Merge branch 'master' into gulpfile-js

This commit is contained in:
Nikita P. Shupeyko 2017-04-21 14:07:53 +03:00
commit 0123a94e06
9 changed files with 57 additions and 54 deletions

View File

@ -16,6 +16,7 @@ Fábio C. Barrionuevo da Luz `@luzfcb`_ @luzfcb
Saurabh Kumar `@theskumar`_ @_theskumar Saurabh Kumar `@theskumar`_ @_theskumar
Jannis Gebauer `@jayfk`_ Jannis Gebauer `@jayfk`_
Burhan Khalid `@burhan`_ @burhan Burhan Khalid `@burhan`_ @burhan
Shupeyko Nikita `@webyneter`_ @webyneter
=========================== ============= =========== =========================== ============= ===========
*Audrey is also the creator of Cookiecutter. Audrey and *Audrey is also the creator of Cookiecutter. Audrey and
@ -26,6 +27,7 @@ Daniel are on the Cookiecutter core team.*
.. _@theskumar: https://github.com/theskumar .. _@theskumar: https://github.com/theskumar
.. _@audreyr: https://github.com/audreyr .. _@audreyr: https://github.com/audreyr
.. _@jayfk: https://github.com/jayfk .. _@jayfk: https://github.com/jayfk
.. _@webyneter: https://github.com/webyneter
Other Contributors Other Contributors
------------------ ------------------

View File

@ -84,7 +84,7 @@ Constraints
* Only maintained 3rd party libraries are used. * Only maintained 3rd party libraries are used.
* Uses PostgreSQL everywhere (9.2+) * Uses PostgreSQL everywhere (9.2+)
* Environment variables for configuration (This won't work with Apache/mod_wsgi). * Environment variables for configuration (This won't work with Apache/mod_wsgi except on AWS ELB).
Usage Usage

View File

@ -7,5 +7,5 @@ binaryornot==0.4.3
pytest==3.0.7 pytest==3.0.7
pep8==1.7.0 pep8==1.7.0
pyflakes==1.5.0 pyflakes==1.5.0
tox==2.6.0 tox==2.7.0
pytest-cookies==0.2.0 pytest-cookies==0.2.0

View File

