Django admin template overrides production work

Like this question , my admin overrides don't work in my production environment, but they are in my development environment (same django version). I tried to reorder the INSTALLED_APPS tuple in settings.py unchanged (was the answer to the question linked above). This is how I built my project:

/WebDJ/ # project dir
    +devices # unrelated app, but it uses templates (see below)
    +sales
        __init__.py
        admin.py
        models.py  # has Customer and Transaction model classes
    +templates
        +admin
            +sales
                +Customer
                    change_form.html
                +Transaction
                    change_form.html
        +devices # lots of templates under here that work fine
        404.html
        500.html

      

and

TEMPLATE_DIRS = ('/WebDJ/templates',)

      

installed in settings.py. The templates in the devices app are lovely. What is not loaded is an override in the admin directory, so additional stuff was added in the change form for the client and the transaction (override of the "after_field_sets" block).

Again, it works in my development environment (using PyCharm), but not in my production environment. Any ideas? I'm really stumped on this one.

+3


source to share


1 answer


Answer: On my production machine, she apparently didn't like "Client" and "Transaction", even though that's the exact model name - it requires "Client" and "Transaction".



+6


source







All Articles