~wxl/loco-team-portal/more-details

« back to all changes in this revision

Viewing changes to loco_directory/articles/models.py

  • Committer: Adnane Belmadiaf
  • Date: 2012-12-13 22:48:12 UTC
  • mto: This revision was merged to the branch mainline in revision 580.
  • Revision ID: daker@ubuntu.com-20121213224812-mcr3skb0iawy3p9p
Added team flag for each blog post
Added the full post

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
from django.db import models
9
9
from django.conf import settings
 
10
from django.template.defaultfilters import slugify
 
11
 
10
12
 
11
13
from teams.models import Team
12
14
from userprofiles.models import UserProfile
119
121
 
120
122
    def __unicode__(self):
121
123
        return u'%s (%s)' % (self.title, self.author)
 
124
 
 
125
    @models.permalink
 
126
    def get_absolute_url(self):
 
127
        return ('article-detail', [str(self.id), slugify(self.title)])