daily pastebin goal
80%
SHARE
TWEET

Django UserProfile

a guest Dec 31st, 2013 3 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.contrib.auth.models import User
  2. from django.db import models
  3.  
  4. class UserProfile(models.Model):
  5.     class Meta:
  6.         app_label = 'app'
  7.  
  8.     user = models.OneToOneField(User)
  9.     twitter = models.CharField(max_length=15, null=True)
  10.     facebook = models.CharField(max_length=72, null=True)
  11.     github = models.CharField(max_length=30, null=True)
  12.     gplus = models.CharField(max_length=21, null=True)
  13.  
  14.     @models.permalink
  15.     def get_absolute_url(self):
  16.         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. OK, I Understand
 
Top