thoughtherder

code

  • migrating a django project from sqlite to mysql / postgresql

    Tuesday, February 23, 2010 5:37 p.m.

    Should you ever be tasked with migrating a django project running on an sqlite database to postgresql or mysql, the following are some of the steps I took. The project ...

  • multilingual site w/ django

    Saturday, October 17, 2009 2:14 p.m.

    A brief tutorial on how I setup a multilingual website using django. Be forewarned, this is a pretty rough draft. I will hopefully get some time to go over it. ...

  • type polymorphism in django

    Monday, May 24, 2010 6:15 p.m.

    models.py from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic related_object_limits = {'model__in': ('specificitem1', \ 'specificitem2')} class RelatedItem(models.Model): content_type = models.ForeignKey(ContentType, \ related_name='main_object', \ limit_choices_to=related_object_limits) object_id = ...