SHARE
TWEET
Django UserProfile
a guest
Dec 31st, 2013
3
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- from django.contrib.auth.models import User
- from django.db import models
- class UserProfile(models.Model):
- class Meta:
- app_label = 'app'
- user = models.OneToOneField(User)
- twitter = models.CharField(max_length=15, null=True)
- facebook = models.CharField(max_length=72, null=True)
- github = models.CharField(max_length=30, null=True)
- gplus = models.CharField(max_length=21, null=True)
- @models.permalink
- def get_absolute_url(self):
- return ('main_profile', (), {'username': self.user.username})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
