Yawd website

Articles Tagged model

  1. Allow for lazy dynamic choices in django's model fields

    Here's a quick how-to for those that need to dynamically generate model field choices with django. Normally we would define a CharField as follows, where choices should be a tuple containing static choices.

    Posted on August 16th, 2011 by Pantelis Petridis