mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-17 03:51:02 +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.
|
||||
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]
|
||||
### Changed
|
||||
- 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]
|
||||
### Added
|
||||
- Mailhog as a replacement for Maildump (@keybits )
|
||||
- Mailhog as a replacement for Maildump (@keybits)
|
||||
|
||||
### Removed
|
||||
- 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)
|
||||
|
||||
### 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]
|
||||
### Changed
|
||||
|
@ -201,7 +215,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||
|
||||
## [2015-10-11]
|
||||
### Changed
|
||||
- Fixed raven issue on development (#302) (@jazztpt )
|
||||
- Fixed raven issue on development (#302) (@jazztpt)
|
||||
|
||||
## [2015-10-05]
|
||||
### Changed
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
Code Contributors
|
||||
=================
|
||||
Contributors
|
||||
============
|
||||
|
||||
Core Developers
|
||||
----------------
|
||||
|
||||
These contributors have commit flags for the repository,
|
||||
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
|
||||
=========================== ============= ===========
|
||||
Daniel Roy Greenfeld `@pydanny`_ @pydanny
|
||||
Audrey Roy Greenfeld* `@audreyr`_
|
||||
Jim Munro
|
||||
Fábio C. Barrionuevo da Luz @luzfcb
|
||||
Audrey Roy Greenfeld* `@audreyr`_ @audreyr
|
||||
Fábio C. Barrionuevo da Luz `@luzfcb`_
|
||||
Saurabh Kumar `@theskumar`_ @_theskumar
|
||||
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
|
||||
.. _@luzfcb: https://github.com/luzfcb
|
||||
|
@ -23,18 +27,10 @@ Jannis Gebauer `@jayfk`_
|
|||
.. _@audreyr: https://github.com/audreyr
|
||||
.. _@jayfk: https://github.com/jayfk
|
||||
|
||||
Special Thanks
|
||||
--------------
|
||||
Other Contributors
|
||||
-------------------
|
||||
|
||||
The following haven't provided code directly, but have provided guidance and advice.
|
||||
|
||||
* Jannis Leidel (django-configurations)
|
||||
* Nate Aune
|
||||
* Barry Morrison
|
||||
|
||||
Contributors
|
||||
------------
|
||||
Listed in alphabetical order
|
||||
Listed in alphabetical order.
|
||||
|
||||
========================== ============================ ==============
|
||||
Name Github Twitter
|
||||
|
@ -64,6 +60,7 @@ Listed in alphabetical order
|
|||
Cristian Vargas `@cdvv7788`_
|
||||
Cullen Rhodes `@c-rhodes`_
|
||||
Daniele Tricoli `@eriol`_
|
||||
David Díaz `@ddiazpinto`_ @DavidDiazPinto
|
||||
Davur Clementsen `@dsclementsen`_ @davur
|
||||
Eyad Al Sibai `@eyadsibai`_
|
||||
Felipe Arruda `@arruda`_
|
||||
|
@ -143,3 +140,13 @@ Listed in alphabetical order
|
|||
.. _@knitatoms: https://github.com/knitatoms
|
||||
.. _@Travistock: https://github.com/Tavistock
|
||||
.. _@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",
|
||||
"version": "0.1.0",
|
||||
"timezone": "UTC",
|
||||
"now": "2015/11/04",
|
||||
"now": "2016/01/07",
|
||||
"year": "{{ cookiecutter.now[:4] }}",
|
||||
"use_whitenoise": "y",
|
||||
"use_celery": "n",
|
||||
|
|
|
@ -54,6 +54,7 @@ To create a persistent folder, log into the virtual machine by running::
|
|||
|
||||
$ docker-machine ssh dev1
|
||||
$ sudo su
|
||||
$ mkdir /data
|
||||
$ 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
|
||||
|
@ -100,8 +101,8 @@ using the ``docker-compose run`` command.
|
|||
|
||||
To migrate your app and to create a superuser, run::
|
||||
|
||||
$ docker-compose run django python manage.py migrate
|
||||
$ docker-compose run django python manage.py createsuperuser
|
||||
$ docker-compose -f dev.yml run django python manage.py migrate
|
||||
$ 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.
|
||||
|
||||
|
@ -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_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_EMAIL_REQUIRED = True
|
||||
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
|
||||
# Select the correct user model
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
postgres:
|
||||
image: postgres
|
||||
image: postgres:9.5
|
||||
volumes:
|
||||
# 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
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
postgres:
|
||||
image: postgres:9.4
|
||||
image: postgres:9.5
|
||||
volumes:
|
||||
- /data/{{cookiecutter.repo_name}}/postgres:/var/lib/postgresql/data
|
||||
env_file: .env
|
||||
|
@ -40,4 +40,4 @@ celerybeat:
|
|||
- postgres
|
||||
- redis
|
||||
command: celery -A {{cookiecutter.repo_name}}.taskapp beat -l INFO
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
@ -95,6 +95,9 @@
|
|||
<!-- Latest JQuery -->
|
||||
<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 -->
|
||||
<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