Opened 3 years ago
Last modified 3 years ago
#34155 closed Uncategorized
ModelAdmin.render_change_form does not lowercase the app_label when setting template directories — at Version 2
| Reported by: | Rishi Diwan | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | 3.2 |
| Severity: | Normal | Keywords: | |
| Cc: | Carlton Gibson | Triage Stage: | Unreviewed |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
In case of differing environments, such as the linux FS and the OSX FS, folders case-matching is important.
Consider an application with:
app label = "App"
model name = "Inventory" with tablename="inventory"
If a particular model's change_form.html needs to be overwritten we would do the following
Overwrite template/django/admin/App/inventory/change_form.html
This works fine on Linux systems.
However on OSX systems the file shows up as template/django/admin/app/inventory/change_form.html.
This breaks the functionality since the template is no longer found in the App/inventory directory.
The app_label variable should be lowercased so the differing file systems do not cause this issue.
Change History (2)
comment:1 by , 3 years ago
| Version: | 4.1 → 3.2 |
|---|
comment:2 by , 3 years ago
| Description: | modified (diff) |
|---|