From 4b6707fe7bebbd849142fe8d75b42a3b5dbcf0ae Mon Sep 17 00:00:00 2001 From: Meghan Heintz Date: Fri, 3 Jun 2016 11:55:44 -0700 Subject: [PATCH 1/9] adding troubleshooting doc --- docs/troubleshooting.rst | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/troubleshooting.rst diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst new file mode 100644 index 000000000..fe121b9cd --- /dev/null +++ b/docs/troubleshooting.rst @@ -0,0 +1,9 @@ +Troubleshooting +===================================== + +This page contains some advice about errors and problems commonly encountered during the development of Cookiecutter Django applications. + +#. If you get the error ``jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'now'.`` , please upgrade your cookiecutter version to >= 1.4 (see issue # 528_ ) +#. ``project_slug`` must be a valid Python module name or you will have issues on imports. + +.. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 \ No newline at end of file From ecc81134dd552475c52cef749615b1356566811c Mon Sep 17 00:00:00 2001 From: Meghan Heintz Date: Fri, 3 Jun 2016 12:04:11 -0700 Subject: [PATCH 2/9] Adding troubleshotting to index --- docs/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.rst b/docs/index.rst index beafb44cf..aa88fe246 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,6 +25,7 @@ Contents: deployment-on-heroku deployment-with-docker faq + troubleshooting Indices and tables ================== From a751fbcf9fa9717dc68db0bb8fad84cb79aac123 Mon Sep 17 00:00:00 2001 From: Meghan Heintz Date: Fri, 3 Jun 2016 12:11:54 -0700 Subject: [PATCH 3/9] moving warnings from readme to troubleshooting --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 14dcf2078..df192efc0 100644 --- a/README.rst +++ b/README.rst @@ -14,9 +14,11 @@ Cookiecutter Django Powered by Cookiecutter_, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. +See Troubleshooting_ for common errors and obstacles. + .. _cookiecutter: https://github.com/audreyr/cookiecutter -**Warning**: if you get the error "jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'now'." , please upgrade your cookiecutter version to >= 1.4 (see issue # 528_ ) +.. _Troubleshooting: https://cookiecutter-django.readthedocs.io/en/latest/troubleshooting.html .. _528: https://github.com/pydanny/cookiecutter-django/issues/528#issuecomment-212650373 @@ -99,8 +101,6 @@ You'll be prompted for some values. Provide them, then a Django project will be **Warning**: After this point, change 'Daniel Greenfeld', 'pydanny', etc to your own information. -**Warning**: project_slug must be a valid Python module name or you will have issues on imports. - Answer the prompts with your own desired options_. For example:: Cloning into 'cookiecutter-django'... From 6885547b6ae2bb606ed13eb4a11f9abf6939fa83 Mon Sep 17 00:00:00 2001 From: mjsisley Date: Fri, 3 Jun 2016 12:50:23 -0700 Subject: [PATCH 4/9] Adding documentation for debugging with Docker (#575) * Adding documentation for debugging with Docker * Add -f dev.yml --- docs/developing-locally-docker.rst | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/docs/developing-locally-docker.rst b/docs/developing-locally-docker.rst index 03e9221c5..85aef9c6d 100644 --- a/docs/developing-locally-docker.rst +++ b/docs/developing-locally-docker.rst @@ -141,3 +141,45 @@ If you want to run the stack in detached mode (in the background), use the ``-d` :: $ docker-compose -f dev.yml up -d + +Debugging +~~~~~~~~~~~~~ + +ipdb +""""" + +If you are using the following within your code to debug: + +:: + + import ipdb; ipdb.set_trace() + +Then you may need to run the following for it to work as desired: + +:: + + $ docker-compose run -f dev.yml --service-ports django + +django-debug-toolbar +"""""""""""""""""""" + +In order for django-debug-toolbar to work with docker you need to add your docker-machine ip address (the output of `Get the IP ADDRESS`_) to INTERNAL_IPS in local.py + + +.. May be a better place to put this, as it is not Docker specific. + +You may need to add the following to your css in order for the django-debug-toolbar to be visible (this applies whether Docker is being used or not): + +.. code-block:: css + + /* Override Bootstrap 4 styling on Django Debug Toolbar */ + #djDebug[hidden], #djDebug [hidden] { + display: block !important; + } + + #djDebug [hidden][style='display: none;'] { + display: none !important; + } + + + From 65b3de002c7f31838e8b6d786a54515d08673c82 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 3 Jun 2016 12:52:52 -0700 Subject: [PATCH 5/9] Added @mjsisley to the contributor list --- CHANGELOG.md | 4 ++++ CONTRIBUTORS.rst | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f8491530..1b9bb5e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All enhancements and patches to Cookiecutter Django will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +##[2016-06-03] +### Added +- Documentation for debugging with Docker (@mjsisley) + ##[2016-06-02] ### Added - Added better instructions for installing postgres on Mac OS X (@dot2dotseurat ) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 4e0bc3bc5..5a0ab6eb4 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -97,6 +97,7 @@ Listed in alphabetical order. Matt Menzenski `@menzenski`_ Matt Warren `@mfwarren`_ Meghan Heintz `@dot2dotseurat`_ + mjsisley `@mjsisley`_ mozillazg `@mozillazg`_ Pablo `@oubiga`_ Raphael Pierzina `@hackebrot`_ @@ -160,6 +161,7 @@ Listed in alphabetical order. .. _@MathijsHoogland: https://github.com/MathijsHoogland .. _@menzenski: https://github.com/menzenski .. _@mfwarren: https://github.com/mfwarren +.. _@mjsisley: https://github.com/mjsisley .. _@mozillazg: https://github.com/mozillazg .. _@originell: https://github.com/originell .. _@oubiga: https://github.com/oubiga From daf98aea428174f7576363b60494a07dcbacc38d Mon Sep 17 00:00:00 2001 From: Meghan Heintz Date: Fri, 3 Jun 2016 14:02:51 -0700 Subject: [PATCH 6/9] Adding Apache 2 License option (#578) * Adding Apache 2 License option * changed order of liences availble --- cookiecutter.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookiecutter.json b/cookiecutter.json index 8fe7010a2..686b8fd61 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -22,5 +22,5 @@ "use_heroku": "n", "use_grunt": "n", "use_angular": "n", - "open_source_license": ["MIT", "BSD", "Not open source"] + "open_source_license": ["MIT", "BSD", "Apache Software License 2.0", "Not open source"] } From 1efe3f6caf66351ec6b914ca115865834f4b2f04 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 3 Jun 2016 14:05:08 -0700 Subject: [PATCH 7/9] Tracking more work by @dot2dotseurat --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b9bb5e6e..9657565b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ##[2016-06-03] ### Added - Documentation for debugging with Docker (@mjsisley) +- Apache 2 License option in `cookiecutter.json` (@dot2dotseurat) ##[2016-06-02] ### Added From 36ac82b1cfbeedbdbcb081c9fe340a7a5f057e3f Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 3 Jun 2016 14:07:25 -0700 Subject: [PATCH 8/9] Removed angular2 --- README.rst | 1 - cookiecutter.json | 1 - .../{{cookiecutter.project_slug}}/templates/base.html | 6 +----- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/README.rst b/README.rst index df192efc0..3e906217f 100644 --- a/README.rst +++ b/README.rst @@ -131,7 +131,6 @@ Answer the prompts with your own desired options_. For example:: use_docker [y]: y use_heroku [n]: n use_grunt [n]: y - use_angular [n]: n Select open_source_license: 1 - MIT 2 - BSD diff --git a/cookiecutter.json b/cookiecutter.json index 686b8fd61..36aa3c300 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -21,6 +21,5 @@ "use_docker": "y", "use_heroku": "n", "use_grunt": "n", - "use_angular": "n", "open_source_license": ["MIT", "BSD", "Apache Software License 2.0", "Not open source"] } diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html index b54692228..a1e2a5ace 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/base.html @@ -1,5 +1,5 @@ {% raw %}{% load staticfiles i18n %} - + @@ -23,10 +23,6 @@ {% endblock %} - {% endraw %}{% if cookiecutter.use_angular == "y" %}{% raw %}{% block angular %} - - {% endblock %}{% endraw %}{% endif %}{% raw %} - From ed11e05d09a56e8326e7c2dcaec7331bbfec6400 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 3 Jun 2016 14:08:25 -0700 Subject: [PATCH 9/9] Finish removing Angular --- CHANGELOG.md | 3 +++ README.rst | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9657565b4..088fb47a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Documentation for debugging with Docker (@mjsisley) - Apache 2 License option in `cookiecutter.json` (@dot2dotseurat) +### Deleted +- AngularJS (@pydanny) + ##[2016-06-02] ### Added - Added better instructions for installing postgres on Mac OS X (@dot2dotseurat ) diff --git a/README.rst b/README.rst index 3e906217f..23fb79d64 100644 --- a/README.rst +++ b/README.rst @@ -28,7 +28,6 @@ Features * For Django 1.9 * Renders Django projects with 100% starting test coverage * Twitter Bootstrap_ v4.0.0 - alpha_ -* AngularJS_ * 12-Factor_ based settings via django-environ_ * Optimized development and production settings * Registration via django-allauth_ @@ -57,7 +56,6 @@ Optional Integrations .. _alpha: http://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/ .. _Bootstrap: https://github.com/twbs/bootstrap -.. _AngularJS: https://github.com/angular/angular.js .. _django-environ: https://github.com/joke2k/django-environ .. _12-Factor: http://12factor.net/ .. _django-allauth: https://github.com/pennersr/django-allauth