configure smtp and setup django-registration module. configure this module

to our User model because, it works only with standart user model

create simple templates, for registration, login, password change and so on
remotes/origin/1203
Nazar Kotjuk 12 years ago
parent 77a5bddb6d
commit e72a03c249
  1. 4
      accounts/models.py
  2. 5
      accounts/urls.py
  3. 7
      accounts/views.py
  4. 1
      news/urls.py
  5. 2
      news/views.py
  6. 38
      proj/admin_urls.py
  7. 20
      proj/settings.py
  8. 17
      proj/urls.py
  9. 3
      proj/views.py
  10. 22
      registration/__init__.py
  11. 46
      registration/admin.py
  12. 60
      registration/auth_urls.py
  13. 0
      registration/backends/__init__.py
  14. 0
      registration/backends/default/__init__.py
  15. 50
      registration/backends/default/urls.py
  16. 130
      registration/backends/default/views.py
  17. 0
      registration/backends/simple/__init__.py
  18. 36
      registration/backends/simple/urls.py
  19. 45
      registration/backends/simple/views.py
  20. 131
      registration/forms.py
  21. BIN
      registration/locale/ar/LC_MESSAGES/django.mo
  22. 81
      registration/locale/ar/LC_MESSAGES/django.po
  23. BIN
      registration/locale/bg/LC_MESSAGES/django.mo
  24. 78
      registration/locale/bg/LC_MESSAGES/django.po
  25. BIN
      registration/locale/ca/LC_MESSAGES/django.mo
  26. 97
      registration/locale/ca/LC_MESSAGES/django.po
  27. BIN
      registration/locale/cs/LC_MESSAGES/django.mo
  28. 94
      registration/locale/cs/LC_MESSAGES/django.po
  29. BIN
      registration/locale/da/LC_MESSAGES/django.mo
  30. 92
      registration/locale/da/LC_MESSAGES/django.po
  31. BIN
      registration/locale/de/LC_MESSAGES/django.mo
  32. 93
      registration/locale/de/LC_MESSAGES/django.po
  33. BIN
      registration/locale/el/LC_MESSAGES/django.mo
  34. 84
      registration/locale/el/LC_MESSAGES/django.po
  35. BIN
      registration/locale/en/LC_MESSAGES/django.mo
  36. 89
      registration/locale/en/LC_MESSAGES/django.po
  37. BIN
      registration/locale/es/LC_MESSAGES/django.mo
  38. 85
      registration/locale/es/LC_MESSAGES/django.po
  39. BIN
      registration/locale/es_AR/LC_MESSAGES/django.mo
  40. 83
      registration/locale/es_AR/LC_MESSAGES/django.po
  41. BIN
      registration/locale/fa/LC_MESSAGES/django.mo
  42. 80
      registration/locale/fa/LC_MESSAGES/django.po
  43. BIN
      registration/locale/fr/LC_MESSAGES/django.mo
  44. 91
      registration/locale/fr/LC_MESSAGES/django.po
  45. BIN
      registration/locale/he/LC_MESSAGES/django.mo
  46. 86
      registration/locale/he/LC_MESSAGES/django.po
  47. BIN
      registration/locale/hr/LC_MESSAGES/django.mo
  48. 86
      registration/locale/hr/LC_MESSAGES/django.po
  49. BIN
      registration/locale/is/LC_MESSAGES/django.mo
  50. 74
      registration/locale/is/LC_MESSAGES/django.po
  51. BIN
      registration/locale/it/LC_MESSAGES/django.mo
  52. 89
      registration/locale/it/LC_MESSAGES/django.po
  53. BIN
      registration/locale/ja/LC_MESSAGES/django.mo
  54. 78
      registration/locale/ja/LC_MESSAGES/django.po
  55. BIN
      registration/locale/ko/LC_MESSAGES/django.mo
  56. 89
      registration/locale/ko/LC_MESSAGES/django.po
  57. BIN
      registration/locale/nb/LC_MESSAGES/django.mo
  58. 91
      registration/locale/nb/LC_MESSAGES/django.po
  59. BIN
      registration/locale/nl/LC_MESSAGES/django.mo
  60. 77
      registration/locale/nl/LC_MESSAGES/django.po
  61. BIN
      registration/locale/pl/LC_MESSAGES/django.mo
  62. 84
      registration/locale/pl/LC_MESSAGES/django.po
  63. BIN
      registration/locale/pt/LC_MESSAGES/django.mo
  64. 88
      registration/locale/pt/LC_MESSAGES/django.po
  65. BIN
      registration/locale/pt_BR/LC_MESSAGES/django.mo
  66. 81
      registration/locale/pt_BR/LC_MESSAGES/django.po
  67. BIN
      registration/locale/ru/LC_MESSAGES/django.mo
  68. 92
      registration/locale/ru/LC_MESSAGES/django.po
  69. BIN
      registration/locale/sl/LC_MESSAGES/django.mo
  70. 87
      registration/locale/sl/LC_MESSAGES/django.po
  71. BIN
      registration/locale/sr/LC_MESSAGES/django.mo
  72. 80
      registration/locale/sr/LC_MESSAGES/django.po
  73. BIN
      registration/locale/sv/LC_MESSAGES/django.mo
  74. 81
      registration/locale/sv/LC_MESSAGES/django.po
  75. BIN
      registration/locale/tr_TR/LC_MESSAGES/django.mo
  76. 92
      registration/locale/tr_TR/LC_MESSAGES/django.po
  77. BIN
      registration/locale/zh_CN/LC_MESSAGES/django.mo
  78. 77
      registration/locale/zh_CN/LC_MESSAGES/django.po
  79. BIN
      registration/locale/zh_TW/LC_MESSAGES/django.mo
  80. 77
      registration/locale/zh_TW/LC_MESSAGES/django.po
  81. 0
      registration/management/__init__.py
  82. 0
      registration/management/commands/__init__.py
  83. 19
      registration/management/commands/cleanupregistration.py
  84. 270
      registration/models.py
  85. 8
      registration/signals.py
  86. 4
      registration/tests/__init__.py
  87. 198
      registration/tests/default_backend.py
  88. 119
      registration/tests/forms.py
  89. 225
      registration/tests/models.py
  90. 89
      registration/tests/simple_backend.py
  91. 82
      registration/tests/urls.py
  92. 15
      registration/urls.py
  93. 142
      registration/views.py
  94. 1
      templates/base.html
  95. 16
      templates/registration/activate.html
  96. 8
      templates/registration/activation_complete.html
  97. 6
      templates/registration/activation_email.txt
  98. 1
      templates/registration/activation_email_subject.txt
  99. 23
      templates/registration/base.html
  100. 27
      templates/registration/login.html
  101. Some files were not shown because too many files have changed in this diff Show More

@ -28,7 +28,7 @@ class UserManager(BaseUserManager):
user= self.model(
email = UserManager.normalize_email(email),first_name = first_name,last_name = last_name,
is_staff=False, is_active=True, is_superuser=False,
is_staff=False, is_active=False, is_superuser=False,
last_login=now, date_joined=now, **extra_fields
)
@ -80,7 +80,7 @@ class User(AbstractBaseUser, PermissionsMixin):
url = models.SlugField(blank=True)
#
is_active = models.BooleanField(default=1) # СДЕЛАТЬ проверку на емейле
is_active = models.BooleanField(default=0) # СДЕЛАТЬ проверку на емейле
is_staff = models.BooleanField(default=0)
is_admin = models.BooleanField(default=0)

@ -3,8 +3,8 @@ from django.conf.urls import patterns, include, url
from django.contrib.auth.views import login, logout
urlpatterns = patterns('',
url(r'^login/', login, {'template_name': 'admin/login.html' }),
url(r'^logout', logout, {'next_page': '/accounts/login/'}),
url(r'^login_admin/', login, {'template_name': 'admin/login.html' }),
url(r'^logout_admin', logout, {'next_page': '/accounts/login_admin/'}),
url(r'^registration/$', 'accounts.views.registration'),
url(r'^create_admin/$', 'accounts.views.create_admin'),
url(r'^create_md5user/$', 'accounts.views.create_md5'),
@ -12,5 +12,4 @@ urlpatterns = patterns('',
# url(r'^change/(?P<user_id>\d+).*/$', 'accounts.views.user_change'),
url(r'^all/$', 'accounts.views.user_all'),
url(r'^reset_password_email/$', 'accounts.views.reset_password_email'),
)

@ -87,11 +87,16 @@ def create_md5(request):
return render_to_response('create_admin.html', args)
from django.core.mail import EmailMessage
def registration(request):
if request.POST:
form = UserCreationForm(request.POST)
if form.is_valid():
form.save()
user = form.save()
email = EmailMessage('Subject', 'Body', to=['%s'%user.email])
email.send()
return HttpResponseRedirect('/accounts/registration')
else:
form = UserCreationForm()

@ -5,6 +5,7 @@ urlpatterns = patterns('news.views',
url(r'^add.*/$', 'news_add'),
url(r'^change/(.*)/$', 'news_change'),
url(r'^all/$', 'news_all'),
#ajax
url(r'^event/$', 'get_event_id'),
)

@ -151,7 +151,7 @@ def news_change(request, url):
def get_event_id(request):
"""
get events(expostions or conferences)
"""
if request.GET['model'] != 'None':

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
url(r'^$', 'proj.views.home', name='home'),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^accounts/', include('accounts.urls')),
url(r'^article/', include('article.urls')),
url(r'^city/', include('city.urls')),
url(r'^company/', include('company.urls')),
url(r'^conference/', include('conference.urls')),
url(r'^country/', include('country.urls')),
url(r'^exposition/', include('exposition.urls')),
url(r'^file/', include('file.urls')),
url(r'^news/', include('news.urls')),
url(r'^organiser/', include('organiser.urls')),
url(r'^place_conference/', include('place_conference.urls')),
url(r'^place_exposition/', include('place_exposition.urls')),
url(r'^seminar/', include('seminar.urls')),
url(r'^service/', include('service.urls')),
url(r'^theme/', include('theme.urls')),
url(r'^translator/', include('translator.urls')),
url(r'^webinar/', include('webinar.urls')),
url(r'^settings/$', 'proj.views.settings'),
url(r'^language/add/', 'directories.views.language_add'),
url(r'^currency/add/', 'directories.views.currency_add'),
#
url(r'^test/', 'proj.views.test'),
#ajax requests
url(r'^ajax_post_file/(?P<obj_id>\d+)/$', 'proj.views.ajax_post_file'),#must be before /ajax_post_file/
url(r'^ajax_post_file/', 'proj.views.ajax_post_file'),
url(r'^ajax_delete_file/', 'proj.views.ajax_delete_file'),
url(r'^ajax_city/', 'proj.views.ajax_city'),
url(r'^ajax_tag/', 'proj.views.ajax_tag'),
#
url(r'^ckeditor/', include('ckeditor.urls')),
)

