For local project settings, I use old trick with
try: from settings_local import * except ImportError: pass
settings_local.py we can override variables from
settings.py. I didn't know how to supplement them. For example how to add line to
INSTALLED_APPSwithout copying whole list.
Yesterday I finally understood that I can import
# settings_local.py from settings import * INSTALLED_APPS += ( # ... )
Now, couple years later I prefer having separate settings file for different environments, as it is described in 2 scoops of django.
In UNIX way, each view should solve single task. This is good idea, but sometimes we need to mix logic of different views on same page. Filter, sort, paginate, or, for example, add comment on product page. In this article I'll show how we can mix such multiple views.
Programmatic generation of PDF files is a frequent task when developing applications that can export reports, bills, or questionnaires. In this article, we will consider three common tools for creating PDFs, including their installation and converting principles.