diff --git a/.editorconfig b/.editorconfig index 517633b9..585e2abc 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true indent_style = space indent_size = 4 -[*.yml] +[*.{html,css,scss,json,yml}] indent_style = space indent_size = 2 diff --git a/docs/linters.rst b/docs/linters.rst index 3349faed..09d5744b 100644 --- a/docs/linters.rst +++ b/docs/linters.rst @@ -2,3 +2,16 @@ Linters ======= .. index:: linters + + +flake8 +------- + +To run flake8: + + $ flake8 + +The config for flake8 is located in setup.cfg. It specifies: + +* Set max line length to 120 chars +* Exclude .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules diff --git a/{{cookiecutter.repo_name}}/.editorconfig b/{{cookiecutter.repo_name}}/.editorconfig index e2232478..e7aa555a 100644 --- a/{{cookiecutter.repo_name}}/.editorconfig +++ b/{{cookiecutter.repo_name}}/.editorconfig @@ -19,7 +19,7 @@ known_first_party={{ cookiecutter.repo_name }} multi_line_output=3 default_section=THIRDPARTY -[*.yml] +[*.{html,css,scss,json,yml}] indent_style = space indent_size = 2 diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore index 13567ebd..de0584e3 100644 --- a/{{cookiecutter.repo_name}}/.gitignore +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -55,3 +55,6 @@ node_modules/ # virtual environments .env + +# User-uploaded media +{{ cookiecutter.repo_name }}/media/ diff --git a/{{cookiecutter.repo_name}}/requirements/production.txt b/{{cookiecutter.repo_name}}/requirements/production.txt index e3546169..e3c05bba 100644 --- a/{{cookiecutter.repo_name}}/requirements/production.txt +++ b/{{cookiecutter.repo_name}}/requirements/production.txt @@ -17,7 +17,7 @@ Collectfast==0.2.3 # Mailgun Support # --------------- -django-mailgun==0.6.0 +django-mailgun==0.7.2 {% if cookiecutter.use_sentry == "y" -%} # Raven is the Sentry client diff --git a/{{cookiecutter.repo_name}}/setup.cfg b/{{cookiecutter.repo_name}}/setup.cfg index 51059eda..3084e402 100644 --- a/{{cookiecutter.repo_name}}/setup.cfg +++ b/{{cookiecutter.repo_name}}/setup.cfg @@ -1,4 +1,3 @@ [flake8] -#ignore = E265 max-line-length = 120 -exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs +exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css index 78508b75..08505aee 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css @@ -27,4 +27,12 @@ .nav.navbar-nav.pull-right { float: none !important; } +} + +/* 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; } \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss index 5352d324..a5e9fb99 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss @@ -13,3 +13,28 @@ background-color: #f2dede; border-color: #eed3d7; } + +/* This is a fix for the bootstrap4 alpha release */ +@media (max-width: 47.9em) { + .navbar-nav .nav-item { + float: none; + width: 100%; + display: inline-block; + } + + .navbar-nav .nav-item + .nav-item { + margin-left: 0; + } + + .nav.navbar-nav.pull-right { + float: none !important; + } +} + +/* 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; +} \ No newline at end of file