mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-14 10:02:27 +03:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
bfc3b09379
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -2,6 +2,20 @@
|
||||||
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/).
|
||||||
|
|
||||||
|
## [2015-1-6]
|
||||||
|
### Added
|
||||||
|
- You can now enable or disable user registration using the ACCOUNT_ALLOW_REGISTRATION setting. (@ddiazpinto)
|
||||||
|
### Changed
|
||||||
|
- Use Postgres 9.5 on docker (@jayfk)
|
||||||
|
|
||||||
|
## [2015-1-4]
|
||||||
|
### Added
|
||||||
|
- Add Tether.js because [is needed](http://v4-alpha.getbootstrap.com/components/tooltips/#overview) for proper positioning of Bootstrap tooltips (@EricZaporzan)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Minor fixes in the docker documentation (@jayfk)
|
||||||
|
- Made @burhan a core committer (@pydanny)
|
||||||
|
|
||||||
## [2015-12-30]
|
## [2015-12-30]
|
||||||
### Changed
|
### Changed
|
||||||
- Fixed a bug where the navbar was not displayed correctly (@jvanbrug)
|
- Fixed a bug where the navbar was not displayed correctly (@jvanbrug)
|
||||||
|
@ -75,7 +89,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## [2015-11-18]
|
## [2015-11-18]
|
||||||
### Added
|
### Added
|
||||||
- Mailhog as a replacement for Maildump (@keybits )
|
- Mailhog as a replacement for Maildump (@keybits)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Maildump because it didn't support Python 3 (@keybits)
|
- Maildump because it didn't support Python 3 (@keybits)
|
||||||
|
@ -85,7 +99,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
- initial configuration to support opbeat (@burhan)
|
- initial configuration to support opbeat (@burhan)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- Took *.pyc out of .gitignore, because it's already covered by *.py[cod] (@audreyr)
|
- Took `*.pyc` out of .gitignore, because it's already covered by `*.py[cod]` (@audreyr)
|
||||||
|
|
||||||
## [2015-11-16]
|
## [2015-11-16]
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -201,7 +215,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## [2015-10-11]
|
## [2015-10-11]
|
||||||
### Changed
|
### Changed
|
||||||
- Fixed raven issue on development (#302) (@jazztpt )
|
- Fixed raven issue on development (#302) (@jazztpt)
|
||||||
|
|
||||||
## [2015-10-05]
|
## [2015-10-05]
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
Code Contributors
|
Contributors
|
||||||
=================
|
============
|
||||||
|
|
||||||
|
Core Developers
|
||||||
|
----------------
|
||||||
|
|
||||||
These contributors have commit flags for the repository,
|
These contributors have commit flags for the repository,
|
||||||
and are able to accept and merge pull requests.
|
and are able to accept and merge pull requests.
|
||||||
|
@ -8,14 +11,15 @@ and are able to accept and merge pull requests.
|
||||||
Name Github Twitter
|
Name Github Twitter
|
||||||
=========================== ============= ===========
|
=========================== ============= ===========
|
||||||
Daniel Roy Greenfeld `@pydanny`_ @pydanny
|
Daniel Roy Greenfeld `@pydanny`_ @pydanny
|
||||||
Audrey Roy Greenfeld* `@audreyr`_
|
Audrey Roy Greenfeld* `@audreyr`_ @audreyr
|
||||||
Jim Munro
|
Fábio C. Barrionuevo da Luz `@luzfcb`_
|
||||||
Fábio C. Barrionuevo da Luz @luzfcb
|
|
||||||
Saurabh Kumar `@theskumar`_ @_theskumar
|
Saurabh Kumar `@theskumar`_ @_theskumar
|
||||||
Jannis Gebauer `@jayfk`_
|
Jannis Gebauer `@jayfk`_
|
||||||
|
Burhan Khalid `@burhan`_ @burhan
|
||||||
=========================== ============= ===========
|
=========================== ============= ===========
|
||||||
|
|
||||||
*Audrey is also the maintainer of cookiecutter.*
|
*Audrey is also the creator of Cookiecutter. Audrey and
|
||||||
|
Daniel are on the Cookiecutter core team.*
|
||||||
|
|
||||||
.. _@pydanny: https://github.com/pydanny
|
.. _@pydanny: https://github.com/pydanny
|
||||||
.. _@luzfcb: https://github.com/luzfcb
|
.. _@luzfcb: https://github.com/luzfcb
|
||||||
|
@ -23,18 +27,10 @@ Jannis Gebauer `@jayfk`_
|
||||||
.. _@audreyr: https://github.com/audreyr
|
.. _@audreyr: https://github.com/audreyr
|
||||||
.. _@jayfk: https://github.com/jayfk
|
.. _@jayfk: https://github.com/jayfk
|
||||||
|
|
||||||
Special Thanks
|
Other Contributors
|
||||||
--------------
|
-------------------
|
||||||
|
|
||||||
The following haven't provided code directly, but have provided guidance and advice.
|
Listed in alphabetical order.
|
||||||
|
|
||||||
* Jannis Leidel (django-configurations)
|
|
||||||
* Nate Aune
|
|
||||||
* Barry Morrison
|
|
||||||
|
|
||||||
Contributors
|
|
||||||
------------
|
|
||||||
Listed in alphabetical order
|
|
||||||
|
|
||||||
========================== ============================ ==============
|
========================== ============================ ==============
|
||||||
Name Github Twitter
|
Name Github Twitter
|
||||||
|
@ -64,6 +60,7 @@ Listed in alphabetical order
|
||||||
Cristian Vargas `@cdvv7788`_
|
Cristian Vargas `@cdvv7788`_
|
||||||
Cullen Rhodes `@c-rhodes`_
|
Cullen Rhodes `@c-rhodes`_
|
||||||
Daniele Tricoli `@eriol`_
|
Daniele Tricoli `@eriol`_
|
||||||
|
David Díaz `@ddiazpinto`_ @DavidDiazPinto
|
||||||
Davur Clementsen `@dsclementsen`_ @davur
|
Davur Clementsen `@dsclementsen`_ @davur
|
||||||
Eyad Al Sibai `@eyadsibai`_
|
Eyad Al Sibai `@eyadsibai`_
|
||||||
Felipe Arruda `@arruda`_
|
Felipe Arruda `@arruda`_
|
||||||
|
@ -143,3 +140,13 @@ Listed in alphabetical order
|
||||||
.. _@knitatoms: https://github.com/knitatoms
|
.. _@knitatoms: https://github.com/knitatoms
|
||||||
.. _@Travistock: https://github.com/Tavistock
|
.. _@Travistock: https://github.com/Tavistock
|
||||||
.. _@jvanbrug: https://github.com/jvanbrug
|
.. _@jvanbrug: https://github.com/jvanbrug
|
||||||
|
.. _@ddiazpinto: https://github.com/ddiazpinto
|
||||||
|
|
||||||
|
Special Thanks
|
||||||
|
~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The following haven't provided code directly, but have provided guidance and advice.
|
||||||
|
|
||||||
|
* Jannis Leidel
|
||||||
|
* Nate Aune
|
||||||
|
* Barry Morrison
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"domain_name": "example.com",
|
"domain_name": "example.com",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"timezone": "UTC",
|
"timezone": "UTC",
|
||||||
"now": "2015/11/04",
|
"now": "2016/01/07",
|
||||||
"year": "{{ cookiecutter.now[:4] }}",
|
"year": "{{ cookiecutter.now[:4] }}",
|
||||||
"use_whitenoise": "y",
|
"use_whitenoise": "y",
|
||||||
"use_celery": "n",
|
"use_celery": "n",
|
||||||
|
|
|
@ -54,6 +54,7 @@ To create a persistent folder, log into the virtual machine by running::
|
||||||
|
|
||||||
$ docker-machine ssh dev1
|
$ docker-machine ssh dev1
|
||||||
$ sudo su
|
$ sudo su
|
||||||
|
$ mkdir /data
|
||||||
$ echo 'ln -sfn /mnt/sda1/data /data' >> /var/lib/boot2docker/bootlocal.sh
|
$ echo 'ln -sfn /mnt/sda1/data /data' >> /var/lib/boot2docker/bootlocal.sh
|
||||||
|
|
||||||
In case you are wondering why you can't use a host volume to keep the files on
|
In case you are wondering why you can't use a host volume to keep the files on
|
||||||
|
@ -100,8 +101,8 @@ using the ``docker-compose run`` command.
|
||||||
|
|
||||||
To migrate your app and to create a superuser, run::
|
To migrate your app and to create a superuser, run::
|
||||||
|
|
||||||
$ docker-compose run django python manage.py migrate
|
$ docker-compose -f dev.yml run django python manage.py migrate
|
||||||
$ docker-compose run django python manage.py createsuperuser
|
$ docker-compose -f dev.yml run django python manage.py createsuperuser
|
||||||
|
|
||||||
Here we specify the ``django`` container as the location to run our management commands.
|
Here we specify the ``django`` container as the location to run our management commands.
|
||||||
|
|
||||||
|
@ -130,4 +131,4 @@ If you want to run the stack in detached mode (in the background), use the ``-d`
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ docker-compose up -d
|
$ docker-compose -f dev.yml up -d
|
||||||
|
|
|
@ -45,3 +45,10 @@ DJANGO_OPBEAT_APP_ID OPBEAT['APP_ID'] n/a
|
||||||
DJANGO_OPBEAT_SECRET_TOKEN OPBEAT['SECRET_TOKEN'] n/a raises error
|
DJANGO_OPBEAT_SECRET_TOKEN OPBEAT['SECRET_TOKEN'] n/a raises error
|
||||||
DJANGO_OPBEAT_ORGANIZATION_ID OPBEAT['ORGANIZATION_ID'] n/a raises error
|
DJANGO_OPBEAT_ORGANIZATION_ID OPBEAT['ORGANIZATION_ID'] n/a raises error
|
||||||
======================================= =========================== ============================================== ======================================================================
|
======================================= =========================== ============================================== ======================================================================
|
||||||
|
|
||||||
|
--------------
|
||||||
|
Other Settings
|
||||||
|
--------------
|
||||||
|
|
||||||
|
ACCOUNT_ALLOW_REGISTRATION (=True)
|
||||||
|
Allow enable or disable user registration through `django-allauth` without disabling other characteristics like authentication and account management.
|
|
@ -211,6 +211,9 @@ AUTHENTICATION_BACKENDS = (
|
||||||
ACCOUNT_AUTHENTICATION_METHOD = 'username'
|
ACCOUNT_AUTHENTICATION_METHOD = 'username'
|
||||||
ACCOUNT_EMAIL_REQUIRED = True
|
ACCOUNT_EMAIL_REQUIRED = True
|
||||||
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
|
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
|
||||||
|
ACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapter.AccountAdapter'
|
||||||
|
SOCIALACCOUNT_ADAPTER = '{{cookiecutter.repo_name}}.users.adapter.SocialAccountAdapter'
|
||||||
|
ACCOUNT_ALLOW_REGISTRATION = True
|
||||||
|
|
||||||
# Custom user app defaults
|
# Custom user app defaults
|
||||||
# Select the correct user model
|
# Select the correct user model
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres
|
image: postgres:9.5
|
||||||
volumes:
|
volumes:
|
||||||
# If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed
|
# If you are using boot2docker, postgres data has to live in the VM for now until #581 is fixed
|
||||||
# for more info see here: https://github.com/boot2docker/boot2docker/issues/581
|
# for more info see here: https://github.com/boot2docker/boot2docker/issues/581
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:9.4
|
image: postgres:9.5
|
||||||
volumes:
|
volumes:
|
||||||
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
||||||
env_file: .env
|
env_file: .env
|
||||||
|
@ -40,4 +40,4 @@ celerybeat:
|
||||||
- postgres
|
- postgres
|
||||||
- redis
|
- redis
|
||||||
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -95,6 +95,9 @@
|
||||||
<!-- Latest JQuery -->
|
<!-- Latest JQuery -->
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||||
|
|
||||||
|
<!-- Tether - a requirement for Bootstrap tooltips -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.1.1/js/tether.min.js"></script>
|
||||||
|
|
||||||
<!-- Latest compiled and minified JavaScript -->
|
<!-- Latest compiled and minified JavaScript -->
|
||||||
<script src="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/js/bootstrap.js"></script>
|
<script src="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/js/bootstrap.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from django.conf import settings
|
||||||
|
from allauth.account.adapter import DefaultAccountAdapter
|
||||||
|
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
|
||||||
|
|
||||||
|
|
||||||
|
class AccountAdapter(DefaultAccountAdapter):
|
||||||
|
def is_open_for_signup(self, request):
|
||||||
|
return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)
|
||||||
|
|
||||||
|
|
||||||
|
class SocialAccountAdapter(DefaultSocialAccountAdapter):
|
||||||
|
def is_open_for_signup(self, request):
|
||||||
|
return getattr(settings, 'ACCOUNT_ALLOW_REGISTRATION', True)
|
Loading…
Reference in New Issue
Block a user