django-registration

How to make django-registration use my customized UserCreationForm and UserChangeForm?

落花浮王杯 提交于 2019-12-01 10:35:21
问题 I am developing a website using Django 1.4 and django-registration I would like to allow users to create their user names using arbitrary Unicode characters. Currently, if someone tries to register using non-latin characters, he will see an error message. The code responsible for rejecting this kind of non-ASCII usernames is in UserCreationForm and UserChangeForm , see here: username = forms.RegexField( label=_("Username"), max_length=30, regex=r"^[\w.@+-]+$", help_text = _("Required. 30

Django-Registration Activation redirect with django.contrib.messages

旧巷老猫 提交于 2019-12-01 09:24:24
问题 I'm trying to set up my django-registration activation workflow so that when the user hits the activation link it redirects them to the login page with a nice little message using the django messages framework django.contrib.messages Right now, I've managed to send the user back to the homepage using the success_url parameter: url(r'activate/(?P<activation_key>\w+)/$', activate, {'backend': 'registration.backends.default.DefaultBackend', 'success_url':'/'}, name='registration_activate', ),

django-registration, registration and login form on index page together, did I do it right?

巧了我就是萌 提交于 2019-12-01 01:12:43
I'd appreciate some code review, I used django-registration app and django.contrib.auth module. What I wanted to do is have both the login and registration form on the index page, and manage it from there. What I did is I just copied code from registration.views.py and contrib.auth.views.py and banged it together. It works but I feel it's very hack-ish, non elegant, and that there is another, proper way to do it. For example I feel it might be better to call or extend view methods in registration and auth instead of copy pasting them. def index(request, success_url=None, form_class

How to use different view for django-registration?

和自甴很熟 提交于 2019-11-30 22:30:21
I have been trying to get django-registration to use the view RegistrationFormUniqueEmail and following the solution from this django-registration question . I have set my urls.py to from django.conf.urls import patterns, include, url from registration.forms import RegistrationFormUniqueEmail from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), (r'^users/', include('registration.backends.default.urls')), url(r'^users/register/$', 'registration.backends.default.views.RegistrationView', {'form_class':

Turn off user social registration in django-allauth?

半城伤御伤魂 提交于 2019-11-30 21:06:34
I noticed looking through the django-allauth templates there's a signup_closed.html users can be redirected to when user registration is closed or disabled. Does anyone who's familiar with that module know if there's a pre-configured setting that can be set in settings.py to turn off new user registration via existing social apps? Or do I need to configure that myself? I've read the full docs for allauth and I don't see any mention of it. Thanks. Looks like you need to override is_open_for_signup on your adapter. See the code . More information at http://django-allauth.readthedocs.io/en/latest

django-registration, registration and login form on index page together, did I do it right?

妖精的绣舞 提交于 2019-11-30 20:48:15
问题 I'd appreciate some code review, I used django-registration app and django.contrib.auth module. What I wanted to do is have both the login and registration form on the index page, and manage it from there. What I did is I just copied code from registration.views.py and contrib.auth.views.py and banged it together. It works but I feel it's very hack-ish, non elegant, and that there is another, proper way to do it. For example I feel it might be better to call or extend view methods in

Turn off user social registration in django-allauth?

扶醉桌前 提交于 2019-11-30 17:00:27
问题 I noticed looking through the django-allauth templates there's a signup_closed.html users can be redirected to when user registration is closed or disabled. Does anyone who's familiar with that module know if there's a pre-configured setting that can be set in settings.py to turn off new user registration via existing social apps? Or do I need to configure that myself? I've read the full docs for allauth and I don't see any mention of it. Thanks. 回答1: Looks like you need to override is_open

Django-registration compatibility issue with django 1.7

半世苍凉 提交于 2019-11-30 13:22:52
问题 I've been using [django-registration] (https://bitbucket.org/ubernostrum/django-registration) and now I have started using django 1.7b1 and here is the error I am getting the error copied below. It is being raised from django-registration in models.py : try: from django.contrib.auth import get_user_model User = get_user_model() except ImportError: from django.contrib.auth.models import User and it seems it is being raised because get_user_model() is being called before the app registry is

django-social-auth django-registration and django-profiles — together

落爺英雄遲暮 提交于 2019-11-29 20:38:59
Has anyone used django-social-auth , django-registration and django-profiles together. Do they work well together? I have established social-auth but I read somewhere that django-allauth is better. Should I switch over to that? Please advise Update: I have used allauth in my project and it is working fine. You don't need to use django-registration with allauth because that is integrated within. However I am using custom user profiles and that is a better option than the django-profiles . They work fine together - I just set this up the other day (except I didn't need to use django-profiles as

Django - authentication, registration with email confirmation

ぃ、小莉子 提交于 2019-11-29 00:27:05
问题 I'm looking at the API for authentication https://docs.djangoproject.com/en/1.3/topics/auth/ I can't seem to find information on simple user registration form that would send confirmation email as it is the usual way on web sites. I guess I could do this: 1) Display a form 2) User enters info and submits 3) Save user as inactive, with a confirmation code 4) Send a link with confirmation code 5) User clicks a confirmation link and becomes active It doesn't seem that difficult but I have a