@ -22,11 +22,6 @@ DATABASES = {
}
}
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'kotzillla@gmail.com'
EMAIL_HOST_PASSWORD = 'fitter2006'
EMAIL_PORT = 587
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
@ -170,7 +165,17 @@ TEMPLATE_DIRS = (
AUTH_USER_MODEL = 'accounts.User'
#AUTH_PROFILE_MODULE = 'accounts.UserProfile'
LOGIN_REDIRECT_URL = '/country/all'
LOGIN_REDIRECT_URL = ''
#registration info
ACCOUNT_ACTIVATION_DAYS=2
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = 'kotzillla@gmail.com'
EMAIL_HOST_PASSWORD = 'fitter2006'
EMAIL_PORT = 587
DEFAULT_FROM_EMAIL = 'kotzillla@gmail.com'
#AUTHENTICATION_BACKENDS = (
# 'django.contrib.auth.backends.ModelBackend',
@ -190,6 +195,8 @@ INSTALLED_APPS = (
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
@ -209,6 +216,7 @@ INSTALLED_APPS = (
'place_conference',
'place_exposition',
'proj',
'registration',
'review',
'seminar',
'service',

@ -1,17 +1,23 @@
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.contrib.auth.views import login, logout
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
#from country.views import city_change
urlpatterns = patterns('',
url(r'^$', 'proj.views.home', name='home'),
url(r'^admin/', include('proj.admin_urls')),
url(r'^accounts/', include('registration.backends.default.urls')),
#uncomment to enable django admin
#url(r'^admin/', include(admin.site.urls)),
)
'''
urlpatterns = patterns('',
# Examples:
#url(r'^accounts/login/', login, {'template_name': 'admin/login.html' }),
# url(r'^logout', logout, {'next_page':'/accounts/login/'}),
url(r'^$', 'proj.views.home', name='home'),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^accounts/', include('accounts.urls')),
url(r'^article/', include('article.urls')),
url(r'^city/', include('city.urls')),
@ -45,3 +51,4 @@ urlpatterns = patterns('',
#--------------------------
url(r'^admin/', include(admin.site.urls)),
)
'''

@ -18,6 +18,9 @@ from django.shortcuts import get_object_or_404
from django.db.models.loading import get_model
def home(request):
return render_to_response('base.html')
@login_required
def settings(request):
"""

@ -0,0 +1,22 @@
VERSION = (1, 0, 0, 'final', 0)
def get_version():
"Returns a PEP 386-compliant version number from VERSION."
assert len(VERSION) == 5
assert VERSION[3] in ('alpha', 'beta', 'rc', 'final')
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases
# | {a|b|c}N - for alpha, beta and rc releases
parts = 2 if VERSION[2] == 0 else 3
main = '.'.join(str(x) for x in VERSION[:parts])
sub = ''
if VERSION[3] != 'final':
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
sub = mapping[VERSION[3]] + str(VERSION[4])
return str(main + sub)

@ -0,0 +1,46 @@
from django.contrib import admin
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from registration.models import RegistrationProfile
class RegistrationAdmin(admin.ModelAdmin):
actions = ['activate_users', 'resend_activation_email']
list_display = ('user', 'activation_key_expired')
raw_id_fields = ['user']
search_fields = ('user__username', 'user__first_name', 'user__last_name')
def activate_users(self, request, queryset):
"""
Activates the selected users, if they are not alrady
activated.
"""
for profile in queryset:
RegistrationProfile.objects.activate_user(profile.activation_key)
activate_users.short_description = _("Activate users")
def resend_activation_email(self, request, queryset):
"""
Re-sends activation emails for the selected users.
Note that this will *only* send activation emails for users
who are eligible to activate; emails will not be sent to users
whose activation keys have expired or who have already
activated.
"""
if Site._meta.installed:
site = Site.objects.get_current()
else:
site = RequestSite(request)
for profile in queryset:
if not profile.activation_key_expired():
profile.send_activation_email(site)
resend_activation_email.short_description = _("Re-send activation emails")
admin.site.register(RegistrationProfile, RegistrationAdmin)

@ -0,0 +1,60 @@
"""
URL patterns for the views included in ``django.contrib.auth``.
Including these URLs (via the ``include()`` directive) will set up the
following patterns based at whatever URL prefix they are included
under:
* User login at ``login/``.
* User logout at ``logout/``.
* The two-step password change at ``password/change/`` and
``password/change/done/``.
* The four-step password reset at ``password/reset/``,
``password/reset/confirm/``, ``password/reset/complete/`` and
``password/reset/done/``.
The default registration backend already has an ``include()`` for
these URLs, so under the default setup it is not necessary to manually
include these views. Other backends may or may not include them;
consult a specific backend's documentation for details.
"""
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.contrib.auth import views as auth_views
urlpatterns = patterns('',
url(r'^login/$',
auth_views.login,
{'template_name': 'registration/login.html'},
name='auth_login'),
url(r'^logout/$',
auth_views.logout,
{'template_name': 'registration/logout.html'},
name='auth_logout'),
url(r'^password/change/$',
auth_views.password_change,
name='auth_password_change'),
url(r'^password/change/done/$',
auth_views.password_change_done,
name='auth_password_change_done'),
url(r'^password/reset/$',
auth_views.password_reset,
name='auth_password_reset'),
url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
auth_views.password_reset_confirm,
name='auth_password_reset_confirm'),
url(r'^password/reset/complete/$',
auth_views.password_reset_complete,
name='auth_password_reset_complete'),
url(r'^password/reset/done/$',
auth_views.password_reset_done,
name='auth_password_reset_done'),
)

@ -0,0 +1,50 @@
"""
URLconf for registration and activation, using django-registration's
default backend.
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/', include('registration.backends.default.urls')),
This will also automatically set up the views in
``django.contrib.auth`` at sensible default locations.
If you'd like to customize registration behavior, feel free to set up
your own URL patterns for these views instead.
"""
from django.conf.urls import patterns
from django.conf.urls import include
from django.conf.urls import url
from django.views.generic.base import TemplateView
from registration.backends.default.views import ActivationView
from registration.backends.default.views import RegistrationView
urlpatterns = patterns('',
url(r'^activate/complete/$',
TemplateView.as_view(template_name='registration/activation_complete.html'),
name='registration_activation_complete'),
# Activation keys get matched by \w+ instead of the more specific
# [a-fA-F0-9]{40} because a bad activation key should still get to the view;
# that way it can return a sensible "invalid key" message instead of a
# confusing 404.
url(r'^activate/(?P<activation_key>\w+)/$',
ActivationView.as_view(),
name='registration_activate'),
url(r'^register/$',
RegistrationView.as_view(),
name='registration_register'),
url(r'^register/complete/$',
TemplateView.as_view(template_name='registration/registration_complete.html'),
name='registration_complete'),
url(r'^register/closed/$',
TemplateView.as_view(template_name='registration/registration_closed.html'),
name='registration_disallowed'),
(r'', include('registration.auth_urls')),
)

@ -0,0 +1,130 @@
from django.conf import settings
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from registration import signals
from registration.models import RegistrationProfile
from registration.views import ActivationView as BaseActivationView
from registration.views import RegistrationView as BaseRegistrationView
class RegistrationView(BaseRegistrationView):
"""
A registration backend which follows a simple workflow:
1. User signs up, inactive account is created.
2. Email is sent to user with activation link.
3. User clicks activation link, account is now active.
Using this backend requires that
* ``registration`` be listed in the ``INSTALLED_APPS`` setting
(since this backend makes use of models defined in this
application).
* The setting ``ACCOUNT_ACTIVATION_DAYS`` be supplied, specifying
(as an integer) the number of days from registration during
which a user may activate their account (after that period
expires, activation will be disallowed).
* The creation of the templates
``registration/activation_email_subject.txt`` and
``registration/activation_email.txt``, which will be used for
the activation email. See the notes for this backends
``register`` method for details regarding these templates.
Additionally, registration can be temporarily closed by adding the
setting ``REGISTRATION_OPEN`` and setting it to
``False``. Omitting this setting, or setting it to ``True``, will
be interpreted as meaning that registration is currently open and
permitted.
Internally, this is accomplished via storing an activation key in
an instance of ``registration.models.RegistrationProfile``. See
that model and its custom manager for full documentation of its
fields and supported operations.
"""
def register(self, request, **cleaned_data):
"""
Given a username, email address and password, register a new
user account, which will initially be inactive.
Along with the new ``User`` object, a new
``registration.models.RegistrationProfile`` will be created,
tied to that ``User``, containing the activation key which
will be used for this account.
An email will be sent to the supplied email address; this
email should contain an activation link. The email will be
rendered using two templates. See the documentation for
``RegistrationProfile.send_activation_email()`` for
information about these templates and the contexts provided to
them.
After the ``User`` and ``RegistrationProfile`` are created and
the activation email is sent, the signal
``registration.signals.user_registered`` will be sent, with
the new ``User`` as the keyword argument ``user`` and the
class of this backend as the sender.
"""
first_name, last_name, email, password = cleaned_data['first_name'],cleaned_data['last_name'], cleaned_data['email'], cleaned_data['password1']
if Site._meta.installed:
site = Site.objects.get_current()
else:
site = RequestSite(request)
new_user = RegistrationProfile.objects.create_inactive_user(first_name, last_name, email,
password, site)
signals.user_registered.send(sender=self.__class__,
user=new_user,
request=request)
return new_user
def registration_allowed(self, request):
"""
Indicate whether account registration is currently permitted,
based on the value of the setting ``REGISTRATION_OPEN``. This
is determined as follows:
* If ``REGISTRATION_OPEN`` is not specified in settings, or is
set to ``True``, registration is permitted.
* If ``REGISTRATION_OPEN`` is both specified and set to
``False``, registration is not permitted.
"""
return getattr(settings, 'REGISTRATION_OPEN', True)
def get_success_url(self, request, user):
"""
Return the name of the URL to redirect to after successful
user registration.
"""
return ('registration_complete', (), {})
class ActivationView(BaseActivationView):
def activate(self, request, activation_key):
"""
Given an an activation key, look up and activate the user
account corresponding to that key (if possible).
After successful activation, the signal
``registration.signals.user_activated`` will be sent, with the
newly activated ``User`` as the keyword argument ``user`` and
the class of this backend as the sender.
"""
activated_user = RegistrationProfile.objects.activate_user(activation_key)
if activated_user:
signals.user_activated.send(sender=self.__class__,
user=activated_user,
request=request)
return activated_user
def get_success_url(self, request, user):
return ('registration_activation_complete', (), {})

@ -0,0 +1,36 @@
"""
URLconf for registration and activation, using django-registration's
one-step backend.
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/', include('registration.backends.simple.urls')),
This will also automatically set up the views in
``django.contrib.auth`` at sensible default locations.
If you'd like to customize registration behavior, feel free to set up
your own URL patterns for these views instead.
"""
from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.views.generic.base import TemplateView
from registration.backends.simple.views import RegistrationView
urlpatterns = patterns('',
url(r'^register/$',
RegistrationView.as_view(),
name='registration_register'),
url(r'^register/closed/$',
TemplateView.as_view(template_name='registration/registration_closed.html'),
name='registration_disallowed'),
(r'', include('registration.auth_urls')),
)

@ -0,0 +1,45 @@
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth import login
from django.contrib.auth.models import User
from registration import signals
from registration.views import RegistrationView as BaseRegistrationView
class RegistrationView(BaseRegistrationView):
"""
A registration backend which implements the simplest possible
workflow: a user supplies a username, email address and password
(the bare minimum for a useful account), and is immediately signed
up and logged in).
"""
def register(self, request, **cleaned_data):
username, email, password = cleaned_data['username'], cleaned_data['email'], cleaned_data['password1']
User.objects.create_user(username, email, password)
new_user = authenticate(username=username, password=password)
login(request, new_user)
signals.user_registered.send(sender=self.__class__,
user=new_user,
request=request)
return new_user
def registration_allowed(self, request):
"""
Indicate whether account registration is currently permitted,
based on the value of the setting ``REGISTRATION_OPEN``. This
is determined as follows:
* If ``REGISTRATION_OPEN`` is not specified in settings, or is
set to ``True``, registration is permitted.
* If ``REGISTRATION_OPEN`` is both specified and set to
``False``, registration is not permitted.
"""
return getattr(settings, 'REGISTRATION_OPEN', True)
def get_success_url(self, request, user):
return (user.get_absolute_url(), (), {})

@ -0,0 +1,131 @@
"""
Forms and validation code for user registration.
Note that all of these forms assume Django's bundle default ``User``
model; since it's not possible for a form to anticipate in advance the
needs of custom user models, you will need to write your own forms if
you're using a custom model.
"""
try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
from django.contrib.auth.models import User
#from django.contrib.auth.models import User
from django import forms
from django.utils.translation import ugettext_lazy as _
class RegistrationForm(forms.Form):
"""
Form for registering a new user account.
Validates that the requested username is not already in use, and
requires the password to be entered twice to catch typos.
Subclasses should feel free to add any additional validation they
need, but should avoid defining a ``save()`` method -- the actual
saving of collected user data is delegated to the active
registration backend.
"""
required_css_class = 'required'
first_name = forms.RegexField(regex=r'^[\w.@+-]+$',
max_length=30,
label=_("First name"),
error_messages={'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")})
last_name = forms.RegexField(regex=r'^[\w.@+-]+$',
max_length=30,
label=_("Last name"),
error_messages={'invalid': _("This value may contain only letters, numbers and @/./+/-/_ characters.")})
email = forms.EmailField(label=_("E-mail"))
password1 = forms.CharField(widget=forms.PasswordInput,
label=_("Password"))
password2 = forms.CharField(widget=forms.PasswordInput,
label=_("Password (again)"))
'''
def clean_username(self):
"""
Validate that the username is alphanumeric and is not already
in use.
"""
existing = User.objects.filter(username__iexact=self.cleaned_data['username'])
if existing.exists():
raise forms.ValidationError(_("A user with that username already exists."))
else:
return self.cleaned_data['username']
'''
def clean(self):
"""
Verifiy that the values entered into the two password fields
match. Note that an error here will end up in
``non_field_errors()`` because it doesn't apply to a single
field.
"""
if 'password1' in self.cleaned_data and 'password2' in self.cleaned_data:
if self.cleaned_data['password1'] != self.cleaned_data['password2']:
raise forms.ValidationError(_("The two password fields didn't match."))
return self.cleaned_data
class RegistrationFormTermsOfService(RegistrationForm):
"""
Subclass of ``RegistrationForm`` which adds a required checkbox
for agreeing to a site's Terms of Service.
"""
tos = forms.BooleanField(widget=forms.CheckboxInput,
label=_(u'I have read and agree to the Terms of Service'),
error_messages={'required': _("You must agree to the terms to register")})
class RegistrationFormUniqueEmail(RegistrationForm):
"""
Subclass of ``RegistrationForm`` which enforces uniqueness of
email addresses.
"""
def clean_email(self):
"""
Validate that the supplied email address is unique for the
site.
"""
if User.objects.filter(email__iexact=self.cleaned_data['email']):
raise forms.ValidationError(_("This email address is already in use. Please supply a different email address."))
return self.cleaned_data['email']
class RegistrationFormNoFreeEmail(RegistrationForm):
"""
Subclass of ``RegistrationForm`` which disallows registration with
email addresses from popular free webmail services; moderately
useful for preventing automated spam registrations.
To change the list of banned domains, subclass this form and
override the attribute ``bad_domains``.
"""
bad_domains = ['aim.com', 'aol.com', 'email.com', 'gmail.com',
'googlemail.com', 'hotmail.com', 'hushmail.com',
'msn.com', 'mail.ru', 'mailinator.com', 'live.com',
'yahoo.com']
def clean_email(self):
"""
Check the supplied email address against a list of known free
webmail domains.
"""
email_domain = self.cleaned_data['email'].split('@')[1]
if email_domain in self.bad_domains:
raise forms.ValidationError(_("Registration using free email addresses is prohibited. Please supply a different email address."))
return self.cleaned_data['email']

@ -0,0 +1,81 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "اسم المستخدم"
#: forms.py:41
msgid "email address"
msgstr "عنوان البريد الالكتروني"
#: forms.py:43
msgid "password"
msgstr "كلمة المرور"
#: forms.py:45
msgid "password (again)"
msgstr "تأكيد كلمة المرور"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "يمكن أن يحتوي اسم المستخدم على احرف، ارقام وشرطات سطرية فقط"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "اسم المستخدم مسجل مسبقا. يرجى اختيار اسم اخر."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "يجب ادخال كلمة المرور مطابقة كل مرة"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "أقر بقراءة والموافقة على شروط الخدمة"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "يجب الموافقة على الشروط للتسجيل"
#: forms.py:124
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "عنوان البريد الالكتروني مسجل مسبقا. يرجى تزويد عنوان بريد الكتروني مختلف."
#: forms.py:149
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "يمنع التسجيل باستخدام عناوين بريد الكترونية مجانية. يرجى تزويد عنوان بريد الكتروني مختلف."
#: models.py:188
msgid "user"
msgstr "مستخدم"
#: models.py:189
msgid "activation key"
msgstr "رمز التفعيل"
#: models.py:194
msgid "registration profile"
msgstr "ملف التسجيل الشخصي"
#: models.py:195
msgid "registration profiles"
msgstr "ملفات التسجيل الشخصية"

@ -0,0 +1,78 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2008-03-05 12:37+0200\n"
"Last-Translator: Vladislav <vladislav.mitov@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Bookmarks: -1,-1,-1,-1,10,-1,-1,-1,-1,-1\n"
#: forms.py:38
msgid "username"
msgstr "Потребителско име "
#: forms.py:41
msgid "email address"
msgstr "Електронна поща"
#: forms.py:43
msgid "password"
msgstr "Парола"
#: forms.py:45
msgid "password (again)"
msgstr "Парола (проверка)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Потребителските имена могат да съдържат букви, цифри и подчертавки"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Потребителското име е заето. Моля изберето друго."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "Грешка при проверка на паролата."
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "Прочел съм и съм съгласен с условията за експлоатация"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "Трябва да сте съгласни с условията за да се регистрирате."
#: forms.py:124
msgid "This email address is already in use. Please supply a different email address."
msgstr "Адреса на електронната поща е използван. Моля въведете друг адрес."
#: forms.py:149
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "Регистрациите с безплатни адреси е забранен. Моля въведете различен адрес за електронна поща"
#: models.py:188
msgid "user"
msgstr "Потребител"
#: models.py:189
msgid "activation key"
msgstr "Ключ за активация"
#: models.py:194
msgid "registration profile"
msgstr "регистрационен профил"
#: models.py:195
msgid "registration profiles"
msgstr "регистрационни профили"

@ -0,0 +1,97 @@
# Catalan translation for django-registration.
# Copyright (C) 2007-2010, James Bennet
# This file is distributed under the same license as the django-registration package.
# Carles Barrobés <carles@barrobes.com>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-17 11:04+0200\n"
"PO-Revision-Date: 2010-09-24 23:21+0100\n"
"Last-Translator: Carles Barrobés i Meix <carles@barrobes.com>\n"
"Language-Team: Català\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Catalan\n"
#: admin.py:23
msgid "Activate users"
msgstr "Activar usuaris"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Re-enviar e-mails d'activació"
#: forms.py:35
msgid "Username"
msgstr "Nom d'usuari"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Aquest valor ha de contenir només lletres, números i guions baixos"
#: forms.py:39
msgid "E-mail"
msgstr "E-mail"
#: forms.py:41
msgid "Password"
msgstr "Contrasenya"
#: forms.py:43
msgid "Password (again)"
msgstr "Contrasenya (de nou)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Ja existeix un usuari amb aquest nom"
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "Els dos camps de contrasenya no coincideixen"
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "He llegit i estic d'acord amb les condicions d'ús"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Heu d'estar d'acord amb les condicions d'ús per registrar-vos"
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Aquesta adreça d'e-mail ja està sent utilitzada. Sisplau, entreu-ne una "
"altra."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Està prohibit registrar-se utilitzant adreces d'e-mail gratuïtes. Sisplau "
"entreu-ne una altra."
#: models.py:168
msgid "user"
msgstr "usuari"
#: models.py:169
msgid "activation key"
msgstr "clau d'activació"
#: models.py:174
msgid "registration profile"
msgstr "perfil de registre"
#: models.py:175
msgid "registration profiles"
msgstr "perfils de registre"
#~ msgid "Email address"
#~ msgstr "Adreça d'e-mail"

@ -0,0 +1,94 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <michal.pilar@implayo.cz>, 2011.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-12 14:09-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Implayo s.r.o. <michal.pilar@implayo.cz>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Aktivovat uživatele"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Znovu odeslat aktivační e-maily"
#: forms.py:35
msgid "username"
msgstr "uživatelské jméno"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Tato hodnota může obsahovat pouze písmena, čísla a podtržítka."
#: forms.py:39
msgid "Email address"
msgstr "E-mailová adresa"
#: forms.py:41
msgid "Password"
msgstr "Heslo"
#: forms.py:43
msgid "Password (again)"
msgstr "Heslo (znovu)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Uživatel s tímto jménem již existuje."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "Zadaná 2 hesla se neshodují."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Přečetl jsem si a souhlasím s podmínkami služby"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Musíte odsouhlasit podmínky služby pro pokračování v registraci."
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Tato e-mailová adresa se již používá. Prosím zadejte jinou e-mailovou "
"adresu."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Používání volných e-mailových adres je zakázáno. Prosím zadejte "
"jinou e-mailovou adresu."
#: models.py:165
msgid "user"
msgstr "uživatel"
#: models.py:166
msgid "activation key"
msgstr "aktivační klíč"
#: models.py:171
msgid "registration profile"
msgstr "registrační profil"
#: models.py:172
msgid "registration profiles"
msgstr "registrační profily"

@ -0,0 +1,92 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Rune Bromer <rb@konstellation.dk>, 2007-2009.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8 \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Rune Bromer <rb@konstellation.dk>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Aktiver brugere"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Gensend aktiveringsemails"
#: forms.py:35
msgid "Username"
msgstr "Brugernavn"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "V¾rdien mŒ kun indeholde bogstaver, tal og underscore."
#: forms.py:39
msgid "Email address"
msgstr "E-mailadresse"
#: forms.py:41
msgid "Password"
msgstr "Password"
#: forms.py:43
msgid "Password (again)"
msgstr "Password (gentag)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Der findes allerede en bruger med dette brugernavn."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "De 2 passwordfelter er ikke ens."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "I har l¾st og accepterer betingelserne."
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Du skal acceptere betingelserne for at registere"
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Denne emailadresse er allerede i brug. Benyt venligst en anden. "
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Registrering med gratis emailadresser er ikke muligt. V¾lg venligst en "
"anden emailadresse"
#: models.py:165
msgid "user"
msgstr "bruger"
#: models.py:166
msgid "activation key"
msgstr "Aktiveringsn¿gle"
#: models.py:171
msgid "registration profile"
msgstr "Registreringsprofil"
#: models.py:172
msgid "registration profiles"
msgstr "Registreringprofiler"

@ -0,0 +1,93 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Jannis Leidel <jannis@leidel.info>, 2007-2009.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8 \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-18 21:32+0200\n"
"PO-Revision-Date: 2007-09-29 16:50+0200\n"
"Last-Translator: Jannis Leidel <jannis@leidel.info>\n"
"Language-Team: Deutsch <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Benutzer aktivieren"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Aktivierungs-E-Mail erneut senden"
#: forms.py:35
msgid "Username"
msgstr "Benutzername"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Dieser Wert darf nur Buchstaben, Ziffern und Unterstriche enthalten."
#: forms.py:39
msgid "Email address"
msgstr "E-Mail-Adresse"
#: forms.py:41
msgid "Password"
msgstr "Passwort"
#: forms.py:43
msgid "Password (again)"
msgstr "Passwort (wiederholen)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Dieser Benutzername ist bereits vergeben."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "Die beiden Passwörter sind nicht identisch."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Ich habe die Nutzungsvereinbarung gelesen und stimme ihr zu"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Sie müssen der Nutzungsvereinbarung zustimmen, um sich zu registrieren"
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Diese E-Mail-Adresse wird schon genutzt. Bitte geben Sie eine andere E-Mail-"
"Adresse an."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Die Registrierung mit einer kostenlosen E-Mail-Adresse ist untersagt. Bitte "
"geben Sie eine andere E-Mail-Adresse an."
#: models.py:165
msgid "user"
msgstr "Benutzer"
#: models.py:166
msgid "activation key"
msgstr "Aktivierungsschlüssel"
#: models.py:171
msgid "registration profile"
msgstr "Registrierungsprofil"
#: models.py:172
msgid "registration profiles"
msgstr "Registrierungsprofile"

@ -0,0 +1,84 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Panos Laganakos <panos.laganakos@gmail.com>, 2007.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2007-11-14 21:50+0200\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "όνομα χρήστη"
#: forms.py:41
msgid "email address"
msgstr "διεύθυνση ηλεκτρονικού ταχυδρομείου"
#: forms.py:43
msgid "password"
msgstr "συνθηματικό"
#: forms.py:45
msgid "password (again)"
msgstr "συνθηματικό (ξανά)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Τα ονόματα χρηστών μπορούν να περιλαμβάνουν μόνο γράμματα, αριθμούς και υπογραμμίσεις"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Αυτό το όνομα χρήστη χρησιμοποίειται ήδη. Παρακαλώ διαλέξτε ένα άλλο."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "Πρέπει να εισάγετε το ίδιο συνθηματικό κάθε φορά"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "Διάβασα και συμφωνώ με τους Όρους της Υπηρεσίας"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "Πρέπει να συμφωνείται με τους όρους για να εγγραφείτε"
#: forms.py:124
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Η συγκεκριμένη διεύθυνση ηλεκτρονικού ταχυδρομείου χρησιμοποιείται ήδη. "
"Παρακαλώ δώστε κάποια άλλη."
#: forms.py:149
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Η εγγραφή μέσω δωρεάν διευθύνσεων ηλεκτρονικού ταχυδρομείου απαγορεύεται. ""Παρακαλώ δώστε κάποια άλλη."
#: models.py:188
msgid "user"
msgstr "χρήστης"
#: models.py:189
msgid "activation key"
msgstr "κλειδί ενεργοποίησης"
#: models.py:194
msgid "registration profile"
msgstr "προφίλ εγγραφής"
#: models.py:195
msgid "registration profiles"
msgstr "προφίλ εγγραφών"

@ -0,0 +1,89 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-12 14:09-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr ""
#: admin.py:43
msgid "Re-send activation emails"
msgstr ""
#: forms.py:35
msgid "username"
msgstr ""
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr ""
#: forms.py:39
msgid "Email address"
msgstr ""
#: forms.py:41
msgid "Password"
msgstr ""
#: forms.py:43
msgid "Password (again)"
msgstr ""
#: forms.py:55
msgid "A user with that username already exists."
msgstr ""
#: forms.py:67
msgid "The two password fields didn't match."
msgstr ""
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr ""
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr ""
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
#: models.py:165
msgid "user"
msgstr ""
#: models.py:166
msgid "activation key"
msgstr ""
#: models.py:171
msgid "registration profile"
msgstr ""
#: models.py:172
msgid "registration profiles"
msgstr ""

@ -0,0 +1,85 @@
# Spanish translation for django-registration.
# Copyright (C) 2007, James Bennet
# This file is distributed under the same license as the registration package.
# Ernesto Rico Schmidt <e.rico.schmidt@gmail.com>, 2008.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.3 \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-03-11 00:19-0400\n"
"PO-Revision-Date: 2008-03-11 00:19-0400\n"
"Last-Translator: Ernesto Rico Schmidt <e.rico.schmidt@gmail.com>\n"
"Language-Team: Español <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "nombre de usuario"
#: forms.py:41
msgid "email address"
msgstr "dirección de coreo electrónico"
#: forms.py:43
msgid "password"
msgstr "contraseña"
#: forms.py:45
msgid "password (again)"
msgstr "contraseña (otra vez)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Los nombres de usuarios sólo pueden contener letras, números y guiones bajos"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Este nombre de usuario ya está ocupado. Por favor escoge otro"
#: forms.py:71
msgid "You must type the same password each time"
msgstr "Tienes que introducir la misma contraseña cada vez"
#: forms.py:100
msgid "I have read and agree to the Terms of Service"
msgstr "He leído y acepto los términos de servicio"
#: forms.py:109
msgid "You must agree to the terms to register"
msgstr "Tienes que aceptar los términos para registrarte"
#: forms.py:128
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"La dirección de correo electrónico ya está siendo usada. Por favor"
"proporciona otra dirección."
#: forms.py:153
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"El registro usando una dirección de correo electrónico gratis está prohibido."
"Por favor proporciona otra dirección."
#: models.py:188
msgid "user"
msgstr "usuario"
#: models.py:189
msgid "activation key"
msgstr "clave de activación"
#: models.py:194
msgid "registration profile"
msgstr "perfil de registro"
#: models.py:195
msgid "registration profiles"
msgstr "perfiles de registro"

@ -0,0 +1,83 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2008 Leonardo Manuel Rocha
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <l e o m a r o at g m a i l dot c o m>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "nombre de usuario"
#: forms.py:41
msgid "email address"
msgstr "dirección de e-mail"
#: forms.py:43
msgid "password"
msgstr "contraseña"
#: forms.py:45
msgid "password (again)"
msgstr "contraseña (nuevamente)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "El nombre de usuario solo puede contener letras, números y guiones bajos"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Ese nombre de usuario ya está asignado. Por favor elija otro."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "Debe tipear la misma contraseña cada vez"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "He leído y estoy de acuerdo con las Condiciones de Servicio"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "Debe estar de acuerdo con las Condiciones para poder registrarse"
#: forms.py:124
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Esa dirección de e-mail ya está en uso. Por favor provea otra "
"dirección."
#: forms.py:149
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "La registración con un e-mail gratuito está prohibida. Por favor "
"de una dirección de e-mail diferente."
#: models.py:188
msgid "user"
msgstr "usuario"
#: models.py:189
msgid "activation key"
msgstr "clave de activación"
#: models.py:194
msgid "registration profile"
msgstr "perfil de registro"
#: models.py:195
msgid "registration profiles"
msgstr "perfiles de registro"

@ -0,0 +1,80 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Mohsen Mansouryar <mohsen.brian@gmail.com>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2011-11-18 01:11+0330\n"
"Last-Translator: Mohsen Mansouryar <mohsen.brian@gmail.com>\n"
"Language-Team: erixe <mohsen.brian@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Persian\n"
"X-Poedit-Country: IRAN, ISLAMIC REPUBLIC OF\n"
"X-Poedit-SourceCharset: utf-8\n"
#: forms.py:38
msgid "username"
msgstr "نام کاربری"
#: forms.py:41
msgid "email address"
msgstr "پست الکترونیکی"
#: forms.py:43
msgid "password"
msgstr "گذرواژه"
#: forms.py:45
msgid "password (again)"
msgstr "گذرواژه(تکرار)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "نام های کاربری تنها می توانند شامل حرف، رقم و یا _ باشند."
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "این نام کاربری گرفته شده است. لطفا نام دیگری انتخاب کنید."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "دو گذرواژه باید مطابق باشند!"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "من شرایط استفاده از این سرویس را مطالعه کرده و می پذیرم."
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "شما باید شرایط عضویت را بپذیرید!"
#: forms.py:124
msgid "This email address is already in use. Please supply a different email address."
msgstr "این آدرس استفاده شده است. لطفا آدرس دیگری ارائه دهید."
#: forms.py:149
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "ثبت نام با استفاده از پست های الکترونیکی رایگان امکان پذیر نمی باشد."
#: models.py:188
msgid "user"
msgstr "کاربر"
#: models.py:189
msgid "activation key"
msgstr "کد فعالسازی"
#: models.py:194
msgid "registration profile"
msgstr "مشخصات ثبت نام"
#: models.py:195
msgid "registration profiles"
msgstr "پروفایل های ثبت نام"

@ -0,0 +1,91 @@
# django-registration French translation.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the django-registration package.
# Samuel Adam <samuel.adam@gmail.com>, 2007.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8 alpha-1 \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-01 14:33+0200\n"
"PO-Revision-Date: 2010-07-01 14:30+0200\n"
"Last-Translator: Patrick Samson <maxcom@laposte.net>\n"
"Language-Team: Français <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: .\admin.py:23
msgid "Activate users"
msgstr "Active les utilisateurs"
#: .\admin.py:43
msgid "Re-send activation emails"
msgstr "Envoie à nouveau les courriels d'activation"
#: .\forms.py:35
msgid "Username"
msgstr "Nom d'utilisateur"
#: .\forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Cette valeur ne doit contenir que des lettres, chiffres et tirets bas."
#: .\forms.py:39
msgid "Email address"
msgstr "Adresse courriel"
#: .\forms.py:41
msgid "Password"
msgstr "Mot de passe"
#: .\forms.py:43
msgid "Password (again)"
msgstr "Mot de passe (vérification)"
#: .\forms.py:55
msgid "A user with that username already exists."
msgstr "Un utilisateur avec ce nom existe déjà."
#: .\forms.py:67
msgid "The two password fields didn't match."
msgstr "Les deux mots de passe ne correspondent pas."
#: .\forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "J'ai lu et accepté les Conditions Générales d'Utilisation"
#: .\forms.py:79
msgid "You must agree to the terms to register"
msgstr "Vous devez accepter les conditions d'utilisation pour vous inscrire"
#: .\forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Cette adresse courriel est déjà utilisée. Veuillez en indiquer une autre."
#: .\forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"L'inscription avec adresse courriel de compte gratuit est interdite. "
"Veuillez en indiquer une autre."
#: .\models.py:165
msgid "user"
msgstr "utilisateur"
#: .\models.py:166
msgid "activation key"
msgstr "clé d'activation"
#: .\models.py:171
msgid "registration profile"
msgstr "profil d'inscription"
#: .\models.py:172
msgid "registration profiles"
msgstr "profils d'inscription"

@ -0,0 +1,86 @@
# translation of registration.
# Copyright (C) 2008 THE registration'S COPYRIGHT HOLDER
# This file is distributed under the same license as the registration package.
# <>, 2008.
# , fuzzy
# <>, 2008.
#
#
msgid ""
msgstr ""
"Project-Id-Version: registration\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-02-10 02:01+0200\n"
"PO-Revision-Date: 2008-02-10 02:05+0200\n"
"Last-Translator: Meir Kriheli <meir@mksoft.co.il>\n"
"Language-Team: Hebrew\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit"
#: forms.py:38
msgid "username"
msgstr "שם משתמש"
#: forms.py:41
msgid "email address"
msgstr "דואר אלקטרוני"
#: forms.py:43
msgid "password"
msgstr "סיסמה"
#: forms.py:45
msgid "password (again)"
msgstr "סיסמה (שוב)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "שמות משתמש יכולים להכיל רק אותיות, ספרות וקווים תחתונים"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "שם המשתמש תפוס כבר. נא לבחור אחר."
#: forms.py:64
msgid "You must type the same password each time"
msgstr "יש להקליד את אותה הסיסמה פעמיים"
#: forms.py:93
msgid "I have read and agree to the Terms of Service"
msgstr "קראתי והסכמתי לתנאי השימוש"
#: forms.py:102
msgid "You must agree to the terms to register"
msgstr "עליך להסכים לתנאי השימוש"
#: forms.py:121
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"כתובת הדואר האלקטרוני תפוסה כבר. נא לספק כתובת דואר אחרת."
#: forms.py:146
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"הרישום בעזרת תיבת דואר אלקטרוני חינמית אסור. נא לספק כתובת אחרת."
#: models.py:188
msgid "user"
msgstr "משתמש"
#: models.py:189
msgid "activation key"
msgstr "מפתח הפעלה"
#: models.py:194
msgid "registration profile"
msgstr "פרופיל רישום"
#: models.py:195
msgid "registration profiles"
msgstr "פרופילי רישום"

@ -0,0 +1,86 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.8.1beta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-01 14:09-0500\n"
"PO-Revision-Date: 2010-12-01 15:49+0100\n"
"Last-Translator: Enis Afgan <afgane@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Croatian\n"
"X-Poedit-Country: CROATIA\n"
#: admin.py:23
msgid "Activate users"
msgstr "Aktiviraj korisnike"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Ponovno pošlji aktivacijski email"
#: forms.py:35
msgid "username"
msgstr "Korisničko ime"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Ova vrijednost mora sadržavati samo slova, brojeve i podvlake."
#: forms.py:39
msgid "Email address"
msgstr "Email adresa"
#: forms.py:41
msgid "Password"
msgstr "Lozinka"
#: forms.py:43
msgid "Password (again)"
msgstr "Lozinka (ponovno)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Ovo korisničko ime već postoji."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "Oba polja za lozinku nisu ista."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Pročitao sam i slažem se s uvijetima uporabe."
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Morate se složiti sa uvijetima uporabe prije registracije."
#: forms.py:95
msgid "This email address is already in use. Please supply a different email address."
msgstr "Ova email adresa je već korištena. Molimo da koristite drugu email adresu."
#: forms.py:122
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "Registracija gdje se koristi besplati email servis nije dopuštena. Molimo da koristite drugu email adresu."
#: models.py:165
msgid "user"
msgstr "Korisnik"
#: models.py:166
msgid "activation key"
msgstr "Aktivacijski ključ"
#: models.py:171
msgid "registration profile"
msgstr "Registracijski profil"
#: models.py:172
msgid "registration profiles"
msgstr "Registracijski profili"

@ -0,0 +1,74 @@
# Icelandic translation of django-registration
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the django-registration
# package.
# Björn Kristinsson <bjornkri@gmail.com>, 2009.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-01-22 12:49+0100\n"
"PO-Revision-Date: 2009-01-22 12:49+0100\n"
"Last-Translator: Björn Kristinsson <bjornkri@gmail.com>\n"
"Language-Team: Icelandic\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:36
msgid "username"
msgstr "notandanafn"
#: forms.py:39
msgid "email address"
msgstr "netfang"
#: forms.py:41
msgid "password"
msgstr "lykilorð"
#: forms.py:43
msgid "password (again)"
msgstr "lykilorð (aftur)"
#: forms.py:55
msgid "This username is already taken. Please choose another."
msgstr "Þetta notendanafn er þegar á skrá. Vinsamlega reyndu annað."
#: forms.py:67
msgid "You must type the same password each time"
msgstr "Lykilorðin verða að vera eins "
#: forms.py:90
msgid "I have read and agree to the Terms of Service"
msgstr "Ég hef lesið og samþykki skilmálana"
#: forms.py:107
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Þetta netfang er þegar á skrá. Vinsamlegast notaðu annað netfang."
#: forms.py:133
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "Óheimilt er að nota ókeypis netföng. Vinsamlegast notaðu annað netfang."
#: models.py:218
msgid "user"
msgstr "notandi"
#: models.py:219
msgid "activation key"
msgstr "einkennislykill"
#: models.py:224
msgid "registration profile"
msgstr "skráningarprófíll"
#: models.py:225
msgid "registration profiles"
msgstr "skráningarprófílar"

@ -0,0 +1,89 @@
# translation of django.po to Italian
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Nicola Larosa <nico@tekNico.net>, 2008.
# Flavio Curella <flavio.curella@gmail.com>, 2011
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8 alpha-1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-07-01 14:33+0200\n"
"PO-Revision-Date: 2011-08-04 12:41-0600\n"
"Last-Translator: Flavio Curella <flavio.curella@gmail.com>\n"
"Language-Team: Italiano <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Language: Italian\n"
"X-Poedit-Country: ITALY\n"
#: .\admin.py:23
msgid "Activate users"
msgstr "Attiva utenti"
#: .\admin.py:43
msgid "Re-send activation emails"
msgstr "Re-invia email di attivazione"
#: .\forms.py:35
msgid "Username"
msgstr "Nome utente"
#: .\forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Questo valore può contenere solo lettere, numeri e sottolineature."
#: .\forms.py:39
msgid "Email address"
msgstr "indirizzo email"
#: .\forms.py:41
msgid "Password"
msgstr "Password"
#: .\forms.py:43
msgid "Password (again)"
msgstr "Password (di nuovo)"
#: .\forms.py:55
msgid "A user with that username already exists."
msgstr "Questo nome utente è già usato."
#: .\forms.py:67
msgid "The two password fields didn't match."
msgstr "Le password inserite non coincidono."
#: .\forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Dichiaro di aver letto e di approvare le Condizioni di Servizio"
#: .\forms.py:79
msgid "You must agree to the terms to register"
msgstr "Per registrarsi bisogna approvare le condizioni"
#: .\forms.py:95
msgid "This email address is already in use. Please supply a different email address."
msgstr "Questo indirizzo email è già in uso. Inserisci un altro indirizzo email."
#: .\forms.py:122
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "La registrazione con indirizzi email gratis non è permessa. Inserisci un altro indirizzo email."
#: .\models.py:165
msgid "user"
msgstr "utente"
#: .\models.py:166
msgid "activation key"
msgstr "chiave di attivazione"
#: .\models.py:171
msgid "registration profile"
msgstr "profilo di registrazione"
#: .\models.py:172
msgid "registration profiles"
msgstr "profili di registrazione"

@ -0,0 +1,78 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Shinya Okano <xxshss@yahoo.co.jp>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.4 \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2008-01-31 10:20+0900\n"
"Last-Translator: Shinya Okano <xxshss@yahoo.co.jp>\n"
"Language-Team: Japanese <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "ユーザ名"
#: forms.py:41
msgid "email address"
msgstr "メールアドレス"
#: forms.py:43
msgid "password"
msgstr "パスワード"
#: forms.py:45
msgid "password (again)"
msgstr "パスワード (確認)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "ユーザ名には半角英数とアンダースコアのみが使用できます。"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "このユーザ名は既に使用されています。他のユーザ名を指定してください。"
#: forms.py:68
msgid "You must type the same password each time"
msgstr "同じパスワードを入力する必要があります。"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "サービス利用規約を読み、同意します。"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "登録するためには規約に同意する必要があります。"
#: forms.py:124
msgid "This email address is already in use. Please supply a different email address."
msgstr "このメールアドレスは既に使用されています。他のメールアドレスを指定して下さい。"
#: forms.py:149
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "自由なメールアドレスを使用した登録は禁止されています。他のメールアドレスを指定してください。"
#: models.py:188
msgid "user"
msgstr "ユーザ"
#: models.py:189
msgid "activation key"
msgstr "アクティベーションキー"
#: models.py:194
msgid "registration profile"
msgstr "登録プロファイル"
#: models.py:195
msgid "registration profiles"
msgstr "登録プロファイル"

@ -0,0 +1,89 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Young Gyu Park <ygpark2@gmail.com>, 2009.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-12 14:09-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Young Gyu Park <ygpark2@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "활동 사용자"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "이 메일 제 전송"
#: forms.py:35
msgid "username"
msgstr "사용자 아이디"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "이 곳에는 숫자, _, 영문 글자만 가능합니다."
#: forms.py:39
msgid "Email address"
msgstr "이메일 주소"
#: forms.py:41
msgid "Password"
msgstr "사용자 패스워드"
#: forms.py:43
msgid "Password (again)"
msgstr "패스워드 (재입력)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "이미 같은 아이디로 사용자가 등록되어 있습니다."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "패스워드가 서로 일치하지 않습니다."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "약관을 읽었고 그 내용에 동의합니다."
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "약관에 동의 하셔야만 합니다."
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "이메일이 이미 사용중입니다. 다른 이메일을 등록해 주세요."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "무료 이메일 계정으로 등록하실 수 없습니다. 다른 이메일을 등록해 주세요"
#: models.py:165
msgid "user"
msgstr "사용자"
#: models.py:166
msgid "activation key"
msgstr "활성화 키"
#: models.py:171
msgid "registration profile"
msgstr "등록 프로파일"
#: models.py:172
msgid "registration profiles"
msgstr "등록 프로파일"

@ -0,0 +1,91 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# jonklo <jon at funkbit dot no>, 2010.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: django-registration 0.8\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-12-15 21:37+0100\n"
"PO-Revision-Date: 2010-12-15 21:37+0100\n"
"Last-Translator: jonklo <jon at funkbit dot no>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Aktiver brukere"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Send ny aktiveringsmail"
#: forms.py:35
msgid "Username"
msgstr "Brukernavn"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Dette feltet kan bare inneholde bokstaver, nummer og understreker."
#: forms.py:39
msgid "Email address"
msgstr "E-postadresse"
#: forms.py:41
msgid "Password"
msgstr "Passord"
#: forms.py:43
msgid "Password (again)"
msgstr "Passord (gjenta)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Det eksisterer allerede en bruker med dette brukernavnet."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "De to passordfeltene er ikke like."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Jeg har lest og godtar betingelsene"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Du må godta betingelsene for å registrere deg"
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Denne e-postadressen er allerede i bruk. Vennligst oppgi en annen "
"e-postadresse."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "Registrering med gratis e-postadresse er ikke tillatt. Vennligst "
"oppgi en annen e-postadresse."
#: models.py:168
msgid "user"
msgstr "bruker"
#: models.py:169
msgid "activation key"
msgstr "aktiveringsnøkkel"
#: models.py:174
msgid "registration profile"
msgstr "registrasjonsprofil"
#: models.py:175
msgid "registration profiles"
msgstr "registrasjonsprofiler"

@ -0,0 +1,77 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: registration\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-08-14 13:25+0200\n"
"PO-Revision-Date: 2008-08-14 13:25+0200\n"
"Last-Translator: Joost Cassee <joost@cassee.net>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: forms.py:38
msgid "username"
msgstr "gebruikersnaam"
#: forms.py:41
msgid "email address"
msgstr "e-mail adres"
#: forms.py:43
msgid "password"
msgstr "wachtwoord"
#: forms.py:45
msgid "password (again)"
msgstr "wachtwoord (opnieuw)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Gebruikersnamen kunnen alleen letters, nummer en liggende streepjes bevatten."
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Deze gebruikersnaam is reeds in gebruik. Kiest u alstublieft een andere gebruikersnaam."
#: forms.py:71
msgid "You must type the same password each time"
msgstr "U moet twee maal hetzelfde wachtwoord typen."
#: forms.py:100
msgid "I have read and agree to the Terms of Service"
msgstr "Ik heb de servicevoorwaarden gelezen en ga akkoord."
#: forms.py:109
msgid "You must agree to the terms to register"
msgstr "U moet akkoord gaan met de servicevoorwaarden om u te registreren."
#: forms.py:125
msgid "This email address is already in use. Please supply a different email address."
msgstr "Dit e-mail adres is reeds in gebruik. Kiest u alstublieft een ander e-mail adres."
#: forms.py:151
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "U kunt u niet registreren met een gratis e-mail adres. Kiest u alstublieft een ander e-mail adres."
#: models.py:191
msgid "user"
msgstr "gebruiker"
#: models.py:192
msgid "activation key"
msgstr "activatiecode"
#: models.py:197
msgid "registration profile"
msgstr "registratieprofiel"
#: models.py:198
msgid "registration profiles"
msgstr "registratieprofielen"

@ -0,0 +1,84 @@
# Polish translation for django-registration.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the django-registration package.
# Jarek Zgoda <jarek.zgoda@gmail.com>, 2007.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 0.4\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2007-12-15 12:45+0100\n"
"Last-Translator: Jarek Zgoda <jarek.zgoda@gmail.com>\n"
"Language-Team: Polish <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "nazwa użytkownika"
#: forms.py:41
msgid "email address"
msgstr "adres email"
#: forms.py:43
msgid "password"
msgstr "hasło"
#: forms.py:45
msgid "password (again)"
msgstr "hasło (ponownie)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr ""
"Nazwa użytkownika może zawierać tylko litery, cyfry i znaki podkreślenia"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Ta nazwa użytkownika jest już zajęta. Wybierz inną."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "Musisz wpisać to samo hasło w obu polach"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "Przeczytałem regulamin i akceptuję go"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "Musisz zaakceptować regulamin, aby się zarejestrować"
#: forms.py:124
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Ten adres email jest już używany. Użyj innego adresu email."
#: forms.py:149
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Nie ma możliwości rejestracji przy użyciu darmowego adresu email. Użyj "
"innego adresu email."
#: models.py:188
msgid "user"
msgstr "użytkownik"
#: models.py:189
msgid "activation key"
msgstr "klucz aktywacyjny"
#: models.py:194
msgid "registration profile"
msgstr "profil rejestracji"
#: models.py:195
msgid "registration profiles"
msgstr "profile rejestracji"

@ -0,0 +1,88 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-03-26 10:54+0000\n"
"PO-Revision-Date: 2011-01-24 12:20+0000\n"
"Last-Translator: Nuno Mariz <nmariz@gmail.com>\n"
"Language-Team: Nuno Mariz <nmariz@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Ativar utilizadores"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Reenviar emails de ativação"
#: forms.py:35
msgid "Username"
msgstr "Utilizador"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Este valor apenas deverá conter letras, números e underscores."
#: forms.py:39
msgid "Email address"
msgstr "Email"
#: forms.py:41
msgid "Password"
msgstr "Password"
#: forms.py:43
msgid "Password (again)"
msgstr "Password (novamente)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Um utilizador com o mesmo nome já se encontra registado."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "As duas passwords não coincidem."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Eu li e concordo com as Condiçoes de Serviço"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Deverá concordar com as condições para se registar"
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Este email já se encontra registado. Por favor forneça um email diferente."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "O registo com emails gratuitos é proibido. Por favor forneça um email diferente."
#: models.py:168
msgid "user"
msgstr "utilizador"
#: models.py:169
msgid "activation key"
msgstr "chave de ativação"
#: models.py:174
msgid "registration profile"
msgstr "perfil de registo"
#: models.py:175
msgid "registration profiles"
msgstr "perfis de registo"

@ -0,0 +1,81 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "usuário"
#: forms.py:41
msgid "email address"
msgstr "endereço de email"
#: forms.py:43
msgid "password"
msgstr ""
#: forms.py:45
msgid "password (again)"
msgstr "senha (novamente)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Nomes de usuário apenas podem conter letras, números, e underscore"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Este nome de usuário já existe. Por favor, escolha outro."
#: forms.py:68
msgid "You must type the same password each time"
msgstr "Você deve escrever a mesma senha nos dois campos"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "Eu lí e concordo com os Termos de Uso do serviço"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "Você deve concordar com os termos para registrar-se"
#: forms.py:124
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Este endereço de email já está em uso. Por favor, informe um endereço de email diferente."
#: forms.py:149
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "Registrar-se com contas de email gratuitos está proibido. Por favor, informe um endereço de email diferente."
#: models.py:188
msgid "user"
msgstr "usuário"
#: models.py:189
msgid "activation key"
msgstr "chave de ativação"
#: models.py:194
msgid "registration profile"
msgstr "profile de registro"
#: models.py:195
msgid "registration profiles"
msgstr "profiles de registro"

@ -0,0 +1,92 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-21 20:12+0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Активировать учетные записи"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Выслать ключи активации заново"
#: forms.py:35
msgid "Username"
msgstr "Имя пользователя"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Это поле может содержать только буквы, цифры и подчеркивания"
#: forms.py:39
msgid "Email address"
msgstr "Адрес электронной почты"
#: forms.py:41
msgid "Password"
msgstr "Пароль"
#: forms.py:43
msgid "Password (again)"
msgstr "Пароль (снова)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Пользователь с таким именем уже существует."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "Введенные пароли не совпадают."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Я прочитал Правила Использования и согласен с ними"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Для регистрации Вы должны согласиться с Правилами"
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr ""
"Этот адрес электронной почты уже используется. Пожалуйста, введите другой "
"адрес."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Регистрация с использованием свободных почтовых серверов запрещена. "
"Пожалуйста, введите другой адрес электронной почты."
#: models.py:165
msgid "user"
msgstr "пользователь"
#: models.py:166
msgid "activation key"
msgstr "ключ активации"
#: models.py:171
msgid "registration profile"
msgstr "карточка регистрации"
#: models.py:172
msgid "registration profiles"
msgstr "карточки регистрации"

@ -0,0 +1,87 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: 0.8.1beta\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-10-12 14:09-0500\n"
"PO-Revision-Date: 2011-11-05 21:20+0100\n"
"Last-Translator: Marko Mrdjenovic <m@mmm.si>\n"
"Language-Team: Slovenian <domen@dev.si>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Poedit-Language: Slovenian\n"
"X-Poedit-Country: SLOVENIA\n"
#: admin.py:23
msgid "Activate users"
msgstr "Aktiviraj uporabnike"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Ponovno pošlji aktivacijsko e-pošto"
#: forms.py:35
msgid "username"
msgstr "uporabniško ime"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Vrednost lahko vsebuje samo črke, cifre in podčrtaje."
#: forms.py:39
msgid "Email address"
msgstr "E-naslov"
#: forms.py:41
msgid "Password"
msgstr "Geslo"
#: forms.py:43
msgid "Password (again)"
msgstr "Geslo (ponovno)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Uporabnik s tem uporabniškim imenom že obstaja."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "Polji z gesli se ne ujemata."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Strinjam se s pogoji uporabe"
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Za registracijo se morate strinjati s pogoji uporabe"
#: forms.py:95
msgid "This email address is already in use. Please supply a different email address."
msgstr "E-naslov je že v uporabi, prosimo vnesite drugega."
#: forms.py:122
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "Registracija ni mogoča z brezplačnimi e-naslovi. Prosimo vnesite drug e-naslov."
#: models.py:165
msgid "user"
msgstr "Uporabnik"
#: models.py:166
msgid "activation key"
msgstr "Aktivacijski ključ"
#: models.py:171
msgid "registration profile"
msgstr "Registracijski profil"
#: models.py:172
msgid "registration profiles"
msgstr "Registracijski profili"

@ -0,0 +1,80 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: django-registration trunk\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-04-05 13:51+0200\n"
"PO-Revision-Date: 2008-04-05 14:00+0100\n"
"Last-Translator: Nebojsa Djordjevic <djnesh@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Poedit-Language: Serbian\n"
"X-Poedit-Country: YUGOSLAVIA\n"
#: forms.py:38
msgid "username"
msgstr "korisničko ime"
#: forms.py:41
msgid "email address"
msgstr "email adresa"
#: forms.py:43
msgid "password"
msgstr "šifra"
#: forms.py:45
msgid "password (again)"
msgstr "šifra (ponovo)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Korisničko ime može da se sastoji samo od slova, brojeva i donje crte (\"_\")"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Korisničko ime je već zauzeto. Izaberite drugo."
#: forms.py:71
msgid "You must type the same password each time"
msgstr "Unete šifre se ne slažu"
#: forms.py:100
msgid "I have read and agree to the Terms of Service"
msgstr "Pročitao sam i slažem se sa uslovima korišćenja"
#: forms.py:109
msgid "You must agree to the terms to register"
msgstr "Morate se složiti sa uslovima korišćenja da bi ste se registrovali"
#: forms.py:128
msgid "This email address is already in use. Please supply a different email address."
msgstr "Ova e-mail adresa je već u upotrebi. Morate koristiti drugu e-mail adresu."
#: forms.py:153
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "Registracija korišćenjem besplatnig e-mail adresa je zabranjena. Morate uneti drugu e-mail adresu."
#: models.py:188
msgid "user"
msgstr "korisnik"
#: models.py:189
msgid "activation key"
msgstr "aktivacioni ključ"
#: models.py:194
msgid "registration profile"
msgstr "registracioni profil"
#: models.py:195
msgid "registration profiles"
msgstr "registracioni profili"

@ -0,0 +1,81 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-03-23 18:59+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emil Stenström <em@kth.se>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: .\forms.py:38
msgid "username"
msgstr "Användarnamn"
#: .\forms.py:41
msgid "email address"
msgstr "E-postadress"
#: .\forms.py:43
msgid "password"
msgstr "Lösenord"
#: .\forms.py:45
msgid "password (again)"
msgstr "Lösenord (igen)"
#: .\forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "Användarnamn får bara innehålla bokstäver, siffror och understreck"
#: .\forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "Det användarnamnet är upptaget. Prova ett annat."
#: .\forms.py:71
msgid "You must type the same password each time"
msgstr "Båda lösenord måste vara lika"
#: .\forms.py:100
msgid "I have read and agree to the Terms of Service"
msgstr "Jag har läst och accepterar avtalet"
#: .\forms.py:109
msgid "You must agree to the terms to register"
msgstr "Du måste acceptera avtalet för att registrera dig"
#: .\forms.py:128
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Den e-postadressen är upptagen, använd an annan adress."
#: .\forms.py:153
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr "Gratis e-postadresser är inte tillåtna, använd en annan adress."
#: .\models.py:188
msgid "user"
msgstr "Användare"
#: .\models.py:189
msgid "activation key"
msgstr "Aktiveringsnyckel"
#: .\models.py:194
msgid "registration profile"
msgstr "Profil"
#: .\models.py:195
msgid "registration profiles"
msgstr "Profiler"

@ -0,0 +1,92 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-11-11 12:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: RECEP KIRMIZI <rkirmizi@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:23
msgid "Activate users"
msgstr "Kullanıcıları aktive et"
#: admin.py:43
msgid "Re-send activation emails"
msgstr "Aktivasyon e-postalarını yeniden gönder"
#: forms.py:35
msgid "Username"
msgstr "Kullanıcı adı"
#: forms.py:36
msgid "This value must contain only letters, numbers and underscores."
msgstr "Bu alan sadece harfler, numaralar ve alt çizgiler barındırabilir."
#: forms.py:39
msgid "Email address"
msgstr "Eposta adresi"
#: forms.py:41
msgid "Password"
msgstr "Parola"
#: forms.py:43
msgid "Password (again)"
msgstr "Parola (tekrar)"
#: forms.py:55
msgid "A user with that username already exists."
msgstr "Bu kullanıcı adına sahip bir kullanıcı bulunmakta."
#: forms.py:67
msgid "The two password fields didn't match."
msgstr "İki parola birbiri ile uyuşmadı."
#: forms.py:78
msgid "I have read and agree to the Terms of Service"
msgstr "Anlaşma kurallarını okudum ve kabul ediyorum."
#: forms.py:79
msgid "You must agree to the terms to register"
msgstr "Kayıt olmak için kuralları kabul etmelisiniz."
#: forms.py:95
msgid ""
"This email address is already in use. Please supply a different email "
"address."
msgstr "Bu eposta adresi kullanımda. Lütfen farklı bir eposta adresi veriniz."
#: forms.py:122
msgid ""
"Registration using free email addresses is prohibited. Please supply a "
"different email address."
msgstr ""
"Ücretsiz eposta adresleri ile kayıt kabul edilmemektedir. Lütfen farklı bir "
"eposta adresi veriniz."
#: models.py:168
msgid "user"
msgstr "kullanıcı"
#: models.py:169
msgid "activation key"
msgstr "aktivasyon anahtarı"
#: models.py:174
msgid "registration profile"
msgstr "kayıt profili"
#: models.py:175
msgid "registration profiles"
msgstr "kayıt profilleri"

@ -0,0 +1,77 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2008-03-20 23:22+0800\n"
"Last-Translator: hutuworm <hutuworm@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "用户名"
#: forms.py:41
msgid "email address"
msgstr "Email 地址"
#: forms.py:43
msgid "password"
msgstr "密码"
#: forms.py:45
msgid "password (again)"
msgstr "密码(重复)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "用户名只能包含字母、数字和下划线"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "该用户名已被占用,请另选一个。"
#: forms.py:68
msgid "You must type the same password each time"
msgstr "您必须输入两遍同样的密码"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "我已阅读并同意该服务条款"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "您必须同意注册条款"
#: forms.py:124
msgid "This email address is already in use. Please supply a different email address."
msgstr "该 Email 地址已有人使用,请提供一个另外的 Email 地址。"
#: forms.py:149
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "禁止使用免费 Email 地址注册,请提供一个另外的 Email 地址。"
#: models.py:188
msgid "user"
msgstr "用户"
#: models.py:189
msgid "activation key"
msgstr "激活密钥"
#: models.py:194
msgid "registration profile"
msgstr "注册信息"
#: models.py:195
msgid "registration profiles"
msgstr "注册信息"

@ -0,0 +1,77 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-09-19 19:30-0500\n"
"PO-Revision-Date: 2008-03-20 23:22+0800\n"
"Last-Translator: hutuworm <hutuworm@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:38
msgid "username"
msgstr "用戶名"
#: forms.py:41
msgid "email address"
msgstr "Email 地址"
#: forms.py:43
msgid "password"
msgstr "密碼"
#: forms.py:45
msgid "password (again)"
msgstr "密碼(重復)"
#: forms.py:54
msgid "Usernames can only contain letters, numbers and underscores"
msgstr "用戶名只能包含字母、數字和下劃線"
#: forms.py:59
msgid "This username is already taken. Please choose another."
msgstr "該用戶名已被佔用,請另選一個。"
#: forms.py:68
msgid "You must type the same password each time"
msgstr "您必須輸入兩遍同樣的密碼"
#: forms.py:96
msgid "I have read and agree to the Terms of Service"
msgstr "我已閱讀並同意該服務條款"
#: forms.py:105
msgid "You must agree to the terms to register"
msgstr "您必須同意注冊條款"
#: forms.py:124
msgid "This email address is already in use. Please supply a different email address."
msgstr "該 Email 地址已有人使用,請提供一個另外的 Email 地址。"
#: forms.py:149
msgid "Registration using free email addresses is prohibited. Please supply a different email address."
msgstr "禁止使用免費 Email 地址注冊,請提供一個另外的 Email 地址。"
#: models.py:188
msgid "user"
msgstr "用戶"
#: models.py:189
msgid "activation key"
msgstr "激活密鑰"
#: models.py:194
msgid "registration profile"
msgstr "注冊信息"
#: models.py:195
msgid "registration profiles"
msgstr "注冊信息"

@ -0,0 +1,19 @@
"""
A management command which deletes expired accounts (e.g.,
accounts which signed up but never activated) from the database.
Calls ``RegistrationProfile.objects.delete_expired_users()``, which
contains the actual logic for determining which accounts are deleted.
"""
from django.core.management.base import NoArgsCommand
from registration.models import RegistrationProfile
class Command(NoArgsCommand):
help = "Delete expired user registrations from the database"
def handle_noargs(self, **options):
RegistrationProfile.objects.delete_expired_users()

@ -0,0 +1,270 @@
import datetime
import hashlib
import random
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.db import models
from django.db import transaction
from django.template.loader import render_to_string
from django.utils.translation import ugettext_lazy as _
try:
from django.contrib.auth import get_user_model
User = get_user_model()
except ImportError:
from django.contrib.auth.models import User
try:
from django.utils.timezone import now as datetime_now
except ImportError:
datetime_now = datetime.datetime.now
SHA1_RE = re.compile('^[a-f0-9]{40}$')
class RegistrationManager(models.Manager):
"""
Custom manager for the ``RegistrationProfile`` model.
The methods defined here provide shortcuts for account creation
and activation (including generation and emailing of activation
keys), and for cleaning out expired inactive accounts.
"""
def activate_user(self, activation_key):
"""
Validate an activation key and activate the corresponding
``User`` if valid.
If the key is valid and has not expired, return the ``User``
after activating.
If the key is not valid or has expired, return ``False``.
If the key is valid but the ``User`` is already active,
return ``False``.
To prevent reactivation of an account which has been
deactivated by site administrators, the activation key is
reset to the string constant ``RegistrationProfile.ACTIVATED``
after successful activation.
"""
# Make sure the key we're trying conforms to the pattern of a
# SHA1 hash; if it doesn't, no point trying to look it up in
# the database.
if SHA1_RE.search(activation_key):
try:
profile = self.get(activation_key=activation_key)
except self.model.DoesNotExist:
return False
if not profile.activation_key_expired():
user = profile.user
user.is_active = True
user.save()
profile.activation_key = self.model.ACTIVATED
profile.save()
return user
return False
def create_inactive_user(self, first_name, last_name, email, password,
site, send_email=True):
"""
Create a new, inactive ``User``, generate a
``RegistrationProfile`` and email its activation key to the
``User``, returning the new ``User``.
By default, an activation email will be sent to the new
user. To disable this, pass ``send_email=False``.
"""
new_user = User.objects.create_user(email, first_name, last_name, password)
new_user.is_active = False
new_user.save()
registration_profile = self.create_profile(new_user)
if send_email:
registration_profile.send_activation_email(site)
return new_user
create_inactive_user = transaction.commit_on_success(create_inactive_user)
def create_profile(self, user):
"""
Create a ``RegistrationProfile`` for a given
``User``, and return the ``RegistrationProfile``.
The activation key for the ``RegistrationProfile`` will be a
SHA1 hash, generated from a combination of the ``User``'s
username and a random salt.
"""
salt = hashlib.sha1(str(random.random())).hexdigest()[:5]
username = user.get_full_name()
if isinstance(username, unicode):
username = username.encode('utf-8')
activation_key = hashlib.sha1(salt+username).hexdigest()
return self.create(user=user,
activation_key=activation_key)
def delete_expired_users(self):
"""
Remove expired instances of ``RegistrationProfile`` and their
associated ``User``s.
Accounts to be deleted are identified by searching for
instances of ``RegistrationProfile`` with expired activation
keys, and then checking to see if their associated ``User``
instances have the field ``is_active`` set to ``False``; any
``User`` who is both inactive and has an expired activation
key will be deleted.
It is recommended that this method be executed regularly as
part of your routine site maintenance; this application
provides a custom management command which will call this
method, accessible as ``manage.py cleanupregistration``.
Regularly clearing out accounts which have never been
activated serves two useful purposes:
1. It alleviates the ocasional need to reset a
``RegistrationProfile`` and/or re-send an activation email
when a user does not receive or does not act upon the
initial activation email; since the account will be
deleted, the user will be able to simply re-register and
receive a new activation key.
2. It prevents the possibility of a malicious user registering
one or more accounts and never activating them (thus
denying the use of those usernames to anyone else); since
those accounts will be deleted, the usernames will become
available for use again.
If you have a troublesome ``User`` and wish to disable their
account while keeping it in the database, simply delete the
associated ``RegistrationProfile``; an inactive ``User`` which
does not have an associated ``RegistrationProfile`` will not
be deleted.
"""
for profile in self.all():
try:
if profile.activation_key_expired():
user = profile.user
if not user.is_active:
user.delete()
profile.delete()
except User.DoesNotExist:
profile.delete()
class RegistrationProfile(models.Model):
"""
A simple profile which stores an activation key for use during
user account registration.
Generally, you will not want to interact directly with instances
of this model; the provided manager includes methods
for creating and activating new accounts, as well as for cleaning
out accounts which have never been activated.
While it is possible to use this model as the value of the
``AUTH_PROFILE_MODULE`` setting, it's not recommended that you do
so. This model's sole purpose is to store data temporarily during
account registration and activation.
"""
ACTIVATED = u"ALREADY_ACTIVATED"
user = models.ForeignKey(User, unique=True, verbose_name=_('user'))
activation_key = models.CharField(_('activation key'), max_length=40)
objects = RegistrationManager()
class Meta:
verbose_name = _('registration profile')
verbose_name_plural = _('registration profiles')
def __unicode__(self):
return u"Registration information for %s" % self.user
def activation_key_expired(self):
"""
Determine whether this ``RegistrationProfile``'s activation
key has expired, returning a boolean -- ``True`` if the key
has expired.
Key expiration is determined by a two-step process:
1. If the user has already activated, the key will have been
reset to the string constant ``ACTIVATED``. Re-activating
is not permitted, and so this method returns ``True`` in
this case.
2. Otherwise, the date the user signed up is incremented by
the number of days specified in the setting
``ACCOUNT_ACTIVATION_DAYS`` (which should be the number of
days after signup during which a user is allowed to
activate their account); if the result is less than or
equal to the current date, the key has expired and this
method returns ``True``.
"""
expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
return self.activation_key == self.ACTIVATED or \
(self.user.date_joined + expiration_date <= datetime_now())
activation_key_expired.boolean = True
def send_activation_email(self, site):
"""
Send an activation email to the user associated with this
``RegistrationProfile``.
The activation email will make use of two templates:
``registration/activation_email_subject.txt``
This template will be used for the subject line of the
email. Because it is used as the subject line of an email,
this template's output **must** be only a single line of
text; output longer than one line will be forcibly joined
into only a single line.
``registration/activation_email.txt``
This template will be used for the body of the email.
These templates will each receive the following context
variables:
``activation_key``
The activation key for the new account.
``expiration_days``
The number of days remaining during which the account may
be activated.
``site``
An object representing the site on which the user
registered; depending on whether ``django.contrib.sites``
is installed, this may be an instance of either
``django.contrib.sites.models.Site`` (if the sites
application is installed) or
``django.contrib.sites.models.RequestSite`` (if
not). Consult the documentation for the Django sites
framework for details regarding these objects' interfaces.
"""
ctx_dict = {'activation_key': self.activation_key,
'expiration_days': settings.ACCOUNT_ACTIVATION_DAYS,
'site': site}
subject = render_to_string('registration/activation_email_subject.txt',
ctx_dict)
# Email subject *must not* contain newlines
subject = ''.join(subject.splitlines())
message = render_to_string('registration/activation_email.txt',
ctx_dict)
self.user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)

@ -0,0 +1,8 @@
from django.dispatch import Signal
# A new user has registered.
user_registered = Signal(providing_args=["user", "request"])
# A user has activated his or her account.
user_activated = Signal(providing_args=["user", "request"])

@ -0,0 +1,4 @@
from registration.tests.default_backend import *
from registration.tests.forms import *
from registration.tests.models import *
from registration.tests.simple_backend import *

@ -0,0 +1,198 @@
import datetime
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core import mail
from django.core.urlresolvers import reverse
from django.test import TestCase
from registration import signals
from registration.admin import RegistrationAdmin
from registration.forms import RegistrationForm
from registration.backends.default.views import RegistrationView
from registration.models import RegistrationProfile
class DefaultBackendViewTests(TestCase):
"""
Test the default registration backend.
Running these tests successfully will require two templates to be
created for the sending of activation emails; details on these
templates and their contexts may be found in the documentation for
the default backend.
"""
urls = 'registration.backends.default.urls'
def setUp(self):
"""
Create an instance of the default backend for use in testing,
and set ``ACCOUNT_ACTIVATION_DAYS`` if it's not set already.
"""
self.old_activation = getattr(settings, 'ACCOUNT_ACTIVATION_DAYS', None)
if self.old_activation is None:
settings.ACCOUNT_ACTIVATION_DAYS = 7 # pragma: no cover
def tearDown(self):
"""
Yank ``ACCOUNT_ACTIVATION_DAYS`` back out if it wasn't
originally set.
"""
if self.old_activation is None:
settings.ACCOUNT_ACTIVATION_DAYS = self.old_activation # pragma: no cover
def test_allow(self):
"""
The setting ``REGISTRATION_OPEN`` appropriately controls
whether registration is permitted.
"""
old_allowed = getattr(settings, 'REGISTRATION_OPEN', True)
settings.REGISTRATION_OPEN = True
resp = self.client.get(reverse('registration_register'))
self.assertEqual(200, resp.status_code)
settings.REGISTRATION_OPEN = False
# Now all attempts to hit the register view should redirect to
# the 'registration is closed' message.
resp = self.client.get(reverse('registration_register'))
self.assertRedirects(resp, reverse('registration_disallowed'))
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
self.assertRedirects(resp, reverse('registration_disallowed'))
settings.REGISTRATION_OPEN = old_allowed
def test_registration_get(self):
"""
HTTP ``GET`` to the registration view uses the appropriate
template and populates a registration form into the context.
"""
resp = self.client.get(reverse('registration_register'))
self.assertEqual(200, resp.status_code)
self.assertTemplateUsed(resp,
'registration/registration_form.html')
self.failUnless(isinstance(resp.context['form'],
RegistrationForm))
def test_registration(self):
"""
Registration creates a new inactive account and a new profile
with activation key, populates the correct account data and
sends an activation email.
"""
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
self.assertRedirects(resp, reverse('registration_complete'))
new_user = User.objects.get(username='bob')
self.failUnless(new_user.check_password('secret'))
self.assertEqual(new_user.email, 'bob@example.com')
# New user must not be active.
self.failIf(new_user.is_active)
# A registration profile was created, and an activation email
# was sent.
self.assertEqual(RegistrationProfile.objects.count(), 1)
self.assertEqual(len(mail.outbox), 1)
def test_registration_no_sites(self):
"""
Registration still functions properly when
``django.contrib.sites`` is not installed; the fallback will
be a ``RequestSite`` instance.
"""
Site._meta.installed = False
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
self.assertEqual(302, resp.status_code)
new_user = User.objects.get(username='bob')
self.failUnless(new_user.check_password('secret'))
self.assertEqual(new_user.email, 'bob@example.com')
self.failIf(new_user.is_active)
self.assertEqual(RegistrationProfile.objects.count(), 1)
self.assertEqual(len(mail.outbox), 1)
Site._meta.installed = True
def test_registration_failure(self):
"""
Registering with invalid data fails.
"""
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'notsecret'})
self.assertEqual(200, resp.status_code)
self.failIf(resp.context['form'].is_valid())
self.assertEqual(0, len(mail.outbox))
def test_activation(self):
"""
Activation of an account functions properly.
"""
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
profile = RegistrationProfile.objects.get(user__username='bob')
resp = self.client.get(reverse('registration_activate',
args=(),
kwargs={'activation_key': profile.activation_key}))
self.assertRedirects(resp, reverse('registration_activation_complete'))
def test_activation_expired(self):
"""
An expired account can't be activated.
"""
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
profile = RegistrationProfile.objects.get(user__username='bob')
user = profile.user
user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
user.save()
resp = self.client.get(reverse('registration_activate',
args=(),
kwargs={'activation_key': profile.activation_key}))
self.assertEqual(200, resp.status_code)
self.assertTemplateUsed(resp, 'registration/activate.html')
self.failIf('activation_key' in resp.context)

@ -0,0 +1,119 @@
from django.contrib.auth.models import User
from django.test import TestCase
from registration import forms
class RegistrationFormTests(TestCase):
"""
Test the default registration forms.
"""
def test_registration_form(self):
"""
Test that ``RegistrationForm`` enforces username constraints
and matching passwords.
"""
# Create a user so we can verify that duplicate usernames aren't
# permitted.
User.objects.create_user('alice', 'alice@example.com', 'secret')
invalid_data_dicts = [
# Non-alphanumeric username.
{'data': {'username': 'foo/bar',
'email': 'foo@example.com',
'password1': 'foo',
'password2': 'foo'},
'error': ('username', [u"This value may contain only letters, numbers and @/./+/-/_ characters."])},
# Already-existing username.
{'data': {'username': 'alice',
'email': 'alice@example.com',
'password1': 'secret',
'password2': 'secret'},
'error': ('username', [u"A user with that username already exists."])},
# Mismatched passwords.
{'data': {'username': 'foo',
'email': 'foo@example.com',
'password1': 'foo',
'password2': 'bar'},
'error': ('__all__', [u"The two password fields didn't match."])},
]
for invalid_dict in invalid_data_dicts:
form = forms.RegistrationForm(data=invalid_dict['data'])
self.failIf(form.is_valid())
self.assertEqual(form.errors[invalid_dict['error'][0]],
invalid_dict['error'][1])
form = forms.RegistrationForm(data={'username': 'foo',
'email': 'foo@example.com',
'password1': 'foo',
'password2': 'foo'})
self.failUnless(form.is_valid())
def test_registration_form_tos(self):
"""
Test that ``RegistrationFormTermsOfService`` requires
agreement to the terms of service.
"""
form = forms.RegistrationFormTermsOfService(data={'username': 'foo',
'email': 'foo@example.com',
'password1': 'foo',
'password2': 'foo'})
self.failIf(form.is_valid())
self.assertEqual(form.errors['tos'],
[u"You must agree to the terms to register"])
form = forms.RegistrationFormTermsOfService(data={'username': 'foo',
'email': 'foo@example.com',
'password1': 'foo',
'password2': 'foo',
'tos': 'on'})
self.failUnless(form.is_valid())
def test_registration_form_unique_email(self):
"""
Test that ``RegistrationFormUniqueEmail`` validates uniqueness
of email addresses.
"""
# Create a user so we can verify that duplicate addresses
# aren't permitted.
User.objects.create_user('alice', 'alice@example.com', 'secret')
form = forms.RegistrationFormUniqueEmail(data={'username': 'foo',
'email': 'alice@example.com',
'password1': 'foo',
'password2': 'foo'})
self.failIf(form.is_valid())
self.assertEqual(form.errors['email'],
[u"This email address is already in use. Please supply a different email address."])
form = forms.RegistrationFormUniqueEmail(data={'username': 'foo',
'email': 'foo@example.com',
'password1': 'foo',
'password2': 'foo'})
self.failUnless(form.is_valid())
def test_registration_form_no_free_email(self):
"""
Test that ``RegistrationFormNoFreeEmail`` disallows
registration with free email addresses.
"""
base_data = {'username': 'foo',
'password1': 'foo',
'password2': 'foo'}
for domain in forms.RegistrationFormNoFreeEmail.bad_domains:
invalid_data = base_data.copy()
invalid_data['email'] = u"foo@%s" % domain
form = forms.RegistrationFormNoFreeEmail(data=invalid_data)
self.failIf(form.is_valid())
self.assertEqual(form.errors['email'],
[u"Registration using free email addresses is prohibited. Please supply a different email address."])
base_data['email'] = 'foo@example.com'
form = forms.RegistrationFormNoFreeEmail(data=base_data)
self.failUnless(form.is_valid())

@ -0,0 +1,225 @@
import datetime
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core import mail
from django.core import management
from django.test import TestCase
from django.utils.hashcompat import sha_constructor
from registration.models import RegistrationProfile
class RegistrationModelTests(TestCase):
"""
Test the model and manager used in the default backend.
"""
user_info = {'username': 'alice',
'password': 'swordfish',
'email': 'alice@example.com'}
def setUp(self):
self.old_activation = getattr(settings, 'ACCOUNT_ACTIVATION_DAYS', None)
settings.ACCOUNT_ACTIVATION_DAYS = 7
def tearDown(self):
settings.ACCOUNT_ACTIVATION_DAYS = self.old_activation
def test_profile_creation(self):
"""
Creating a registration profile for a user populates the
profile with the correct user and a SHA1 hash to use as
activation key.
"""
new_user = User.objects.create_user(**self.user_info)
profile = RegistrationProfile.objects.create_profile(new_user)
self.assertEqual(RegistrationProfile.objects.count(), 1)
self.assertEqual(profile.user.id, new_user.id)
self.failUnless(re.match('^[a-f0-9]{40}$', profile.activation_key))
self.assertEqual(unicode(profile),
"Registration information for alice")
def test_activation_email(self):
"""
``RegistrationProfile.send_activation_email`` sends an
email.
"""
new_user = User.objects.create_user(**self.user_info)
profile = RegistrationProfile.objects.create_profile(new_user)
profile.send_activation_email(Site.objects.get_current())
self.assertEqual(len(mail.outbox), 1)
self.assertEqual(mail.outbox[0].to, [self.user_info['email']])
def test_user_creation(self):
"""
Creating a new user populates the correct data, and sets the
user's account inactive.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
self.assertEqual(new_user.username, 'alice')
self.assertEqual(new_user.email, 'alice@example.com')
self.failUnless(new_user.check_password('swordfish'))
self.failIf(new_user.is_active)
def test_user_creation_email(self):
"""
By default, creating a new user sends an activation email.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
self.assertEqual(len(mail.outbox), 1)
def test_user_creation_no_email(self):
"""
Passing ``send_email=False`` when creating a new user will not
send an activation email.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
send_email=False,
**self.user_info)
self.assertEqual(len(mail.outbox), 0)
def test_unexpired_account(self):
"""
``RegistrationProfile.activation_key_expired()`` is ``False``
within the activation window.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
profile = RegistrationProfile.objects.get(user=new_user)
self.failIf(profile.activation_key_expired())
def test_expired_account(self):
"""
``RegistrationProfile.activation_key_expired()`` is ``True``
outside the activation window.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
new_user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS + 1)
new_user.save()
profile = RegistrationProfile.objects.get(user=new_user)
self.failUnless(profile.activation_key_expired())
def test_valid_activation(self):
"""
Activating a user within the permitted window makes the
account active, and resets the activation key.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
profile = RegistrationProfile.objects.get(user=new_user)
activated = RegistrationProfile.objects.activate_user(profile.activation_key)
self.failUnless(isinstance(activated, User))
self.assertEqual(activated.id, new_user.id)
self.failUnless(activated.is_active)
profile = RegistrationProfile.objects.get(user=new_user)
self.assertEqual(profile.activation_key, RegistrationProfile.ACTIVATED)
def test_expired_activation(self):
"""
Attempting to activate outside the permitted window does not
activate the account.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
new_user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS + 1)
new_user.save()
profile = RegistrationProfile.objects.get(user=new_user)
activated = RegistrationProfile.objects.activate_user(profile.activation_key)
self.failIf(isinstance(activated, User))
self.failIf(activated)
new_user = User.objects.get(username='alice')
self.failIf(new_user.is_active)
profile = RegistrationProfile.objects.get(user=new_user)
self.assertNotEqual(profile.activation_key, RegistrationProfile.ACTIVATED)
def test_activation_invalid_key(self):
"""
Attempting to activate with a key which is not a SHA1 hash
fails.
"""
self.failIf(RegistrationProfile.objects.activate_user('foo'))
def test_activation_already_activated(self):
"""
Attempting to re-activate an already-activated account fails.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
profile = RegistrationProfile.objects.get(user=new_user)
RegistrationProfile.objects.activate_user(profile.activation_key)
profile = RegistrationProfile.objects.get(user=new_user)
self.failIf(RegistrationProfile.objects.activate_user(profile.activation_key))
def test_activation_nonexistent_key(self):
"""
Attempting to activate with a non-existent key (i.e., one not
associated with any account) fails.
"""
# Due to the way activation keys are constructed during
# registration, this will never be a valid key.
invalid_key = sha_constructor('foo').hexdigest()
self.failIf(RegistrationProfile.objects.activate_user(invalid_key))
def test_expired_user_deletion(self):
"""
``RegistrationProfile.objects.delete_expired_users()`` only
deletes inactive users whose activation window has expired.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
expired_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
username='bob',
password='secret',
email='bob@example.com')
expired_user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS + 1)
expired_user.save()
RegistrationProfile.objects.delete_expired_users()
self.assertEqual(RegistrationProfile.objects.count(), 1)
self.assertRaises(User.DoesNotExist, User.objects.get, username='bob')
def test_management_command(self):
"""
The ``cleanupregistration`` management command properly
deletes expired accounts.
"""
new_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
**self.user_info)
expired_user = RegistrationProfile.objects.create_inactive_user(site=Site.objects.get_current(),
username='bob',
password='secret',
email='bob@example.com')
expired_user.date_joined -= datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS + 1)
expired_user.save()
management.call_command('cleanupregistration')
self.assertEqual(RegistrationProfile.objects.count(), 1)
self.assertRaises(User.DoesNotExist, User.objects.get, username='bob')

