~dholbach/loco-team-portal/release

« back to all changes in this revision

Viewing changes to loco_directory/venues/models.py

  • Committer: Thomas Bechtold
  • Date: 2010-05-02 13:39:19 UTC
  • Revision ID: thomasbechtold@jpberlin.de-20100502133919-mqb2cwp0s0kpu28a
group venues by country

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from django.db import models
2
2
from django.utils.translation import ugettext_lazy as _
 
3
from django.db.models import permalink
3
4
 
4
5
# Create your models here.
5
6
 
34
35
            return '%(name)s (%(city)s, %(country)s)' %{'name':self.name, 'city':self.city, 'country':self.country}
35
36
        else:
36
37
            return self.name
 
38
    
 
39
    @models.permalink
 
40
    def get_absolute_url(self):
 
41
        """ get the absolute url for the venue """
 
42
        return ('venue-detail', [self.id])
37
43