Quantcast
Channel: Nomad Journey » Django
Browsing all 8 articles
Browse latest View live

Using Django templates with jQuery AJAX

I recently discovered a neat way of displaying data retrieved using jQuery AJAX in concert with Django’s template engine. You can create a view in Django which simply uses the render_to_response...

View Article



Using svn:externals for external Django module dependencies

After working on building a fairly complex Django application for the last year or so, I have ended up using a few of the open source Django modules that are out there. Why re-invent the wheel after...

View Article

UUID template tag for Django

A while back, I had posted a template tag on djangosnippets which generates UUIDs on the fly. I figured that I’d share the same snippet here and explain why I did it. My rationale for writing this: I...

View Article

Database independent Django queries: COALESCE vs. NVL, IFNULL, ISNULL

Most of the time, it is not necessary to write raw SQL from Django. However, there are cases where it can’t be avoided. One common pattern in SQL that always comes up is to check two fields and get the...

View Article

Dynamic Django queries (or why kwargs is your friend)

A very easy way to dynamically build queries in Django is to use Python kwargs (keyword arguments). Let’s say we have a model that looks something like this: class Entry( models.Model ): user =...

View Article


Customized comment notifications from Django

I recently had to implement a way to send notifications (using the excellent django-notification app developed by James Tauber) to users whose content is commented on in my Django web app. However, I...

View Article

Splitting up Django models

Sometimes it makes sense to split up your Django models for a specific application across multiple files instead of having all of them in one models.py file. This allows for easier and simpler code...

View Article

Returning HTTP responses with django-tastypie

Here at MutualMind, we’ve built our REST developer API using the excellent django-tastypie framework. Once you understand the basic request/response cycle as mentioned in the documentation, it takes...

View Article

Browsing all 8 articles
Browse latest View live




Latest Images