#34155: ModelAdmin.render_change_form does not lowercase the app_label when
setting
template directories
-------------------------------+--------------------------------------
Reporter: Rishi Diwan | Owner: nobody
Type: Uncategorized | Status: closed
Component: contrib.admin | Version: 3.2
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Comment (by Carlton Gibson):
macOS APFS is case insensitive:
{{{
% mkdir App
% mkdir app
mkdir: app: File exists
% ls
App
% diskutil info /System/Volumes/Data | grep Personality
File System Personality: APFS
}}}
However...
> 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.
On macOS I'd expect the template to be found regardless of the casing of
the `app` directory.
(A full runnable example showing otherwise please.)
This is a long-standing gotcha of macOS. Linux has case sensitive names so
don't use `App` unless you mean it there. It's best just to use lowercase,
and then you don't hit problems.
(Use `AppConfig.verbose_name` if you want that for display purposes.)
> ...forcing lowercase would be highly backward incompatible
Exactly. This isn't something we can realistically change.
--
Ticket URL: <https://code.djangoproject.com/ticket/34155#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701847ac46e4d-6b4576cc-c2e2-4bb7-9769-f43ba9d04712-000000%40eu-central-1.amazonses.com.