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 4093154
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:34:56+00:00 2026-05-20T19:34:56+00:00

I fallowed recommendation in this SO question: What's the best solution for OpenID with

  • 0

I fallowed recommendation in this SO question: What's the best solution for OpenID with Django? and installed django-openid-auth for my application.

But I just can’t get it working, I always get CSRF verification failed. Request aborted. when I try to log in.

django csrf

I have checked everything:

1.

{% csrf_token %} is present in the template:

<form name="fopenid" action="{{ action }}" method="post">
    {% csrf_token %}
    <fieldset>
        <legend>Sign In Using Your OpenID</legend>
        <div class="form-row">
            <label for="id_openid_identifier">OpenID:</label><br />
            {{ form.openid_identifier }}
        </div>
        <div class="submit-row ">
            <input name="bsignin" type="submit" value="Log in">
        </div>
 {% if next %}
        <input type="hidden" name="next" value="{{ next }}" />
 {% endif %}
    </fieldset>
</form>

2.

In the views.py inside of django_openid_auth I found, that they use RequestContext:

return render_to_response(template_name, {
                    'form': login_form,
                    redirect_field_name: redirect_to
                    }, context_instance=RequestContext(request))

3.

My MIDDLEWARE_CLASSES does contain CsrfViewMiddleware:

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

I just can’t understand what else could be wrong? Do you have any ideas?

I am using Django 1.3 beta.

UPDATE

This seem to be my global problem. I’ve created a simple form and got the same result:

def index(request):
    return render_to_response('index.html',
                              locals(),
                              context_instance=RequestContext(request))

index.html:

<form action="/" method="post">
    {% csrf_token %}
    <input type="text" name="test">
    <input type="submit">
</form>

Rendered HTML:

<form action="/" method="post">
    <div style="display:none"><input type="hidden" name="csrfmiddlewaretoken" value="1fbd5345560d325bf05809260f7d43c3"></div>
    <input type="text" name="test">
    <input type="submit">
</form>

What’s wrong!?

  • 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-05-20T19:34:57+00:00Added an answer on May 20, 2026 at 7:34 pm

    Actually, I think it was the first bug I encountered in Django. I’ve updated my copy to fresh release of 1.3 and everything started working. Good job, Django developers!

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

Sidebar

Related Questions

I've followed this example: RCP+JavaWS but the app just briefly comes up and goes
Followed this question about delayed_job and monit Its working on my development machine. But
I followed this example and it works great but I'm wondering if I can
I followed the tutorial exactly: http://github.com/binarylogic/authlogic_example But I am wondering how can I get
Followed instructions on Railscast but can't get server to start. It states the following
I've followed this otherwise excellent tutorial on getting Xen working with Ubuntu but am
I have followed the suggestion in this question... [ How to handle checkboxes in
I've followed the recommendation from the Devise github pages for this: http://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-in Now this
I followed the instructions on ADT Plugin for Eclipse but I got this message
Sorry it seems like a repeated question, BUT I think I don't qualify to

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.