This commit is contained in:
j 2010-08-10 23:59:20 +02:00
parent 2553d5766e
commit 253a401e9b

View file

@ -6,13 +6,14 @@ from django.db import models
from django.db.models import signals from django.db.models import signals
from django.dispatch import dispatcher from django.dispatch import dispatcher
from django.utils import simplejson as json from django.utils import simplejson as json
from datetime import datetime
class UserProfile(models.Model): class UserProfile(models.Model):
recover_key = models.TextField() recover_key = models.TextField()
user = models.ForeignKey(User, unique=True) user = models.ForeignKey(User, unique=True)
files_updated = models.DateTimeField(default=None) files_updated = models.DateTimeField(default=datetime.now)
def user_post_save(sender, instance, **kwargs): def user_post_save(sender, instance, **kwargs):
profile, new = UserProfile.objects.get_or_create(user=instance) profile, new = UserProfile.objects.get_or_create(user=instance)