Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{{is_admin}} is populated as a Pythony bool (capitalized) in javascript #113

Open
j6k4m8 opened this issue Nov 28, 2023 · 1 comment
Open

Comments

@j6k4m8
Copy link
Member

j6k4m8 commented Nov 28, 2023

This is currently throwing a False is not defined ReferenceError in the api.bossdb.io js console (should be lowercase false for javascript):

var is_admin = {{is_admin}};

(There are a handful of lines where this is repeated, so this needs to be fixed in multiple places)

@j6k4m8
Copy link
Member Author

j6k4m8 commented Oct 16, 2024

The fix for this is (I think) something like,

var is_admin = {{is_admin|yesno:"true,false" }}

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#yesno

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant