Django is app-based
projects vs. apps
- templates directory in apps
- static directory in apps
python manage.py collectstatic
Django, by default on production, does not serve static assets
- that's the webserver's job
- views handle logic
- class-based views
- you can define methods to handle differend HTTP methods
- include vs. extend
- blocks
- very limited logic, by design
- design your URLs
- very flexible, but can get messy
- use the
url()
pattern with thename=
kwarg. - reference URLs by name in templates
- https://docs.djangoproject.com/en/1.5/
- https://docs.djangoproject.com/en/1.5/topics/http/urls/
- https://docs.djangoproject.com/en/1.5/topics/http/views/
- https://docs.djangoproject.com/en/dev/topics/class-based-views/#supporting-other-http-methods
- https://github.com/rca/django-resourceful
- http://django_compressor.readthedocs.org/en/latest/quickstart/
- COMPRESS_ENABLED=False
- http://docs.python.org/2/library/itertools.html
- http://docs.python.org/2/library/functools.html