mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-03-12 07:15:54 +03:00
Merge branch 'master' into gulpfile-js
This commit is contained in:
commit
0123a94e06
|
@ -16,6 +16,7 @@ Fábio C. Barrionuevo da Luz `@luzfcb`_ @luzfcb
|
|||
Saurabh Kumar `@theskumar`_ @_theskumar
|
||||
Jannis Gebauer `@jayfk`_
|
||||
Burhan Khalid `@burhan`_ @burhan
|
||||
Shupeyko Nikita `@webyneter`_ @webyneter
|
||||
=========================== ============= ===========
|
||||
|
||||
*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
|
||||
.. _@audreyr: https://github.com/audreyr
|
||||
.. _@jayfk: https://github.com/jayfk
|
||||
.. _@webyneter: https://github.com/webyneter
|
||||
|
||||
Other Contributors
|
||||
------------------
|
||||
|
|
14
README.rst
14
README.rst
|
@ -84,7 +84,7 @@ Constraints
|
|||
|
||||
* Only maintained 3rd party libraries are used.
|
||||
* 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
|
||||
|
@ -273,18 +273,18 @@ Two Scoops Press
|
|||
:align: center
|
||||
:alt: Two Scoops Press
|
||||
:target: https://twoscoopspress.com
|
||||
|
||||
Two Scoops Press brings you the best dairy-themed Django references in the universe
|
||||
|
||||
|
||||
Two Scoops Press brings you the best dairy-themed Django references in the universe
|
||||
|
||||
pyup
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. image:: https://pyup.io/static/images/logo.png
|
||||
:name: pyup
|
||||
:align: center
|
||||
:alt: pyup
|
||||
:target: https://pyup.io/
|
||||
|
||||
|
||||
Pyup brings you automated security and dependency updates used by Google and other organizations. Free for open source projects!
|
||||
|
||||
.. _`PyPA Code of Conduct`: https://www.pypa.io/en/latest/code-of-conduct/
|
||||
|
|
|
@ -7,5 +7,5 @@ binaryornot==0.4.3
|
|||
pytest==3.0.7
|
||||
pep8==1.7.0
|
||||
pyflakes==1.5.0
|
||||
tox==2.6.0
|
||||
tox==2.7.0
|
||||
pytest-cookies==0.2.0
|
||||
|
|
|
@ -54,11 +54,12 @@ MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware', ]
|
|||
INSTALLED_APPS += ['debug_toolbar', ]
|
||||
|
||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
||||
{% if cookiecutter.use_docker == 'y' %}
|
||||
# tricks to have debug toolbar when developing with docker
|
||||
if os.environ.get('USE_DOCKER') == 'yes':
|
||||
ip = socket.gethostbyname(socket.gethostname())
|
||||
INTERNAL_IPS += [ip[:-1] + '1']
|
||||
|
||||
{% endif %}
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'DISABLE_PANELS': [
|
||||
'debug_toolbar.panels.redirects.RedirectsPanel',
|
||||
|
|
|
@ -35,7 +35,6 @@ if settings.DEBUG:
|
|||
]
|
||||
if 'debug_toolbar' in settings.INSTALLED_APPS:
|
||||
import debug_toolbar
|
||||
|
||||
urlpatterns += [
|
||||
urlpatterns = [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
]
|
||||
] + urlpatterns
|
||||
|
|
|
@ -13,14 +13,16 @@ middleware here, or combine a Django application with an application of another
|
|||
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
|
||||
# {{ cookiecutter.project_slug }} directory.
|
||||
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
|
||||
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 os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
||||
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
||||
|
|
|
@ -10,7 +10,7 @@ wheel==0.29.0
|
|||
django==1.10.7 # pyup: >=1.10,<1.11
|
||||
|
||||
# Configuration
|
||||
django-environ==0.4.1
|
||||
django-environ==0.4.3
|
||||
{% if cookiecutter.use_whitenoise == 'y' -%}
|
||||
whitenoise==3.3.0
|
||||
{%- endif %}
|
||||
|
@ -21,10 +21,10 @@ django-braces==1.11.0
|
|||
django-crispy-forms==1.6.1
|
||||
|
||||
# Models
|
||||
django-model-utils==2.6.1
|
||||
django-model-utils==3.0.0
|
||||
|
||||
# Images
|
||||
Pillow==4.0.0
|
||||
Pillow==4.1.0
|
||||
|
||||
# Password storage
|
||||
argon2-cffi==16.3.0
|
||||
|
|
|
@ -24,7 +24,7 @@ Collectfast==0.5.2
|
|||
|
||||
# Email backends for Mailgun, Postmark, SendGrid and more
|
||||
# -------------------------------------------------------
|
||||
django-anymail==0.8
|
||||
django-anymail==0.9
|
||||
|
||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
||||
# Raven is the Sentry client
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
|
@ -15,7 +15,7 @@
|
|||
|
||||
{% block 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 -->
|
||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %}
|
||||
|
@ -29,44 +29,43 @@
|
|||
<body>
|
||||
|
||||
<div class="m-b-1">
|
||||
<nav class="navbar navbar-dark navbar-static-top bg-inverse">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a>
|
||||
<button type="button" class="navbar-toggler hidden-sm-up pull-xs-right" data-toggle="collapse" data-target="#bs-navbar-collapse-1">
|
||||
☰
|
||||
</button>
|
||||
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
|
||||
<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">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{% url 'home' %}">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-toggleable-xs" id="bs-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<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">
|
||||
<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 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>
|
||||
</ul>
|
||||
|
||||
<ul class="nav navbar-nav pull-xs-right">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'account_logout' %}">{% trans "Sign Out" %}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<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>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
{# URL provided by django-allauth/account/urls.py #}
|
||||
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
{# URL provided by django-allauth/account/urls.py #}
|
||||
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
@ -90,9 +89,9 @@
|
|||
<!-- Placed at the end of the document so the pages load faster -->
|
||||
{% block javascript %}
|
||||
<!-- 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://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js" integrity="sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8" 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://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.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" 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 -->
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user