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

Whitelist/Blacklist problem when adding django app with capital letter in name #48

Open
WasinTh opened this issue Nov 8, 2018 · 0 comments

Comments

@WasinTh
Copy link

WasinTh commented Nov 8, 2018

According to this issue, the code convert whitelist/blacklist to lowercase. But it'll cause another problem for capital letter django app because all the text in self.content_type_whitelist is in lowercase but the code in method genericadmin_js_init() which loop through all content type doesn't convert the app into lower case therefore the whitelist will ignore all capital letter Django App.
Here is a simple solution for this issue
In the method "genericadmin_js_init()" just add ".lower()" to these 2 lines
if val.lower() in self.content_type_whitelist:
and
elif val.lower() not in self.content_type_blacklist:

WasinTh added a commit to WasinTh/django-genericadmin that referenced this issue Nov 8, 2018
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

No branches or pull requests

1 participant