mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-17 03:51:02 +03:00
Merge branch 'master' into update-django-1.11.8-to-2.0
This commit is contained in:
commit
93f11f6691
|
@ -36,13 +36,12 @@ To run all tests using various versions of python in virtualenvs defined in tox.
|
|||
|
||||
$ tox
|
||||
|
||||
It is possible to tests with some versions of python, to do this the command
|
||||
It is possible to test with a specific version of python. To do this, the command
|
||||
is::
|
||||
|
||||
$ tox -e py34,py35
|
||||
$ tox -e py36
|
||||
|
||||
Will run py.test with the python3.4, and python3.5 interpreters, for
|
||||
example.
|
||||
This will run py.test with the python3.6 interpreter, for example.
|
||||
|
||||
To run a particular test with tox for against your current Python version::
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ Make sure your project is fully commited and pushed up to Bitbucket or Github or
|
|||
|
||||
git clone <my-repo-url> # you can also use hg
|
||||
cd my-project-name
|
||||
mkvirtualenv --python=/usr/bin/python3.5 my-project-name
|
||||
mkvirtualenv --python=/usr/bin/python3.6 my-project-name
|
||||
pip install -r requirements/production.txt # may take a few minutes
|
||||
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ if docker == 'n':
|
|||
python_major_version = sys.version_info[0]
|
||||
|
||||
if python_major_version == 2:
|
||||
sys.stdout.write("WARNING: Cookiecutter Django does not support Python 2! Stability is guaranteed with Python 3.4+ only. Are you sure you want to proceed? (y/n)")
|
||||
sys.stdout.write("WARNING: Cookiecutter Django does not support Python 2! Stability is guaranteed with Python 3.6+ only. Are you sure you want to proceed? (y/n)")
|
||||
|
||||
yes_options = set(['y'])
|
||||
no_options = set(['n', ''])
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
# These requirements prevented an upgrade to Django 1.10.
|
||||
django-coverage-plugin==1.5.0
|
||||
# These requirements prevented an upgrade to Django 1.11.
|
||||
django-autoslug==1.9.3
|
||||
|
||||
|
|
5
setup.py
5
setup.py
|
@ -34,14 +34,13 @@ setup(
|
|||
classifiers=[
|
||||
'Development Status :: 4 - Beta',
|
||||
'Environment :: Console',
|
||||
'Framework :: Django :: 1.10',
|
||||
'Framework :: Django :: 1.11',
|
||||
'Intended Audience :: Developers',
|
||||
'Natural Language :: English',
|
||||
'License :: OSI Approved :: BSD License',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Programming Language :: Python :: Implementation :: CPython',
|
||||
'Programming Language :: Python :: Implementation :: PyPy',
|
||||
'Topic :: Software Development',
|
||||
|
|
|
@ -8,4 +8,4 @@ before_install:
|
|||
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
|
||||
language: python
|
||||
python:
|
||||
- "3.5"
|
||||
- "3.6"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.5
|
||||
FROM python:3.6
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM python:3.5
|
||||
FROM python:3.6
|
||||
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ The `Docker compose documentation`_ explains in detail what you can accomplish i
|
|||
build: database
|
||||
webapp:
|
||||
build: webapp:
|
||||
command: /usr/bin/python3.4 manage.py runserver 0.0.0.0:8000 # dev setting
|
||||
command: /usr/bin/python3.6 manage.py runserver 0.0.0.0:8000 # dev setting
|
||||
# command: gunicorn -b 0.0.0.0:8000 wsgi:application # production setting
|
||||
volumes:
|
||||
- webapp/your_project_name:/path/to/container/workdir/
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
coverage==4.5
|
||||
django-coverage-plugin==1.5.0
|
||||
|
||||
Sphinx==1.6.6
|
||||
Sphinx==1.6.7
|
||||
django-extensions==1.9.9
|
||||
Werkzeug==0.14.1
|
||||
django-test-plus==1.0.22
|
||||
|
@ -16,4 +16,4 @@ django-debug-toolbar==1.9.1
|
|||
ipdb==0.10.3
|
||||
|
||||
pytest-django==3.1.2
|
||||
pytest-sugar==0.9.0
|
||||
pytest-sugar==0.9.1
|
||||
|
|
|
@ -16,7 +16,7 @@ gunicorn==19.7.1
|
|||
|
||||
# Static and Media Storage
|
||||
# ------------------------------------------------
|
||||
boto3==1.5.22
|
||||
boto3==1.5.24
|
||||
django-storages==1.6.5
|
||||
{% if cookiecutter.use_whitenoise != 'y' -%}
|
||||
Collectfast==0.6.0
|
||||
|
|
|
@ -15,4 +15,4 @@ django-coverage-plugin==1.5.0
|
|||
|
||||
# pytest
|
||||
pytest-django==3.1.2
|
||||
pytest-sugar==0.9.0
|
||||
pytest-sugar==0.9.1
|
||||
|
|
|
@ -1 +1 @@
|
|||
python-3.6.2
|
||||
python-3.6.4
|
||||
|
|
|
@ -11,11 +11,3 @@
|
|||
background-color: #f2dede;
|
||||
border-color: #eed3d7;
|
||||
}
|
||||
|
||||
/* Display django-debug-toolbar.
|
||||
See https://github.com/django-debug-toolbar/django-debug-toolbar/issues/742
|
||||
and https://github.com/pydanny/cookiecutter-django/issues/317
|
||||
*/
|
||||
[hidden][style="display: block;"] {
|
||||
display: block !important;
|
||||
}
|
||||
|
|
|
@ -38,15 +38,3 @@ $red: #b94a48;
|
|||
border-color: $dark-pink;
|
||||
color: $red;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//Django Toolbar//
|
||||
////////////////////////////////
|
||||
|
||||
// Display django-debug-toolbar.
|
||||
// See https://github.com/django-debug-toolbar/django-debug-toolbar/issues/742
|
||||
// and https://github.com/pydanny/cookiecutter-django/issues/317
|
||||
|
||||
[hidden][style="display: block;"] {
|
||||
display: block !important;
|
||||
}
|
||||
|
|
|
@ -1,50 +0,0 @@
|
|||
{% raw %}
|
||||
{% load crispy_forms_field %}
|
||||
|
||||
{% if field.is_hidden %}
|
||||
{{ field }}
|
||||
{% else %}
|
||||
{% if field|is_checkbox %}
|
||||
<div class="form-group{% if using_grid_layout %} row{% endif %}">
|
||||
{% if label_class %}
|
||||
<div class="controls col-{{ bootstrap_device_type }}-offset-{{ label_size }} {{ field_class }}">
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" {% if not field|is_checkbox %}class="form-group{% if using_grid_layout %} row{% endif %}{% else %}class="checkbox{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if form_show_errors%}{% if field.errors %} has-danger{% endif %}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">
|
||||
{% if field.label and not field|is_checkbox and form_show_labels %}
|
||||
<label for="{{ field.id_for_label }}" class="form-control-label {{ label_class }}{% if field.field.required %} requiredField{% endif %}">
|
||||
{{ field.label|safe }}{% if field.field.required %}<span class="asteriskField">*</span>{% endif %}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
{% if field|is_checkboxselectmultiple %}
|
||||
{% include 'bootstrap4/layout/checkboxselectmultiple.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% if field|is_radioselect %}
|
||||
{% include 'bootstrap4/layout/radioselect.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% if not field|is_checkboxselectmultiple and not field|is_radioselect %}
|
||||
{% if field|is_checkbox and form_show_labels %}
|
||||
<label for="{{ field.id_for_label }}" class="{% if field.field.required %} requiredField{% endif %}">
|
||||
{% crispy_field field %}
|
||||
{{ field.label|safe }}
|
||||
{% include 'bootstrap4/layout/help_text_and_errors.html' %}
|
||||
</label>
|
||||
{% else %}
|
||||
<div class="{{ field_class }}">
|
||||
{% crispy_field field %}
|
||||
</div>
|
||||
{% include 'bootstrap4/layout/help_text_and_errors.html' %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</{% if tag %}{{ tag }}{% else %}div{% endif %}>
|
||||
{% if field|is_checkbox %}
|
||||
{% if label_class %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endraw %}
|
|
@ -1,7 +0,0 @@
|
|||
{% raw %}
|
||||
{% if form_show_errors and field.errors %}
|
||||
{% for error in field.errors %}
|
||||
<p id="error_{{ forloop.counter }}_{{ field.auto_id }}" class="text-danger help-block">{{ error }}</p>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endraw %}
|
|
@ -1,6 +1,6 @@
|
|||
from django.contrib.auth.models import AbstractUser
|
||||
from django.urls import reverse
|
||||
from django.db import models
|
||||
from django.urls import reverse
|
||||
from django.utils.encoding import python_2_unicode_compatible
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.urls import reverse
|
||||
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
|
||||
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
|
||||
from .models import User
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user