Author: leidel
Date: Sat Sep 27 15:34:00 2008
New Revision: 968
Modified:
trunk/local_apps/profiles/models.py
Log:
Added get_absolute_url to Profile model
Modified: trunk/local_apps/profiles/models.py
==============================================================================
--- trunk/local_apps/profiles/models.py (original)
+++ trunk/local_apps/profiles/models.py Sat Sep 27 15:34:00 2008
@@ -22,10 +22,14 @@
pownce_user = models.CharField(_('Pownce Username'), max_length=50,
blank=True)
pownce_password = models.CharField(_('Pownce Password'),
max_length=50, blank=True)
language = models.CharField(_('language'), max_length=10,
choices=settings.LANGUAGES, default=settings.LANGUAGE_CODE)
-
+
def __unicode__(self):
return self.user.username
-
+
+ def get_absolute_url(self):
+ return ('profile_detail', None, {'username': self.user.username})
+ get_absolute_url = models.permalink(get_absolute_url)
+
class Meta:
verbose_name = _('profile')
verbose_name_plural = _('profiles')
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pinax-updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pinax-updates?hl=en
-~----------~----~----~----~------~----~------~--~---