@ -54,11 +54,12 @@ MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware', ]
INSTALLED_APPS += ['debug_toolbar', ] INSTALLED_APPS += ['debug_toolbar', ]
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ] INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
{% if cookiecutter.use_docker == 'y' %}
# tricks to have debug toolbar when developing with docker # tricks to have debug toolbar when developing with docker
if os.environ.get('USE_DOCKER') == 'yes': if os.environ.get('USE_DOCKER') == 'yes':
ip = socket.gethostbyname(socket.gethostname()) ip = socket.gethostbyname(socket.gethostname())
INTERNAL_IPS += [ip[:-1] + '1'] INTERNAL_IPS += [ip[:-1] + '1']
{% endif %}
DEBUG_TOOLBAR_CONFIG = { DEBUG_TOOLBAR_CONFIG = {
'DISABLE_PANELS': [ 'DISABLE_PANELS': [
'debug_toolbar.panels.redirects.RedirectsPanel', 'debug_toolbar.panels.redirects.RedirectsPanel',

View File

@ -35,7 +35,6 @@ if settings.DEBUG:
] ]
if 'debug_toolbar' in settings.INSTALLED_APPS: if 'debug_toolbar' in settings.INSTALLED_APPS:
import debug_toolbar import debug_toolbar
urlpatterns = [
urlpatterns += [
url(r'^__debug__/', include(debug_toolbar.urls)), url(r'^__debug__/', include(debug_toolbar.urls)),
] ] + urlpatterns

View File

@ -13,14 +13,16 @@ middleware here, or combine a Django application with an application of another
framework. framework.
""" """
import os, sys import os
import sys
from django.core.wsgi import get_wsgi_application
# This allows easy placement of apps within the interior # This allows easy placement of apps within the interior
# {{ cookiecutter.project_slug }} directory. # {{ cookiecutter.project_slug }} directory.
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '') app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}')) sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}'))
from django.core.wsgi import get_wsgi_application
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%} {% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production': if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry from raven.contrib.django.raven_compat.middleware.wsgi import Sentry

View File

@ -10,7 +10,7 @@ wheel==0.29.0
django==1.10.7 # pyup: >=1.10,<1.11 django==1.10.7 # pyup: >=1.10,<1.11
# Configuration # Configuration
django-environ==0.4.1 django-environ==0.4.3
{% if cookiecutter.use_whitenoise == 'y' -%} {% if cookiecutter.use_whitenoise == 'y' -%}
whitenoise==3.3.0 whitenoise==3.3.0
{%- endif %} {%- endif %}
@ -21,10 +21,10 @@ django-braces==1.11.0
django-crispy-forms==1.6.1 django-crispy-forms==1.6.1
# Models # Models
django-model-utils==2.6.1 django-model-utils==3.0.0
# Images # Images
Pillow==4.0.0 Pillow==4.1.0
# Password storage # Password storage
argon2-cffi==16.3.0 argon2-cffi==16.3.0

View File

@ -24,7 +24,7 @@ Collectfast==0.5.2
# Email backends for Mailgun, Postmark, SendGrid and more # Email backends for Mailgun, Postmark, SendGrid and more
# ------------------------------------------------------- # -------------------------------------------------------
django-anymail==0.8 django-anymail==0.9
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%} {% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
# Raven is the Sentry client # Raven is the Sentry client

View File

@ -15,7 +15,7 @@
{% block css %} {% block css %}
<!-- Latest compiled and minified Bootstrap 4 Alpha 4 CSS --> <!-- Latest compiled and minified Bootstrap 4 Alpha 4 CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css" integrity="sha384-2hfp1SzUoho7/TsGGGDaFdsuuDL0LX2hnUp6VkX3CUQ2K4K+xjboZdsXyp4oUHZj" crossorigin="anonymous"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<!-- Your stuff: Third-party CSS libraries go here --> <!-- Your stuff: Third-party CSS libraries go here -->
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %} {% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %}
@ -29,44 +29,43 @@
<body> <body>
<div class="m-b-1"> <div class="m-b-1">
<nav class="navbar navbar-dark navbar-static-top bg-inverse"> <nav class="navbar navbar-toggleable-md navbar-light bg-faded">
<div class="container"> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<a class="navbar-brand" href="/">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a> <span class="navbar-toggler-icon"></span>
<button type="button" class="navbar-toggler hidden-sm-up pull-xs-right" data-toggle="collapse" data-target="#bs-navbar-collapse-1"> </button>
&#9776; <a class="navbar-brand" href="{% url 'home' %}">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a>
</button>
<!-- Collect the nav links, forms, and other content for toggling --> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<div class="collapse navbar-toggleable-xs" id="bs-navbar-collapse-1"> <ul class="navbar-nav mr-auto">
<ul class="nav navbar-nav"> <li class="nav-item active">
<a class="nav-link" href="{% url 'home' %}">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'about' %}">About</a>
</li>
{% if request.user.is_authenticated %}
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'home' %}">Home</a> {# URL provided by django-allauth/account/urls.py #}
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="{% url 'about' %}">About</a> {# URL provided by django-allauth/account/urls.py #}
<a class="nav-link" href="{% url 'account_logout' %}">{% trans "Sign Out" %}</a>
</li> </li>
</ul> {% else %}
<li class="nav-item">
<ul class="nav navbar-nav pull-xs-right"> {# URL provided by django-allauth/account/urls.py #}
{% if request.user.is_authenticated %} <a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
<li class="nav-item"> </li>
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a> <li class="nav-item">
</li> {# URL provided by django-allauth/account/urls.py #}
<li class="nav-item"> <a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
<a class="nav-link" href="{% url 'account_logout' %}">{% trans "Sign Out" %}</a> </li>
</li> {% endif %}
{% else %} </ul>
<li class="nav-item">
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
</li>
<li class="nav-item">
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
</li>
{% endif %}
</ul>
</div>
</div> </div>
</nav> </nav>
</div> </div>
<div class="container"> <div class="container">
@ -90,9 +89,9 @@
<!-- Placed at the end of the document so the pages load faster --> <!-- Placed at the end of the document so the pages load faster -->
{% block javascript %} {% block javascript %}
<!-- Required by Bootstrap v4 Alpha 4 --> <!-- Required by Bootstrap v4 Alpha 4 -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script> <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js" integrity="sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/js/bootstrap.min.js" integrity="sha384-VjEeINv9OSwtWFLAtmc4JCtEJXXBub00gtSnszmspDLCtC0I4z4nqz7rEFbIZLLU" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
<!-- Your stuff: Third-party javascript libraries go here --> <!-- Your stuff: Third-party javascript libraries go here -->