Fix Django CSRF token failure on an AWS ELB → Apache2 → uWSGI stack. The pitfall is the HTTP/HTTPS scheme detection when switching from mod_wsgi to uWSGI.
How to return a Shift-JIS (CP932) CSV download response from Django on Python 3 — write to StringIO as Unicode first, then encode to cp932 in one shot.
Page through Django model instances retrieved via a complex query (raw SQL or composed Q objects) using Paginator, with a working implementation pattern.
```html
Here are two methods to output an HTML template as it is using Django's TemplateView class, but replacing strings in the output result at once.
url(r'^login/', 'django.contrib.auth.views.login', name='login',
kwargs={'template_name': 'admin/login.html',
'extra_context': {'next': '/'}}),
Write this link in the template as follows,
There is a system called Mezzanine for building a CMS on Python + Django. By default, blog entries are written using a WYSIWYG HTML editor, but I wanted to write them using reStructured Text (reST, rst), so I did some research.