Skip to content

Fix possible unbound variable issue in skeleton#1973

Open
tomdtp wants to merge 2 commits intounfoldadmin:mainfrom
tomdtp:fix/unauthenticated-unbound-flags
Open

Fix possible unbound variable issue in skeleton#1973
tomdtp wants to merge 2 commits intounfoldadmin:mainfrom
tomdtp:fix/unauthenticated-unbound-flags

Conversation

@tomdtp
Copy link
Copy Markdown
Contributor

@tomdtp tomdtp commented Apr 13, 2026

Fixes self-referential template issues that showed up with django-fastdev enabled.

Also the regular changelist now follows Django’s own action_form / cl.show_admin_actions contract again, while dataset views get an explicit has_action_form flag so they only show bulk-action UI when actions are actually available.

@tomdtp tomdtp changed the title Fix/unauthenticated unbound flags Align template action rendering with Django defaults and fix unbound variable handling Apr 13, 2026
@lukasvinclav
Copy link
Copy Markdown
Contributor

lukasvinclav commented Apr 13, 2026

Thanks for PR. Can you provide a description how can I replicate the issue so I can test it on local machine? I'm particularly interested in testing unfold_admin_actions.

btw you forget to fill the template questions ;-) Did you used AI to create this code?

@tomdtp tomdtp force-pushed the fix/unauthenticated-unbound-flags branch from b1683d0 to 7f7c222 Compare April 14, 2026 12:01
@tomdtp
Copy link
Copy Markdown
Contributor Author

tomdtp commented Apr 14, 2026

I separated the 2 issues, so this is now just a fix for the unbound self referencing variables.

To reproduce this you can add django-fastdev to the project and then add FASTDEV_STRICT_TEMPLATE_CHECKING = True to the settings.py. You will then directly see the unbound variable error for is_fullwidth. (if you are on main, from this branch it is fixed) if you are unauthenticated and go to the login page of the django admin.

sorry, I did not see any template questions. I just checked the other open PRs and also couldn't see any templates. so if you have questions please ask away :) I did use AI to review the code change (because I wanted it to doublecheck the default values)

the extracted issue is a contract issue, I will issue a separate pr for it

@tomdtp tomdtp changed the title Align template action rendering with Django defaults and fix unbound variable handling Fix possible unbound variable issue in skeleton Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants