File diff 96596dc5ddb2 → 6d5c24e6354f
symposion/conference/models.py
Show inline comments
...
 
@@ -11,24 +11,24 @@ class Conference(models.Model):
 
    """
 
    the full conference for a specific year, e.g. US PyCon 2012.
 
    """
 
    
 

 
    title = models.CharField(_("title"), max_length=100)
 
    
 

 
    # when the conference runs
 
    start_date = models.DateField(_("start date"), null=True, blank=True)
 
    end_date = models.DateField(_("end date"), null=True, blank=True)
 
    
 

 
    # timezone the conference is in
 
    timezone = TimeZoneField(_("timezone"), blank=True)
 
    
 

 
    def __unicode__(self):
 
        return self.title
 
    
 

 
    def save(self, *args, **kwargs):
 
        super(Conference, self).save(*args, **kwargs)
 
        if self.id in CONFERENCE_CACHE:
 
            del CONFERENCE_CACHE[self.id]
 
    
 

 
    def delete(self):
 
        pk = self.pk
 
        super(Conference, self).delete()
...
 
@@ -36,7 +36,7 @@ class Conference(models.Model):
 
            del CONFERENCE_CACHE[pk]
 
        except KeyError:
 
            pass
 
    
 

 
    class Meta(object):
 
        verbose_name = _("conference")
 
        verbose_name_plural = _("conferences")
...
 
@@ -48,19 +48,19 @@ class Section(models.Model):
 
    "Talks", "Expo", "Sprints", that may have its own review and
 
    scheduling process.
 
    """
 
    
 

 
    conference = models.ForeignKey(Conference, verbose_name=_("conference"))
 
    
 

 
    name = models.CharField(_("name"), max_length=100)
 
    slug = models.SlugField()
 

	
 
    # when the section runs
 
    start_date = models.DateField(_("start date"), null=True, blank=True)
 
    end_date = models.DateField(_("end date"), null=True, blank=True)
 
    
 

 
    def __unicode__(self):
 
        return "%s %s" % (self.conference, self.name)
 
    
 

 
    class Meta(object):
 
        verbose_name = _("section")
 
        verbose_name_plural = _("sections")