#342 Merge last updates on master

This commit is contained in:
andresgz 2016-06-03 18:35:24 -04:00
commit f566a4e536
8 changed files with 67 additions and 13 deletions

View File

@ -2,6 +2,14 @@
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)
- 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 )

View File

@ -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

View File

@ -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
@ -26,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_
@ -55,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
@ -99,8 +99,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'...
@ -131,7 +129,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

View File

@ -21,7 +21,6 @@
"use_docker": "y",
"use_heroku": "n",
"use_grunt": "n",
"use_angular": "n",
"use_compressor": "n",
"open_source_license": ["MIT", "BSD", "Not open source"]
"open_source_license": ["MIT", "BSD", "Apache Software License 2.0", "Not open source"]
}

View File

@ -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;
}

View File

@ -25,6 +25,7 @@ Contents:
deployment-on-heroku
deployment-with-docker
faq
troubleshooting
Indices and tables
==================

9
docs/troubleshooting.rst Normal file
View File

@ -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

View File

@ -1,5 +1,5 @@
{% raw %}{% load staticfiles i18n {% endraw %}{% if cookiecutter.use_compressor == "y" %}compress{% endif %}{% raw %}%}<!DOCTYPE html>
<html lang="en" {% endraw %}{% if cookiecutter.use_angular == "y" %}ng-app{% endif %}{% raw %}>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
@ -24,10 +24,6 @@
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
{% endblock %}
{% endraw %}{% if cookiecutter.use_angular == "y" %}{% raw %}{% block angular %}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
{% endblock %}{% endraw %}{% endif %}{% raw %}
</head>
<body>