├── .editorconfig ├── .gitignore ├── .travis.yml ├── AUTHORS.rst ├── CHANGELOG.rst ├── CONTRIBUTING.rst ├── LICENSE ├── Makefile ├── README.rst ├── cookiecutter.json ├── hooks └── post_gen_project.py ├── requirements ├── ci.pip ├── dev.pip └── test-local.pip ├── setup.cfg ├── test_develop.sh ├── test_manifest.sh ├── tox.ini └── {{ cookiecutter.repo_name }} ├── .bumpversion.cfg ├── .editorconfig ├── .gitignore ├── CONTRIBUTING.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── docs ├── Makefile ├── _static │ └── .gitkeep ├── conf.py ├── contributing.rst ├── deployment.rst ├── index.rst ├── installation.rst ├── make.bat ├── ref │ ├── config.rst │ └── index.rst ├── releases.rst └── settings.rst ├── envs └── dev │ ├── DEFAULT_DATABASE_URL │ ├── DJANGO_DEBUG │ ├── DJANGO_DEFAULT_CONN_MAX_AGE │ ├── DJANGO_TEMPLATES_TEMPLATE_DEBUG │ └── PGPASSWORD ├── manage.py ├── pep257.sh ├── requirements ├── ci.pip ├── constraints.pip ├── dev.pip ├── docs.pip ├── forks.pip ├── mailgun.pip ├── test-local.pip └── test.pip ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── conftest.py └── test_context_processors.py ├── tox.ini └── {{ cookiecutter.pkg_name }} ├── __init__.py ├── apps └── __init__.py ├── config ├── __init__.py ├── app_template │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ └── views.py ├── settings │ ├── __init__.py │ ├── common.py │ ├── databases.py │ ├── dev.py │ ├── email.py │ ├── public.py │ ├── test.py │ └── values.py ├── urls.py └── wsgi.py ├── context_processors.py ├── fixtures └── sites.json ├── media └── .gitkeep ├── static ├── css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ └── main.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff └── js │ ├── main.js │ └── vendor │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jquery-1.11.0.min.js │ └── modernizr-2.6.2-respond-1.1.0.min.js ├── static_root └── .gitkeep └── templates ├── 403.html ├── 404.html ├── 500.html └── base.html /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.yml] 14 | indent_size = 2 15 | 16 | [LICENSE] 17 | insert_final_newline = false 18 | 19 | [Makefile] 20 | indent_style = tab 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .python-version 2 | .tox 3 | my-project 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: python 2 | python: 3.5 3 | cache: 4 | directories: 5 | - ~/.cache/pip 6 | install: 7 | - pip install -r requirements/ci.pip 8 | env: 9 | - TOXENV=py27 10 | - TOXENV=py34 11 | - TOXENV=py35 12 | - TOXENV=pypy 13 | - TOXENV=docs 14 | - TOXENV=flake8 15 | - TOXENV=isort 16 | - TOXENV=project-tox-docs 17 | - TOXENV=project-tox-flake8 18 | - TOXENV=project-tox-isort 19 | - TOXENV=project-tox-manifest 20 | - TOXENV=project-tox-pep257 21 | - TOXENV=project-tox-py27 22 | - TOXENV=project-tox-py35 23 | - TOXENV=py27-project-develop 24 | - TOXENV=py34-project-develop 25 | - TOXENV=py35-project-develop 26 | services: 27 | - postgresql 28 | addons: 29 | postgresql: "9.4" 30 | script: 31 | - make test 32 | sudo: false 33 | notifications: 34 | slack: 35 | secure: ic70R8NJdSRtGvpOS2xJzegUTD/vVzgvz47rGmBCt2d0pW01IUA1pZ/KGAMj17F0dqhuv/RKlXex9TagHzf0AyEWOiFj5cr/zJyWKxtXsMhzJnpGwltMoE44lHfNW79xHXyEaRDRPdo1NwVvtDG4KYAocseMHMhCPhuB1TJohdo= 36 | -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | Development Lead 2 | ================ 3 | 4 | * `Markus Zapke-Gründemann `_ 5 | 6 | Contributors 7 | ============ 8 | 9 | * `René Muhl `_ 10 | * `Max Brauer `_ 11 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | ********** 2 | Change Log 3 | ********** 4 | 5 | 2015-12-15 6 | ========== 7 | 8 | Added 9 | ----- 10 | 11 | * Added a pip constraints file 12 | 13 | Changed 14 | ------- 15 | 16 | * Improved settings and settings documentation 17 | 18 | 2015-12-10 19 | ========== 20 | 21 | Added 22 | ----- 23 | 24 | * Added django-template-debug 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | ************ 2 | Contributing 3 | ************ 4 | 5 | Contributions are welcome, and they are greatly appreciated! Every little bit 6 | helps, and credit will always be given. 7 | 8 | You can contribute in many ways: 9 | 10 | Types of Contributions 11 | ====================== 12 | 13 | Report Bugs 14 | ----------- 15 | 16 | Report bugs at the `GitHub issue tracker 17 | `_. 18 | 19 | If you are reporting a bug, please include: 20 | 21 | * Your operating system name and version. 22 | * Any details about your local setup that might be helpful in troubleshooting. 23 | * Detailed steps to reproduce the bug. 24 | 25 | Fix Bugs 26 | -------- 27 | 28 | Look through the GitHub issues for bugs. Anything tagged with "bug" is open to 29 | whoever wants to implement it. 30 | 31 | Implement Features 32 | ------------------ 33 | 34 | Look through the GitHub issues for features. Anything tagged with "feature" is 35 | open to whoever wants to implement it. 36 | 37 | Write Documentation 38 | ------------------- 39 | 40 | cookiecutter-django-project could always use more documentation, whether as 41 | part of the official cookiecutter-django-project docs, in docstrings, or even 42 | on the web in blog posts, articles, and such. 43 | 44 | Submit Feedback 45 | --------------- 46 | 47 | The best way to send feedback is to file an issue at the `GitHub issue tracker 48 | `_. 49 | 50 | If you are proposing a feature: 51 | 52 | * Explain in detail how it would work. 53 | * Keep the scope as narrow as possible, to make it easier to implement. 54 | * Remember that this is a volunteer-driven project, and that 55 | contributions are welcome :) 56 | 57 | Get Started! 58 | ============ 59 | 60 | Ready to contribute? Here's how to set up `cookiecutter-django-project` for 61 | local development. 62 | 63 | 1. Fork the `cookiecutter-django-project` repo on GitHub. 64 | 2. Clone your fork locally: 65 | 66 | :: 67 | 68 | $ git clone git@github.com:your_name_here/cookiecutter-django-project.git 69 | 70 | 3. Install your local copy into a virtualenv. Assuming you have 71 | virtualenvwrapper installed, this is how you set up your fork for local 72 | development: 73 | 74 | :: 75 | 76 | $ mkvirtualenv cookiecutter-django-project 77 | $ cd cookiecutter-django-project 78 | $ make develop 79 | 80 | 4. Create a branch for local development: 81 | 82 | :: 83 | 84 | $ git checkout -b name-of-your-bugfix-or-feature 85 | 86 | Now you can make your changes locally. 87 | 88 | 5. When you're done making changes, check that your changes can build with 89 | cookiecutter and the created project template is working with Python 2 and 90 | Python 3: 91 | 92 | :: 93 | 94 | $ make test 95 | 96 | 6. Commit your changes and push your branch to GitHub: 97 | 98 | :: 99 | 100 | $ git add . 101 | $ git commit -m "Your detailed description of your changes." 102 | $ git push origin name-of-your-bugfix-or-feature 103 | 104 | 7. Submit a pull request through the GitHub website. 105 | 106 | Pull Request Guidelines 107 | ======================= 108 | 109 | Before you submit a pull request, check that it meets these guidelines: 110 | 111 | 1. The pull request should include tests. 112 | 2. If the pull request adds functionality, the docs should be updated. Put 113 | your new functionality into a function with a docstring, and add the 114 | feature to the list in `README.rst`. 115 | 3. The pull request should work for Python 2.7 and 3.5. Check 116 | `Travis CI `_ 117 | and make sure that the tests pass for all supported Python versions. 118 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, transcode 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 20 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 22 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 25 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PORT ?= 8000 2 | 3 | .PHONY: help clean clean-backups clean-pyc clean-test develop test 4 | 5 | help: 6 | @echo "Please use 'make ' where is one of" 7 | @echo " clean to remove all test and Python artifacts (does not remove backups)" 8 | @echo " clean-backups to remove backup files created by editors and Git" 9 | @echo " clean-pyc to remove Python file artifacts" 10 | @echo " clean-test to remove test artifacts" 11 | @echo " develop to install (or update) all packages required for development" 12 | @echo " isort to run isort on the whole project" 13 | @echo " open-project-docs to open the project documentation in the default browser" 14 | @echo " serve-project-docs to serve the project documentation in the default browser" 15 | @echo " test to run unit tests on every Python version with tox" 16 | 17 | 18 | clean: clean-test clean-pyc 19 | 20 | clean-backups: 21 | find . -name '*~' -delete 22 | find . -name '*.orig' -delete 23 | find . -name '*.swp' -delete 24 | 25 | clean-pyc: 26 | find . -name '*.pyc' -delete 27 | find . -name '*.pyo' -delete 28 | find . -name '__pycache__' -delete 29 | 30 | clean-test: 31 | rm -fr .cache/ 32 | rm -fr .tox/ 33 | 34 | develop: 35 | pip install -U pip setuptools wheel 36 | pip install -U -r requirements/dev.pip -r requirements/test-local.pip 37 | 38 | isort: 39 | isort --recursive hooks/ 40 | 41 | open-project-docs: 42 | python -c "import os, webbrowser; webbrowser.open('file://{}/.tox/project-tox-docs/tmp/my-project/.tox/docs/tmp/html/index.html'.format(os.getcwd()))" 43 | 44 | serve-project-docs: 45 | python -c "import webbrowser; webbrowser.open('http://127.0.0.1:$(PORT)')" 46 | cd .tox/project-tox-docs/tmp/my-project/.tox/docs/tmp/html/; python -m http.server $(PORT) 47 | 48 | test: 49 | tox 50 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | *************************** 2 | cookiecutter-django-project 3 | *************************** 4 | 5 | .. image:: https://img.shields.io/travis/transcode-de/cookiecutter-django-project/master.svg 6 | :target: https://travis-ci.org/transcode-de/cookiecutter-django-project 7 | :alt: Build Status 8 | 9 | .. image:: https://img.shields.io/requires/github/transcode-de/cookiecutter-django-project.svg 10 | :target: https://requires.io/github/transcode-de/cookiecutter-django-project/requirements/?branch=master 11 | :alt: Requirements Status 12 | 13 | .. image:: https://badge.waffle.io/transcode-de/cookiecutter-django-project.svg?label=ready&title=issues%20ready 14 | :target: https://waffle.io/transcode-de/cookiecutter-django-project 15 | :alt: 'Stories in Ready' 16 | 17 | A `Cookiecutter `_ template we use for 18 | Django projects at `transcode `_. 19 | 20 | What makes this cookiecutter template special? 21 | 22 | * Fully tested cookiecutter template (Python 2, 3 and PyPy) 23 | * The Django project can be build as a Python package, which simplifies 24 | distribution and installation 25 | * Comes with a simple, modern Django app template 26 | * Up-to-date requirements 27 | * Configured to work with PostgreSQL, including easy creation of user and 28 | database 29 | * All Django settings can be easily configured for different environments like 30 | ``dev`` or ``prod`` using environment variables 31 | * Django third-party packages like django-braces, django-crispy-forms, 32 | django-debug-toolbar, django-devserver, django-model-utils and 33 | django-template-debug are already installed 34 | * IPython for a powerfull Python and Django shell 35 | * A set of basic Django HTML templates is included 36 | * Includes a ``Makefile`` which helps with all the every-day tasks 37 | * pdb++ and Werkzeug for better debugging 38 | * An extensive collection of lint tools for Python code, documentation and 39 | packaging 40 | * Prepared for testing with pytest-django, including libraries like faker, 41 | factory_boy, fauxfactory and freezegun as well as a few useful pytest 42 | fixtures 43 | * Measuring of test coverage for Python code and Django templates 44 | * A set of tox environments to test the project with different Python versions 45 | and all lint tools 46 | * pg-activity and Glances to monitor your development machine 47 | * bumpversion makes it easy to increment the version number in several files at 48 | once with a single command 49 | * Includes configurations for different email backends (SMTP, Mailgun) 50 | * Prepared for reporting to a `Sentry `_ server 51 | * Comes with a project documentation built with Sphinx using the alabaster 52 | theme, including pages for installation, settings, releases, deployment and 53 | contributing 54 | 55 | Batteries included 56 | ================== 57 | 58 | .. class:: compact 59 | 60 | * `Django 1.8 `_ 61 | * `Initializr 4.0 `_ HTML5 template 62 | 63 | * `Bootstrap 3.1.1 `_ 64 | * `HTML5 Boilerplate 4.3.0 `_ 65 | * `jQuery 1.11.0 `_ 66 | 67 | * `django-braces `_ 68 | * `django-crispy-forms `_ 69 | * `django-grappelli `_ 70 | * `django-model-utils `_ 71 | * `psycopg2 `_ 72 | * `Sphinx `_ 73 | 74 | Configuration 75 | ------------- 76 | 77 | .. class:: compact 78 | 79 | * `django-configurations `_ 80 | * `dj-database-url `_ 81 | * `envdir `_ 82 | 83 | Development Tools 84 | ----------------- 85 | 86 | .. class:: compact 87 | 88 | * `bumpversion `_ 89 | * `django-debug-toolbar `_ 90 | * `django-devserver `_ 91 | 92 | * `sqlparse `_ 93 | * `Werkzeug `_ 94 | 95 | * `django-template-debug `_ 96 | * `Glances `_ 97 | * `IPython `_ 98 | * `pdb++ `_ 99 | * `pg_activity `_ 100 | 101 | Lint Tools 102 | ---------- 103 | 104 | .. class:: compact 105 | 106 | * `check-manifest `_ 107 | * `doc8 `_ 108 | * `flake8 `_ 109 | * `isort `_ 110 | * `pep257 `_ 111 | 112 | Testing 113 | ------- 114 | 115 | .. class:: compact 116 | 117 | * `coverage `_ 118 | * `django-coverage-plugin `_ 119 | * `factory_boy `_ 120 | * `faker `_ 121 | * `fauxfactory `_ 122 | * `freezegun `_ 123 | * `pytest `_ 124 | * `pytest-django `_ 125 | * `pytest-factoryboy `_ 126 | * `pytest-faker `_ 127 | * `tox `_ 128 | * `tox-pyenv `_ 129 | 130 | Creating a new Project 131 | ====================== 132 | 133 | First you have to install `Cookiecutter `_: 134 | 135 | :: 136 | 137 | $ pip install cookiecutter 138 | 139 | After that change to the directory where you want to create a your new Django 140 | project in. Then set up the project using this cookiecutter template like so: 141 | 142 | :: 143 | 144 | $ cookiecutter gh:transcode-de/cookiecutter-django-project 145 | 146 | You have to answer a few questions to configure the project. The defaults are 147 | good for transcode projects - surely you want to override them for yours. 148 | 149 | Next Steps 150 | ========== 151 | 152 | Change into your newly created project directory and execute the following 153 | commands to get started. 154 | 155 | You should create a new virtualenv for the project: 156 | 157 | :: 158 | 159 | $ mkvirtualenv -a `pwd` my-project 160 | 161 | 162 | Install the packages for development: 163 | 164 | :: 165 | 166 | $ make develop 167 | 168 | Then create the new PostgreSQL user and database: 169 | 170 | :: 171 | 172 | $ make create-db-user 173 | $ make create-db 174 | 175 | The next step is to create the Django app(s) you want for the project. Just run 176 | the ``startapp`` task to create new Django app(s): 177 | 178 | :: 179 | 180 | $ make startapp 181 | 182 | Now create the database tables: 183 | 184 | :: 185 | 186 | $ make migrate 187 | 188 | And create a new Django superuser: 189 | 190 | :: 191 | 192 | $ envdir envs/dev/ python manage.py createsuperuser 193 | 194 | Finally start the development webserver: 195 | 196 | :: 197 | 198 | $ make runserver 199 | 200 | To see the other targets available in the ``Makefile`` simply run: 201 | 202 | :: 203 | 204 | $ make 205 | 206 | Detailed installation instructions can be found in your new project under 207 | ``docs/installation.rst``. 208 | 209 | License 210 | ======= 211 | 212 | This project is licensed under the New BSD License. See ``LICENSE`` for the 213 | full license. 214 | -------------------------------------------------------------------------------- /cookiecutter.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "My Project", 3 | "repo_name": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}", 4 | "pkg_name": "{{ cookiecutter.repo_name|replace('-', '') }}", 5 | "author_name": "transcode", 6 | "github_account": "transcode-de", 7 | "email": "noreply@example.com", 8 | "error_email": "errors@example.com", 9 | "domain": "www.example.com", 10 | "description": "A short description of the project.", 11 | "year": "2015", 12 | "version": "0.1.0", 13 | "license": "BSD" 14 | } 15 | -------------------------------------------------------------------------------- /hooks/post_gen_project.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | if '{{ cookiecutter.license|lower }}' != 'bsd': 4 | os.remove('./LICENSE') 5 | -------------------------------------------------------------------------------- /requirements/ci.pip: -------------------------------------------------------------------------------- 1 | # This file is used for testing on continuous integration servers with tox. 2 | 3 | tox==2.3.1 4 | -------------------------------------------------------------------------------- /requirements/dev.pip: -------------------------------------------------------------------------------- 1 | # This file is used for all packages required for local development. 2 | 3 | cookiecutter==1.4.0 4 | isort==4.2.5 5 | -------------------------------------------------------------------------------- /requirements/test-local.pip: -------------------------------------------------------------------------------- 1 | # This file is used for local testing with tox. 2 | 3 | tox-pyenv==1.0.3 4 | tox==2.3.1 5 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [flake8] 2 | ignore = E128 3 | max-line-length = 99 4 | 5 | [isort] 6 | line_length = 99 7 | -------------------------------------------------------------------------------- /test_develop.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Set up a development environment and run the test suite. 4 | 5 | set -o errexit 6 | set -o nounset 7 | set -o pipefail 8 | 9 | export PYTHONIOENCODING=UTF-8 10 | cd my-project 11 | 12 | # Set up the development environment 13 | make develop 14 | PG_UUID=`faker uuid4` 15 | psql -d postgres -c "CREATE USER \"${PG_UUID}\" WITH PASSWORD '${PG_UUID}' CREATEDB;" 16 | echo ${PG_UUID} > envs/dev/PGPASSWORD 17 | echo "postgres://${PG_UUID}:${PG_UUID}@localhost/${PG_UUID}" > envs/dev/DEFAULT_DATABASE_URL 18 | 19 | # Run the tests and collect coverage data 20 | cat >> tests/test_context_processors.py <`_. 18 | 19 | If you are reporting a bug, please include: 20 | 21 | * Your operating system name and version. 22 | * Any details about your local setup that might be helpful in troubleshooting. 23 | * Detailed steps to reproduce the bug. 24 | 25 | Fix Bugs 26 | -------- 27 | 28 | Look through the GitHub issues for bugs. Anything tagged with "bug" is open to 29 | whoever wants to implement it. 30 | 31 | Implement Features 32 | ------------------ 33 | 34 | Look through the GitHub issues for features. Anything tagged with "feature" or 35 | "help wanted" is open to whoever wants to implement it. 36 | 37 | Write Documentation 38 | ------------------- 39 | 40 | {{ cookiecutter.repo_name }} could always use more documentation, whether as 41 | part of the official {{ cookiecutter.repo_name }} docs, in docstrings, or even 42 | on the web in blog posts, articles, and such. 43 | 44 | Submit Feedback 45 | --------------- 46 | 47 | The best way to send feedback is to file an issue at the `GitHub issue tracker 48 | `_. 49 | 50 | If you are proposing a feature: 51 | 52 | * Explain in detail how it would work. 53 | * Keep the scope as narrow as possible, to make it easier to implement. 54 | * Remember that this is a volunteer-driven project, and that 55 | contributions are welcome :) 56 | 57 | Get Started! 58 | ============ 59 | 60 | Ready to contribute? Here's how to set up `{{ cookiecutter.repo_name }}` for 61 | local development. 62 | 63 | 1. Fork the `{{ cookiecutter.repo_name }}` repo on GitHub. 64 | 2. Clone your fork locally: 65 | 66 | :: 67 | 68 | $ git clone git@github.com:your_name_here/{{ cookiecutter.repo_name }}.git 69 | 70 | 3. Install your local copy into a virtualenv. Assuming you have 71 | virtualenvwrapper installed, this is how you set up your fork for local 72 | development: 73 | 74 | :: 75 | 76 | $ mkvirtualenv {{ cookiecutter.repo_name }} 77 | $ cd {{ cookiecutter.repo_name }} 78 | $ git flow init 79 | $ make develop 80 | $ make create-db-user 81 | 82 | 4. Create a branch for local development: 83 | 84 | :: 85 | 86 | $ git flow feature start name-of-your-bugfix-or-feature 87 | 88 | Now you can make your changes locally. 89 | 90 | 5. When you're done making changes, check that your changes pass the tests, 91 | including testing other Python versions and running all lint tools with tox: 92 | 93 | :: 94 | 95 | $ make test-all 96 | 97 | 6. Commit your changes and push your branch to GitHub: 98 | 99 | :: 100 | 101 | $ git add . 102 | $ git commit -m "Your detailed description of your changes." 103 | $ git push origin name-of-your-bugfix-or-feature 104 | 105 | 7. Submit a pull request through the GitHub website. 106 | 107 | Pull Request Guidelines 108 | ======================= 109 | 110 | Before you submit a pull request, check that it meets these guidelines: 111 | 112 | 1. The pull request should include tests. 113 | 2. If the pull request adds functionality, the docs should be updated. Put 114 | your new functionality into a function with a docstring, and add the 115 | feature to the list in `README.rst`. 116 | 3. The pull request should work for Python 2.7 and 3.5. Check 117 | `Travis CI `_ 118 | and make sure that the tests pass for all supported Python versions. 119 | 120 | Tips 121 | ==== 122 | 123 | To run a subset of tests pass the :option:`-k` inside the :envvar:`TEST_ARGS` 124 | variable to the `:command:`test` command: 125 | 126 | :: 127 | 128 | $ make test TEST_ARGS='-k ' 129 | 130 | The pytest documentation `explains 131 | `_ 132 | how to use the :option:`-k` option. 133 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) {{ cookiecutter.year }}, {{ cookiecutter.author_name }} 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | 1. Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in the 13 | documentation and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived from 17 | this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 20 | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 22 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 25 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 26 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 28 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 29 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include *.rst 2 | include LICENSE 3 | include Makefile 4 | include manage.py 5 | include tox.ini 6 | 7 | exclude .bumpversion.cfg 8 | exclude .editorconfig 9 | exclude pep257.sh 10 | 11 | recursive-include docs *.rst .gitkeep conf.py Makefile make.bat 12 | recursive-include requirements *.pip 13 | 14 | recursive-exclude * __pycache__ 15 | recursive-exclude * *.py[co] 16 | 17 | graft {{ cookiecutter.pkg_name }} 18 | graft tests 19 | 20 | prune envs 21 | prune {{ cookiecutter.pkg_name }}/.cache 22 | prune {{ cookiecutter.pkg_name }}/media 23 | include {{ cookiecutter.pkg_name }}/media/.gitkeep 24 | prune {{ cookiecutter.pkg_name }}/static_root 25 | include {{ cookiecutter.pkg_name }}/static_root/.gitkeep 26 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/Makefile: -------------------------------------------------------------------------------- 1 | BUILDDIR ?= _build 2 | ENV ?= dev 3 | PORT ?= 8000 4 | SPHINXOPTS = 5 | 6 | define CMDS 7 | ifeq ($(1), runserver) 8 | envdir envs/$(ENV) {{ cookiecutter.pkg_name }}/manage.py$(1)$(PORT) 9 | else 10 | $(1): 11 | envdir envs/$(ENV) {{ cookiecutter.pkg_name }}/manage.py$(1) 12 | endif 13 | endef 14 | 15 | $(eval $(call CMDS, $(cmd))) 16 | 17 | .PHONY: help clean clean-build clean-docs clean-pyc clean-test cmd coverage coverage-html \ 18 | create-db develop docs isort livehtml migrate open-docs runserver shell startapp test \ 19 | test-all test-upload upload 20 | 21 | help: 22 | @echo "Please use 'make ' where is one of" 23 | @echo " clean to remove all build, test, coverage and Python artifacts (does not remove backups)" 24 | @echo " clean-backups to remove backup files created by editors and Git" 25 | @echo " clean-build to remove build artifacts" 26 | @echo " clean-docs to remove documentation artifacts" 27 | @echo " clean-pyc to remove Python file artifacts" 28 | @echo " clean-test to remove test and coverage artifacts" 29 | @echo " cmd= to use any other manage.py command" 30 | @echo " coverage to generate a coverage report with the default Python" 31 | @echo " coverage-html to generate and open a HTML coverage report with the default Python" 32 | @echo " create-db to create a new PostgreSQL database" 33 | @echo " create-db-user to create a new PostgreSQL user" 34 | @echo " drop-db to drop the PostgreSQL database" 35 | @echo " drop-db-user to drop the PostgreSQL user" 36 | @echo " develop to install (or update) all packages required for development" 37 | @echo " dist to package a release" 38 | @echo " docs to build the project documentation as HTML" 39 | @echo " isort to run isort on the whole project" 40 | @echo " livehtml to open documentation in browser and rebuild automatically" 41 | @echo " migrate to synchronize Django's database state with the current set of models and migrations" 42 | @echo " open-docs to open the project documentation in the default browser" 43 | @echo " runserver to start Django's development Web server" 44 | @echo " shell to start a Python interactive interpreter" 45 | @echo " startapp to create a new Django app" 46 | @echo " test to run unit tests quickly with the default Python" 47 | @echo " test-all to run unit tests on every Python version with tox" 48 | @echo " test-upload to upload a release to test PyPI using twine" 49 | @echo " upload to upload a release using twine" 50 | 51 | 52 | clean: clean-build clean-docs clean-test clean-pyc 53 | 54 | clean-backups: 55 | find . -name '*~' -delete 56 | find . -name '*.orig' -delete 57 | find . -name '*.swp' -delete 58 | 59 | clean-build: 60 | rm -fr build/ 61 | rm -fr dist/ 62 | rm -fr *.egg-info 63 | 64 | clean-docs: 65 | $(MAKE) -C docs clean BUILDDIR=$(BUILDDIR) 66 | 67 | clean-pyc: 68 | find . -name '*.pyc' -delete 69 | find . -name '*.pyo' -delete 70 | find . -name '__pycache__' -delete 71 | 72 | clean-test: 73 | rm -fr .cache/ 74 | rm -fr .tox/ 75 | coverage erase 76 | rm -fr htmlcov/ 77 | 78 | cmd: 79 | @echo " cmd Please use 'make cmd='" 80 | 81 | coverage: 82 | envdir envs/$(ENV) coverage run -m pytest $(TEST_ARGS) tests/ 83 | coverage report 84 | 85 | coverage-html: coverage 86 | coverage html 87 | python -c "import os, webbrowser; webbrowser.open('file://{}/htmlcov/index.html'.format(os.getcwd()))" 88 | 89 | create-db: 90 | envdir envs/$(ENV) createdb -U {{ cookiecutter.repo_name }} -l en_US.utf-8 -E utf-8 -O {{ cookiecutter.repo_name }} -T template0 -e {{ cookiecutter.repo_name }} 91 | 92 | create-db-user: 93 | psql -d postgres -c "CREATE USER \"{{ cookiecutter.repo_name }}\" WITH PASSWORD '{{ cookiecutter.repo_name }}' CREATEDB;" 94 | 95 | drop-db: 96 | envdir envs/$(ENV) dropdb -i -e -U {{ cookiecutter.repo_name }} {{ cookiecutter.repo_name }} 97 | 98 | drop-db-user: 99 | dropuser -i -e {{ cookiecutter.repo_name }} 100 | 101 | develop: 102 | pip install -U pip setuptools wheel 103 | pip install -U -c requirements/constraints.pip -e . 104 | pip install -U -c requirements/constraints.pip -r requirements/dev.pip 105 | 106 | dist: clean 107 | python setup.py sdist bdist_wheel 108 | ls -l dist 109 | 110 | docs: 111 | $(MAKE) -C docs html BUILDDIR=$(BUILDDIR) SPHINXOPTS='$(SPHINXOPTS)' 112 | 113 | isort: 114 | isort --recursive setup.py {{ cookiecutter.pkg_name }}/ tests/ 115 | 116 | livehtml: docs 117 | $(MAKE) -C docs livehtml BUILDDIR=$(BUILDDIR) SPHINXOPTS='$(SPHINXOPTS)' 118 | 119 | migrate: 120 | envdir envs/$(ENV) python manage.py migrate 121 | 122 | open-docs: 123 | python -c "import os, webbrowser; webbrowser.open('file://{}/docs/{}/html/index.html'.format(os.getcwd(), '$(BUILDDIR)'))" 124 | 125 | runserver: 126 | envdir envs/$(ENV) python manage.py runserver $(PORT) 127 | 128 | shell: 129 | envdir envs/$(ENV) python manage.py shell 130 | 131 | startapp: 132 | @read -p "Enter the name of the new Django app: " app_name; \ 133 | app_name_title=`python -c "import sys; sys.stdout.write(sys.argv[1].title())" $$app_name`; \ 134 | mkdir -p {{ cookiecutter.pkg_name }}/apps/$$app_name; \ 135 | envdir envs/$(ENV) python manage.py startapp $$app_name {{ cookiecutter.pkg_name }}/apps/$$app_name --template {{ cookiecutter.pkg_name }}/config/app_template; \ 136 | echo "Don't forget to add '{{ cookiecutter.pkg_name }}.apps."$$app_name".apps."$$app_name_title"Config' to INSTALLED_APPS in '{{ cookiecutter.pkg_name }}.config/settings/common.py'!" 137 | 138 | test: 139 | envdir envs/$(ENV) python -m pytest $(TEST_ARGS) tests/ 140 | 141 | test-all: 142 | tox 143 | 144 | test-upload: 145 | twine upload -r test -s dist/* 146 | python -c "import webbrowser; webbrowser.open('https://testpypi.python.org/pypi/{{ cookiecutter.pkg_name }}')" 147 | 148 | upload: 149 | twine upload -s dist/* 150 | python -c "import webbrowser; webbrowser.open('https://pypi.python.org/pypi/{{ cookiecutter.pkg_name }}')" 151 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/README.rst: -------------------------------------------------------------------------------- 1 | ******************************* 2 | {{ cookiecutter.project_name }} 3 | ******************************* 4 | 5 | .. image:: https://img.shields.io/codecov/c/token//github/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}/develop.svg 6 | :target: http://codecov.io/github/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}?branch=develop 7 | :alt: Coverage Status 8 | 9 | .. image:: https://requires.io/github/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}/requirements.svg?branch=develop 10 | :target: https://requires.io/github/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}/requirements/?branch=develop 11 | :alt: Requirements Status 12 | 13 | {{ cookiecutter.description }} 14 | 15 | Detailed installation instructions for this Djangp project can be found in 16 | ``docs/installation.rst``. 17 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext livehtml 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | @echo " livehtml to open documentation in browser and rebuild automatically" 49 | 50 | clean: 51 | rm -rf $(BUILDDIR)/* 52 | 53 | html: 54 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 55 | @echo 56 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 57 | 58 | dirhtml: 59 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 60 | @echo 61 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 62 | 63 | singlehtml: 64 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 65 | @echo 66 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 67 | 68 | pickle: 69 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 70 | @echo 71 | @echo "Build finished; now you can process the pickle files." 72 | 73 | json: 74 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 75 | @echo 76 | @echo "Build finished; now you can process the JSON files." 77 | 78 | htmlhelp: 79 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 80 | @echo 81 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 82 | ".hhp project file in $(BUILDDIR)/htmlhelp." 83 | 84 | qthelp: 85 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 86 | @echo 87 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 88 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 89 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/{{ cookiecutter.repo_name }}.qhcp" 90 | @echo "To view the help file:" 91 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/{{ cookiecutter.repo_name }}.qhc" 92 | 93 | devhelp: 94 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 95 | @echo 96 | @echo "Build finished." 97 | @echo "To view the help file:" 98 | @echo "# mkdir -p $$HOME/.local/share/devhelp/{{ cookiecutter.repo_name }}" 99 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/{{ cookiecutter.repo_name }}" 100 | @echo "# devhelp" 101 | 102 | epub: 103 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 104 | @echo 105 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 106 | 107 | latex: 108 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 109 | @echo 110 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 111 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 112 | "(use \`make latexpdf' here to do that automatically)." 113 | 114 | latexpdf: 115 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 116 | @echo "Running LaTeX files through pdflatex..." 117 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 118 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 119 | 120 | latexpdfja: 121 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 122 | @echo "Running LaTeX files through platex and dvipdfmx..." 123 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 124 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 125 | 126 | text: 127 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 128 | @echo 129 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 130 | 131 | man: 132 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 133 | @echo 134 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 135 | 136 | texinfo: 137 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 138 | @echo 139 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 140 | @echo "Run \`make' in that directory to run these through makeinfo" \ 141 | "(use \`make info' here to do that automatically)." 142 | 143 | info: 144 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 145 | @echo "Running Texinfo files through makeinfo..." 146 | make -C $(BUILDDIR)/texinfo info 147 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 148 | 149 | gettext: 150 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 151 | @echo 152 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 153 | 154 | changes: 155 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 156 | @echo 157 | @echo "The overview file is in $(BUILDDIR)/changes." 158 | 159 | linkcheck: 160 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 161 | @echo 162 | @echo "Link check complete; look for any errors in the above output " \ 163 | "or in $(BUILDDIR)/linkcheck/output.txt." 164 | 165 | doctest: 166 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 167 | @echo "Testing of doctests in the sources finished, look at the " \ 168 | "results in $(BUILDDIR)/doctest/output.txt." 169 | 170 | xml: 171 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 172 | @echo 173 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 174 | 175 | pseudoxml: 176 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 177 | @echo 178 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 179 | 180 | livehtml: 181 | sphinx-autobuild --open-browser -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 182 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/_static/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/docs/_static/.gitkeep -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # {{ cookiecutter.project_name }} documentation build configuration file. 4 | # 5 | # This file is execfile()d with the current directory set to its 6 | # containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import os 15 | 16 | import alabaster 17 | 18 | # If extensions (or modules to document with autodoc) are in another directory, 19 | # add these directories to sys.path here. If the directory is relative to the 20 | # documentation root, use os.path.abspath to make it absolute, like shown here. 21 | #sys.path.insert(0, os.path.abspath('.')) 22 | 23 | # -- General configuration ------------------------------------------------ 24 | 25 | # If your documentation needs a minimal Sphinx version, state it here. 26 | needs_sphinx = '1.3' 27 | 28 | # Add any Sphinx extension module names here, as strings. They can be 29 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom 30 | # ones. 31 | extensions = [ 32 | 'sphinx.ext.autodoc', 33 | 'sphinx.ext.extlinks', 34 | 'sphinx.ext.ifconfig', 35 | 'alabaster', 36 | ] 37 | 38 | # Add any paths that contain templates here, relative to this directory. 39 | templates_path = ['_templates'] 40 | 41 | # The suffix of source filenames. 42 | source_suffix = '.rst' 43 | 44 | # The encoding of source files. 45 | #source_encoding = 'utf-8-sig' 46 | 47 | # The master toctree document. 48 | master_doc = 'index' 49 | 50 | # General information about the project. 51 | project = u'{{ cookiecutter.project_name }}' 52 | copyright = u'{{ cookiecutter.year }}, {{ cookiecutter.author_name }}' 53 | 54 | # The version info for the project you're documenting, acts as replacement for 55 | # |version| and |release|, also used in various other places throughout the 56 | # built documents. 57 | # 58 | # The short X.Y version. 59 | version = '{{ cookiecutter.version }}' 60 | # The full version, including alpha/beta/rc tags. 61 | release = '{{ cookiecutter.version }}' 62 | 63 | # The language for content autogenerated by Sphinx. Refer to documentation 64 | # for a list of supported languages. 65 | #language = None 66 | 67 | # There are two options for replacing |today|: either, you set today to some 68 | # non-false value, then it is used: 69 | #today = '' 70 | # Else, today_fmt is used as the format for a strftime call. 71 | #today_fmt = '%B %d, %Y' 72 | 73 | # List of patterns, relative to source directory, that match files and 74 | # directories to ignore when looking for source files. 75 | exclude_patterns = ['_build'] 76 | 77 | # The reST default role (used for this markup: `text`) to use for all 78 | # documents. 79 | #default_role = None 80 | 81 | # If true, '()' will be appended to :func: etc. cross-reference text. 82 | #add_function_parentheses = True 83 | 84 | # If true, the current module name will be prepended to all description 85 | # unit titles (such as .. function::). 86 | #add_module_names = True 87 | 88 | # If true, sectionauthor and moduleauthor directives will be shown in the 89 | # output. They are ignored by default. 90 | #show_authors = False 91 | 92 | # The name of the Pygments (syntax highlighting) style to use. 93 | pygments_style = 'sphinx' 94 | 95 | # A list of ignored prefixes for module index sorting. 96 | #modindex_common_prefix = [] 97 | 98 | # If true, keep warnings as "system message" paragraphs in the built documents. 99 | #keep_warnings = False 100 | 101 | 102 | # -- Options for HTML output ---------------------------------------------- 103 | 104 | # The theme to use for HTML and HTML Help pages. See the documentation for 105 | # a list of builtin themes. 106 | html_theme = 'alabaster' 107 | 108 | # Theme options are theme-specific and customize the look and feel of a theme 109 | # further. For a list of options available for each theme, see the 110 | # documentation. 111 | html_theme_options = { 112 | # Relative path (from $PROJECT/_static/) to a logo image, which will appear 113 | # in the upper left corner above the name of the project. 114 | # 'logo': 'logo.png', 115 | 'logo_name': True, 116 | 'description': '', 117 | 'github_user': '{{ cookiecutter.github_account }}', 118 | 'github_repo': '{{ cookiecutter.repo_name }}', 119 | 'github_button': True, 120 | 'github_banner': False, 121 | 'travis_button': False, 122 | 'extra_nav_links': { 123 | 'CodeCov': 'http://codecov.io/github/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}?branch=develop', 124 | 'requires.io': 'https://requires.io/github/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}/requirements/?branch=develop', 125 | }, 126 | 'analytics_id': '', 127 | 'show_related': False, 128 | } 129 | # Add any paths that contain custom themes here, relative to this directory. 130 | html_theme_path = [alabaster.get_path()] 131 | 132 | # The name for this set of Sphinx documents. If None, it defaults to 133 | # " v documentation". 134 | #html_title = None 135 | 136 | # A shorter title for the navigation bar. Default is the same as html_title. 137 | #html_short_title = None 138 | 139 | # The name of an image file (relative to this directory) to place at the top 140 | # of the sidebar. 141 | #html_logo = None 142 | 143 | # The name of an image file (within the static path) to use as favicon of the 144 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 145 | # pixels large. 146 | #html_favicon = None 147 | 148 | # Add any paths that contain custom static files (such as style sheets) here, 149 | # relative to this directory. They are copied after the builtin static files, 150 | # so a file named "default.css" will overwrite the builtin "default.css". 151 | html_static_path = ['_static'] 152 | 153 | # Add any extra paths that contain custom files (such as robots.txt or 154 | # .htaccess) here, relative to this directory. These files are copied 155 | # directly to the root of the documentation. 156 | #html_extra_path = [] 157 | 158 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 159 | # using the given strftime format. 160 | #html_last_updated_fmt = '%b %d, %Y' 161 | 162 | # If true, SmartyPants will be used to convert quotes and dashes to 163 | # typographically correct entities. 164 | #html_use_smartypants = True 165 | 166 | # Custom sidebar templates, maps document names to template names. 167 | html_sidebars = { 168 | '**': [ 169 | 'about.html', 170 | 'navigation.html', 171 | 'relations.html', 172 | 'searchbox.html', 173 | 'donate.html', 174 | ] 175 | } 176 | 177 | # Additional templates that should be rendered to pages, maps page names to 178 | # template names. 179 | #html_additional_pages = {} 180 | 181 | # If false, no module index is generated. 182 | #html_domain_indices = True 183 | 184 | # If false, no index is generated. 185 | #html_use_index = True 186 | 187 | # If true, the index is split into individual pages for each letter. 188 | #html_split_index = False 189 | 190 | # If true, links to the reST sources are added to the pages. 191 | #html_show_sourcelink = True 192 | 193 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 194 | #html_show_sphinx = True 195 | 196 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 197 | #html_show_copyright = True 198 | 199 | # If true, an OpenSearch description file will be output, and all pages will 200 | # contain a tag referring to it. The value of this option must be the 201 | # base URL from which the finished HTML is served. 202 | #html_use_opensearch = '' 203 | 204 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 205 | #html_file_suffix = None 206 | 207 | # Output file base name for HTML help builder. 208 | htmlhelp_basename = '{{ cookiecutter.repo_name }}doc' 209 | 210 | 211 | # -- Options for LaTeX output --------------------------------------------- 212 | 213 | latex_elements = { 214 | # The paper size ('letterpaper' or 'a4paper'). 215 | #'papersize': 'letterpaper', 216 | 217 | # The font size ('10pt', '11pt' or '12pt'). 218 | #'pointsize': '10pt', 219 | 220 | # Additional stuff for the LaTeX preamble. 221 | #'preamble': '', 222 | } 223 | 224 | # Grouping the document tree into LaTeX files. List of tuples 225 | # (source start file, target name, title, 226 | # author, documentclass [howto, manual, or own class]). 227 | latex_documents = [ 228 | ('index', '{{ cookiecutter.repo_name }}.tex', u'{{ cookiecutter.project_name }} Documentation', 229 | u'{{ cookiecutter.author_name }}', 'manual'), 230 | ] 231 | 232 | # The name of an image file (relative to this directory) to place at the top of 233 | # the title page. 234 | #latex_logo = None 235 | 236 | # For "manual" documents, if this is true, then toplevel headings are parts, 237 | # not chapters. 238 | #latex_use_parts = False 239 | 240 | # If true, show page references after internal links. 241 | #latex_show_pagerefs = False 242 | 243 | # If true, show URL addresses after external links. 244 | #latex_show_urls = False 245 | 246 | # Documents to append as an appendix to all manuals. 247 | #latex_appendices = [] 248 | 249 | # If false, no module index is generated. 250 | #latex_domain_indices = True 251 | 252 | 253 | # -- Options for manual page output --------------------------------------- 254 | 255 | # One entry per manual page. List of tuples 256 | # (source start file, name, description, authors, manual section). 257 | man_pages = [ 258 | ('index', '{{ cookiecutter.repo_name }}', u'{{ cookiecutter.project_name }} Documentation', 259 | [u'{{ cookiecutter.author_name }}'], 1) 260 | ] 261 | 262 | # If true, show URL addresses after external links. 263 | #man_show_urls = False 264 | 265 | 266 | # -- Options for Texinfo output ------------------------------------------- 267 | 268 | # Grouping the document tree into Texinfo files. List of tuples 269 | # (source start file, target name, title, author, 270 | # dir menu entry, description, category) 271 | texinfo_documents = [ 272 | ('index', '{{ cookiecutter.repo_name }}', u'{{ cookiecutter.project_name }} Documentation', 273 | u'{{ cookiecutter.author_name }}', '{{ cookiecutter.project_name }}', '{{ cookiecutter.description }}', 274 | 'Miscellaneous'), 275 | ] 276 | 277 | # Documents to append as an appendix to all manuals. 278 | #texinfo_appendices = [] 279 | 280 | # If false, no module index is generated. 281 | #texinfo_domain_indices = True 282 | 283 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 284 | #texinfo_show_urls = 'footnote' 285 | 286 | # If true, do not generate a @detailmenu in the "Top" node's menu. 287 | #texinfo_no_detailmenu = False 288 | 289 | linkcheck_ignore = [ 290 | # Uncomment the next line if the repository on GitHub is private. 291 | #r'https://github.com/{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}.*', 292 | ] 293 | 294 | extlinks = { 295 | 'djangodocs': ('https://docs.djangoproject.com/en/1.8/%s', None) 296 | } 297 | 298 | autodoc_default_flags = ['members', 'undoc-members'] 299 | 300 | # django-configurations setup 301 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ cookiecutter.pkg_name }}.config.settings.dev') 302 | os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') 303 | 304 | from configurations import importer 305 | importer.install() 306 | 307 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTING.rst 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/deployment.rst: -------------------------------------------------------------------------------- 1 | ********** 2 | Deployment 3 | ********** 4 | 5 | .. note:: 6 | 7 | You should extend this chapter with instructions explaining how to deploy 8 | your project and how to install and configure the WSGI and HTTP server(s). 9 | Make sure that you configure the WSGI server to use the right envdir! 10 | 11 | Install the project package and extra requirements 12 | ================================================== 13 | 14 | First install the ``{{ cookiecutter.pkg_name }}`` package. It is very useful 15 | to use a virtualenv for that, there are several good reasons for it. Read the 16 | blog posts `virtualenv Lives! `_ 17 | by Hynek Schlawack and `Fast Immutable Python Deployments 18 | `_ by Peter 19 | Baumgartner to gain a better understanding of the reasons. 20 | 21 | :: 22 | 23 | $ pip install {{ cookiecutter.pkg_name }} 24 | 25 | If you are using `Mailgun `_ install the extra 26 | requirements as well: 27 | 28 | :: 29 | 30 | $ pip install {{ cookiecutter.pkg_name }}[mailgun] 31 | 32 | If you are using `Sentry `_ you have to do the same for 33 | ``raven``: 34 | 35 | :: 36 | 37 | $ pip install {{ cookiecutter.pkg_name }}[raven] 38 | 39 | Configure the project environment 40 | ================================= 41 | 42 | `envdir `_ is used to configure the 43 | project's environment. 44 | 45 | Let's assume we want to deploy a production site. The first step is to create a 46 | :file:`prod` directory which will contain all the files defining the 47 | environment variables: 48 | 49 | :: 50 | 51 | $ mkdir -p envs/prod 52 | 53 | Now create a file to define the configuration class to be used: 54 | 55 | :: 56 | 57 | $ echo "Production" > envs/prod/DJANGO_CONFIGURATION 58 | 59 | Then create the file for the ``DJANGO_SETTINGS_MODULE`` environment variable: 60 | 61 | :: 62 | 63 | $ echo "{{ cookiecutter.pkg_name }}.config.settings.public" > envs/prod/DJANGO_SETTINGS_MODULE 64 | 65 | Now configure the rest of the settings for your Django project. You should make 66 | sure that the following environment variables are set to right values. 67 | 68 | * ``DJANGO_SECRET_KEY`` 69 | * ``DJANGO_ALLOWED_HOSTS`` 70 | * ``DEFAULT_DATABASE_URL`` 71 | * ``DJANGO_MEDIA_ROOT`` 72 | * ``DJANGO_STATIC_ROOT`` 73 | * ``DJANGO_TIME_ZONE`` 74 | * ``DJANGO_DEFAULT_FROM_EMAIL`` 75 | * ``DJANGO_ADMINS`` 76 | * ``DJANGO_SILENCED_SYSTEM_CHECKS`` 77 | 78 | You should not set ``DJANGO_DEBUG`` as the default value is ``False`` by 79 | default which is the right value for production sites. 80 | 81 | Don't forget to configure the email backend you selected. 82 | 83 | Also configure ``DJANGO_RAVEN_CONFIG_DSN`` if you want to use Sentry for 84 | logging. 85 | 86 | Have a look at :doc:`settings` to understand what each setting does. 87 | 88 | Now set the environment's name so that our :file:`Makefile` will use the right 89 | environment: 90 | 91 | :: 92 | 93 | $ export ENV=prod 94 | 95 | .. note:: 96 | 97 | If you want to keep the ``ENV`` variable at this value add it to the 98 | :file:`.bashrc`: 99 | 100 | :: 101 | 102 | $ echo "export ENV=prod" >> ~/.bashrc 103 | 104 | Migrate the database 105 | ==================== 106 | 107 | Then migrate the database: 108 | 109 | :: 110 | 111 | $ make migrate 112 | 113 | Run the deployment checks 114 | ========================= 115 | 116 | Now run the deployment checks: 117 | 118 | :: 119 | 120 | $ envdir envs/prod python manage.py check --deploy 121 | 122 | No security issues should be identified. Otherwise check your configuration or 123 | change ``DJANGO_SILENCED_SYSTEM_CHECKS``. 124 | 125 | Create a new superuser 126 | ====================== 127 | 128 | After that create a new superuser: 129 | 130 | :: 131 | 132 | $ envdir envs/prod python manage.py createsuperuser 133 | 134 | Create and fill the directories for user uploads and static files 135 | ================================================================= 136 | 137 | Finally create the ``MEDIA_ROOT`` and ``STATIC_ROOT`` directories and collect 138 | the static files into the ``STATIC_ROOT`` directory: 139 | 140 | :: 141 | 142 | $ envdir envs/prod python manage.py collectstatic 143 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/index.rst: -------------------------------------------------------------------------------- 1 | *********************************************************** 2 | Welcome to {{ cookiecutter.project_name }}'s documentation! 3 | *********************************************************** 4 | 5 | {{ cookiecutter.description }} 6 | 7 | Contents: 8 | 9 | .. toctree:: 10 | :maxdepth: 3 11 | 12 | installation 13 | settings 14 | releases 15 | deployment 16 | contributing 17 | ref/index 18 | 19 | Indices and tables 20 | ================== 21 | 22 | * :ref:`genindex` 23 | * :ref:`modindex` 24 | * :ref:`search` 25 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/installation.rst: -------------------------------------------------------------------------------- 1 | ************ 2 | Installation 3 | ************ 4 | 5 | Prerequisites 6 | ============= 7 | 8 | pip and setuptools 9 | ------------------ 10 | 11 | Make sure you have the latest versions of `pip 12 | `_ and `setuptools 13 | `_ installed. 14 | 15 | :: 16 | 17 | $ pip --version 18 | 19 | .. note:: 20 | 21 | The package managers of most Linux/Unix distributions usually use outdated 22 | versions of :program:`pip`. Please uninstall the package providing 23 | :program:`pip` (usually it's named ``python-pip``) and :ref:`reinstall it 24 | using the bootstrap script `. 25 | 26 | Install/upgrade pip using ensurepip 27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 28 | 29 | If you have Python 3.4 (or newer) or Python 2.7.9 (or newer) installed you can 30 | use `ensurepip `_ to install 31 | or upgrade :program:`pip`: 32 | 33 | :: 34 | 35 | $ python -m ensurepip --upgrade 36 | 37 | If your Python version is too old you will simply see an error message like 38 | that: 39 | 40 | :: 41 | 42 | $ python -m ensurepip --upgrade 43 | /usr/bin/python: No module named ensurepip 44 | 45 | In this case :ref:`reinstall it using the bootstrap script 46 | `. 47 | 48 | .. _pip_bootstrap_script: 49 | 50 | Install/upgrade pip using the bootstrap script 51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 52 | 53 | :program:`pip` can be installed with the help from a `bootstrap script 54 | `_. If :program:`curl` is installed, you 55 | can use it to download :program:`pip` at the command line. Otherwise just use 56 | the browser. 57 | 58 | :: 59 | 60 | $ curl -O https://bootstrap.pypa.io/get-pip.py 61 | 62 | When the bootstrap script has been downloaded execute it to install 63 | :program:`pip`: 64 | 65 | :: 66 | 67 | $ python get-pip.py 68 | 69 | virtualenvwrapper 70 | ----------------- 71 | 72 | Make sure you have installed the latest version of `virtualenvwrapper 73 | `_. You can use :program:`pip` to 74 | either install or upgrade it: 75 | 76 | :: 77 | 78 | $ pip install -U virtualenvwrapper 79 | 80 | .. note:: 81 | 82 | If you installed :program:`virtualenvwrapper` for the first time, take your 83 | time to read the installation documentation. 84 | 85 | pyenv 86 | ----- 87 | 88 | This project will be tested with different Python versions. You should install 89 | `pyenv `_ to make the installation of different 90 | Python versions as easy as possible. 91 | 92 | Also install `pyenv-virtualenvwrapper `_, a :program:`pyenv` plugin which provides a 94 | :program:`pyenv virtualenvwrapper` command to manage your virtualenvs with 95 | virtualenvwrapper. 96 | 97 | After you have installed and configured :program:`pyenv` and the plugin you can 98 | use the following command in the root of the project to configure the Python 99 | versions to use: 100 | 101 | :: 102 | 103 | $ pyenv local 3.4.3 2.7.9 104 | 105 | .. note:: 106 | 107 | You first have to install the Python versions you want to use using 108 | :program:`pyenv install`. :program:`pyenv install -l` lists all available 109 | versions. 110 | 111 | The first version passed to :program:`pyenv local` will be the main version 112 | used for the project. 113 | 114 | PostgreSQL 115 | ---------- 116 | 117 | Check if PostgreSQL is installed: 118 | 119 | :: 120 | 121 | $ psql --version 122 | 123 | If not, `download `_ and install it for 124 | your operating system. 125 | 126 | EditorConfig 127 | ------------ 128 | 129 | `EditorConfig `_ helps developers define and maintain 130 | consistent coding styles between different editors and IDEs. `Download a plugin 131 | `_ for your favourite editor to enable it to 132 | read the file format and adhere to the defined styles. 133 | 134 | Development Setup 135 | ================= 136 | 137 | Git and git-flow 138 | ---------------- 139 | 140 | Clone the repository using `Git `_: 141 | 142 | :: 143 | 144 | $ git clone git@github.com:{{ cookiecutter.github_account }}/{{ cookiecutter.repo_name }}.git 145 | 146 | Then change into the cloned repository: 147 | 148 | :: 149 | 150 | $ cd {{ cookiecutter.repo_name }} 151 | 152 | We are using `git-flow `_, a set of git 153 | extensions for a branching model introduced by Vincent Driessen. You can read 154 | more about it on `Vincent's blog 155 | `_, where you can also 156 | find a `high-quality PDF illustrating the model 157 | `_. For your daily workflow 158 | there also the `git-flow cheatsheet 159 | `_ created by Daniel 160 | Kummer, which is very helpful. 161 | 162 | If you havn't installed git-flow, `do it now 163 | `_! 164 | 165 | So the next step is to initialize your repository clone with git-flow. You can 166 | choose the default for all questions being asked during the initialzaion 167 | (simply press :kbd:`Enter` on every question): 168 | 169 | :: 170 | 171 | $ git-flow init 172 | 173 | Install Python packages 174 | ----------------------- 175 | 176 | First create a new virtualenv for the project using virtualenvwrapper: 177 | 178 | :: 179 | 180 | $ mkvirtualenv -a `pwd` {{ cookiecutter.repo_name }} 181 | 182 | Now you can install the packages for development: 183 | 184 | :: 185 | 186 | $ make develop 187 | 188 | You should run this command every time a requirement changes to update your 189 | development environment. 190 | 191 | Create the database 192 | ------------------- 193 | 194 | Then create the new PostgreSQL user and database: 195 | 196 | :: 197 | 198 | $ make create-db-user 199 | $ make create-db 200 | 201 | .. note:: 202 | 203 | You may need to run :command:`make create-db-user` as a PostgreSQL superuser: 204 | 205 | :: 206 | 207 | $ sudo -u postgres make create-db-user 208 | 209 | .. note:: 210 | 211 | You may have to edit the PostgreSQL permissions in :file:`pg_hba.conf` by 212 | adding a line as follows after the ``postgres`` user line: 213 | 214 | :: 215 | 216 | local {{ cookiecutter.repo_name }} {{ cookiecutter.repo_name }} md5 217 | 218 | Now it's the time to create the database tables: 219 | 220 | :: 221 | 222 | $ make migrate 223 | 224 | And to create a new Django superuser: 225 | 226 | :: 227 | 228 | $ envdir envs/dev/ python manage.py createsuperuser 229 | 230 | Start the development webserver 231 | ------------------------------- 232 | 233 | Finally start the development webserver: 234 | 235 | :: 236 | 237 | $ make runserver 238 | 239 | To see the other targets available in the :file:`Makefile` simply run: 240 | 241 | :: 242 | 243 | $ make 244 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | goto end 41 | ) 42 | 43 | if "%1" == "clean" ( 44 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 45 | del /q /s %BUILDDIR%\* 46 | goto end 47 | ) 48 | 49 | 50 | %SPHINXBUILD% 2> nul 51 | if errorlevel 9009 ( 52 | echo. 53 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 54 | echo.installed, then set the SPHINXBUILD environment variable to point 55 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 56 | echo.may add the Sphinx directory to PATH. 57 | echo. 58 | echo.If you don't have Sphinx installed, grab it from 59 | echo.http://sphinx-doc.org/ 60 | exit /b 1 61 | ) 62 | 63 | if "%1" == "html" ( 64 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 68 | goto end 69 | ) 70 | 71 | if "%1" == "dirhtml" ( 72 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 76 | goto end 77 | ) 78 | 79 | if "%1" == "singlehtml" ( 80 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 84 | goto end 85 | ) 86 | 87 | if "%1" == "pickle" ( 88 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can process the pickle files. 92 | goto end 93 | ) 94 | 95 | if "%1" == "json" ( 96 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 97 | if errorlevel 1 exit /b 1 98 | echo. 99 | echo.Build finished; now you can process the JSON files. 100 | goto end 101 | ) 102 | 103 | if "%1" == "htmlhelp" ( 104 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 105 | if errorlevel 1 exit /b 1 106 | echo. 107 | echo.Build finished; now you can run HTML Help Workshop with the ^ 108 | .hhp project file in %BUILDDIR%/htmlhelp. 109 | goto end 110 | ) 111 | 112 | if "%1" == "qthelp" ( 113 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 117 | .qhcp project file in %BUILDDIR%/qthelp, like this: 118 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\{{ cookiecutter.repo_name }}.qhcp 119 | echo.To view the help file: 120 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\{{ cookiecutter.repo_name }}.ghc 121 | goto end 122 | ) 123 | 124 | if "%1" == "devhelp" ( 125 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished. 129 | goto end 130 | ) 131 | 132 | if "%1" == "epub" ( 133 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 137 | goto end 138 | ) 139 | 140 | if "%1" == "latex" ( 141 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 145 | goto end 146 | ) 147 | 148 | if "%1" == "latexpdf" ( 149 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 150 | cd %BUILDDIR%/latex 151 | make all-pdf 152 | cd %BUILDDIR%/.. 153 | echo. 154 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 155 | goto end 156 | ) 157 | 158 | if "%1" == "latexpdfja" ( 159 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 160 | cd %BUILDDIR%/latex 161 | make all-pdf-ja 162 | cd %BUILDDIR%/.. 163 | echo. 164 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 165 | goto end 166 | ) 167 | 168 | if "%1" == "text" ( 169 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 170 | if errorlevel 1 exit /b 1 171 | echo. 172 | echo.Build finished. The text files are in %BUILDDIR%/text. 173 | goto end 174 | ) 175 | 176 | if "%1" == "man" ( 177 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 178 | if errorlevel 1 exit /b 1 179 | echo. 180 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 181 | goto end 182 | ) 183 | 184 | if "%1" == "texinfo" ( 185 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 186 | if errorlevel 1 exit /b 1 187 | echo. 188 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 189 | goto end 190 | ) 191 | 192 | if "%1" == "gettext" ( 193 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 194 | if errorlevel 1 exit /b 1 195 | echo. 196 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 197 | goto end 198 | ) 199 | 200 | if "%1" == "changes" ( 201 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 202 | if errorlevel 1 exit /b 1 203 | echo. 204 | echo.The overview file is in %BUILDDIR%/changes. 205 | goto end 206 | ) 207 | 208 | if "%1" == "linkcheck" ( 209 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 210 | if errorlevel 1 exit /b 1 211 | echo. 212 | echo.Link check complete; look for any errors in the above output ^ 213 | or in %BUILDDIR%/linkcheck/output.txt. 214 | goto end 215 | ) 216 | 217 | if "%1" == "doctest" ( 218 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 219 | if errorlevel 1 exit /b 1 220 | echo. 221 | echo.Testing of doctests in the sources finished, look at the ^ 222 | results in %BUILDDIR%/doctest/output.txt. 223 | goto end 224 | ) 225 | 226 | if "%1" == "xml" ( 227 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 228 | if errorlevel 1 exit /b 1 229 | echo. 230 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 231 | goto end 232 | ) 233 | 234 | if "%1" == "pseudoxml" ( 235 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 236 | if errorlevel 1 exit /b 1 237 | echo. 238 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 239 | goto end 240 | ) 241 | 242 | :end 243 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/ref/config.rst: -------------------------------------------------------------------------------- 1 | ****** 2 | Config 3 | ****** 4 | 5 | settings.common 6 | =============== 7 | 8 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.common 9 | :show-inheritance: 10 | :no-undoc-members: 11 | 12 | settings.databases 13 | ================== 14 | 15 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.databases 16 | :show-inheritance: 17 | :no-undoc-members: 18 | 19 | settings.dev 20 | ============ 21 | 22 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.dev 23 | :show-inheritance: 24 | :no-undoc-members: 25 | 26 | settings.email 27 | ============== 28 | 29 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.email 30 | :show-inheritance: 31 | :no-undoc-members: 32 | 33 | settings.public 34 | =============== 35 | 36 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.public 37 | :show-inheritance: 38 | :no-undoc-members: 39 | 40 | settings.test 41 | ============= 42 | 43 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.test 44 | :show-inheritance: 45 | :no-undoc-members: 46 | 47 | settings.values 48 | =============== 49 | 50 | .. automodule:: {{ cookiecutter.pkg_name }}.config.settings.values 51 | :show-inheritance: 52 | :no-undoc-members: 53 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/ref/index.rst: -------------------------------------------------------------------------------- 1 | .. _ref-index: 2 | 3 | ************* 4 | API-Reference 5 | ************* 6 | 7 | .. toctree:: 8 | :maxdepth: 1 9 | 10 | config 11 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/releases.rst: -------------------------------------------------------------------------------- 1 | ******** 2 | Releases 3 | ******** 4 | 5 | Since `git-flow `_ is used to organize the 6 | work in feature branches it will also be used to create the releases. Before 7 | you start a new release make sure all feature branches you want to be part of 8 | the release have been merged into the ``develop`` branch. 9 | 10 | Furthermore it's assumed that `protected branches 11 | `_ and 12 | `required status checks 13 | `_ are 14 | enabled on GitHub. Usually the branches ``develop`` and ``master`` are 15 | configured as protected branches and status checks for continuous integration 16 | and code coverage are required. 17 | 18 | Start a new release branch 19 | ========================== 20 | 21 | Let's assume all features for the next release are merged into the ``develop`` 22 | branch and the next release should be version ``1.0.0``. 23 | 24 | So the first step is to start a new release branch: 25 | 26 | :: 27 | 28 | $ git flow release start 1.0.0 29 | 30 | After that you will be on the newly created ``release/1.0.0`` branch. 31 | 32 | Prepare the release branch 33 | ========================== 34 | 35 | The next thing to do is to update the version numbers using 36 | `bumpversion `_. Since this is a new 37 | major release we need to pass the ``major`` keyword to :program:`bumpversion`. 38 | Other possible keyword for the version number part are ``patch`` for bugfix 39 | releases (example: ``0.8.2``) and ``minor`` for minor releases (example 40 | ``0.9.0``). 41 | 42 | :: 43 | 44 | $ bumpversion major 45 | 46 | Now run the test suite to make sure everything works as expected: 47 | 48 | :: 49 | 50 | $ make clean test-all 51 | 52 | Fix any errors or failures that occur directly in the release branch. 53 | 54 | Publish the release branch 55 | ========================== 56 | 57 | Then push the new branch ``release/1.0.0`` to the GitHub remote to run the 58 | required status checks for the release branch: 59 | 60 | :: 61 | 62 | $ git push --set-upstream origin release/1.0.0 63 | 64 | Finish the release branch 65 | ========================= 66 | 67 | After all GitHub status checks have passed you can finish the release branch: 68 | 69 | :: 70 | 71 | $ git flow release finish 1.0.0 72 | 73 | Now you change to the ``master`` branch and push it together with the new tag 74 | ``1.0.0`` to the GitHub remote: 75 | 76 | :: 77 | 78 | $ git checkout master 79 | $ git push origin master 80 | $ git push origin master --tags 81 | 82 | Create an integration branch to merge ``master`` into ``develop`` 83 | ================================================================= 84 | 85 | Then checkout the ``develop`` branch: 86 | 87 | :: 88 | 89 | $ git checkout develop 90 | 91 | You will recognize that it has already been merged with ``master``. But for a 92 | protected branches configuration where ``master`` and ``develop`` are protected 93 | this does not work. 94 | 95 | So create a new integration branch to merge ``master`` into ``develop``: 96 | 97 | :: 98 | 99 | $ git checkout -b merge-master-into-develop-for-release-1.0.0 100 | 101 | After that fetch the latest changes, merge with the integration branch and push 102 | it: 103 | 104 | :: 105 | 106 | $ git fetch 107 | $ git merge origin/develop 108 | $ git push --set-upstream origin merge-master-into-develop-for-release-1.0.0 109 | 110 | Now that we have the merge of ``master`` into ``develop`` in a separate 111 | integration branch we can safely reset the ``develop`` branch: 112 | 113 | :: 114 | 115 | $ git checkout develop 116 | $ git reset --hard origin/develop 117 | 118 | The last step create a new pull request for the integration branch 119 | ``merge-master-into-develop-for-release-1.0.0`` on GitHub, merge and delete it 120 | after all required status checks have passed. 121 | 122 | Clean up 123 | ======== 124 | 125 | Finally delete all stale remote-tracking branches for ``origin``, the local 126 | branch ``merge-master-into-develop-for-release-1.0.0`` and the remote-tracking 127 | branch ``release/1.0.0``: 128 | 129 | :: 130 | 131 | $ git pull 132 | $ git remote prune origin 133 | $ git branch -d merge-master-into-develop-for-release-1.0.0 134 | $ git push origin :release/1.0.0 135 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/docs/settings.rst: -------------------------------------------------------------------------------- 1 | ******** 2 | Settings 3 | ******** 4 | 5 | This is a list of all settings for this project. Each setting can be configured 6 | using environment variables. 7 | 8 | .. Keep the length of the "Description" column at a maximum of 45 characters. 9 | 10 | These are the default settings in :file:`{{ cookiecutter.repo_name }}/manage.py`. 11 | Both together control which settings are loaded and used. 12 | 13 | .. list-table:: 14 | :header-rows: 1 15 | 16 | * - Setting 17 | - Default 18 | - Env Variable 19 | - Description 20 | * - ``DJANGO_CONFIGURATION`` 21 | - ``'Development'`` 22 | - ``DJANGO_CONFIGURATION`` 23 | - | Name of the `django-configurations `_ 24 | | class you want to use. 25 | * - ``DJANGO_SETTINGS_MODULE`` 26 | - ``'{{ cookiecutter.pkg_name }}.config.settings.dev'`` 27 | - ``DJANGO_SETTINGS_MODULE`` 28 | - | Python path to the settings module 29 | | for this project. 30 | 31 | General Settings 32 | ================ 33 | 34 | List of general Django settings from 35 | :py:class:`{{ cookiecutter.pkg_name }}.config.settings.common.Common`. 36 | 37 | .. list-table:: 38 | :header-rows: 1 39 | 40 | * - Setting 41 | - Default 42 | - Env Variable 43 | - Description 44 | * - ``ADMINS`` 45 | - ``(('transcode', 'errors@example.com'),)`` 46 | - ``DJANGO_ADMINS`` 47 | - | A tuple that lists people who get 48 | | code error notifications. When 49 | | ``DEBUG=False`` and a view raises 50 | | an exception, Django will email 51 | | these people with the full 52 | | exception information. 53 | | Example environment value: 54 | | ``Alice,alice@brown.com;Bob,bob@dylan.com`` 55 | * - ``ALLOWED_HOSTS`` 56 | - ``['{{ cookiecutter.domain }}']`` 57 | - ``DJANGO_ALLOWED_HOSTS`` 58 | - | A list of strings representing the 59 | | host/domain names that this Django 60 | | site can serve. 61 | | Example environment value: 62 | | ``example.com,www.example.com`` 63 | * - ``CACHES`` 64 | - | ``{`` 65 | | ``'default': {`` 66 | | ``'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',`` 67 | | ``}`` 68 | | ``}`` 69 | - ``DJANGO_CACHES`` 70 | - | A dictionary containing the 71 | | settings for all caches to be used 72 | | with Django. 73 | * - ``CRISPY_TEMPLATE_PACK`` 74 | - ``'bootstrap3'`` 75 | - ``DJANGO_CRISPY_TEMPLATE_PACK`` 76 | - | The default template pack to be 77 | | used by `django-crispy-forms `_. 78 | * - ``DEBUG`` 79 | - ``False`` 80 | - ``DJANGO_DEBUG`` 81 | - | A boolean that turns on/off debug 82 | | mode. Never deploy a site into 83 | | production with ``DEBUG`` turned 84 | | on. 85 | * - ``DEFAULT_FROM_EMAIL`` 86 | - ``'noreply@example.com'`` 87 | - ``DJANGO_DEFAULT_FROM_EMAIL`` 88 | - | Default email address to use for 89 | | various automated correspondence. 90 | * - ``DJANGO_TEMPLATES_STRING_IF_INVALID`` 91 | - ``''`` 92 | - ``DJANGO_DJANGO_TEMPLATES_STRING_IF_INVALID`` 93 | - | The output, as a string, that 94 | | Django's template engine should 95 | | use for invalid (e.g. misspelled) 96 | | variables. 97 | * - ``DJANGO_TEMPLATES_TEMPLATE_DEBUG`` 98 | - ``False`` 99 | - ``DJANGO_DJANGO_TEMPLATES_TEMPLATE_DEBUG`` 100 | - | A boolean that turns on/off template debug 101 | | mode for Django's template engine. 102 | * - ``LANGUAGE_CODE`` 103 | - ``'en-us'`` 104 | - ``DJANGO_LANGUAGE_CODE`` 105 | - | A string representing the 106 | | language code for this 107 | | installation. 108 | * - ``MIDDLEWARE_CLASSES`` 109 | - | ``['django.contrib.sessions.middleware.SessionMiddleware',`` 110 | | ``'django.middleware.common.CommonMiddleware',`` 111 | | ``'django.middleware.csrf.CsrfViewMiddleware',`` 112 | | ``'django.contrib.auth.middleware.AuthenticationMiddleware',`` 113 | | ``'django.contrib.auth.middleware.SessionAuthenticationMiddleware',`` 114 | | ``'django.contrib.messages.middleware.MessageMiddleware',`` 115 | | ``'django.middleware.clickjacking.XFrameOptionsMiddleware',`` 116 | | ``'django.middleware.security.SecurityMiddleware',]`` 117 | - ``DJANGO_MIDDLEWARE_CLASSES`` 118 | - | A list of middleware classes to 119 | | use. 120 | * - ``MEDIA_ROOT`` 121 | - ``'/media/'`` 122 | - ``DJANGO_MEDIA_ROOT`` 123 | - | Absolute filesystem path to the 124 | | directory that will hold 125 | | user-uploaded files. Must be 126 | | changed for production sites. 127 | * - ``MEDIA_URL`` 128 | - ``'/media/'`` 129 | - ``DJANGO_MEDIA_URL`` 130 | - | URL that handles the media served 131 | | from ``MEDIA_ROOT``. 132 | * - ``SITE_ID`` 133 | - ``1`` 134 | - ``DJANGO_SITE_ID`` 135 | - | The ID, as an integer, of the 136 | | current site in the 137 | | ``django_site`` database table. 138 | * - ``STATIC_ROOT`` 139 | - ``'/static_root/'`` 140 | - ``DJANGO_STATIC_ROOT`` 141 | - | The absolute path to the directory 142 | | where :command:`collectstatic` will collect 143 | | static files for deployment. Must 144 | | be set for production sites. 145 | * - ``STATIC_URL`` 146 | - ``'/static/'`` 147 | - ``DJANGO_STATIC_URL`` 148 | - | URL to use when referring to 149 | | static files located in 150 | | ``STATIC_ROOT``. 151 | * - ``STATICFILES_FINDERS`` 152 | - | ``['django.contrib.staticfiles.finders.AppDirectoriesFinder',`` 153 | | ``'django.contrib.staticfiles.finders.FileSystemFinder',]`` 154 | - ``DJANGO_STATICFILES_FINDERS`` 155 | - | The list of finder backends that 156 | | know how to find static files in 157 | | various locations. 158 | * - ``TIME_ZONE`` 159 | - ``'Europe/Berlin'`` 160 | - ``DJANGO_TIME_ZONE`` 161 | - | A string representing the time 162 | | zone for this installation. See 163 | | the `list of time zones `_. 164 | 165 | Database 166 | ======== 167 | 168 | The database settings are in 169 | :py:class:`{{ cookiecutter.pkg_name }}.config.settings.databases.Databases`. 170 | 171 | The following classes inherit from it: 172 | 173 | * :py:class:`{{ cookiecutter.pkg_name }}.config.settings.dev.Development` 174 | * :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Production` 175 | * :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Staging` 176 | * :py:class:`{{ cookiecutter.pkg_name }}.config.settings.test.Testing` 177 | 178 | .. list-table:: 179 | :header-rows: 1 180 | 181 | * - Setting 182 | - Default 183 | - Env Variable 184 | - Description 185 | * - ``DEFAULT_DATABASE_URL`` 186 | - ``''`` 187 | - ``DEFAULT_DATABASE_URL`` 188 | - | Database URL for the default 189 | | database connection. 190 | | Example environment value: 191 | | ``postgres://dbuser:password@localhost/database`` 192 | * - ``DEFAULT_CONN_MAX_AGE`` 193 | - ``600`` 194 | - ``DJANGO_DEFAULT_CONN_MAX_AGE`` 195 | - | The lifetime of a database 196 | | connection, in seconds. 197 | 198 | Development 199 | =========== 200 | 201 | The default class for development is 202 | :py:class:`{{ cookiecutter.pkg_name }}.config.settings.dev.Development`. 203 | It uses `django-devserver `_. 204 | 205 | .. list-table:: 206 | :header-rows: 1 207 | 208 | * - Setting 209 | - Default 210 | - Env Variable 211 | - Description 212 | * - ``CACHES`` 213 | - | ``{`` 214 | | ``'default': {`` 215 | | ``'BACKEND': 'django.core.cache.backends.dummy.DummyCache',`` 216 | | ``}`` 217 | | ``}`` 218 | - ``DJANGO_CACHES`` 219 | - | A dictionary containing the 220 | | settings for all caches to be used 221 | | with Django. 222 | * - ``DEVSERVER_ARGS`` 223 | - ``[]`` 224 | - ``DJANGO_DEVSERVER_ARGS`` 225 | - | Additional command line 226 | | arguments to pass to the :command:`runserver` 227 | | command (as defaults). 228 | | Example environment value: ``--werkzeug`` 229 | * - ``DEVSERVER_MODULES`` 230 | - | ``['devserver.modules.sql.SQLRealTimeModule',`` 231 | | ``'devserver.modules.sql.SQLSummaryModule',`` 232 | | ``'devserver.modules.profile.ProfileSummaryModule',]`` 233 | - ``DJANGO_DEVSERVER_MODULES`` 234 | - | django-devserver modules. See 235 | | `list of available modules `_. 236 | * - ``DEVSERVER_TRUNCATE_SQL`` 237 | - ``True`` 238 | - ``DJANGO_DEVSERVER_TRUNCATE_SQL`` 239 | - | Enables SQL query truncation 240 | | (used in ``SQLRealTimeModule``). 241 | * - ``EMAIL_BACKEND`` 242 | - ``'django.core.mail.backends.console.EmailBackend'`` 243 | - ``DJANGO_EMAIL_BACKEND`` 244 | - | The backend to use for sending 245 | | emails. 246 | 247 | SMTP 248 | ==== 249 | 250 | Settings for sending email using 251 | :djangodocs:`SMTP `. Inherit from 252 | :py:class:`{{ cookiecutter.pkg_name }}.config.settings.email.SMTP` 253 | to use these settings. 254 | 255 | .. list-table:: 256 | :header-rows: 1 257 | 258 | * - Setting 259 | - Default 260 | - Env Variable 261 | - Description 262 | * - ``EMAIL_HOST`` 263 | - ``'localhost'`` 264 | - ``DJANGO_EMAIL_HOST`` 265 | - | The host to use for sending email. 266 | * - ``EMAIL_HOST_PASSWORD`` 267 | - ``''`` 268 | - ``DJANGO_EMAIL_HOST_PASSWORD`` 269 | - | Password to use for SMTP server 270 | | authentication. Must be set for 271 | | production sites if email should 272 | | be sent via SMTP. 273 | * - ``EMAIL_HOST_USER`` 274 | - ``'noreply@example.com'`` 275 | - ``DJANGO_EMAIL_HOST_USER`` 276 | - | Username to use for SMTP server 277 | | authentication. 278 | * - ``EMAIL_PORT`` 279 | - ``465`` 280 | - ``DJANGO_EMAIL_PORT`` 281 | - | Port to use for SMTP. 282 | * - ``EMAIL_USE_SSL`` 283 | - ``True`` 284 | - ``DJANGO_EMAIL_USE_SSL`` 285 | - | Whether to use an implicit TLS 286 | | (secure) connection when talking 287 | | to the SMTP server. In most email 288 | | documentation this type of TLS 289 | | connection is referred to as SSL. 290 | | Default port is ``465``. 291 | * - ``EMAIL_USE_TLS`` 292 | - ``False`` 293 | - ``DJANGO_EMAIL_USE_TLS`` 294 | - | Whether to use a TLS (secure) 295 | | connection when talking to the SMTP 296 | | server. Default port is ``587``. 297 | 298 | Mailgun 299 | ======= 300 | 301 | Settings for sending email using `Mailgun `_. Inherit 302 | from :py:class:`{{ cookiecutter.pkg_name }}.config.settings.email.Mailgun` 303 | to use these settings. 304 | 305 | .. list-table:: 306 | :header-rows: 1 307 | 308 | * - Setting 309 | - Default 310 | - Env Variable 311 | - Description 312 | * - ``MAILGUN_ACCESS_KEY`` 313 | - ``''`` 314 | - ``DJANGO_MAILGUN_ACCESS_KEY`` 315 | - | The secret Mailgun API key. You 316 | | can find it on the `Mailgun dashboard `_. 317 | * - ``MAILGUN_SERVER_NAME`` 318 | - ``'mg.transcode.de'`` 319 | - ``DJANGO_MAILGUN_SERVER_NAME`` 320 | - | Specifies the subdomain that is 321 | | being used for Mailgun. More 322 | | information on how to configure 323 | | your DNS records is available in 324 | | the `Mailgun User Manual `_. 325 | 326 | Sentry 327 | ====== 328 | 329 | Settings to track errors using `Sentry `_. Inherit 330 | from :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Raven` 331 | to use these settings. 332 | 333 | .. list-table:: 334 | :header-rows: 1 335 | 336 | * - Setting 337 | - Default 338 | - Env Variable 339 | - Description 340 | * - ``RAVEN_CONFIG_DSN`` 341 | - ``''`` 342 | - ``DJANGO_RAVEN_CONFIG_DSN`` 343 | - | `Sentry `_ DSN, see 344 | | `Raven documentation `_. 345 | | Must be set for production sites 346 | | to use Sentry. 347 | 348 | Public 349 | ====== 350 | 351 | The class 352 | :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Public` 353 | is the base class for the following classes: 354 | 355 | * :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Production` 356 | * :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Staging` 357 | 358 | .. list-table:: 359 | :header-rows: 1 360 | 361 | * - Setting 362 | - Default 363 | - Env Variable 364 | - Description 365 | * - ``SECRET_KEY`` 366 | - ``''`` 367 | - ``DJANGO_SECRET_KEY`` 368 | - | A secret key for a particular 369 | | Django installation, used to 370 | | provide cryptographic signing. 371 | | Must be set for public sites. 372 | * - ``SILENCED_SYSTEM_CHECKS`` 373 | - ``[]`` 374 | - ``DJANGO_SILENCED_SYSTEM_CHECKS`` 375 | - | A list of identifiers of messages 376 | | generated by the system check 377 | | framework (i.e. ``["models.W001"]``) 378 | | that should be permanently 379 | | acknowledged and ignored. 380 | | See `list of builtin checks `_ 381 | | Example environment value: 382 | | ``security.W004,security.W008`` 383 | 384 | SSL 385 | === 386 | 387 | Default settings for SSL-enabled servers. Inherit 388 | from :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.SSL` 389 | to use these settings. 390 | :py:class:`{{ cookiecutter.pkg_name }}.config.settings.public.Production` 391 | inherits from this class by default. Make sure you read 392 | :djangodocs:`Django's SSL ` documentation before 393 | using these settings. 394 | 395 | .. list-table:: 396 | :header-rows: 1 397 | 398 | * - Setting 399 | - Default 400 | - Env Variable 401 | - Description 402 | * - ``CSRF_COOKIE_SECURE`` 403 | - ``True`` 404 | - ``DJANGO_CSRF_COOKIE_SECURE`` 405 | - | If this is set to ``True``, the 406 | | cookie will be marked as “secure”, 407 | | which means browsers may ensure 408 | | that the cookie is only sent with 409 | | an HTTPS connection. 410 | * - ``SECURE_HSTS_INCLUDE_SUBDOMAINS`` 411 | - ``True`` 412 | - ``DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS`` 413 | - | If ``True``, the 414 | | ``SecurityMiddleware`` adds the 415 | | ``includeSubDomains`` tag to the 416 | | HTTP Strict Transport Security 417 | | header. 418 | * - ``SECURE_HSTS_SECONDS`` 419 | - ``3600`` 420 | - ``DJANGO_SECURE_HSTS_SECONDS`` 421 | - | If set to a non-zero integer 422 | | value, the ``SecurityMiddleware`` 423 | | sets the HTTP Strict Transport 424 | | Security header on all responses 425 | | that do not already have it. 426 | * - ``SECURE_PROXY_SSL_HEADER`` 427 | - ``None`` 428 | - ``DJANGO_SECURE_PROXY_SSL_HEADER`` 429 | - | A tuple representing a HTTP 430 | | header/value combination that 431 | | signifies a request is secure. 432 | * - ``SECURE_REDIRECT_EXEMPT`` 433 | - ``[]`` 434 | - ``DJANGO_SECURE_REDIRECT_EXEMPT`` 435 | - | If a URL path matches a regular 436 | | expression in this list, the 437 | | request will not be redirected to 438 | | HTTPS. 439 | * - ``SECURE_SSL_HOST`` 440 | - ``'{{ cookiecutter.domain }}'`` 441 | - ``DJANGO_SECURE_SSL_HOST`` 442 | - | If a string, all SSL redirects 443 | | will be directed to this host 444 | | rather than the 445 | | originally-requested host. 446 | * - ``SECURE_SSL_REDIRECT`` 447 | - ``True`` 448 | - ``DJANGO_SECURE_SSL_REDIRECT`` 449 | - | If ``True``, the 450 | | ``SecurityMiddleware`` redirects 451 | | all non-HTTPS requests to HTTPS. 452 | * - ``SESSION_COOKIE_SECURE`` 453 | - ``True`` 454 | - ``DJANGO_SESSION_COOKIE_SECURE`` 455 | - | If this is set to ``True``, the 456 | | cookie will be marked as “secure”, 457 | | which means browsers may ensure 458 | | that the cookie is only sent with 459 | | an HTTPS connection. 460 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/envs/dev/DEFAULT_DATABASE_URL: -------------------------------------------------------------------------------- 1 | postgres://{{ cookiecutter.repo_name }}:{{ cookiecutter.repo_name }}@localhost/{{ cookiecutter.repo_name }} 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/envs/dev/DJANGO_DEBUG: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/envs/dev/DJANGO_DEFAULT_CONN_MAX_AGE: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/envs/dev/DJANGO_TEMPLATES_TEMPLATE_DEBUG: -------------------------------------------------------------------------------- 1 | True 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/envs/dev/PGPASSWORD: -------------------------------------------------------------------------------- 1 | {{ cookiecutter.repo_name }} 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == '__main__': 6 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ cookiecutter.pkg_name }}.config.settings.dev') 7 | os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') 8 | 9 | from configurations.management import execute_from_command_line 10 | 11 | execute_from_command_line(sys.argv) 12 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/pep257.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Find all Python files and check their docstrings with pep257. 4 | 5 | set -o errexit 6 | set -o nounset 7 | set -o pipefail 8 | 9 | find . -name '*.py' -not -path './.*/*' -not -path '*/migrations/*' -not -path './node_modules/*' -exec pep257 -s {} + 10 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/ci.pip: -------------------------------------------------------------------------------- 1 | # This file is used for testing on continuous integration servers with tox. 2 | 3 | codecov==2.0.5 4 | django-coverage-plugin==1.3.1 5 | tox==2.3.1 6 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/constraints.pip: -------------------------------------------------------------------------------- 1 | # This file controls which version of a requirement is installed. 2 | 3 | Django==1.8.14 # rq.filter: <1.9 4 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/dev.pip: -------------------------------------------------------------------------------- 1 | # This file is used for all packages required for local development. 2 | 3 | -r ./docs.pip 4 | -r ./test.pip 5 | -r ./test-local.pip 6 | 7 | Werkzeug==0.11.10 8 | Glances==2.6.2 9 | # Bottle is required to run Glances in webserver mode 10 | bottle==0.12.9 11 | bumpversion==0.5.3 12 | django-debug-toolbar==1.5 13 | django-template-debug==0.3.5 14 | envdir==0.7 15 | flake8==3.0.4 16 | ipython==5.1.0 17 | isort==4.2.5 18 | # Newer versions of pdbpp do not work with Python 3 19 | # See https://bitbucket.org/antocuni/pdb/issue/45/fails-to-install-on-os-x-1010-python-343 20 | pdbpp==0.8.3 # rq.filter: !=0.8.2 21 | pg-activity==1.3.0 22 | sqlparse==0.2.1 23 | 24 | # Fork of django-devserver with support for Django 1.8 and Python 3 25 | https://github.com/transcode-de/django-devserver/archive/8ec8efbb7b738508f489d3ddca54c40f510928b6.zip 26 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/docs.pip: -------------------------------------------------------------------------------- 1 | # This file is used for all packages required to build the documentation. 2 | 3 | Sphinx==1.3.3 4 | sphinx-autobuild==0.6.0 5 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/forks.pip: -------------------------------------------------------------------------------- 1 | # This file is used only for forks of packages required in setup.py. 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/mailgun.pip: -------------------------------------------------------------------------------- 1 | django-mailgun==0.9.1 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/test-local.pip: -------------------------------------------------------------------------------- 1 | # This file is used for local testing with tox. 2 | 3 | tox-pyenv==1.0.3 4 | tox==2.3.1 5 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/requirements/test.pip: -------------------------------------------------------------------------------- 1 | # This file is used for local testing with and without tox as well as for 2 | # testing on continuous integration servers. 3 | 4 | -r ./forks.pip 5 | 6 | coverage==4.2 7 | django-coverage-plugin==1.3.1 8 | fauxfactory==2.0.9 9 | freezegun==0.3.7 10 | pytest-django==2.9.1 11 | pytest-factoryboy==1.2.2 12 | pytest-faker==1.1.0 13 | pytest==2.9.2 14 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/setup.cfg: -------------------------------------------------------------------------------- 1 | [coverage:run] 2 | branch = True 3 | source = {{ cookiecutter.pkg_name }} 4 | omit = *migrations*,*urls.py,manage.py,{{ cookiecutter.pkg_name }}/config/* 5 | plugins = django_coverage_plugin 6 | 7 | [coverage:report] 8 | show_missing = True 9 | 10 | [doc8] 11 | ignore-path = *.egg-info/,.tox/,docs/_build/,node_modules,{{ cookiecutter.pkg_name }}/apps/*/templates/*,{{ cookiecutter.pkg_name }}/media/ 12 | 13 | [flake8] 14 | exclude = build/*.py,docs/*.py,*/migrations/*.py,{{ cookiecutter.pkg_name }}/config/app_template/*,{{ cookiecutter.pkg_name }}/config/wsgi.py 15 | max-line-length = 99 16 | 17 | [isort] 18 | line_length = 99 19 | not_skip = __init__.py 20 | known_first_party = {{ cookiecutter.pkg_name }},tests 21 | known_third_party = braces,configurations,coverage,crispy_forms,dj_database_url,django,envdir,factory,factory_boy,faker,fauxfactory,freezegun,grappelli,psycopg2,pytest,pytest_factoryboy,six 22 | skip = manage.py,migrations,wsgi.py 23 | 24 | [pep257] 25 | add-ignore = D100,D104 26 | 27 | [pytest] 28 | DJANGO_SETTINGS_MODULE = {{ cookiecutter.pkg_name }}.config.settings.test 29 | DJANGO_CONFIGURATION = Testing 30 | addopts = 31 | --tb=short 32 | --strict 33 | --fail-on-template-vars 34 | 35 | [wheel] 36 | universal = 1 37 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | import os 4 | from codecs import open 5 | 6 | from setuptools import find_packages, setup 7 | 8 | BASE_DIR = os.path.dirname(os.path.abspath(__file__)) 9 | 10 | 11 | def read(*paths): 12 | """Build a file path from *paths and return the contents.""" 13 | with open(os.path.join(*paths), 'r', 'utf-8') as f: 14 | return f.read() 15 | 16 | extras_require = { 17 | 'mailgun': [ 18 | 'django-mailgun==0.8.0', 19 | ], 20 | 'raven': [ 21 | 'raven==5.8.1', 22 | ], 23 | } 24 | 25 | requires = [ 26 | 'Django==1.8.7', 27 | 'dj-database-url==0.3.0', 28 | 'django-braces==1.8.1', 29 | 'django-configurations==1.0', 30 | 'django-crispy-forms==1.5.2', 31 | 'django-grappelli==2.7.2', 32 | 'django-model-utils==2.4', 33 | 'envdir==0.7', 34 | 'psycopg2==2.6.1', 35 | 'pytz==2015.7', 36 | 'rules==1.1.1', 37 | ] 38 | 39 | setup( 40 | name='{{ cookiecutter.pkg_name }}', 41 | version='{{ cookiecutter.version }}', 42 | description='{{ cookiecutter.description }}', 43 | long_description=read(BASE_DIR, 'README.rst'), 44 | author='{{ cookiecutter.author_name }}', 45 | author_email='{{ cookiecutter.email }}', 46 | packages=find_packages(), 47 | include_package_data=True, 48 | scripts=['manage.py'], 49 | install_requires=requires, 50 | license='{{ cookiecutter.license }}', 51 | zip_safe=False, 52 | classifiers=[ 53 | 'Framework :: Django', 54 | 'Intended Audience :: Developers', 55 | {% if cookiecutter.license|lower == 'bsd' -%} 56 | 'License :: OSI Approved :: BSD License', 57 | {%- endif %} 58 | 'Natural Language :: English', 59 | 'Operating System :: OS Independent', 60 | 'Programming Language :: Python', 61 | 'Programming Language :: Python :: 2', 62 | 'Programming Language :: Python :: 2.7', 63 | 'Programming Language :: Python :: 3', 64 | 'Programming Language :: Python :: 3.5', 65 | 'Programming Language :: Python :: Implementation :: CPython', 66 | ], 67 | ) 68 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/tests/__init__.py -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/tests/conftest.py: -------------------------------------------------------------------------------- 1 | # encoding: utf-8 2 | import shutil 3 | import tempfile 4 | from functools import partial 5 | 6 | import pytest 7 | from faker import Faker 8 | 9 | 10 | @pytest.fixture 11 | def loaddata(settings, db): 12 | """Load a Django fixture. 13 | 14 | Works exactly like the loaddata command. All command line options must be 15 | given as keyword arguments. 16 | 17 | There is no no need to mark the test itself with the django_db marker 18 | because the loaddata fixture already loads the db fixture. 19 | 20 | Usage:: 21 | 22 | def test_model(loaddata): 23 | loaddata('my_fixture') 24 | # do a test using the fixture 25 | 26 | 27 | def test_othermodel(loaddata): 28 | loaddata('other_fixture', database='other') 29 | # do a test using the fixture 30 | """ 31 | from django.core import management 32 | return partial(management.call_command, 'loaddata') 33 | 34 | 35 | def pytest_runtest_setup(item): 36 | """Seed the Faker generator for every test. 37 | 38 | Faker is seeded at the beginning of each test based on the test name, so 39 | each test that uses Faker will use the same fake data between test runs, 40 | regardless of test order. 41 | 42 | Requires fake-factory 0.5.3 or newer. 43 | """ 44 | Faker().seed(item.nodeid) 45 | 46 | 47 | @pytest.fixture 48 | def tmp_media_root(request, settings): 49 | """Create a temporary directory and use it as MEDIA_ROOT. 50 | 51 | The temporary directory is deleted after the test has been finished. 52 | """ 53 | settings.MEDIA_ROOT = tempfile.mkdtemp() 54 | settings.DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' 55 | 56 | def cleanup(): 57 | shutil.rmtree(settings.MEDIA_ROOT, ignore_errors=True) 58 | request.addfinalizer(cleanup) 59 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/tests/test_context_processors.py: -------------------------------------------------------------------------------- 1 | import django 2 | 3 | from {{ cookiecutter.pkg_name }} import context_processors 4 | 5 | 6 | def test_django_version(): 7 | """Test the django_version context processor. 8 | 9 | Must return a dictionary containing the current Django version. 10 | """ 11 | assert context_processors.django_version(None) == {'django_version': django.get_version()} 12 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/tox.ini: -------------------------------------------------------------------------------- 1 | [tox] 2 | envlist = py27,py35,flake8,isort,manifest,docs,pep257 3 | minversion = 2.1.0 4 | 5 | [testenv] 6 | install_command = pip install -c requirements/constraints.pip {opts} {packages} 7 | commands = 8 | pip install -c requirements/constraints.pip -r requirements/test.pip 9 | make coverage 10 | passenv = 11 | DEFAULT_DATABASE_URL 12 | SPHINXOPTS_BUILD 13 | SPHINXOPTS_LINKCHECK 14 | whitelist_externals = make 15 | 16 | [testenv:flake8] 17 | basepython = python3.5 18 | commands = 19 | flake8 setup.py {{ cookiecutter.pkg_name }}/ tests/ 20 | deps = 21 | flake8-debugger==1.4.0 22 | flake8-print==2.0.2 23 | flake8==2.5.1 24 | pep8-naming==0.3.3 25 | skip_install = True 26 | 27 | [testenv:isort] 28 | basepython = python3.5 29 | commands = 30 | isort --check-only --recursive --verbose setup.py {{ cookiecutter.pkg_name }}/ tests/ 31 | deps = 32 | isort==4.2.2 33 | skip_install = True 34 | 35 | [testenv:manifest] 36 | basepython = python3.5 37 | commands = 38 | check-manifest -v 39 | deps = 40 | check-manifest==0.29 41 | skip_install = True 42 | 43 | [testenv:pep257] 44 | basepython = python3.5 45 | commands = 46 | {toxinidir}/pep257.sh 47 | deps = 48 | pep257==0.7.0 49 | skip_install = True 50 | 51 | [testenv:docs] 52 | basepython = python3.5 53 | commands = 54 | pip install -c requirements/constraints.pip -r requirements/docs.pip 55 | make docs BUILDDIR={envtmpdir} SPHINXOPTS={env:SPHINXOPTS_BUILD:'-W'} 56 | make -C docs linkcheck BUILDDIR={envtmpdir} SPHINXOPTS={env:SPHINXOPTS_LINKCHECK:} 57 | doc8 58 | deps = 59 | django-configurations==2.0 60 | doc8==0.6.0 61 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '{{ cookiecutter.version }}' 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/apps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/apps/__init__.py -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '{{ cookiecutter.version }}' 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/__init__.py -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | # Register your models here. 4 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | from django.utils.translation import ugettext_lazy as _ 3 | 4 | 5 | class {{ '{{ app_name|title }}' }}Config(AppConfig): 6 | """Configuration for {{ '{{ app_name }}' }} app.""" 7 | 8 | name = '{{ cookiecutter.pkg_name }}.apps.{{ '{{ app_name }}' }}' 9 | verbose_name = _("{{ '{{ app_name|title }}' }}") 10 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/migrations/__init__.py -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/models.py: -------------------------------------------------------------------------------- 1 | {{ '{{ unicode_literals }}' }}from django.db import models 2 | 3 | # Create your models here. 4 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/app_template/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | 3 | # Create your views here. 4 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/__init__.py -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/common.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from configurations import Configuration, values 4 | 5 | from .values import AdminsValue 6 | 7 | 8 | class BaseDir(object): 9 | """Provide absolute path to project package root directory as BASE_DIR setting. 10 | 11 | Use it to build your absolute paths like this:: 12 | 13 | os.path.join(BaseDir.BASE_DIR, 'templates') 14 | """ 15 | 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) 17 | 18 | 19 | class Common(Configuration): 20 | """Common configuration base class.""" 21 | 22 | SECRET_KEY = '(_j4e0=pbe(b+b1$^ch_48be0=gszglcgfzz^dy=(gnx=@m*b7' 23 | 24 | DEBUG = values.BooleanValue(False) 25 | 26 | MAIL_ADMINS = values.BooleanValue(False) 27 | 28 | ADMINS = AdminsValue( 29 | (('{{ cookiecutter.author_name }}', '{{ cookiecutter.error_email }}'),) 30 | ) 31 | MANAGERS = ADMINS 32 | 33 | LOGGING = { 34 | 'version': 1, 35 | 'disable_existing_loggers': False, 36 | 'filters': { 37 | 'require_debug_false': { 38 | '()': 'django.utils.log.RequireDebugFalse', 39 | }, 40 | 'require_debug_true': { 41 | '()': 'django.utils.log.RequireDebugTrue', 42 | }, 43 | }, 44 | 'handlers': { 45 | 'console': { 46 | 'level': 'INFO', 47 | 'filters': ['require_debug_true'], 48 | 'class': 'logging.StreamHandler', 49 | }, 50 | 'null': { 51 | 'class': 'logging.NullHandler', 52 | }, 53 | 'mail_admins': { 54 | 'level': 'ERROR', 55 | 'class': 'django.utils.log.AdminEmailHandler' 56 | } 57 | }, 58 | 'loggers': { 59 | 'django': { 60 | 'handlers': ['console'], 61 | }, 62 | 'django.request': { 63 | 'handlers': ['mail_admins'], 64 | 'level': 'ERROR', 65 | 'propagate': False, 66 | }, 67 | 'django.security': { 68 | 'handlers': ['mail_admins'], 69 | 'level': 'ERROR', 70 | 'propagate': False, 71 | }, 72 | 'django.security.DisallowedHost': { 73 | 'handlers': ['null'], 74 | 'propagate': False, 75 | }, 76 | 'py.warnings': { 77 | 'handlers': ['console'], 78 | }, 79 | } 80 | } 81 | 82 | ALLOWED_HOSTS = values.ListValue(['{{ cookiecutter.domain }}']) 83 | 84 | SITE_ID = values.IntegerValue(1) 85 | 86 | # Internationalization 87 | # https://docs.djangoproject.com/en/dev/topics/i18n/ 88 | LANGUAGE_CODE = values.Value('en-us') 89 | 90 | TIME_ZONE = values.Value('Europe/Berlin') 91 | 92 | USE_I18N = True 93 | 94 | USE_L10N = True 95 | 96 | USE_TZ = True 97 | 98 | # Absolute filesystem path to the directory that will hold user-uploaded files. 99 | # Example: "/var/www/example.com/media/" 100 | MEDIA_ROOT = values.PathValue(os.path.join(BaseDir.BASE_DIR, 'media')) 101 | 102 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a 103 | # trailing slash. 104 | # Examples: "http://example.com/media/", "http://media.example.com/" 105 | MEDIA_URL = values.Value('/media/') 106 | 107 | # Absolute path to the directory static files should be collected to. 108 | # Don't put anything in this directory yourself; store your static files 109 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. 110 | # Example: "/var/www/example.com/static/" 111 | STATIC_ROOT = values.PathValue(os.path.join(BaseDir.BASE_DIR, 'static_root')) 112 | 113 | # Static files (CSS, JavaScript, Images) 114 | # https://docs.djangoproject.com/en/dev/howto/static-files/ 115 | STATIC_URL = values.Value('/static/') 116 | 117 | # Additional locations of static files 118 | STATICFILES_DIRS = ( 119 | # Put strings here, like "/home/html/static" or "C:/www/django/static". 120 | # Always use forward slashes, even on Windows. 121 | # Don't forget to use absolute paths, not relative paths. 122 | os.path.join(BaseDir.BASE_DIR, 'static'), 123 | ) 124 | 125 | STATICFILES_FINDERS = values.ListValue([ 126 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 127 | 'django.contrib.staticfiles.finders.FileSystemFinder', 128 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', 129 | ]) 130 | 131 | MIDDLEWARE_CLASSES = values.ListValue([ 132 | 'django.contrib.sessions.middleware.SessionMiddleware', 133 | 'django.middleware.common.CommonMiddleware', 134 | 'django.middleware.csrf.CsrfViewMiddleware', 135 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 136 | 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 137 | 'django.contrib.messages.middleware.MessageMiddleware', 138 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 139 | 'django.middleware.security.SecurityMiddleware', 140 | ]) 141 | 142 | ROOT_URLCONF = '{{ cookiecutter.pkg_name }}.config.urls' 143 | 144 | WSGI_APPLICATION = '{{ cookiecutter.pkg_name }}.config.wsgi.application' 145 | 146 | TEMPLATES = [ 147 | { 148 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 149 | 'DIRS': [os.path.join(BaseDir.BASE_DIR, 'templates'), ], 150 | 'APP_DIRS': True, 151 | 'OPTIONS': { 152 | 'context_processors': [ 153 | 'django.template.context_processors.debug', 154 | 'django.template.context_processors.request', 155 | 'django.contrib.auth.context_processors.auth', 156 | 'django.contrib.messages.context_processors.messages', 157 | '{{ cookiecutter.pkg_name }}.context_processors.django_version', 158 | ], 159 | 'debug': values.BooleanValue( 160 | False, 161 | environ_name='DJANGO_TEMPLATES_TEMPLATE_DEBUG' 162 | ), 163 | # Beware before activating this! Grappelli has problems with admin 164 | # inlines and the template backend option 'string_if_invalid'. 165 | 'string_if_invalid': values.Value( 166 | '', 167 | environ_name='DJANGO_TEMPLATES_STRING_IF_INVALID' 168 | ), 169 | }, 170 | }, 171 | ] 172 | 173 | # the following line is only necessary because django-template-debug uses it 174 | TEMPLATE_DEBUG = TEMPLATES[0]['OPTIONS'].get('debug', False) 175 | 176 | FIXTURE_DIRS = ( 177 | os.path.join(BaseDir.BASE_DIR, 'fixtures'), 178 | ) 179 | 180 | INSTALLED_APPS = ( 181 | 'django.contrib.auth', 182 | 'django.contrib.contenttypes', 183 | 'django.contrib.sessions', 184 | 'django.contrib.sites', 185 | 'django.contrib.messages', 186 | 'django.contrib.staticfiles', 187 | 'grappelli', # grappelli must be listed before django.contrib.admin! 188 | 'django.contrib.admin', 189 | 'django.contrib.admindocs', 190 | 'crispy_forms', 191 | 'rules.apps.AutodiscoverRulesConfig', 192 | ) 193 | 194 | CACHES = values. DictValue({ 195 | 'default': { 196 | 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 197 | } 198 | }) 199 | 200 | CRISPY_TEMPLATE_PACK = values.Value('bootstrap3') 201 | 202 | GRAPPELLI_ADMIN_TITLE = '{{ cookiecutter.project_name }} Admin' 203 | 204 | EMAIL_SUBJECT_PREFIX = '[{{ cookiecutter.project_name }}]' 205 | 206 | DEFAULT_FROM_EMAIL = values.EmailValue('{{ cookiecutter.email }}') 207 | 208 | SERVER_EMAIL = DEFAULT_FROM_EMAIL 209 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/databases.py: -------------------------------------------------------------------------------- 1 | import dj_database_url 2 | from configurations import values 3 | 4 | 5 | class Databases(object): 6 | """Settings for PostgreSQL databases.""" 7 | 8 | DATABASES = { 9 | 'default': dj_database_url.config(env='DEFAULT_DATABASE_URL') 10 | } 11 | 12 | # Number of seconds database connections should persist for 13 | DATABASES['default']['CONN_MAX_AGE'] = values.IntegerValue( 14 | 600, 15 | environ_prefix='', 16 | environ_name='DEFAULT_CONN_MAX_AGE' 17 | ) 18 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/dev.py: -------------------------------------------------------------------------------- 1 | import socket 2 | import subprocess 3 | 4 | from configurations import values 5 | 6 | from . import common, databases 7 | 8 | 9 | class Development(databases.Databases, common.Common): 10 | """Settings for development.""" 11 | 12 | CACHES = values. DictValue({ 13 | 'default': { 14 | 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', 15 | } 16 | }) 17 | 18 | DEVSERVER_ARGS = values.ListValue([]) 19 | 20 | @property 21 | def DEVSERVER_DEFAULT_ADDR(self): # noqa 22 | """Return the default address to bind devserver to.""" 23 | if 'vagrant' in socket.gethostname(): 24 | addr = '0.0.0.0' 25 | else: 26 | addr = '127.0.0.1' 27 | return addr 28 | 29 | DEVSERVER_MODULES = values.ListValue([ 30 | 'devserver.modules.sql.SQLRealTimeModule', 31 | 'devserver.modules.sql.SQLSummaryModule', 32 | 'devserver.modules.profile.ProfileSummaryModule', 33 | ]) 34 | 35 | DEVSERVER_TRUNCATE_SQL = values.BooleanValue(True) 36 | 37 | EMAIL_BACKEND = values.Value('django.core.mail.backends.console.EmailBackend') 38 | 39 | # devserver must be ahead of django.contrib.staticfiles 40 | INSTALLED_APPS = ('devserver',) + common.Common.INSTALLED_APPS + ('debug_toolbar',) 41 | 42 | @property 43 | def INTERNAL_IPS(self): # noqa 44 | """Return a tuple of IP addresses, as strings. 45 | 46 | Detect a Vagrant box by looking at the hostname. Return the gateway IP 47 | address on a Vagrant box, because this is the IP address the request 48 | will originate from. 49 | """ 50 | if 'vagrant' in socket.gethostname(): 51 | addr = [line.split()[1] for line in subprocess.check_output(['netstat', '-rn']).splitlines() if line.startswith('0.0.0.0')][0] # noqa 52 | else: 53 | addr = '127.0.0.1' 54 | return (addr,) 55 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/email.py: -------------------------------------------------------------------------------- 1 | from configurations import values 2 | 3 | 4 | class Email(object): 5 | """Email settings for SMTP.""" 6 | 7 | EMAIL_HOST = values.Value('localhost') 8 | 9 | EMAIL_HOST_PASSWORD = values.SecretValue() 10 | 11 | EMAIL_HOST_USER = values.Value('{{ cookiecutter.email }}') 12 | 13 | EMAIL_PORT = values.IntegerValue(465) 14 | 15 | EMAIL_USE_SSL = values.BooleanValue(True) 16 | 17 | EMAIL_USE_TLS = values.BooleanValue(False) 18 | 19 | 20 | class Mailgun(object): 21 | """Email settings for Mailgun.""" 22 | 23 | EMAIL_BACKEND = 'django_mailgun.MailgunBackend' 24 | 25 | MAILGUN_ACCESS_KEY = values.SecretValue() 26 | 27 | MAILGUN_SERVER_NAME = values.Value('mg.transcode.de') 28 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/public.py: -------------------------------------------------------------------------------- 1 | from configurations import values 2 | 3 | from . import common, databases, email 4 | from .. import __version__ 5 | 6 | 7 | class Raven(object): 8 | """Report uncaught exceptions to the Sentry server.""" 9 | 10 | INSTALLED_APPS = common.Common.INSTALLED_APPS + ('raven.contrib.django.raven_compat',) 11 | 12 | RAVEN_CONFIG = { 13 | 'dsn': values.URLValue(environ_name='RAVEN_CONFIG_DSN'), 14 | 'release': __version__, 15 | } 16 | 17 | 18 | class Sentry404(Raven): 19 | """Log 404 events to the Sentry server.""" 20 | 21 | MIDDLEWARE_CLASSES = values.ListValue([ 22 | 'raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware', 23 | ].append(common.Common.MIDDLEWARE_CLASSES)) 24 | 25 | 26 | class Public(email.Email, databases.Databases, common.Common): 27 | """General settings for all public servers.""" 28 | 29 | CSRF_COOKIE_HTTPONLY = True 30 | 31 | SECRET_KEY = values.SecretValue() 32 | 33 | SECURE_BROWSER_XSS_FILTER = True 34 | 35 | SECURE_CONTENT_TYPE_NOSNIFF = True 36 | 37 | SILENCED_SYSTEM_CHECKS = values.ListValue([]) 38 | 39 | X_FRAME_OPTIONS = 'DENY' 40 | 41 | 42 | class SSL(object): 43 | """Default settings for SSL-enabled servers. 44 | 45 | Please read Django's SSL/HTTPS documentation and modify this configuration 46 | as needed. Be advised that the default settings will not work with all web 47 | servers. 48 | """ 49 | 50 | CSRF_COOKIE_SECURE = values.BooleanValue(True) 51 | 52 | SECURE_HSTS_INCLUDE_SUBDOMAINS = values.BooleanValue(True) 53 | 54 | SECURE_HSTS_SECONDS = values. IntegerValue(3600) 55 | 56 | SECURE_PROXY_SSL_HEADER = values.TupleValue(None) 57 | 58 | SECURE_REDIRECT_EXEMPT = values.ListValue([]) 59 | 60 | SECURE_SSL_HOST = values.Value('{{ cookiecutter.domain }}') 61 | 62 | SECURE_SSL_REDIRECT = values.BooleanValue(True) 63 | 64 | SESSION_COOKIE_SECURE = values.BooleanValue(True) 65 | 66 | 67 | class Staging(Public): 68 | """Settings for staging servers.""" 69 | 70 | pass 71 | 72 | 73 | class Production(Public, SSL): 74 | """Settings for production servers.""" 75 | 76 | pass 77 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/test.py: -------------------------------------------------------------------------------- 1 | from . import common, databases 2 | 3 | 4 | class Testing(databases.Databases, common.Common): 5 | """Settings for running the test suite.""" 6 | 7 | # Use a fast hasher to speed up tests. 8 | PASSWORD_HASHERS = ( 9 | 'django.contrib.auth.hashers.MD5PasswordHasher', 10 | ) 11 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/settings/values.py: -------------------------------------------------------------------------------- 1 | from configurations import values 2 | from django.core.exceptions import ValidationError 3 | from django.core.validators import validate_email 4 | 5 | 6 | class AdminsValue(values.SingleNestedTupleValue): 7 | """A ``SingleNestedTupleValue`` subclass to be used for the ADMINS and MANAGERS settings. 8 | 9 | Two validators are executed for each tuple: 10 | 11 | 1. The exact length of each tuple must be two. 12 | 2. The second element of each tuple must be a valid email address. 13 | """ 14 | 15 | def __init__(self, *args, **kwargs): 16 | """Configure the value object and validate the default if present.""" 17 | super(AdminsValue, self).__init__(*args, **kwargs) 18 | if self.default: 19 | self.validate(self.default) 20 | 21 | def validate_length(self, value): 22 | """Validate that each tuple contains only two values.""" 23 | if len(value) != 2: 24 | raise ValueError('Each ADMINS tuple must have exact two values') 25 | 26 | def validate_email(self, value): 27 | """Validate the email address.""" 28 | try: 29 | validate_email(value) 30 | except ValidationError: 31 | raise ValueError('Cannot interpret email value {0!r}'.format(value)) 32 | 33 | def validate(self, value): 34 | """Validate all tuples.""" 35 | for item in value: 36 | self.validate_length(item) 37 | self.validate_email(item[1]) 38 | 39 | def to_python(self, value): 40 | """Convert environment variable string and validate the python objects.""" 41 | value = super(AdminsValue, self).to_python(value) 42 | self.validate(value) 43 | return value 44 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from django.conf import settings 3 | from django.conf.urls import include, url 4 | from django.conf.urls.static import static 5 | from django.contrib import admin 6 | 7 | urlpatterns = [ 8 | url(r'^grappelli/', include('grappelli.urls')), 9 | url(r'^admin/', include(admin.site.urls)), 10 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 11 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/config/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for {{ cookiecutter.repo_name }} project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ 8 | """ 9 | import os 10 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', '{{ cookiecutter.pkg_name }}.config.settings.dev') 11 | os.environ.setdefault('DJANGO_CONFIGURATION', 'Development') 12 | 13 | from configurations.wsgi import get_wsgi_application 14 | application = get_wsgi_application() 15 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/context_processors.py: -------------------------------------------------------------------------------- 1 | import django 2 | 3 | 4 | def django_version(request): 5 | """Add the Django version to the context.""" 6 | return {'django_version': django.get_version()} 7 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/fixtures/sites.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pk": 1, 4 | "model": "sites.site", 5 | "fields": { 6 | "domain": "{{ cookiecutter.domain }}", 7 | "name": "{{ cookiecutter.project_name }}" 8 | } 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/media/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/media/.gitkeep -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/css/bootstrap-theme.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.1.1 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | .btn-default, 8 | .btn-primary, 9 | .btn-success, 10 | .btn-info, 11 | .btn-warning, 12 | .btn-danger { 13 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); 14 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 15 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); 16 | } 17 | .btn-default:active, 18 | .btn-primary:active, 19 | .btn-success:active, 20 | .btn-info:active, 21 | .btn-warning:active, 22 | .btn-danger:active, 23 | .btn-default.active, 24 | .btn-primary.active, 25 | .btn-success.active, 26 | .btn-info.active, 27 | .btn-warning.active, 28 | .btn-danger.active { 29 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 30 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); 31 | } 32 | .btn:active, 33 | .btn.active { 34 | background-image: none; 35 | } 36 | .btn-default { 37 | text-shadow: 0 1px 0 #fff; 38 | background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); 39 | background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); 40 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); 41 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 42 | background-repeat: repeat-x; 43 | border-color: #dbdbdb; 44 | border-color: #ccc; 45 | } 46 | .btn-default:hover, 47 | .btn-default:focus { 48 | background-color: #e0e0e0; 49 | background-position: 0 -15px; 50 | } 51 | .btn-default:active, 52 | .btn-default.active { 53 | background-color: #e0e0e0; 54 | border-color: #dbdbdb; 55 | } 56 | .btn-primary { 57 | background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); 58 | background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); 59 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); 60 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 61 | background-repeat: repeat-x; 62 | border-color: #2b669a; 63 | } 64 | .btn-primary:hover, 65 | .btn-primary:focus { 66 | background-color: #2d6ca2; 67 | background-position: 0 -15px; 68 | } 69 | .btn-primary:active, 70 | .btn-primary.active { 71 | background-color: #2d6ca2; 72 | border-color: #2b669a; 73 | } 74 | .btn-success { 75 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); 76 | background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); 77 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); 78 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 79 | background-repeat: repeat-x; 80 | border-color: #3e8f3e; 81 | } 82 | .btn-success:hover, 83 | .btn-success:focus { 84 | background-color: #419641; 85 | background-position: 0 -15px; 86 | } 87 | .btn-success:active, 88 | .btn-success.active { 89 | background-color: #419641; 90 | border-color: #3e8f3e; 91 | } 92 | .btn-info { 93 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); 94 | background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); 95 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); 96 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 97 | background-repeat: repeat-x; 98 | border-color: #28a4c9; 99 | } 100 | .btn-info:hover, 101 | .btn-info:focus { 102 | background-color: #2aabd2; 103 | background-position: 0 -15px; 104 | } 105 | .btn-info:active, 106 | .btn-info.active { 107 | background-color: #2aabd2; 108 | border-color: #28a4c9; 109 | } 110 | .btn-warning { 111 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); 112 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); 113 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); 114 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 115 | background-repeat: repeat-x; 116 | border-color: #e38d13; 117 | } 118 | .btn-warning:hover, 119 | .btn-warning:focus { 120 | background-color: #eb9316; 121 | background-position: 0 -15px; 122 | } 123 | .btn-warning:active, 124 | .btn-warning.active { 125 | background-color: #eb9316; 126 | border-color: #e38d13; 127 | } 128 | .btn-danger { 129 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); 130 | background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); 131 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); 132 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 133 | background-repeat: repeat-x; 134 | border-color: #b92c28; 135 | } 136 | .btn-danger:hover, 137 | .btn-danger:focus { 138 | background-color: #c12e2a; 139 | background-position: 0 -15px; 140 | } 141 | .btn-danger:active, 142 | .btn-danger.active { 143 | background-color: #c12e2a; 144 | border-color: #b92c28; 145 | } 146 | .thumbnail, 147 | .img-thumbnail { 148 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 149 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 150 | } 151 | .dropdown-menu > li > a:hover, 152 | .dropdown-menu > li > a:focus { 153 | background-color: #e8e8e8; 154 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 155 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 156 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 157 | background-repeat: repeat-x; 158 | } 159 | .dropdown-menu > .active > a, 160 | .dropdown-menu > .active > a:hover, 161 | .dropdown-menu > .active > a:focus { 162 | background-color: #357ebd; 163 | background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); 164 | background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); 165 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); 166 | background-repeat: repeat-x; 167 | } 168 | .navbar-default { 169 | background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); 170 | background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); 171 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); 172 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 173 | background-repeat: repeat-x; 174 | border-radius: 4px; 175 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 176 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); 177 | } 178 | .navbar-default .navbar-nav > .active > a { 179 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); 180 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); 181 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); 182 | background-repeat: repeat-x; 183 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 184 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); 185 | } 186 | .navbar-brand, 187 | .navbar-nav > li > a { 188 | text-shadow: 0 1px 0 rgba(255, 255, 255, .25); 189 | } 190 | .navbar-inverse { 191 | background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); 192 | background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); 193 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); 194 | filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); 195 | background-repeat: repeat-x; 196 | } 197 | .navbar-inverse .navbar-nav > .active > a { 198 | background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%); 199 | background-image: linear-gradient(to bottom, #222 0%, #282828 100%); 200 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); 201 | background-repeat: repeat-x; 202 | -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 203 | box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); 204 | } 205 | .navbar-inverse .navbar-brand, 206 | .navbar-inverse .navbar-nav > li > a { 207 | text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); 208 | } 209 | .navbar-static-top, 210 | .navbar-fixed-top, 211 | .navbar-fixed-bottom { 212 | border-radius: 0; 213 | } 214 | .alert { 215 | text-shadow: 0 1px 0 rgba(255, 255, 255, .2); 216 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 217 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); 218 | } 219 | .alert-success { 220 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); 221 | background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); 222 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); 223 | background-repeat: repeat-x; 224 | border-color: #b2dba1; 225 | } 226 | .alert-info { 227 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); 228 | background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); 229 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); 230 | background-repeat: repeat-x; 231 | border-color: #9acfea; 232 | } 233 | .alert-warning { 234 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); 235 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); 236 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); 237 | background-repeat: repeat-x; 238 | border-color: #f5e79e; 239 | } 240 | .alert-danger { 241 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); 242 | background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); 243 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); 244 | background-repeat: repeat-x; 245 | border-color: #dca7a7; 246 | } 247 | .progress { 248 | background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); 249 | background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); 250 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); 251 | background-repeat: repeat-x; 252 | } 253 | .progress-bar { 254 | background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); 255 | background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); 256 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); 257 | background-repeat: repeat-x; 258 | } 259 | .progress-bar-success { 260 | background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); 261 | background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); 262 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); 263 | background-repeat: repeat-x; 264 | } 265 | .progress-bar-info { 266 | background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); 267 | background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); 268 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); 269 | background-repeat: repeat-x; 270 | } 271 | .progress-bar-warning { 272 | background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); 273 | background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); 274 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); 275 | background-repeat: repeat-x; 276 | } 277 | .progress-bar-danger { 278 | background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); 279 | background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); 280 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); 281 | background-repeat: repeat-x; 282 | } 283 | .list-group { 284 | border-radius: 4px; 285 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 286 | box-shadow: 0 1px 2px rgba(0, 0, 0, .075); 287 | } 288 | .list-group-item.active, 289 | .list-group-item.active:hover, 290 | .list-group-item.active:focus { 291 | text-shadow: 0 -1px 0 #3071a9; 292 | background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); 293 | background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); 294 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); 295 | background-repeat: repeat-x; 296 | border-color: #3278b3; 297 | } 298 | .panel { 299 | -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 300 | box-shadow: 0 1px 2px rgba(0, 0, 0, .05); 301 | } 302 | .panel-default > .panel-heading { 303 | background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); 304 | background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); 305 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); 306 | background-repeat: repeat-x; 307 | } 308 | .panel-primary > .panel-heading { 309 | background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); 310 | background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); 311 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); 312 | background-repeat: repeat-x; 313 | } 314 | .panel-success > .panel-heading { 315 | background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); 316 | background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); 317 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); 318 | background-repeat: repeat-x; 319 | } 320 | .panel-info > .panel-heading { 321 | background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); 322 | background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); 323 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); 324 | background-repeat: repeat-x; 325 | } 326 | .panel-warning > .panel-heading { 327 | background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); 328 | background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); 329 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); 330 | background-repeat: repeat-x; 331 | } 332 | .panel-danger > .panel-heading { 333 | background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); 334 | background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); 335 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); 336 | background-repeat: repeat-x; 337 | } 338 | .well { 339 | background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); 340 | background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); 341 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); 342 | background-repeat: repeat-x; 343 | border-color: #dcdcdc; 344 | -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 345 | box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); 346 | } 347 | /*# sourceMappingURL=bootstrap-theme.css.map */ 348 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.1.1 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | .btn-default,.btn-primary,.btn-success,.btn-info,.btn-warning,.btn-danger{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-default:active,.btn-primary:active,.btn-success:active,.btn-info:active,.btn-warning:active,.btn-danger:active,.btn-default.active,.btn-primary.active,.btn-success.active,.btn-info.active,.btn-warning.active,.btn-danger.active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn:active,.btn.active{background-image:none}.btn-default{background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;text-shadow:0 1px 0 #fff;border-color:#ccc}.btn-default:hover,.btn-default:focus{background-color:#e0e0e0;background-position:0 -15px}.btn-default:active,.btn-default.active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-primary{background-image:-webkit-linear-gradient(top,#428bca 0,#2d6ca2 100%);background-image:linear-gradient(to bottom,#428bca 0,#2d6ca2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#2b669a}.btn-primary:hover,.btn-primary:focus{background-color:#2d6ca2;background-position:0 -15px}.btn-primary:active,.btn-primary.active{background-color:#2d6ca2;border-color:#2b669a}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:hover,.btn-success:focus{background-color:#419641;background-position:0 -15px}.btn-success:active,.btn-success.active{background-color:#419641;border-color:#3e8f3e}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:hover,.btn-info:focus{background-color:#2aabd2;background-position:0 -15px}.btn-info:active,.btn-info.active{background-color:#2aabd2;border-color:#28a4c9}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:hover,.btn-warning:focus{background-color:#eb9316;background-position:0 -15px}.btn-warning:active,.btn-warning.active{background-color:#eb9316;border-color:#e38d13}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:hover,.btn-danger:focus{background-color:#c12e2a;background-position:0 -15px}.btn-danger:active,.btn-danger.active{background-color:#c12e2a;border-color:#b92c28}.thumbnail,.img-thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-color:#e8e8e8}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);background-color:#357ebd}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f3f3f3 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f3f3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .navbar-nav>.active>a{background-image:-webkit-linear-gradient(top,#222 0,#282828 100%);background-image:linear-gradient(to bottom,#222 0,#282828 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-static-top,.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0)}.progress-bar{background-image:-webkit-linear-gradient(top,#428bca 0,#3071a9 100%);background-image:linear-gradient(to bottom,#428bca 0,#3071a9 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0)}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0)}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0)}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0)}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{text-shadow:0 -1px 0 #3071a9;background-image:-webkit-linear-gradient(top,#428bca 0,#3278b3 100%);background-image:linear-gradient(to bottom,#428bca 0,#3278b3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);border-color:#3278b3}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0)}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0)}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0)}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0)}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0)}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0)}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/css/main.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* ========================================================================== 4 | Author's custom styles 5 | ========================================================================== */ 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/js/main.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/js/vendor/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.1.1 (http://getbootstrap.com) 3 | * Copyright 2011-2014 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js: -------------------------------------------------------------------------------- 1 | {% raw %} 2 | /* Modernizr 2.6.2 (Custom Build) | MIT & BSD 3 | * Build: http://modernizr.com/download/#-fontface-backgroundsize-borderimage-borderradius-boxshadow-flexbox-hsla-multiplebgs-opacity-rgba-textshadow-cssanimations-csscolumns-generatedcontent-cssgradients-cssreflections-csstransforms-csstransforms3d-csstransitions-applicationcache-canvas-canvastext-draganddrop-hashchange-history-audio-video-indexeddb-input-inputtypes-localstorage-postmessage-sessionstorage-websockets-websqldatabase-webworkers-geolocation-inlinesvg-smil-svg-svgclippaths-touch-webgl-shiv-mq-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-load 4 | */ 5 | ;window.Modernizr=function(a,b,c){function D(a){j.cssText=a}function E(a,b){return D(n.join(a+";")+(b||""))}function F(a,b){return typeof a===b}function G(a,b){return!!~(""+a).indexOf(b)}function H(a,b){for(var d in a){var e=a[d];if(!G(e,"-")&&j[e]!==c)return b=="pfx"?e:!0}return!1}function I(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:F(f,"function")?f.bind(d||b):f}return!1}function J(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+p.join(d+" ")+d).split(" ");return F(b,"string")||F(b,"undefined")?H(e,b):(e=(a+" "+q.join(d+" ")+d).split(" "),I(e,b,c))}function K(){e.input=function(c){for(var d=0,e=c.length;d',a,""].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},z=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return y("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},A=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=F(e[d],"function"),F(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),B={}.hasOwnProperty,C;!F(B,"undefined")&&!F(B.call,"undefined")?C=function(a,b){return B.call(a,b)}:C=function(a,b){return b in a&&F(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=w.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(w.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(w.call(arguments)))};return e}),s.flexbox=function(){return J("flexWrap")},s.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},s.canvastext=function(){return!!e.canvas&&!!F(b.createElement("canvas").getContext("2d").fillText,"function")},s.webgl=function(){return!!a.WebGLRenderingContext},s.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:y(["@media (",n.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},s.geolocation=function(){return"geolocation"in navigator},s.postmessage=function(){return!!a.postMessage},s.websqldatabase=function(){return!!a.openDatabase},s.indexedDB=function(){return!!J("indexedDB",a)},s.hashchange=function(){return A("hashchange",a)&&(b.documentMode===c||b.documentMode>7)},s.history=function(){return!!a.history&&!!history.pushState},s.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},s.websockets=function(){return"WebSocket"in a||"MozWebSocket"in a},s.rgba=function(){return D("background-color:rgba(150,255,150,.5)"),G(j.backgroundColor,"rgba")},s.hsla=function(){return D("background-color:hsla(120,40%,100%,.5)"),G(j.backgroundColor,"rgba")||G(j.backgroundColor,"hsla")},s.multiplebgs=function(){return D("background:url(https://),url(https://),red url(https://)"),/(url\s*\(.*?){3}/.test(j.background)},s.backgroundsize=function(){return J("backgroundSize")},s.borderimage=function(){return J("borderImage")},s.borderradius=function(){return J("borderRadius")},s.boxshadow=function(){return J("boxShadow")},s.textshadow=function(){return b.createElement("div").style.textShadow===""},s.opacity=function(){return E("opacity:.55"),/^0.55$/.test(j.opacity)},s.cssanimations=function(){return J("animationName")},s.csscolumns=function(){return J("columnCount")},s.cssgradients=function(){var a="background-image:",b="gradient(linear,left top,right bottom,from(#9f9),to(white));",c="linear-gradient(left top,#9f9, white);";return D((a+"-webkit- ".split(" ").join(b+a)+n.join(c+a)).slice(0,-a.length)),G(j.backgroundImage,"gradient")},s.cssreflections=function(){return J("boxReflect")},s.csstransforms=function(){return!!J("transform")},s.csstransforms3d=function(){var a=!!J("perspective");return a&&"webkitPerspective"in g.style&&y("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},s.csstransitions=function(){return J("transition")},s.fontface=function(){var a;return y('@font-face {font-family:"font";src:url("https://")}',function(c,d){var e=b.getElementById("smodernizr"),f=e.sheet||e.styleSheet,g=f?f.cssRules&&f.cssRules[0]?f.cssRules[0].cssText:f.cssText||"":"";a=/src/i.test(g)&&g.indexOf(d.split(" ")[0])===0}),a},s.generatedcontent=function(){var a;return y(["#",h,"{font:0/0 a}#",h,':after{content:"',l,'";visibility:hidden;font:3px/1 a}'].join(""),function(b){a=b.offsetHeight>=3}),a},s.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c},s.audio=function(){var a=b.createElement("audio"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),c.mp3=a.canPlayType("audio/mpeg;").replace(/^no$/,""),c.wav=a.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),c.m4a=(a.canPlayType("audio/x-m4a;")||a.canPlayType("audio/aac;")).replace(/^no$/,"")}catch(d){}return c},s.localstorage=function(){try{return localStorage.setItem(h,h),localStorage.removeItem(h),!0}catch(a){return!1}},s.sessionstorage=function(){try{return sessionStorage.setItem(h,h),sessionStorage.removeItem(h),!0}catch(a){return!1}},s.webworkers=function(){return!!a.Worker},s.applicationcache=function(){return!!a.applicationCache},s.svg=function(){return!!b.createElementNS&&!!b.createElementNS(r.svg,"svg").createSVGRect},s.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="",(a.firstChild&&a.firstChild.namespaceURI)==r.svg},s.smil=function(){return!!b.createElementNS&&/SVGAnimate/.test(m.call(b.createElementNS(r.svg,"animate")))},s.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(m.call(b.createElementNS(r.svg,"clipPath")))};for(var L in s)C(s,L)&&(x=L.toLowerCase(),e[x]=s[L](),v.push((e[x]?"":"no-")+x));return e.input||K(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)C(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},D(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=n,e._domPrefixes=q,e._cssomPrefixes=p,e.mq=z,e.hasEvent=A,e.testProp=function(a){return H([a])},e.testAllProps=J,e.testStyles=y,e.prefixed=function(a,b,c){return b?J(a,b,c):J(a,"pfx")},g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+v.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f #mq-test-1 { width: 42px; }';a.insertBefore(d,b);c=g.offsetWidth==42;a.removeChild(d);return{matches:c,media:h}}})(document); 10 | 11 | /*! Respond.js v1.1.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ 12 | (function(e){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=e.matchMedia&&e.matchMedia("only all").matches;if(respond.mediaQueriesSupported){return}var w=e.document,s=w.documentElement,i=[],k=[],q=[],o={},h=30,f=w.getElementsByTagName("head")[0]||s,g=w.getElementsByTagName("base")[0],b=f.getElementsByTagName("link"),d=[],a=function(){var D=b,y=D.length,B=0,A,z,C,x;for(;B-1,minw:F.match(/\(min\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:F.match(/\(max\-width:[\s]*([\s]*[0-9\.]+)(px|em)[\s]*\)/)&&parseFloat(RegExp.$1)+(RegExp.$2||"")})}}j()},l,r,v=function(){var z,A=w.createElement("div"),x=w.body,y=false;A.style.cssText="position:absolute;font-size:1em;width:1em";if(!x){x=y=w.createElement("body");x.style.background="none"}x.appendChild(A);s.insertBefore(x,s.firstChild);z=A.offsetWidth;if(y){s.removeChild(x)}else{x.removeChild(A)}z=p=parseFloat(z);return z},p,j=function(I){var x="clientWidth",B=s[x],H=w.compatMode==="CSS1Compat"&&B||w.body[x]||B,D={},G=b[b.length-1],z=(new Date()).getTime();if(I&&l&&z-l-1?(p||v()):1)}if(!!J){J=parseFloat(J)*(J.indexOf(y)>-1?(p||v()):1)}if(!K.hasquery||(!A||!L)&&(A||H>=C)&&(L||H<=J)){if(!D[K.media]){D[K.media]=[]}D[K.media].push(k[K.rules])}}for(var E in q){if(q[E]&&q[E].parentNode===f){f.removeChild(q[E])}}for(var E in D){var M=w.createElement("style"),F=D[E].join("\n");M.type="text/css";M.media=E;f.insertBefore(M,G.nextSibling);if(M.styleSheet){M.styleSheet.cssText=F}else{M.appendChild(w.createTextNode(F))}q.push(M)}},n=function(x,z){var y=c();if(!y){return}y.open("GET",x,true);y.onreadystatechange=function(){if(y.readyState!=4||y.status!=200&&y.status!=304){return}z(y.responseText)};if(y.readyState==4){return}y.send(null)},c=(function(){var x=false;try{x=new XMLHttpRequest()}catch(y){x=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return x}})();a();respond.update=a;function t(){j(true)}if(e.addEventListener){e.addEventListener("resize",t,false)}else{if(e.attachEvent){e.attachEvent("onresize",t)}}})(this); 13 | {% endraw %} 14 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static_root/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/transcode-de/cookiecutter-django-project/d710298b819cf2194ae7b362c03c8dea662edf4c/{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/static_root/.gitkeep -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/templates/403.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Permission denied :( 6 | 72 | 73 | 74 |
75 |

