Skip to content

Instantly share code, notes, and snippets.

@neara
Created October 30, 2012 08:18
Show Gist options
  • Save neara/3978936 to your computer and use it in GitHub Desktop.
Save neara/3978936 to your computer and use it in GitHub Desktop.
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