summaryrefslogtreecommitdiff
path: root/usuarios/models.py
diff options
context:
space:
mode:
authorJoaquín Aguirrezabalaga <kinote@kinote.org>2014-01-03 01:06:22 +0100
committerJoaquín Aguirrezabalaga <kinote@kinote.org>2014-01-03 01:06:40 +0100
commitf05c5e2d8a705df1c94b63a978267b291c893bbb (patch)
treea8bd95e9cc2c0bd48be57893ccc4ddec63152d29 /usuarios/models.py
parent802a74102b9073e961ef1d7a487f99b962d76512 (diff)
downloadelgarito-master.tar.gz
elgarito-master.zip
django 1.6HEADmaster
Diffstat (limited to 'usuarios/models.py')
-rw-r--r--usuarios/models.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/usuarios/models.py b/usuarios/models.py
index 3f5b3c7..f63de7a 100644
--- a/usuarios/models.py
+++ b/usuarios/models.py
@@ -1,9 +1,10 @@
# vim: set fileencoding=utf-8 ts=4 shiftwidth=4 softtabstop=4 expandtab:
-from elgarito.tablon.models import PermisoForo
+from tablon.models import PermisoForo
from django.db import models
from django.contrib.auth.models import User
from django import forms
+
class UserProfile(models.Model):
user = models.OneToOneField(User)
show_email = models.BooleanField("Mostrar e-mail", blank=True)
@@ -29,24 +30,27 @@ class UserProfile(models.Model):
pass
return False
+
class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
- exclude = ('user')
+ exclude = ('user',)
+
class UserForm(forms.ModelForm):
class Meta:
model = User
fields = ('first_name', 'last_name', 'email')
+
class UserProfileCreateForm(forms.ModelForm):
class Meta:
model = UserProfile
fields = ('show_email', 'url', 'msn_id', 'jabber_id', 'imagen')
+
class UserCreateForm(forms.ModelForm):
class Meta:
model = User
fields = ('username', 'password', 'first_name', 'last_name', 'email')
-