From 650d4f1dd21d1f75c8f9bb443e05a0c8f085e47e Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Tue, 22 Sep 2015 09:04:33 -0700 Subject: [PATCH 1/8] Copy mobile navbar fix from css to scss. --- .../static/sass/project.scss | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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..82a319fc 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,20 @@ 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; + } +} \ No newline at end of file From 97142763a6b543cc05ba832d98dbf0455ba50282 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Wed, 23 Sep 2015 23:53:33 -0700 Subject: [PATCH 2/8] Workaround for debug-toolbar conflict with Bootstrap 4. --- .../{{cookiecutter.repo_name}}/static/css/project.css | 8 ++++++++ .../{{cookiecutter.repo_name}}/static/sass/project.scss | 8 ++++++++ 2 files changed, 16 insertions(+) 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 82a319fc..a5e9fb99 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/sass/project.scss @@ -29,4 +29,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 From 8fa150a81f5cc445a1a0b3cdff58a2801df8a5b9 Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 24 Sep 2015 00:33:33 -0700 Subject: [PATCH 3/8] Have flake8 ignore node_modules/ --- {{cookiecutter.repo_name}}/setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/setup.cfg b/{{cookiecutter.repo_name}}/setup.cfg index 51059eda..e2bc1f40 100644 --- a/{{cookiecutter.repo_name}}/setup.cfg +++ b/{{cookiecutter.repo_name}}/setup.cfg @@ -1,4 +1,4 @@ [flake8] #ignore = E265 max-line-length = 120 -exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs +exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules From b642fed5bb73914e6fd5919810237c33a759553c Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 24 Sep 2015 00:38:04 -0700 Subject: [PATCH 4/8] Starter docs on our flake8 setup. --- docs/linters.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 From 9160a3443a198a29d342fcb358a7d662eab2311a Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 24 Sep 2015 00:39:42 -0700 Subject: [PATCH 5/8] Remove commented-out flake8 ignore rule. --- {{cookiecutter.repo_name}}/setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.repo_name}}/setup.cfg b/{{cookiecutter.repo_name}}/setup.cfg index e2bc1f40..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,node_modules From 7c0e979ef3ce3d4ddc95b868824de816b887bc2a Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 24 Sep 2015 16:18:20 -0700 Subject: [PATCH 6/8] Update editorconfig to match existing project conventions for 2-space html, css, scss, json --- .editorconfig | 2 +- {{cookiecutter.repo_name}}/.editorconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/{{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 From de4a717b9882558e44740882184b7b9971a52f0d Mon Sep 17 00:00:00 2001 From: Audrey Roy Greenfeld Date: Thu, 24 Sep 2015 16:19:38 -0700 Subject: [PATCH 7/8] Ignore user-uploaded media --- {{cookiecutter.repo_name}}/.gitignore | 3 +++ 1 file changed, 3 insertions(+) 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/ From 7c2777734b36f26f22a1d70467f3797e1cbe2656 Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Fri, 25 Sep 2015 23:26:56 -0700 Subject: [PATCH 8/8] Updated django-mailgun requirement This not only has a nice feature, it also improves Python 3 support. --- {{cookiecutter.repo_name}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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