If you’re building a Django system that implies serving some kind of documents like reports or bills, chances are you want to provide docs in various formats from PDF to MS Word to HTML. But how to implement this without resorting to numerous templates and packages for each document type?Continue reading
This writing is inspired by a comment on Reddit concerning my recent post:
“The problem is that everyone I speak to seems to think the opposite - that the admin is super-limited, inflexible and hard to customize.”
— andybak on Reddit
I’m about to break this prejudice right now. The Django admin is a really brilliant piece of software, which can significantly speed up your development.
Here are some tips about the Django admin, which I’ve found to be quite useful.Continue reading
Did you ever want to have a simple Django notification bot? An intranet one which just sends you (or someone you tell it to) Jabber messages when certain events occur? So did I. Please, welcome: django-jabber.Continue reading
There are times when you want to get a single field of a single object in the database. For example, just get the headline of the blog post #1, not fetching it’s body. How do you do it in a usual way?
:::python >>> BlogPost.objects.only('headline').get(pk=1).headline 'Hello world' # Or maybe even this way: >>> BlogPost.objects.values('headline').filter(pk=1)['headline'] 'Hello world'
Recently I’ve stumbled upon a shorter one:Continue reading
In case you’ve thought I detest
django.contrib.admin — by no means.
Actually it’s one of the Django’s greatest features, I really love it. In most cases.
Here’s a real life story. We’ve had to quickly put up the first version of an intranet claim tracking system, and one of our developers was just crazy about the Django admin… So why not, we’ve got along with the stock interface as the primary one for ...Continue reading