mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-02 03:00:23 +03:00
merge my changes with master upstream
This commit is contained in:
commit
5bb3f61945
40
CHANGELOG.md
40
CHANGELOG.md
|
@ -2,6 +2,44 @@
|
||||||
All enhancements and patches to Cookiecutter Django will be documented in this file.
|
All enhancements and patches to Cookiecutter Django will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
##[2016-05-22]
|
||||||
|
### Added
|
||||||
|
- Added instructions for copying backups from docker to host (@phiberjenz)
|
||||||
|
- Added mailhog docker container (@noisy)
|
||||||
|
|
||||||
|
##[2016-05-15]
|
||||||
|
### Added
|
||||||
|
- Added GitLab continuous integration article to README.rst (@dezoito)
|
||||||
|
|
||||||
|
## [2016-05-13]
|
||||||
|
### Changed
|
||||||
|
- Update version of pyflakes to 1.2.3, django-extensions to 1.6.7 and gunicorn to 19.5.0 (@luzfcb)
|
||||||
|
- Update version of AngularJS to 1.5.5 (@luzfcb)
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
- Remove Raven 404 catch middleware. Fix #367 (@pydanny)
|
||||||
|
|
||||||
|
## [2016-05-09]
|
||||||
|
### Changed
|
||||||
|
- Improved mailhog usage documentation on `developing-locally.rst` (@shireenrao)
|
||||||
|
- Replaced all `readthedocs.org` referencies to point to the new domain `readthedocs.io` (@luzfcb)
|
||||||
|
- Update version of pyflakes (@luzfcb)
|
||||||
|
|
||||||
|
## [2016-05-08]
|
||||||
|
### Changed
|
||||||
|
- Updated whitenoise configuration to match changes in version 3.0 (@trungdong)
|
||||||
|
|
||||||
|
## [2016-05-07]
|
||||||
|
### Added
|
||||||
|
- Added Ubuntu 16.04 dependencies on a new dependency file `requirements.apt.xenial` (@raonyguimaraes)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Small improvements in ``install_os_dependencies.sh`` support new dependency file (@raonyguimaraes)
|
||||||
|
|
||||||
|
## [2016-05-06]
|
||||||
|
### Changed
|
||||||
|
- Update version of pyflakes (@pydanny)
|
||||||
|
|
||||||
## [2016-05-03]
|
## [2016-05-03]
|
||||||
### Changed
|
### Changed
|
||||||
- Update version of Django, django-extensions, django-mailgun (@luzfcb)
|
- Update version of Django, django-extensions, django-mailgun (@luzfcb)
|
||||||
|
@ -518,7 +556,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- Styles that already exist in Bootstrap 4 (or 3) (@audreyr)
|
- Styles that already exist in Bootstrap 4 (or 3) (@audreyr)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Fix issue #296 - change login.html to use [get_providers](https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/templatetags/socialaccount.py#L84-L93) templatetag because ``allauth.socialaccount`` context processor now is [deprecated](http://django-allauth.readthedocs.org/en/latest/changelog.html#from-0-21-0) (@luzfcb)
|
- Fix issue #296 - change login.html to use [get_providers](https://github.com/pennersr/django-allauth/blob/master/allauth/socialaccount/templatetags/socialaccount.py#L84-L93) templatetag because ``allauth.socialaccount`` context processor now is [deprecated](http://django-allauth.readthedocs.io/en/latest/changelog.html#from-0-21-0) (@luzfcb)
|
||||||
|
|
||||||
## [2015-09-09]
|
## [2015-09-09]
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -49,7 +49,7 @@ To run a particular test with tox for against your current Python version::
|
||||||
$ tox -e py -- -k test_default_configuration
|
$ tox -e py -- -k test_default_configuration
|
||||||
|
|
||||||
.. _`pytest usage docs`: https://pytest.org/latest/usage.html#specifying-tests-selecting-tests
|
.. _`pytest usage docs`: https://pytest.org/latest/usage.html#specifying-tests-selecting-tests
|
||||||
.. _`tox`: https://tox.readthedocs.org/en/latest/
|
.. _`tox`: https://tox.readthedocs.io/en/latest/
|
||||||
.. _`pip`: https://pypi.python.org/pypi/pip/
|
.. _`pip`: https://pypi.python.org/pypi/pip/
|
||||||
.. _`pytest-cookies`: https://pypi.python.org/pypi/pytest-cookies/
|
.. _`pytest-cookies`: https://pypi.python.org/pypi/pytest-cookies/
|
||||||
.. _`flake8`: https://pypi.python.org/pypi/flake8/
|
.. _`flake8`: https://pypi.python.org/pypi/flake8/
|
||||||
|
|
|
@ -35,6 +35,7 @@ Listed in alphabetical order.
|
||||||
========================== ============================ ==============
|
========================== ============================ ==============
|
||||||
Name Github Twitter
|
Name Github Twitter
|
||||||
========================== ============================ ==============
|
========================== ============================ ==============
|
||||||
|
18 `@dezoito`_
|
||||||
a7p `@a7p`_
|
a7p `@a7p`_
|
||||||
Aaron Eikenberry `@aeikenberry`_
|
Aaron Eikenberry `@aeikenberry`_
|
||||||
Adam Bogdał `@bogdal`_
|
Adam Bogdał `@bogdal`_
|
||||||
|
@ -67,6 +68,8 @@ Listed in alphabetical order.
|
||||||
David Díaz `@ddiazpinto`_ @DavidDiazPinto
|
David Díaz `@ddiazpinto`_ @DavidDiazPinto
|
||||||
Davur Clementsen `@dsclementsen`_ @davur
|
Davur Clementsen `@dsclementsen`_ @davur
|
||||||
Dónal Adams `@epileptic-fish`_
|
Dónal Adams `@epileptic-fish`_
|
||||||
|
Dong Huynh `@trungdong`_
|
||||||
|
Emanuel Calso `@bloodpet`_ @bloodpet
|
||||||
Eraldo Energy `@eraldo`_
|
Eraldo Energy `@eraldo`_
|
||||||
Eyad Al Sibai `@eyadsibai`_
|
Eyad Al Sibai `@eyadsibai`_
|
||||||
Felipe Arruda `@arruda`_
|
Felipe Arruda `@arruda`_
|
||||||
|
@ -76,6 +79,7 @@ Listed in alphabetical order.
|
||||||
Henrique G. G. Pereira `@ikkebr`_
|
Henrique G. G. Pereira `@ikkebr`_
|
||||||
Ian Lee `@IanLee1521`_
|
Ian Lee `@IanLee1521`_
|
||||||
Jan Van Bruggen `@jvanbrug`_
|
Jan Van Bruggen `@jvanbrug`_
|
||||||
|
Jens Nilsson `@phiberjenz`
|
||||||
Julio Castillo `@juliocc`_
|
Julio Castillo `@juliocc`_
|
||||||
Kaido Kert `@kaidokert`_
|
Kaido Kert `@kaidokert`_
|
||||||
Kaveh `@ka7eh`_
|
Kaveh `@ka7eh`_
|
||||||
|
@ -95,11 +99,13 @@ Listed in alphabetical order.
|
||||||
mozillazg `@mozillazg`_
|
mozillazg `@mozillazg`_
|
||||||
Pablo `@oubiga`_
|
Pablo `@oubiga`_
|
||||||
Raphael Pierzina `@hackebrot`_
|
Raphael Pierzina `@hackebrot`_
|
||||||
|
Raony Guimarães Corrêa `@raonyguimaraes`_
|
||||||
Roman Afanaskin `@siauPatrick`_
|
Roman Afanaskin `@siauPatrick`_
|
||||||
Roman Osipenko `@romanosipenko`_
|
Roman Osipenko `@romanosipenko`_
|
||||||
Russell Davies
|
Russell Davies
|
||||||
stepmr `@stepmr`_
|
stepmr `@stepmr`_
|
||||||
Sławek Ehlert `@slafs`_
|
Sławek Ehlert `@slafs`_
|
||||||
|
Srinivas Nyayapati `@shireenrao`_
|
||||||
Taylor Baldwin
|
Taylor Baldwin
|
||||||
Théo Segonds `@show0k`_
|
Théo Segonds `@show0k`_
|
||||||
Tom Atkins `@knitatoms`_
|
Tom Atkins `@knitatoms`_
|
||||||
|
@ -109,6 +115,7 @@ Listed in alphabetical order.
|
||||||
Yaroslav Halchenko
|
Yaroslav Halchenko
|
||||||
========================== ============================ ==============
|
========================== ============================ ==============
|
||||||
|
|
||||||
|
.. _@dezoito: https://github.com/dezoito
|
||||||
.. _@a7p: https://github.com/a7p
|
.. _@a7p: https://github.com/a7p
|
||||||
.. _@ad-m: https://github.com/ad-m
|
.. _@ad-m: https://github.com/ad-m
|
||||||
.. _@aeikenberry: https://github.com/aeikenberry
|
.. _@aeikenberry: https://github.com/aeikenberry
|
||||||
|
@ -117,6 +124,7 @@ Listed in alphabetical order.
|
||||||
.. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza
|
.. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza
|
||||||
.. _@areski: https://github.com/areski
|
.. _@areski: https://github.com/areski
|
||||||
.. _@arruda: https://github.com/arruda
|
.. _@arruda: https://github.com/arruda
|
||||||
|
.. _@bloodpet: https://github.com/bloodpet
|
||||||
.. _@bogdal: https://github.com/bogdal
|
.. _@bogdal: https://github.com/bogdal
|
||||||
.. _@burhan: https://github.com/burhan
|
.. _@burhan: https://github.com/burhan
|
||||||
.. _@c-rhodes: https://github.com/c-rhodes
|
.. _@c-rhodes: https://github.com/c-rhodes
|
||||||
|
@ -154,11 +162,14 @@ Listed in alphabetical order.
|
||||||
.. _@originell: https://github.com/originell
|
.. _@originell: https://github.com/originell
|
||||||
.. _@oubiga: https://github.com/oubiga
|
.. _@oubiga: https://github.com/oubiga
|
||||||
.. _@romanosipenko: https://github.com/romanosipenko
|
.. _@romanosipenko: https://github.com/romanosipenko
|
||||||
|
.. _@raonyguimaraes: https://github.com/raonyguimaraes
|
||||||
.. _@show0k: https://github.com/show0k
|
.. _@show0k: https://github.com/show0k
|
||||||
.. _@siauPatrick: https://github.com/siauPatrick
|
.. _@siauPatrick: https://github.com/siauPatrick
|
||||||
|
.. _@shireenrao: https://github.com/shireenrao
|
||||||
.. _@slafs: https://github.com/slafs
|
.. _@slafs: https://github.com/slafs
|
||||||
.. _@stepmr: https://github.com/stepmr
|
.. _@stepmr: https://github.com/stepmr
|
||||||
.. _@Travistock: https://github.com/Tavistock
|
.. _@Travistock: https://github.com/Tavistock
|
||||||
|
.. _@trungdong: https://github.com/trungdong
|
||||||
.. _@yunti: https://github.com/yunti
|
.. _@yunti: https://github.com/yunti
|
||||||
.. _@zcho: https://github.com/zcho
|
.. _@zcho: https://github.com/zcho
|
||||||
.. _@noisy: https://github.com/noisy
|
.. _@noisy: https://github.com/noisy
|
||||||
|
|
4
LICENSE
4
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2013, Daniel Greenfeld
|
Copyright (c) 2013-2016, Daniel Greenfeld
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification,
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
@ -11,7 +11,7 @@ are permitted provided that the following conditions are met:
|
||||||
list of conditions and the following disclaimer in the documentation and/or
|
list of conditions and the following disclaimer in the documentation and/or
|
||||||
other materials provided with the distribution.
|
other materials provided with the distribution.
|
||||||
|
|
||||||
* Neither the name of cookiecutter-django nor the names of its contributors may
|
* Neither the name of Cookiecutter Django nor the names of its contributors may
|
||||||
be used to endorse or promote products derived from this software without
|
be used to endorse or promote products derived from this software without
|
||||||
specific prior written permission.
|
specific prior written permission.
|
||||||
|
|
||||||
|
|
14
README.rst
14
README.rst
|
@ -16,6 +16,10 @@ Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting pr
|
||||||
|
|
||||||
.. _cookiecutter: https://github.com/audreyr/cookiecutter
|
.. _cookiecutter: https://github.com/audreyr/cookiecutter
|
||||||
|
|
||||||
|
**Warning**: if you get the error "jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'now'." , please upgrade your cookiecutter version to >= 1.4 (see issue # 528_ )
|
||||||
|
|
||||||
|
.. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373
|
||||||
|
|
||||||
Features
|
Features
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
@ -58,7 +62,7 @@ Optional Integrations
|
||||||
.. _django-avatar: https://github.com/jezdez/django-avatar/
|
.. _django-avatar: https://github.com/jezdez/django-avatar/
|
||||||
.. _Procfile: https://devcenter.heroku.com/articles/procfile
|
.. _Procfile: https://devcenter.heroku.com/articles/procfile
|
||||||
.. _Mailgun: https://mailgun.com/
|
.. _Mailgun: https://mailgun.com/
|
||||||
.. _Whitenoise: https://whitenoise.readthedocs.org/
|
.. _Whitenoise: https://whitenoise.readthedocs.io/
|
||||||
.. _Celery: http://www.celeryproject.org/
|
.. _Celery: http://www.celeryproject.org/
|
||||||
.. _MailHog: https://github.com/mailhog/MailHog
|
.. _MailHog: https://github.com/mailhog/MailHog
|
||||||
.. _Sentry: https://getsentry.com
|
.. _Sentry: https://getsentry.com
|
||||||
|
@ -153,9 +157,9 @@ For development, see the following for local development:
|
||||||
* `Developing locally`_
|
* `Developing locally`_
|
||||||
* `Developing locally using docker`_
|
* `Developing locally using docker`_
|
||||||
|
|
||||||
.. _options: http://cookiecutter-django.readthedocs.org/en/latest/project-generation-options.html
|
.. _options: http://cookiecutter-django.readthedocs.io/en/latest/project-generation-options.html
|
||||||
.. _`Developing locally`: http://cookiecutter-django.readthedocs.org/en/latest/developing-locally.html
|
.. _`Developing locally`: http://cookiecutter-django.readthedocs.io/en/latest/developing-locally.html
|
||||||
.. _`Developing locally using docker`: http://cookiecutter-django.readthedocs.org/en/latest/developing-locally-docker.html
|
.. _`Developing locally using docker`: http://cookiecutter-django.readthedocs.io/en/latest/developing-locally-docker.html
|
||||||
|
|
||||||
Community
|
Community
|
||||||
-----------
|
-----------
|
||||||
|
@ -217,6 +221,7 @@ Articles
|
||||||
* `Development and Deployment of Cookiecutter-Django via Docker`_ - Dec. 29, 2015
|
* `Development and Deployment of Cookiecutter-Django via Docker`_ - Dec. 29, 2015
|
||||||
* `How to create a Django Application using Cookiecutter and Django 1.8`_ - Sept. 12, 2015
|
* `How to create a Django Application using Cookiecutter and Django 1.8`_ - Sept. 12, 2015
|
||||||
* `Introduction to Cookiecutter-Django`_ - Feb. 19, 2016
|
* `Introduction to Cookiecutter-Django`_ - Feb. 19, 2016
|
||||||
|
* `Django and GitLab - Running Continuous Integration and tests with your FREE account`_ - May. 11, 2016
|
||||||
|
|
||||||
Got a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link.
|
Got a blog or online publication? Write about your cookiecutter-django tips and tricks, then send us a pull request with the link.
|
||||||
|
|
||||||
|
@ -224,6 +229,7 @@ Got a blog or online publication? Write about your cookiecutter-django tips and
|
||||||
.. _`Development and Deployment of Cookiecutter-Django on Fedora`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-on-fedora/
|
.. _`Development and Deployment of Cookiecutter-Django on Fedora`: https://realpython.com/blog/python/development-and-deployment-of-cookiecutter-django-on-fedora/
|
||||||
.. _`How to create a Django Application using Cookiecutter and Django 1.8`: http://blog.swapps.co/how-to-create-a-django-application-using-cookiecutter-and-django-1-8/#.VxKfBpMrKRs
|
.. _`How to create a Django Application using Cookiecutter and Django 1.8`: http://blog.swapps.co/how-to-create-a-django-application-using-cookiecutter-and-django-1-8/#.VxKfBpMrKRs
|
||||||
.. _`Introduction to Cookiecutter-Django`: http://krzysztofzuraw.com/blog/2016/django-cookiecutter.html
|
.. _`Introduction to Cookiecutter-Django`: http://krzysztofzuraw.com/blog/2016/django-cookiecutter.html
|
||||||
|
.. _`Django and GitLab - Running Continuous Integration and tests with your FREE account`: http://dezoito.github.io/2016/05/11/django-gitlab-continuous-integration-phantomjs.html
|
||||||
|
|
||||||
Support This Project
|
Support This Project
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
|
@ -45,7 +45,7 @@ source_suffix = '.rst'
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = 'cookiecutter-django'
|
project = 'Cookiecutter Django'
|
||||||
copyright = '2013-{}, Daniel Roy Greenfeld'.format(now.year)
|
copyright = '2013-{}, Daniel Roy Greenfeld'.format(now.year)
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
|
@ -220,7 +220,7 @@ latex_documents = [
|
||||||
# One entry per manual page. List of tuples
|
# One entry per manual page. List of tuples
|
||||||
# (source start file, name, description, authors, manual section).
|
# (source start file, name, description, authors, manual section).
|
||||||
man_pages = [
|
man_pages = [
|
||||||
('index', 'cookiecutter-django', 'cookiecutter-django documentation',
|
('index', 'Cookiecutter Django', 'Cookiecutter Django documentation',
|
||||||
['Daniel Roy Greenfeld'], 1)
|
['Daniel Roy Greenfeld'], 1)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -234,8 +234,8 @@ man_pages = [
|
||||||
# (source start file, target name, title, author,
|
# (source start file, target name, title, author,
|
||||||
# dir menu entry, description, category)
|
# dir menu entry, description, category)
|
||||||
texinfo_documents = [
|
texinfo_documents = [
|
||||||
('index', 'cookiecutter-django', 'cookiecutter-django documentation',
|
('index', 'Cookiecutter Django', 'Cookiecutter Django documentation',
|
||||||
'Daniel Roy Greenfeld', 'cookiecutter-django',
|
'Daniel Roy Greenfeld', 'Cookiecutter Django',
|
||||||
'A Cookiecutter template for creating production-ready Django projects quickly.', 'Miscellaneous'),
|
'A Cookiecutter template for creating production-ready Django projects quickly.', 'Miscellaneous'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,13 @@ To restore a backup, run::
|
||||||
|
|
||||||
docker-compose -f dev.yml run postgres restore filename.sql
|
docker-compose -f dev.yml run postgres restore filename.sql
|
||||||
|
|
||||||
|
To copy the files from the running Postgres container to the host system::
|
||||||
|
|
||||||
|
docker cp <containerId>:/backups /host/path/target
|
||||||
|
|
||||||
|
Where <containerId> is the ID of the Postgres container. To get it, run::
|
||||||
|
|
||||||
|
docker ps
|
||||||
|
|
||||||
Other Useful Tips
|
Other Useful Tips
|
||||||
-----------------
|
-----------------
|
||||||
|
|
|
@ -23,13 +23,13 @@ Then, create a PostgreSQL database with the following command, where `[project_s
|
||||||
|
|
||||||
$ createdb [project_slug]
|
$ createdb [project_slug]
|
||||||
|
|
||||||
`cookiecutter-django` uses the excellent `django-environ`_ package with its ``DATABASE_URL`` environment variable to simplify database configuration in your Django settings. Now all you have to do is compose a definition for ``DATABASE_URL``:
|
`Cookiecutter Django` uses the excellent `django-environ`_ package with its ``DATABASE_URL`` environment variable to simplify database configuration in your Django settings. Now all you have to do is compose a definition for ``DATABASE_URL``:
|
||||||
|
|
||||||
.. parsed-literal::
|
.. parsed-literal::
|
||||||
|
|
||||||
$ export DATABASE_URL="postgres://*<pg_user_name>*:*<pg_user_password>*\ @127.0.0.1:\ *<pg_port>*/*<pg_database_name>*"
|
$ export DATABASE_URL="postgres://*<pg_user_name>*:*<pg_user_password>*\ @127.0.0.1:\ *<pg_port>*/*<pg_database_name>*"
|
||||||
|
|
||||||
.. _django-environ: http://django-environ.readthedocs.org
|
.. _django-environ: http://django-environ.readthedocs.io
|
||||||
|
|
||||||
You can now run the usual Django ``migrate`` and ``runserver`` commands::
|
You can now run the usual Django ``migrate`` and ``runserver`` commands::
|
||||||
|
|
||||||
|
@ -41,16 +41,25 @@ You can now run the usual Django ``migrate`` and ``runserver`` commands::
|
||||||
django-allauth sends an email to verify users (and superusers) after signup and login (if they are still not verified). To send email you need to `configure your email backend`_
|
django-allauth sends an email to verify users (and superusers) after signup and login (if they are still not verified). To send email you need to `configure your email backend`_
|
||||||
|
|
||||||
.. _configure your email backend: http://docs.djangoproject.com/en/1.9/topics/email/#smtp-backend
|
.. _configure your email backend: http://docs.djangoproject.com/en/1.9/topics/email/#smtp-backend
|
||||||
|
{% if cookiecutter.use_docker == 'y' %}
|
||||||
|
In development you can (optionally) use MailHog_ for email testing. MailHog is added as docker-container. To use MailHog::
|
||||||
|
|
||||||
|
1. Make sure, that ``mailhog`` docker container is up and running
|
||||||
|
2. Open your browser and go to ``http://127.0.0.1:8025``
|
||||||
|
|
||||||
|
.. _Mailhog: https://github.com/mailhog/MailHog/
|
||||||
|
{% else %}
|
||||||
In development you can (optionally) use MailHog_ for email testing. MailHog is built with Go so there are no dependencies. To use MailHog::
|
In development you can (optionally) use MailHog_ for email testing. MailHog is built with Go so there are no dependencies. To use MailHog::
|
||||||
|
|
||||||
1. `Download the latest release`_ for your operating system
|
1. `Download the latest release`_ for your operating system
|
||||||
2. Rename the executable to ``mailhog`` and copy it to the root of your project directory
|
2. Rename the executable to ``mailhog`` and copy it to the root of your project directory
|
||||||
3. Make sure it is executable (e.g. ``chmod +x mailhog``)
|
3. Make sure it is executable (e.g. ``chmod +x mailhog``)
|
||||||
|
4. Execute mailhog from the root of your project in a new terminal window (e.g. ``./mailhog``)
|
||||||
|
5. All emails generated from your django app can be seen on http://127.0.0.1:8025/
|
||||||
|
|
||||||
.. _Mailhog: https://github.com/mailhog/MailHog/
|
.. _Mailhog: https://github.com/mailhog/MailHog/
|
||||||
.. _Download the latest release: https://github.com/mailhog/MailHog/releases
|
.. _Download the latest release: https://github.com/mailhog/MailHog/releases
|
||||||
|
{% endif %}
|
||||||
Alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'``
|
Alternatively simply output emails to the console via: ``EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'``
|
||||||
|
|
||||||
In production basic email configuration is setup to send emails with Mailgun_
|
In production basic email configuration is setup to send emails with Mailgun_
|
||||||
|
|
|
@ -3,7 +3,7 @@ FAQ
|
||||||
|
|
||||||
.. index:: FAQ, 12-Factor App
|
.. index:: FAQ, 12-Factor App
|
||||||
|
|
||||||
Why is there a django.contrib.sites directory in cookiecutter-django?
|
Why is there a django.contrib.sites directory in Cookiecutter Django?
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
||||||
It is there to add a migration so you don't have to manually change the ``sites.Site`` record from ``example.com`` to whatever your domain is. Instead, your ``{{cookiecutter.domain_name}}`` and {{cookiecutter.project_name}} value is placed by **Cookiecutter** in the domain and name fields respectively.
|
It is there to add a migration so you don't have to manually change the ``sites.Site`` record from ``example.com`` to whatever your domain is. Instead, your ``{{cookiecutter.domain_name}}`` and {{cookiecutter.project_name}} value is placed by **Cookiecutter** in the domain and name fields respectively.
|
||||||
|
|
|
@ -39,7 +39,7 @@ def get_random_string(
|
||||||
if using_sysrandom:
|
if using_sysrandom:
|
||||||
return ''.join(random.choice(allowed_chars) for i in range(length))
|
return ''.join(random.choice(allowed_chars) for i in range(length))
|
||||||
print(
|
print(
|
||||||
"cookiecutter-django couldn't find a secure pseudo-random number generator on your system."
|
"Cookiecutter Django couldn't find a secure pseudo-random number generator on your system."
|
||||||
" Please change change your SECRET_KEY variables in conf/settings/local.py and env.example"
|
" Please change change your SECRET_KEY variables in conf/settings/local.py and env.example"
|
||||||
" manually."
|
" manually."
|
||||||
)
|
)
|
||||||
|
|
|
@ -6,6 +6,6 @@ binaryornot==0.4.0
|
||||||
# Testing
|
# Testing
|
||||||
pytest==2.9.1
|
pytest==2.9.1
|
||||||
pep8==1.7.0
|
pep8==1.7.0
|
||||||
pyflakes==1.2.1
|
pyflakes==1.2.3
|
||||||
tox==2.3.1
|
tox==2.3.1
|
||||||
pytest-cookies==0.2.0
|
pytest-cookies==0.2.0
|
||||||
|
|
4
{{cookiecutter.project_slug}}/.gitignore
vendored
4
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -68,5 +68,9 @@ node_modules/
|
||||||
# User-uploaded media
|
# User-uploaded media
|
||||||
{{ cookiecutter.project_slug }}/media/
|
{{ cookiecutter.project_slug }}/media/
|
||||||
|
|
||||||
|
# Hitch directory
|
||||||
|
tests/.hitch
|
||||||
|
{% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n'%}
|
||||||
# MailHog binary
|
# MailHog binary
|
||||||
mailhog
|
mailhog
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -112,14 +112,14 @@ module.exports = function (grunt) {
|
||||||
runDjango: {
|
runDjango: {
|
||||||
cmd: 'python <%= paths.manageScript %> runserver'
|
cmd: 'python <%= paths.manageScript %> runserver'
|
||||||
},
|
},
|
||||||
{% if cookiecutter.use_mailhog == "y" -%}runMailHog: {
|
{% if cookiecutter.use_mailhog == "y" and cookiecutter.use_docker == 'n' -%}runMailHog: {
|
||||||
cmd: './mailhog'
|
cmd: './mailhog'
|
||||||
},{%- endif %}
|
},{%- endif %}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
grunt.registerTask('serve', [
|
grunt.registerTask('serve', [
|
||||||
{% if cookiecutter.use_mailhog == "y" -%}
|
{% if cookiecutter.use_mailhog == "y" and cookiecutter.use_docker == 'n' -%}
|
||||||
'bgShell:runMailHog',
|
'bgShell:runMailHog',
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
'bgShell:runDjango',
|
'bgShell:runDjango',
|
||||||
|
|
|
@ -16,7 +16,7 @@ Settings
|
||||||
|
|
||||||
Moved to settings_.
|
Moved to settings_.
|
||||||
|
|
||||||
.. _settings: http://cookiecutter-django.readthedocs.org/en/latest/settings.html
|
.. _settings: http://cookiecutter-django.readthedocs.io/en/latest/settings.html
|
||||||
|
|
||||||
Basic Commands
|
Basic Commands
|
||||||
--------------
|
--------------
|
||||||
|
@ -53,7 +53,7 @@ Live reloading and Sass CSS compilation
|
||||||
|
|
||||||
Moved to `Live reloading and SASS compilation`_.
|
Moved to `Live reloading and SASS compilation`_.
|
||||||
|
|
||||||
.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.org/en/latest/live-reloading-and-sass-compilation.html
|
.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html
|
||||||
|
|
||||||
{% if cookiecutter.use_celery == "y" %}
|
{% if cookiecutter.use_celery == "y" %}
|
||||||
|
|
||||||
|
@ -77,7 +77,16 @@ Please note: For Celery's import magic to work, it is important *where* the cele
|
||||||
|
|
||||||
Email Server
|
Email Server
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
{% if cookiecutter.use_docker == 'y' %}
|
||||||
|
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container.
|
||||||
|
|
||||||
|
.. _mailhog: https://github.com/mailhog/MailHog
|
||||||
|
|
||||||
|
Container mailhog will start automatically when you will run all docker containers.
|
||||||
|
Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers.
|
||||||
|
|
||||||
|
With MailHog running, to view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
|
||||||
|
{% else %}
|
||||||
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available.
|
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available.
|
||||||
|
|
||||||
.. _mailhog: https://github.com/mailhog/MailHog
|
.. _mailhog: https://github.com/mailhog/MailHog
|
||||||
|
@ -92,7 +101,7 @@ To start the service, make sure you have nodejs installed, and then type the fol
|
||||||
To view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
|
To view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
|
||||||
|
|
||||||
The email server will exit when you exit the Grunt task on the CLI with Ctrl+C.
|
The email server will exit when you exit the Grunt task on the CLI with Ctrl+C.
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry == "y" %}
|
{% if cookiecutter.use_sentry == "y" %}
|
||||||
|
@ -121,7 +130,7 @@ Heroku
|
||||||
|
|
||||||
See detailed `cookiecutter-django Heroku documentation`_.
|
See detailed `cookiecutter-django Heroku documentation`_.
|
||||||
|
|
||||||
.. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.org/en/latest/deployment-on-heroku.html
|
.. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -132,6 +141,6 @@ Docker
|
||||||
|
|
||||||
See detailed `cookiecutter-django Docker documentation`_.
|
See detailed `cookiecutter-django Docker documentation`_.
|
||||||
|
|
||||||
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.org/en/latest/deployment-with-docker.html
|
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -12,7 +12,7 @@ from __future__ import absolute_import, unicode_literals
|
||||||
|
|
||||||
import environ
|
import environ
|
||||||
|
|
||||||
ROOT_DIR = environ.Path(__file__) - 3 # (/a/b/myfile.py - 3 = /)
|
ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config/settings/common.py - 3 = {{ cookiecutter.project_slug }}/)
|
||||||
APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}')
|
APPS_DIR = ROOT_DIR.path('{{ cookiecutter.project_slug }}')
|
||||||
|
|
||||||
env = environ.Env()
|
env = environ.Env()
|
||||||
|
@ -163,7 +163,7 @@ TEMPLATES = [
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
# See: http://django-crispy-forms.readthedocs.org/en/latest/install.html#template-packs
|
# See: http://django-crispy-forms.readthedocs.io/en/latest/install.html#template-packs
|
||||||
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
CRISPY_TEMPLATE_PACK = 'bootstrap3'
|
||||||
|
|
||||||
# STATIC FILE CONFIGURATION
|
# STATIC FILE CONFIGURATION
|
||||||
|
|
|
@ -23,16 +23,15 @@ SECRET_KEY = env('DJANGO_SECRET_KEY', default='CHANGEME!!!')
|
||||||
|
|
||||||
# Mail settings
|
# Mail settings
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
EMAIL_PORT = 1025
|
EMAIL_PORT = 1025
|
||||||
{% if cookiecutter.use_docker == 'y' and cookiecutter.use_mailhog == 'y' -%}
|
{% if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'y' %}
|
||||||
EMAIL_HOST = 'mailhog'
|
EMAIL_HOST = env("EMAIL_HOST", default='mailhog')
|
||||||
{% else %}
|
{% else %}
|
||||||
EMAIL_HOST = 'localhost'
|
EMAIL_HOST = 'localhost'
|
||||||
{%- endif %}
|
|
||||||
{%if cookiecutter.use_mailhog == 'n' -%}
|
|
||||||
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
EMAIL_BACKEND = env('DJANGO_EMAIL_BACKEND',
|
||||||
default='django.core.mail.backends.console.EmailBackend')
|
default='django.core.mail.backends.console.EmailBackend')
|
||||||
{%- endif %}
|
{% endif %}
|
||||||
|
|
||||||
# CACHING
|
# CACHING
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
|
@ -46,15 +46,16 @@ SECURITY_MIDDLEWARE = (
|
||||||
)
|
)
|
||||||
{% if cookiecutter.use_whitenoise == 'y' -%}
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
||||||
# Use Whitenoise to serve static files
|
# Use Whitenoise to serve static files
|
||||||
# See: https://whitenoise.readthedocs.org/
|
# See: https://whitenoise.readthedocs.io/
|
||||||
WHITENOISE_MIDDLEWARE = (
|
WHITENOISE_MIDDLEWARE = (
|
||||||
'whitenoise.middleware.WhiteNoiseMiddleware',
|
'whitenoise.middleware.WhiteNoiseMiddleware',
|
||||||
)
|
)
|
||||||
MIDDLEWARE_CLASSES = WHITENOISE_MIDDLEWARE + MIDDLEWARE_CLASSES
|
MIDDLEWARE_CLASSES = WHITENOISE_MIDDLEWARE + MIDDLEWARE_CLASSES
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_sentry == 'y' -%}
|
{% if cookiecutter.use_sentry == 'y' -%}
|
||||||
RAVEN_MIDDLEWARE = ('raven.contrib.django.raven_compat.middleware.Sentry404CatchMiddleware',
|
RAVEN_MIDDLEWARE = (
|
||||||
'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',)
|
'raven.contrib.django.raven_compat.middleware.SentryResponseErrorIdMiddleware',
|
||||||
|
)
|
||||||
MIDDLEWARE_CLASSES = RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES
|
MIDDLEWARE_CLASSES = RAVEN_MIDDLEWARE + MIDDLEWARE_CLASSES
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
@ -98,7 +99,7 @@ INSTALLED_APPS += ('gunicorn', )
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Uploaded Media Files
|
# Uploaded Media Files
|
||||||
# ------------------------
|
# ------------------------
|
||||||
# See: http://django-storages.readthedocs.org/en/latest/index.html
|
# See: http://django-storages.readthedocs.io/en/latest/index.html
|
||||||
INSTALLED_APPS += (
|
INSTALLED_APPS += (
|
||||||
'storages',
|
'storages',
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
coverage==4.0.3
|
coverage==4.0.3
|
||||||
django_coverage_plugin==1.3
|
django_coverage_plugin==1.3
|
||||||
Sphinx
|
Sphinx
|
||||||
django-extensions==1.6.6
|
django-extensions==1.6.7
|
||||||
Werkzeug==0.11.9
|
Werkzeug==0.11.9
|
||||||
django-test-plus==1.0.12
|
django-test-plus==1.0.12
|
||||||
factory_boy==2.7.0
|
factory_boy==2.7.0
|
||||||
|
|
|
@ -12,7 +12,7 @@ psycopg2==2.6.1
|
||||||
# WSGI Handler
|
# WSGI Handler
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
gevent==1.1.1
|
gevent==1.1.1
|
||||||
gunicorn==19.4.5
|
gunicorn==19.5.0
|
||||||
|
|
||||||
# Static and Media Storage
|
# Static and Media Storage
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
|
|
@ -3,7 +3,11 @@
|
||||||
build-essential
|
build-essential
|
||||||
#required to translate
|
#required to translate
|
||||||
gettext
|
gettext
|
||||||
|
{% if cookiecutter.use_python2 == 'n' -%}
|
||||||
|
python3-dev
|
||||||
|
{% else %}
|
||||||
python-dev
|
python-dev
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
##shared dependencies of:
|
##shared dependencies of:
|
||||||
##Pillow, pylibmc
|
##Pillow, pylibmc
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""
|
"""
|
||||||
To understand why this file is here, please read:
|
To understand why this file is here, please read:
|
||||||
|
|
||||||
http://cookiecutter-django.readthedocs.org/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""
|
"""
|
||||||
To understand why this file is here, please read:
|
To understand why this file is here, please read:
|
||||||
|
|
||||||
http://cookiecutter-django.readthedocs.org/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
To understand why this file is here, please read:
|
To understand why this file is here, please read:
|
||||||
|
|
||||||
http://cookiecutter-django.readthedocs.org/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
"""
|
"""
|
||||||
To understand why this file is here, please read:
|
To understand why this file is here, please read:
|
||||||
|
|
||||||
http://cookiecutter-django.readthedocs.org/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% endraw %}{% if cookiecutter.use_angular == "y" %}{% raw %}{% block angular %}
|
{% endraw %}{% if cookiecutter.use_angular == "y" %}{% raw %}{% block angular %}
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
|
||||||
{% endblock %}{% endraw %}{% endif %}{% raw %}
|
{% endblock %}{% endraw %}{% endif %}{% raw %}
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user