How to hook into the admin site to count login attempts with REST API / proxy?

101 views
Skip to first unread message

Daniel Grace

unread,
Nov 4, 2016, 12:46:20 PM11/4/16
to Django users
Hello, I have a REST API which is not publicly accessible as it is behind a proxy.  However the admin site is publicly available through an NGINX server.  The REST API already has functionality to count failed login attempts and I would like to duplicate that functionality on the admin login page.  How do I hook into the admin login page and add the appropriate code?  Can I still use Django Axes or should I create my own login form as a replacement?
Thanks

T Thomas

unread,
Nov 17, 2016, 11:38:28 AM11/17/16
to Django users

Hi Daniel,

 

Hope this email finds you well! We are App Innovation Technologies expertise in Microsoft SharePoint, with the latest .NET Framework 3.5, 4.0 and 4.5 and sound knowledge in developing WPF based window and web applications. We use PHP, Word-Press and other open source technologies for website development and on mobile we work on iOS, Android and Windows applications.

 

 Our lab is equipped with dedicated TFS 2012, MS SQL server 2012, MS SharePoint 2010 Enterprise servers in the base of Windows Server 2012 and Windows Server 2012 R2. We offer good quality work on a reasonable cost.

 

If you have any project, Please let me know.

 

Our work:

1. ASP.Net / .Net

2. Website

3. iOS Application

 

 Thanks & Regards,

Thomas Russell

+1-224-636-9884

App Innovation Technologies

Reza Shalbafzadeh

unread,
Nov 20, 2016, 8:35:51 AM11/20/16
to Django users
Hi
you still can use Django axes as described in Django axes  documentation:

django-axes requires a supported Django version. The application is intended to work around the Django admin and the regular django.contrib.auth login-powered pages.

Also you can manually register urls for Django axes
http://django-axes.readthedocs.io/en/latest/issues.html#not-being-locked-out-after-failed-attempts
add watch_login to your admin url

Luis Zárate

unread,
Nov 20, 2016, 9:19:43 AM11/20/16
to django...@googlegroups.com
Hi
You can override the admin login page overwriting the URLs, you can put your own login view in admin/account/login after admin include in URLs
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
> To post to this group, send email to django...@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1d87fca9-1d1d-4a6f-ba10-30c47152917b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

--
"La utopía sirve para caminar" Fernando Birri



Reply all
Reply to author
Forward
0 new messages