Version 1 (modified by Joshua Tacoma, 12 years ago) (diff)

initial sketch, so the page exists

in progress

from django.db import models

class Individual (models.Model):
    class Admin: pass

class Event (models.Model):
    class Admin: pass

class Participation (models.Model):
    # leave defaults: null=False , core=False
    event = models.ForeignKey(Event, related_name='participants', edit_inline=True, blank=True, default=None)
    individual = models.ForeignKey(Individual, related_name='events', edit_inline=True, blank=True, default=None)
    # set core=True and blank=True: now admin will show it blank by default (so it won't exist unless you specify something)
    role = models.PositiveSmallIntegerField(core=True, blank=True, default=None)
    class Admin: pass
Back to Top