mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-25 00:34:18 +03:00
Merge branch 'master' into mypy
This commit is contained in:
commit
78efa64f73
|
@ -89,6 +89,7 @@ Listed in alphabetical order.
|
|||
Delio Castillo `@jangeador`_ @jangeador
|
||||
Denis Orehovsky `@apirobot`_
|
||||
Dónal Adams `@epileptic-fish`_
|
||||
Diane Chen `@purplediane`_ @purplediane88
|
||||
Dong Huynh `@trungdong`_
|
||||
Emanuel Calso `@bloodpet`_ @bloodpet
|
||||
Eraldo Energy `@eraldo`_
|
||||
|
@ -99,11 +100,13 @@ Listed in alphabetical order.
|
|||
Garry Polley `@garrypolley`_
|
||||
Hamish Durkin `@durkode`_
|
||||
Harry Percival `@hjwp`_
|
||||
Hendrik Schneider `@hendrikschneider`_
|
||||
Henrique G. G. Pereira `@ikkebr`_
|
||||
Ian Lee `@IanLee1521`_
|
||||
Jan Van Bruggen `@jvanbrug`_
|
||||
Jens Nilsson `@phiberjenz`_
|
||||
Jimmy Gitonga `@afrowave`_ @afrowave
|
||||
John Cass `@jcass77`_ @cass_john
|
||||
Julien Almarcha `@sladinji`_
|
||||
Julio Castillo `@juliocc`_
|
||||
Kaido Kert `@kaidokert`_
|
||||
|
@ -122,6 +125,7 @@ Listed in alphabetical order.
|
|||
Malik Sulaimanov `@flyudvik`_ @flyudvik
|
||||
Martin Blech
|
||||
Martin Saizar `@msaizar`_
|
||||
Mateusz Ostaszewski `@mostaszewski`_
|
||||
Mathijs Hoogland `@MathijsHoogland`_
|
||||
Matt Braymer-Hayes `@mattayes`_ @mattayes
|
||||
Matt Linares
|
||||
|
@ -162,7 +166,7 @@ Listed in alphabetical order.
|
|||
Will Farley `@goldhand`_ @g01dhand
|
||||
William Archinal `@archinal`_
|
||||
Yaroslav Halchenko
|
||||
Denis Bobrov `@delneg`_
|
||||
Denis Bobrov `@delneg`_
|
||||
========================== ============================ ==============
|
||||
|
||||
.. _@a7p: https://github.com/a7p
|
||||
|
@ -209,6 +213,7 @@ Listed in alphabetical order.
|
|||
.. _@goldhand: https://github.com/goldhand
|
||||
.. _@hackebrot: https://github.com/hackebrot
|
||||
.. _@hairychris: https://github.com/hairychris
|
||||
.. _@hendrikschneider https://github.com/hendrikschneider
|
||||
.. _@hjwp: https://github.com/hjwp
|
||||
.. _@IanLee1521: https://github.com/IanLee1521
|
||||
.. _@ikkebr: https://github.com/ikkebr
|
||||
|
@ -226,6 +231,7 @@ Listed in alphabetical order.
|
|||
.. _@MathijsHoogland: https://github.com/MathijsHoogland
|
||||
.. _@mattayes: https://github.com/mattayes
|
||||
.. _@menzenski: https://github.com/menzenski
|
||||
.. _@mostaszewski: https://github.com/mostaszewski
|
||||
.. _@mfwarren: https://github.com/mfwarren
|
||||
.. _@mimischi: https://github.com/mimischi
|
||||
.. _@mjsisley: https://github.com/mjsisley
|
||||
|
@ -267,6 +273,7 @@ Listed in alphabetical order.
|
|||
.. _@afrowave: https://github.com/afrowave
|
||||
.. _@pchiquet: https://github.com/pchiquet
|
||||
.. _@delneg: https://github.com/delneg
|
||||
.. _@purplediane: https://github.com/purplediane
|
||||
Special Thanks
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ Features
|
|||
* For Django 2.0
|
||||
* Works with Python 3.6
|
||||
* Renders Django projects with 100% starting test coverage
|
||||
* Twitter Bootstrap_ v4.0.0 (`maintained Foundation fork`_ also available)
|
||||
* Twitter Bootstrap_ v4.1.1 (`maintained Foundation fork`_ also available)
|
||||
* 12-Factor_ based settings via django-environ_
|
||||
* Secure by default. We believe in SSL.
|
||||
* Optimized development and production settings
|
||||
|
|
|
@ -93,7 +93,8 @@ use_travisci:
|
|||
keep_local_envs_in_vcs:
|
||||
Indicates whether the project's ``.envs/.local/`` should be kept in VCS
|
||||
(comes in handy when working in teams where local environment reproducibility
|
||||
is strongly encouraged).
|
||||
is strongly encouraged).
|
||||
Note: .env(s) are only utilized when Docker Compose and/or Heroku support is enabled.
|
||||
|
||||
debug:
|
||||
Indicates whether the project should be configured for debugging.
|
||||
|
|
|
@ -8,6 +8,6 @@ flake8==3.5.0
|
|||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
tox==3.0.0
|
||||
pytest==3.6.2
|
||||
tox==3.2.1
|
||||
pytest==3.7.2
|
||||
pytest-cookies==0.3.0
|
||||
|
|
|
@ -15,7 +15,7 @@ cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y
|
|||
cd my_awesome_project
|
||||
|
||||
# run the project's tests
|
||||
docker-compose -f local.yml run django python manage.py test
|
||||
docker-compose -f local.yml run django python manage.py pytest
|
||||
|
||||
# return non-zero status code if there are migrations that have not been created
|
||||
docker-compose -f local.yml run django python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
|
||||
|
|
|
@ -46,7 +46,7 @@ Test coverage
|
|||
|
||||
To run the tests, check your test coverage, and generate an HTML coverage report::
|
||||
|
||||
$ coverage run manage.py test
|
||||
$ coverage run -m pytest
|
||||
$ coverage html
|
||||
$ open htmlcov/index.html
|
||||
|
||||
|
@ -55,7 +55,7 @@ Running tests with py.test
|
|||
|
||||
::
|
||||
|
||||
$ py.test
|
||||
$ pytest
|
||||
|
||||
Live reloading and Sass CSS compilation
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
@ -147,7 +147,7 @@ Custom Bootstrap Compilation
|
|||
^^^^^^
|
||||
|
||||
The generated CSS is set up with automatic Bootstrap recompilation with variables of your choice.
|
||||
Bootstrap v4 is installed using npm and customised by tweaking your variables in ``static/sass/custom_bootstrap_vars``.
|
||||
Bootstrap v4.1.1 is installed using npm and customised by tweaking your variables in ``static/sass/custom_bootstrap_vars``.
|
||||
|
||||
You can find a list of available variables `in the bootstrap source`_, or get explanations on them in the `Bootstrap docs`_.
|
||||
|
||||
|
@ -156,6 +156,6 @@ Bootstrap's javascript as well as its dependencies is concatenated into a single
|
|||
{% endif %}
|
||||
|
||||
.. _in the bootstrap source: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
|
||||
.. _Bootstrap docs: https://getbootstrap.com/docs/4.0/getting-started/theming/
|
||||
.. _Bootstrap docs: https://getbootstrap.com/docs/4.1/getting-started/theming/
|
||||
|
||||
{% endif %}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"devDependencies": {
|
||||
{% if cookiecutter.js_task_runner == 'Gulp' %}
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
"bootstrap": "^4.0.0",
|
||||
"bootstrap": "4.1.1",
|
||||
{% endif %}
|
||||
"browser-sync": "^2.14.0",
|
||||
"del": "^2.2.2",
|
||||
|
@ -23,8 +23,8 @@
|
|||
"gulp-uglify": "^3.0.0",
|
||||
"gulp-util": "^3.0.7",
|
||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||
"jquery": "^3.2.1-slim",
|
||||
"popper.js": "^1.12.3",
|
||||
"jquery": "3.3.1-slim",
|
||||
"popper.js": "1.14.3",
|
||||
{% endif %}
|
||||
"run-sequence": "^2.1.1"
|
||||
{% endif %}
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
pytz==2018.5 # https://github.com/stub42/pytz
|
||||
python-slugify==1.2.5 # https://github.com/un33k/python-slugify
|
||||
Pillow==5.1.0 # https://github.com/python-pillow/Pillow
|
||||
Pillow==5.2.0 # https://github.com/python-pillow/Pillow
|
||||
{%- if cookiecutter.use_compressor == "y" %}
|
||||
rcssmin==1.0.6{% if cookiecutter.windows == 'y' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin
|
||||
{%- endif %}
|
||||
argon2-cffi==18.1.0 # https://github.com/hynek/argon2_cffi
|
||||
argon2-cffi==18.2.0 # https://github.com/hynek/argon2_cffi
|
||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||
whitenoise==3.3.1 # https://github.com/evansd/whitenoise
|
||||
whitenoise==4.0 # https://github.com/evansd/whitenoise
|
||||
{%- endif %}
|
||||
redis>=2.10.5 # https://github.com/antirez/redis
|
||||
{%- if cookiecutter.use_celery == "y" %}
|
||||
celery==4.2.0 # pyup: <5.0 # https://github.com/celery/celery
|
||||
celery==4.2.1 # pyup: <5.0 # https://github.com/celery/celery
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
flower==0.9.2 # https://github.com/mher/flower
|
||||
{%- endif %}
|
||||
|
@ -18,7 +18,7 @@ flower==0.9.2 # https://github.com/mher/flower
|
|||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
django==2.0.6 # pyup: < 2.1 # https://www.djangoproject.com/
|
||||
django==2.0.8 # pyup: < 2.1 # https://www.djangoproject.com/
|
||||
django-environ==0.4.5 # https://github.com/joke2k/django-environ
|
||||
django-model-utils==3.1.2 # https://github.com/jazzband/django-model-utils
|
||||
django-allauth==0.36.0 # https://github.com/pennersr/django-allauth
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Werkzeug==0.14.1 # https://github.com/pallets/werkzeug
|
||||
ipdb==0.11 # https://github.com/gotcha/ipdb
|
||||
Sphinx==1.7.5 # https://github.com/sphinx-doc/sphinx
|
||||
Sphinx==1.7.6 # https://github.com/sphinx-doc/sphinx
|
||||
{%- if cookiecutter.use_docker == 'y' %}
|
||||
psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
||||
{%- else %}
|
||||
|
@ -11,8 +11,8 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2
|
|||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
mypy==0.610 # https://github.com/python/mypy
|
||||
pytest==3.6.2 # https://github.com/pytest-dev/pytest
|
||||
mypy==0.620 # https://github.com/python/mypy
|
||||
pytest==3.7.2 # https://github.com/pytest-dev/pytest
|
||||
pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar
|
||||
|
||||
# Code quality
|
||||
|
@ -25,6 +25,6 @@ coverage==4.5.1 # https://github.com/nedbat/coveragepy
|
|||
factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy
|
||||
|
||||
django-debug-toolbar==1.9.1 # https://github.com/jazzband/django-debug-toolbar
|
||||
django-extensions==2.0.7 # https://github.com/django-extensions/django-extensions
|
||||
django-extensions==2.1.0 # https://github.com/django-extensions/django-extensions
|
||||
django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin
|
||||
pytest-django==3.3.2 # https://github.com/pytest-dev/pytest-django
|
||||
pytest-django==3.4.1 # https://github.com/pytest-dev/pytest-django
|
||||
|
|
|
@ -1 +1 @@
|
|||
python-3.6.5
|
||||
python-3.6.6
|
||||
|
|
|
@ -1,21 +1 @@
|
|||
/* Project specific Javascript goes here. */
|
||||
|
||||
/*
|
||||
Formatting hack to get around crispy-forms unfortunate hardcoding
|
||||
in helpers.FormHelper:
|
||||
|
||||
if template_pack == 'bootstrap4':
|
||||
grid_colum_matcher = re.compile('\w*col-(xs|sm|md|lg|xl)-\d+\w*')
|
||||
using_grid_layout = (grid_colum_matcher.match(self.label_class) or
|
||||
grid_colum_matcher.match(self.field_class))
|
||||
if using_grid_layout:
|
||||
items['using_grid_layout'] = True
|
||||
|
||||
Issues with the above approach:
|
||||
|
||||
1. Fragile: Assumes Bootstrap 4's API doesn't change (it does)
|
||||
2. Unforgiving: Doesn't allow for any variation in template design
|
||||
3. Really Unforgiving: No way to override this behavior
|
||||
4. Undocumented: No mention in the documentation, or it's too hard for me to find
|
||||
*/
|
||||
$('.form-group').removeClass('row');
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
{% block css %}
|
||||
{% endraw %}{% if cookiecutter.custom_bootstrap_compilation == "n" %}{% raw %}
|
||||
<!-- Latest compiled and minified Bootstrap 4 beta CSS -->
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
|
||||
<!-- Latest compiled and minified Bootstrap 4.1.1 CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
|
||||
{% endraw %}{% endif %}{% raw %}
|
||||
|
||||
<!-- Your stuff: Third-party CSS libraries go here -->
|
||||
|
@ -102,10 +102,10 @@
|
|||
<script src="{% static 'js/vendors.js' %}"></script>
|
||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
||||
{% endraw %}{% else %}{% raw %}
|
||||
<!-- Required by Bootstrap v4 beta -->
|
||||
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script>
|
||||
<!-- Required by Bootstrap v4.1.1 -->
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js" integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T" crossorigin="anonymous"></script>
|
||||
|
||||
<!-- Your stuff: Third-party javascript libraries go here -->
|
||||
{% endraw %}{% endif %}{% raw %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user