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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:24:31+00:00 2026-06-05T09:24:31+00:00

I am using Django-axes, and using the exact same steps described in readme on

  • 0

I am using Django-axes, and using the exact same steps described in readme on github. I am able to login and logout fine through django views, but none of the failed login attempts get captured if going throught the main website. None the less, failed login attempts from admin site get captured just fine. I am using the FailedLoginMiddleware, and nothing admin specific. I have double checked all the settings and configs, but I am still failing to find the source of the problem. Please help.

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',
    'axes.middleware.FailedLoginMiddleware',
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'axes',
    'django.contrib.admin',
)

Here is the projects urls.py:

from django.conf.urls.defaults import patterns, include, url
from django.contrib.auth.views import login, logout, password_change 

from qs.forms import ValidatingPasswordChangeForm

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^login/$', login, {'template_name': 'auth/login.html'}),
    (r'^logout/$', logout, {'redirect_field_name': '/login', 
                            'template_name': 'auth/logged_out.html'}),
    (r'^passw_change/$', password_change, 
                           {'post_change_redirect': '/rage', 
                            'template_name': 'auth/password_change.html',
                            'password_change_form': ValidatingPasswordChangeForm}),

    (r'^passw_reset/$', 'views.rage_password_reset'),
    (r'^passw_reset/done/', 'views.rage_password_reset_done'),
    (r'^passw_reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'views.rage_password_reset_confirm'),
    (r'^passw_reset/complete/$', 'views.rage_password_reset_complete'),

    url(r'^$', 'be.views.main.index'),
    url(r'^admin/', include(admin.site.urls)),
)
  • 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-05T09:24:33+00:00Added an answer on June 5, 2026 at 9:24 am

    I can’t think of any reason why your config wouldn’t work- I use django-axes and my setup is the exact same as yours and it works fine. However, you can force axes to log everything by doing the following:

    1. Change axes.middleware.FailedLoginMiddleware to axes.middleware.FailedAdminLoginMiddleware in your settings.py. (FailedAuthLoginMiddleware obviously isn’t working for you, so don’t use it.)

    2. Edit your urls.conf:

      ...
      from django.contrib.auth.views import login, logout, password_change
      from axes.decorators import watch_login
      ...
      urlpatterns = patterns('',
          (r'^login/$', watch_login(login), {'template_name': 'auth/login.html'}),
      ...
      

    This should force axes to log attempts- and doing so may also shed some light on what the initial issue was.

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

Sidebar

Related Questions

Im using Django 1.2.3. I have login functionality in my site using django.contrib.auth.views.login .
I using Django and a generic view django.views.generic.create_update.create_object I have a model form wich
im using django-registration, all is fine, the confirmation email was sending in plain text,
Am using Django's form for my login page. I want to set focus to
I am using Django's generic views to create a blog site. The templates I
Using django, I am authenticating the user through Google. I get the initial request
I am using django generic views, how do I get access to the request
Am using django social-auth authentication for my app.After login to facebook or twitter from
Using Django, I want to make some data available for download. My jQuery call
Using django comments framework http://docs.djangoproject.com/en/dev/ref/contrib/comments/ Not sure is there option, to make all comments

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.