Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 17 lines (10 sloc) 0.444 kb
d714daa Add UserProfile Creation to TestCase. Up a version
Val L33 authored
1 import os
2
3 # create a database table only in unit test mode
3b461d6 moving away from buildout
Val Neekman authored
4 if 'testsettings' in os.environ['DJANGO_SETTINGS_MODULE']:
d714daa Add UserProfile Creation to TestCase. Up a version
Val L33 authored
5 from django.db import models
6 from django.contrib.auth.models import User
3b461d6 moving away from buildout
Val Neekman authored
7
d714daa Add UserProfile Creation to TestCase. Up a version
Val L33 authored
8 class UserProfile(models.Model):
9 user = models.ForeignKey(User, related_name="%(class)s", unique=True)
10 is_active = models.BooleanField(default=False)
11
12 def __unicode__(self):
13 return self.user.username
14
378139c Initial commit
Val L33 authored
15
16
Something went wrong with that request. Please try again.