Changes between Initial Version and Version 1 of CookBookPredicates


Ignore:
Timestamp:
Jun 21, 2006, 9:29:09 PM (18 years ago)
Author:
Joshua Tacoma
Comment:

initial sketch, so the page exists

Legend:

Unmodified
Added
Removed
Modified
  • CookBookPredicates

    v1 v1  
     1== in progress ==
     2
     3{{{
     4from django.db import models
     5
     6class Individual (models.Model):
     7    #...
     8    class Admin: pass
     9
     10class Event (models.Model):
     11    #...
     12    class Admin: pass
     13
     14class Participation (models.Model):
     15    # leave defaults: null=False , core=False
     16    event = models.ForeignKey(Event, related_name='participants', edit_inline=True, blank=True, default=None)
     17    individual = models.ForeignKey(Individual, related_name='events', edit_inline=True, blank=True, default=None)
     18    # set core=True and blank=True: now admin will show it blank by default (so it won't exist unless you specify something)
     19    role = models.PositiveSmallIntegerField(core=True, blank=True, default=None)
     20    class Admin: pass
     21}}}
Back to Top