django-genericadmin
django-genericadmin copied to clipboard
Whitelist/Blacklist problem when adding django app with capital letter in name
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: