Generating an InlineModelAdmin Form on the fly in Django

Posted by & filed under Code.

I’m adding drag/drop uploading to the django admin for one of our open source projects called Stager. A blog post about that will follow, it’s not screen-shot ready yet.  While doing this I knew we needed a pretty seamless transition after the upload finished, and that we would have to refresh the inline.  I didn’t… Read more »

Getting Started with Solr and Django

Posted by & filed under Code.

Solr is a very powerful search tool and it is pretty easy to get the basics, such as full text search, facets, and related assets up and running pretty quickly. We will be using haystack to do the communication between Django and Solr. All code for this can be viewed on github. Install Assuming you… Read more »

Developing with multiple versions of Django on windows

Posted by & filed under Code.

At work, we have sites that use various versions of Django, so there is a need to switch packages.  On my mac I use virtualenv to handle this, but I’ve never quite gotten it to play nice with windows, and just switching Django versions has sufficed so far. If you can set up virtualenv, that’s… Read more »

Some reading from django-nyc

Posted by & filed under Code.

Went to the django-nyc meetup last night, it was in Manhattan and much easier to get to then when it’s at huge in bk.  Wrote down a few things to read up on: Celery – Celery is an asynchronous task queue/job queue based on distributed message passing. It is focused on real-time operation, but supports… Read more »

select foo, count(*) from bar group by foo in django

Posted by & filed under Code.

Every once in a while you need some old fashion SQL style queries in django.  This is a common one for reporting and aggregation.  Its fairly easy to replicate in a queryset.  Say I wanted to get the authors and the number of articles they have written going back to the beginning of 2009 to… Read more »