79482744

Date: 2025-03-04 05:40:27
Score: 0.5
Natty:
Report link

Error was missing imports and that missing decorator.

After adding @security.context_processor above the context processor block the error filtered through the login_user.html until I finally started to see h is undefined then url_for was undefined. In transitioning my initial admin page that was made without the admin package my imports got mixed up so I was missing those two. Now that I have added those 3 things I now see the login page! Hopefully if anyone else sees the very unhelpful admin_base_plate undefined they can know to look for those smaller items which don't come out of the stack trace very clearly.

I ended up adding onto the context processor so it looks like this:

@security.context_processor
def security_context_processor():
return dict(
    admin_base_template=admin.theme.base_template,
    admin_view=admin.index_view,
    theme=admin.theme,
    h=admin_helpers,
    get_url=url_for,
)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Aqua Darkness