@ -0,0 +1,89 @@
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.test import TestCase
from registration.forms import RegistrationForm
class SimpleBackendViewTests(TestCase):
urls = 'registration.backends.simple.urls'
def test_allow(self):
"""
The setting ``REGISTRATION_OPEN`` appropriately controls
whether registration is permitted.
"""
old_allowed = getattr(settings, 'REGISTRATION_OPEN', True)
settings.REGISTRATION_OPEN = True
resp = self.client.get(reverse('registration_register'))
self.assertEqual(200, resp.status_code)
settings.REGISTRATION_OPEN = False
# Now all attempts to hit the register view should redirect to
# the 'registration is closed' message.
resp = self.client.get(reverse('registration_register'))
self.assertRedirects(resp, reverse('registration_disallowed'))
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
self.assertRedirects(resp, reverse('registration_disallowed'))
settings.REGISTRATION_OPEN = old_allowed
def test_registration_get(self):
"""
HTTP ``GET`` to the registration view uses the appropriate
template and populates a registration form into the context.
"""
resp = self.client.get(reverse('registration_register'))
self.assertEqual(200, resp.status_code)
self.assertTemplateUsed(resp,
'registration/registration_form.html')
self.failUnless(isinstance(resp.context['form'],
RegistrationForm))
def test_registration(self):
"""
Registration creates a new account and logs the user in.
"""
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'secret'})
new_user = User.objects.get(username='bob')
self.assertEqual(302, resp.status_code)
self.failUnless(new_user.get_absolute_url() in resp['Location'])
self.failUnless(new_user.check_password('secret'))
self.assertEqual(new_user.email, 'bob@example.com')
# New user must be active.
self.failUnless(new_user.is_active)
# New user must be logged in.
resp = self.client.get(reverse('registration_register'))
self.failUnless(resp.context['user'].is_authenticated())
def test_registration_failure(self):
"""
Registering with invalid data fails.
"""
resp = self.client.post(reverse('registration_register'),
data={'username': 'bob',
'email': 'bob@example.com',
'password1': 'secret',
'password2': 'notsecret'})
self.assertEqual(200, resp.status_code)
self.failIf(resp.context['form'].is_valid())

