Skip to content

Instantly share code, notes, and snippets.

View neara's full-sized avatar
🏠
Working from home

Ana neara

🏠
Working from home
View GitHub Profile
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):
// in app.js
// Routes
var routes = require('./routes')(app);
app.get('/:controller/:action/:id', routes.get);
app.get('/:controller/:id', routes.get);
app.get('/:controller', routes.get);
app.get('/api/v2/*', routes.api);
app.get('/dev-status/:path', routes.dev_status); // this is what i want to add