Source

lindyjam / djschedule / models.py

Full commit
from django.db import models
from lindyjam.sms.models import Carrier
from django.contrib.localflavor.us.models import PhoneNumberField

class Slot(models.Model):
    dj_date = models.DateField('Date to DJ')
    submitted = models.DateTimeField('Submitted', blank=True, null=True)
    name = models.CharField(max_length=50)
    email = models.EmailField(blank=True, null=True)
    phone = PhoneNumberField(blank=True, null=True)
    carrier = models.ForeignKey(Carrier, blank=True, null=True)
    approved = models.BooleanField(default=False)
    
    @models.permalink
    def get_absolute_url(self):
        return ('djschedule-index',)
    
    def __unicode__(self):
        return u'%s - %s' % (str(self.dj_date), self.name)