@ -0,0 +1,82 @@
"""
URLs used in the unit tests for django-registration.
You should not attempt to use these URLs in any sort of real or
development environment; instead, use
``registration/backends/default/urls.py``. This URLconf includes those
URLs, and also adds several additional URLs which serve no purpose
other than to test that optional keyword arguments are properly
handled.
"""
from django.conf.urls.defaults import *
from django.views.generic.simple import direct_to_template
from registration.views import activate
from registration.views import register
urlpatterns = patterns('',
# Test the 'activate' view with custom template
# name.
url(r'^activate-with-template-name/(?P<activation_key>\w+)/$',
activate,
{'template_name': 'registration/test_template_name.html',
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_activate_template_name'),
# Test the 'activate' view with
# extra_context_argument.
url(r'^activate-extra-context/(?P<activation_key>\w+)/$',
activate,
{'extra_context': {'foo': 'bar', 'callable': lambda: 'called'},
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_activate_extra_context'),
# Test the 'activate' view with success_url argument.
url(r'^activate-with-success-url/(?P<activation_key>\w+)/$',
activate,
{'success_url': 'registration_test_custom_success_url',
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_activate_success_url'),
# Test the 'register' view with custom template
# name.
url(r'^register-with-template-name/$',
register,
{'template_name': 'registration/test_template_name.html',
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_register_template_name'),
# Test the'register' view with extra_context
# argument.
url(r'^register-extra-context/$',
register,
{'extra_context': {'foo': 'bar', 'callable': lambda: 'called'},
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_register_extra_context'),
# Test the 'register' view with custom URL for
# closed registration.
url(r'^register-with-disallowed-url/$',
register,
{'disallowed_url': 'registration_test_custom_disallowed',
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_register_disallowed_url'),
# Set up a pattern which will correspond to the
# custom 'disallowed_url' above.
url(r'^custom-disallowed/$',
direct_to_template,
{'template': 'registration/registration_closed.html'},
name='registration_test_custom_disallowed'),
# Test the 'register' view with custom redirect
# on successful registration.
url(r'^register-with-success_url/$',
register,
{'success_url': 'registration_test_custom_success_url',
'backend': 'registration.backends.default.DefaultBackend'},
name='registration_test_register_success_url'
),
# Pattern for custom redirect set above.
url(r'^custom-success/$',
direct_to_template,
{'template': 'registration/test_template_name.html'},
name='registration_test_custom_success_url'),
(r'', include('registration.backends.default.urls')),
)

@ -0,0 +1,15 @@
"""
Backwards-compatible URLconf for existing django-registration
installs; this allows the standard ``include('registration.urls')`` to
continue working, but that usage is deprecated and will be removed for
django-registration 1.0. For new installs, use
``include('registration.backends.default.urls')``.
"""
import warnings
warnings.warn("include('registration.urls') is deprecated; use include('registration.backends.default.urls') instead.",
DeprecationWarning)
from registration.backends.default.urls import *

@ -0,0 +1,142 @@
"""
Views which allow users to create and activate accounts.
"""
from django.shortcuts import redirect
from django.views.generic.base import TemplateView
from django.views.generic.edit import FormView
from registration import signals
from registration.forms import RegistrationForm, RegistrationFormUniqueEmail
class _RequestPassingFormView(FormView):
"""
A version of FormView which passes extra arguments to certain
methods, notably passing the HTTP request nearly everywhere, to
enable finer-grained processing.
"""
def get(self, request, *args, **kwargs):
# Pass request to get_form_class and get_form for per-request
# form control.
form_class = self.get_form_class(request)
form = self.get_form(form_class)
return self.render_to_response(self.get_context_data(form=form))
def post(self, request, *args, **kwargs):
# Pass request to get_form_class and get_form for per-request
# form control.
form_class = self.get_form_class(request)
form = self.get_form(form_class)
if form.is_valid():
# Pass request to form_valid.
return self.form_valid(request, form)
else:
return self.form_invalid(form)
def get_form_class(self, request=None):
return super(_RequestPassingFormView, self).get_form_class()
def get_form_kwargs(self, request=None, form_class=None):
return super(_RequestPassingFormView, self).get_form_kwargs()
def get_initial(self, request=None):
return super(_RequestPassingFormView, self).get_initial()
def get_success_url(self, request=None, user=None):
# We need to be able to use the request and the new user when
# constructing success_url.
return super(_RequestPassingFormView, self).get_success_url()
def form_valid(self, form, request=None):
return super(_RequestPassingFormView, self).form_valid(form)
def form_invalid(self, form, request=None):
return super(_RequestPassingFormView, self).form_invalid(form)
class RegistrationView(_RequestPassingFormView):
"""
Base class for user registration views.
"""
disallowed_url = 'registration_disallowed'
form_class = RegistrationFormUniqueEmail
http_method_names = ['get', 'post', 'head', 'options', 'trace']
success_url = None
template_name = 'registration/registration_form.html'
def dispatch(self, request, *args, **kwargs):
"""
Check that user signup is allowed before even bothering to
dispatch or do other processing.
"""
if not self.registration_allowed(request):
return redirect(self.disallowed_url)
return super(RegistrationView, self).dispatch(request, *args, **kwargs)
def form_valid(self, request, form):
new_user = self.register(request, **form.cleaned_data)
success_url = self.get_success_url(request, new_user)
# success_url may be a simple string, or a tuple providing the
# full argument set for redirect(). Attempting to unpack it
# tells us which one it is.
try:
to, args, kwargs = success_url
return redirect(to, *args, **kwargs)
except ValueError:
return redirect(success_url)
def registration_allowed(self, request):
"""
Override this to enable/disable user registration, either
globally or on a per-request basis.
"""
return True
def register(self, request, **cleaned_data):
"""
Implement user-registration logic here. Access to both the
request and the full cleaned_data of the registration form is
available here.
"""
raise NotImplementedError
class ActivationView(TemplateView):
"""
Base class for user activation views.
"""
http_method_names = ['get']
template_name = 'registration/activate.html'
def get(self, request, *args, **kwargs):
activated_user = self.activate(request, *args, **kwargs)
if activated_user:
signals.user_activated.send(sender=self.__class__,
user=activated_user,
request=request)
success_url = self.get_success_url(request, activated_user)
try:
to, args, kwargs = success_url
return redirect(to, *args, **kwargs)
except ValueError:
return redirect(success_url)
return super(ActivationView, self).get(request, *args, **kwargs)
def activate(self, request, *args, **kwargs):
"""
Implement account-activation logic here.
"""
raise NotImplementedError
def get_success_url(self, request, user):
raise NotImplementedError

@ -148,6 +148,7 @@
<li><a href="/currency/add">Валюты</a></li>
</ul>
</li>
<li><a href="/accounts/register">Зарегестрировать<br> пользователя</a></li>
</ul>

@ -0,0 +1,16 @@
{% extends "registration/base.html" %}
{% block title %}Account activated{% endblock %}
{% block content %}
<h1>Account activated.</h1>
{% load humanize %}
{% if account %}
<p>Thanks for signing up! Now you can <a href="/accounts/login/">log in</a>.</p>
{% else %}
<p>Sorry, it didn't work. Either your activation link was incorrect, or
the activation key for your account has expired; activation keys are
only valid for {{ expiration_days|apnumber }} days after
registration.</p>
{% endif %}
{% endblock %}

@ -0,0 +1,8 @@
{% extends "registration/base.html" %}
{% block title %}Activation complete{% endblock %}
{% block content %}
<h1>Congratulations!</h1>
<p>Your registration is now complete. Go to the site and start having fun!</p>
{% endblock %}

@ -0,0 +1,6 @@
Someone, hopefully you, signed up for a new account at djangoproject.com using this email address. If it was you, and you'd like to activate and use your account, click the link below or copy and paste it into your web browser's address bar:
http://127.0.0.1:8000/accounts/activate/{{ activation_key }}/
If you didn't request this, you don't need to do anything; you won't receive any more email from us, and the account will expire automatically in {{ expiration_days }} days.

@ -0,0 +1 @@
Activate your djangoproject.com account - you have {{ expiration_days }} days!

@ -0,0 +1,23 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
input.required, error {
border: 2px solid red;
}
</style>
<title>{% block title %}Tagging Exploration{% endblock %}</title>
</head>
<body>
<div id="sidebar">
{% block sidebar %}{% endblock %}
</div>
<div id="content">
{% block content %}{% endblock %}
{% block main_content %}{% endblock %}
</div>
</body>
</html>

@ -0,0 +1,27 @@
{% extends "registration/base.html" %}
{% block title %}Log in{% endblock %}
{% block content %}
<h1>Log in</h1>
{% if form.errors %}
<p class="error">Please correct the errors below:</p>
{% endif %}
<form method="post" action="?next={{ next|default:"/" }}">{% csrf_token %}
<dl>
<dt><label for="id_username">Username:</label>{% if form.username.errors %} <span class="error">{{ form.username.errors|join:", " }}</span>{% endif %}</dt>
<dd>{{ form.username }}</dd>
<dt><label for="id_password">Password:</label>{% if form.password.errors %} <span class="error">{{ form.password.errors|join:", " }}</span>{% endif %}</dt>
<dd>{{ form.password }}</dd>
<dt><input type="submit" value="Log in" /></dt>
</dl>
</form>
{% endblock %}
{% block content-related %}
<p>If you don't have an account, you can <a href="/accounts/register/">sign
up</a> for one.
{% endblock %}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save