Overriding/extending Django Admin Login page with django-suit

136 views Asked by At

I've been working on adding Okta integration to django admin and tried to extend the login page to add a new button (the okta integration itself works fine if a go to /admin/login), but when i do this:

{% extends 'admin/login.html' %}
{% load i18n %}




{% block extrastyle %}
   {{ block.super }}
   <style>
       #content-main {
           float: none !important;
       }

       .okta_login_container {
           margin-top: 15px;
           display: flex;
           justify-content: center;
       }
   </style>
{% endblock %}

{% block content %}
   {{ block.super }}

   <div class="okta_login_container">
       <a href="some-url">Or Login With Okta</a>
   </div>
{% endblock %}

Starting the server fails the following error maximum recursion depth exceeded while getting the repr of an object as it seems to not find the login.html page. overriding other pages like base.html work fine.

Other important facts, django-suit is being used and it already overrides the style of the login page.

0

There are 0 answers