Created
October 30, 2012 08:18
-
-
Save neara/3978936 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Occupation(models.Model): | |
event = models.ForeignKey(Event, related_name='sections') | |
section = models.ForeignKey(Section) | |
expected_capacity = models.PositiveIntegerField( | |
help_text='Max Capacity: %d' % self.section.crowd_capacity) | |
def __unicode__(self): | |
return self.section.name | |
class OccupationForm(forms.ModelForm): | |
class Meta: | |
model = Occupation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment