django-registration

Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

此生再无相见时 提交于 2019-12-20 18:09:15
问题 I'm trying to get django-register to work on my website but I keep getting this error which I do not understand I'm using django 1.6 on Python 3.3 NoReverseMatch at /accounts/register/ Reverse for 'index' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] Request Method: GET Request URL: http://127.0.0.1:8000/accounts/register/ Django Version: 1.6.1 Exception Type: NoReverseMatch Exception Value: Reverse for 'index' with arguments '()' and keyword arguments '{}'

django-registration auto create UserProfile

 ̄綄美尐妖づ 提交于 2019-12-20 12:36:27
问题 I'm using django-registration and I'm trying to connect to its signals to automatically create a UserProfile. Signal definition: from django.dispatch import Signal # A new user has registered. user_registered = Signal(providing_args=["user", "request"]) Signal send by django-registration: def register(self, request, **kwargs): """ Create and immediately log in a new user. """ username, email, password = kwargs['username'], kwargs['email'], kwargs['password1'] User.objects.create_user(username

Getting `django-registration` to send you to the page you were originally trying to visit

怎甘沉沦 提交于 2019-12-20 10:07:22
问题 django.contrib.auth has an awesome feature: When you try to access a page that's decorated by login_required , you get redirected to the login page with a next argument, so after you login you get redirected back to the page you were originally trying to access. That's good for the user flow. But, apparently django-registration does not provide a similar feature. I expected that if you register instead of login, you would also get a next thing, and after registering-n'-activating you'll get

get_success_url() takes exactly 3 arguments (2 given)

泪湿孤枕 提交于 2019-12-20 06:37:27
问题 every one ,, I am using django-registration-redux (1.4) for my django registration(django 1.8),,however ,,when never I registered the web will show the error ,,but the views.py in form_valid, line 43 it is the editing function,,it seems not about the register?? views.py @login_required def edit_thing(request, slug): # grab the object... thing = ProductsTbl.objects.get(slug=slug) if thing.user != request.user: raise Http404 # set the form we're using... form_class = ProductsTblForm if request

Django 1.8+ extending the User model

不打扰是莪最后的温柔 提交于 2019-12-20 04:05:30
问题 I know this question has been asked hundreds of times, but most of them contain -accepted- answers that are not valid anymore. Some of them are for Django 1.5, some of them are even older. So I'm looking for an up-to-date answer. The question that most resembles my problem is this one. I'm using the django-registration module and I want users to have additional fields (like integer user.points ). I'm OK with implementing my own MyUser model and changing the rest of my program accordingly.

NotImplementedError in django-registration when registering a user

谁说胖子不能爱 提交于 2019-12-19 11:45:11
问题 I have a django app and trying to use django-registration app in it. And below are my settings and codes settings.py INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'south', 'registration', 'user_profile', ) AUTH_PROFILE_MODULE = "user_profile.UserProfile" AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', ) project

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

被刻印的时光 ゝ 提交于 2019-12-18 10:14:06
问题 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 . 回答1:

Create User-Specific Redirect After Login in django

 ̄綄美尐妖づ 提交于 2019-12-14 04:12:01
问题 I have three types of people in my Django application Admin, Staff and Parent . how can I set up log-in for them as they will have different views after logging in using django registration? my code so far is this : in settings.py LOGIN_REDIRECT_URL = '/app/login_redirect' LOGIN_URL = '/app/accounts/login/' LOGOUT_URL = '/app/accounts/logout/' and in views.py: def login_redirect(request): if request.user.is_authenticated() and not request.user.is_superuser: return HttpResponseRedirect(reverse

Equals sign in django-registration activation url

瘦欲@ 提交于 2019-12-14 01:23:21
问题 I am using django-registration and for some reason, when it sends the activation email, it inserts an equals sign in the third to last character as such: http://example.com/accounts/activate/a65b4aca5156211bc522e29f3e872290544d14= e4/ This means the URL dispatcher does not catch the URL (the regex is ^activate/(?P<activation_key>\w+)/$ . The url is incorrect anyway, as it should be without the equals sign. Anybody know why this is happening? 回答1: Your email client isn't reading the quoted

Login and Registration on the index page using django allauth

瘦欲@ 提交于 2019-12-13 12:34:02
问题 I am using django-allauth . I want the login and signup forms both on the home page of my website and not on '/accounts/login' or '/accounts/signup' I have created a separate app. The following code is in views.py from allauth.account.views import SignupView from allauth.account.forms import LoginForm class CustomSignupView(SignupView): # here we add some context to the already existing context template_name = 'index.html' def get_context_data(self, **kwargs): # we get context data from