Skip to content

Commit

Permalink
get_absolute_url and ping_google buggy
Browse files Browse the repository at this point in the history
  • Loading branch information
dokterbob committed Oct 14, 2008
1 parent a60b6be commit 8780b84
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion agenda/models.py
Expand Up @@ -43,6 +43,14 @@ class Meta:
def __unicode__(self):
return _("%(title)s on %(event_date)s") % { 'title' : self.title,
'event_date' : self.event_date }

@models.permalink
def get_absolute_url(self):
return ('agenda-detail', (), {
'year' : self.event_date.year,
'month' : self.event_date.month,
'day' : self.event_date.day,
'slug' : self.slug })

objects = models.Manager()
on_site = CurrentSiteManager()
Expand Down Expand Up @@ -76,7 +84,7 @@ def __unicode__(self):

def save(self):
super(Event, self).save()
if settings.DEBUG:
if not settings.DEBUG:
try:
ping_google()
except Exception:
Expand Down

0 comments on commit 8780b84

Please sign in to comment.