fabiocaccamo / django-admin-interface

:superhero: :zap: django's default admin interface with superpowers - customizable themes, popup windows replaced by modals and many other features.
MIT License
1.73k stars 178 forks source link

Add tests for default django templates that are overridden. #301

Open fabiocaccamo opened 11 months ago

fabiocaccamo commented 11 months ago

Problem

Some features require template changes that now work correctly, but may become incompatible with future django releases.

Solution

Discover incompatibility issues as soon as possible using the CI by comparing the default django template (this will run for each supported django version in the CI) with a list of templates that we know are compatible with this library. Doing this, any future change to an overridden template will immediately result in a CI failure, very easy to discover and debug.


Here there are all default django admin templates that are overridden by this package: https://github.com/fabiocaccamo/django-admin-interface/tree/main/admin_interface/templates/admin

Funding

Fund with Polar

merwok commented 11 months ago

Is your idea to add special comments like {# begin d-a-i custom code #} around added lines? What about changed lines?

fabiocaccamo commented 11 months ago

No, it's too hard comparing customized templates with the original ones, my idea is this:

Preparation

Tests


What do you think about it?

merwok commented 11 months ago

Ah I understand, it’s an automated comparison of a saved copy with the upstream file! Plan seems good.