Permission denied :(

76 |

Sorry, but you have no permissions for the page you were trying to view.

77 |
78 | 79 | 80 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/templates/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Page Not Found :( 6 | 141 | 142 | 143 |
144 |

Not found :(

145 |

Sorry, but the page you were trying to view does not exist.

146 |

It looks like this was the result of either:

147 |
    148 |
  • a mistyped address
  • 149 |
  • an out-of-date link
  • 150 |
151 | 154 | 155 |
156 | 157 | 158 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/templates/500.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Server error :( 6 | 72 | 73 | 74 |
75 |

Server error :(

76 |

Sorry, but there seems to be a technical problem with the page you are trying to view.

77 |

Our support team has been informed and will try to fix the problem as soon as possible.

78 |
79 | 80 | 81 | -------------------------------------------------------------------------------- /{{ cookiecutter.repo_name }}/{{ cookiecutter.pkg_name }}/templates/base.html: -------------------------------------------------------------------------------- 1 | {% raw %}{% load static from staticfiles %}{% endraw %} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {{ cookiecutter.project_name }} - {% raw %}{% block title %}{% endblock %}{% endraw %} 11 | 12 | 13 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 30 | 54 | 55 |
56 |
57 | {% block content %}{% endblock %} 58 |
59 | 60 |
61 | 62 |
63 |

© {{ cookiecutter.project_name }} {{ cookiecutter.year }}

64 |
65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 81 | 82 | 83 | 84 | --------------------------------------------------------------------------------