Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8581283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:00:38+00:00 2026-06-11T21:00:38+00:00

I’m trying to create a site with invite only login. In addition the invited

  • 0

I’m trying to create a site with invite only login. In addition the invited users can sign in only by using some OAuth login method.

I’m using Django 1.4.

I’m using apps github.com/lizrice/django-allauth and github.com/lizrice/django-invitation

In installed_apps I have included all the apps that documentation tells me to include:

'allauth',
'allauth.account',
'allauth.socialaccount',
'allauth.socialaccount.providers.google',
'invitation',

I have set up few variables in settings.py:

SOCIALACCOUNT_AUTO_SIGNUP = False
SOCIALACCOUNT_ENABLED = True
INVITE_MODE = True
ACCOUNT_INVITATION_DAYS = 10
INVITATIONS_PER_USER = 1
INVITATION_USE_ALLAUTH = True

And in urls.py I have only needed urls

url(r'^accounts/register/$', register,
        {
            'backend': 'invitation.backends.InvitationBackend',
        },
    name='registration_register'),
(r'^accounts/', include('invitation.urls')),
(r'^accounts/', include('allauth.urls')),

I can create an invitation code and with that invitation code I can proceed to registration. Now, the registration view brings up the following error (full Stacktrace):

The view invitation.views.register didn't return an HttpResponse object.

Registration view should display a registration flow where user can select OAuth provider to create an account.

Edit: with my configuration, the error comes from allauth/socialaccount/views.py

def signup(request, **kwargs):
    if request.user.is_authenticated():
        return HttpResponseRedirect(reverse(connections))
    sociallogin = request.session.get('socialaccount_sociallogin')
    if not sociallogin:
        return HttpResponseRedirect(reverse('account_login'))

There is no session item with that name, so code tries to reverse to ‘account_login’. This URL is defined in allauth. Allauth is in the installed_apps list and the urls are included.

Edit: Added Stacktrace

Edit: removed registration, it is not needed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:00:40+00:00Added an answer on June 11, 2026 at 9:00 pm

    It’s more than possible that this code of mine is flawed 🙂 but let’s see if we can get to the bottom of it. Also, note that pennersr suggested a better way to do this but I haven’t had a chance to implement it yet.

    The idea with this is that you don’t let people sign up for a new account unless they’ve got a valid invite code – but if they’re going to sign in through a social account you can’t tell if they’re an existing user or a new user until after they already signed in. If it turns out they’re a new user, we’ll tell them they need an invitation key. Time passes, they get hold of an invitation key somehow and come back to your site and enter it. If they happen to be in the same session, they’ll still be logged in socially (I think that’s where request.session[‘socialaccount_sociallogin’] comes into it). If not then they’ll go to the account login page, from which they can sign in socially or create a new username/pw account.

    Anyway. The call to reverse(‘account_login’) should, I believe, resolve to allauth.account.views.login – can you check that’s happening for you? On a quick inspection I can’t see how that function wouldn’t return an HttpResponse object so I wonder if it’s being called at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.