Translations for django/auth.py
This commit is contained in:
parent
3f3f93b0fa
commit
63ee4fef1a
@ -3,6 +3,7 @@ from mongoengine import *
|
|||||||
from django.utils.hashcompat import md5_constructor, sha_constructor
|
from django.utils.hashcompat import md5_constructor, sha_constructor
|
||||||
from django.utils.encoding import smart_str
|
from django.utils.encoding import smart_str
|
||||||
from django.contrib.auth.models import AnonymousUser
|
from django.contrib.auth.models import AnonymousUser
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
@ -21,16 +22,32 @@ class User(Document):
|
|||||||
"""A User document that aims to mirror most of the API specified by Django
|
"""A User document that aims to mirror most of the API specified by Django
|
||||||
at http://docs.djangoproject.com/en/dev/topics/auth/#users
|
at http://docs.djangoproject.com/en/dev/topics/auth/#users
|
||||||
"""
|
"""
|
||||||
username = StringField(max_length=30, required=True)
|
username = StringField(max_length=30, required=True,
|
||||||
first_name = StringField(max_length=30)
|
verbose_name=_('username'),
|
||||||
last_name = StringField(max_length=30)
|
help_text=_("Required. 30 characters or fewer. Letters, numbers and @/./+/-/_ characters"))
|
||||||
email = StringField()
|
|
||||||
password = StringField(max_length=128)
|
first_name = StringField(max_length=30,
|
||||||
is_staff = BooleanField(default=False)
|
verbose_name=_('first name'))
|
||||||
is_active = BooleanField(default=True)
|
|
||||||
is_superuser = BooleanField(default=False)
|
last_name = StringField(max_length=30,
|
||||||
last_login = DateTimeField(default=datetime.datetime.now)
|
verbose_name=_('last name'))
|
||||||
date_joined = DateTimeField(default=datetime.datetime.now)
|
email = EmailField(verbose_name=_('e-mail address'))
|
||||||
|
password = StringField(max_length=128,
|
||||||
|
verbose_name=_('password'),
|
||||||
|
help_text=_("Use '[algo]$[salt]$[hexdigest]' or use the <a href=\"password/\">change password form</a>."))
|
||||||
|
is_staff = BooleanField(default=False,
|
||||||
|
verbose_name=_('staff status'),
|
||||||
|
help_text=_("Designates whether the user can log into this admin site."))
|
||||||
|
is_active = BooleanField(default=True,
|
||||||
|
verbose_name=_('active'),
|
||||||
|
help_text=_("Designates whether this user should be treated as active. Unselect this instead of deleting accounts."))
|
||||||
|
is_superuser = BooleanField(default=False,
|
||||||
|
verbose_name=_('superuser status'),
|
||||||
|
help_text=_("Designates that this user has all permissions without explicitly assigning them."))
|
||||||
|
last_login = DateTimeField(default=datetime.datetime.now,
|
||||||
|
verbose_name=_('last login'))
|
||||||
|
date_joined = DateTimeField(default=datetime.datetime.now,
|
||||||
|
verbose_name=_('date joined'))
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
'indexes': [
|
'indexes': [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user