django-rosetta
django-rosetta copied to clipboard
Break dependency on the admin
- Which version of Django are you using?: 2.2.6
- Which version of django-rosetta are you using?: 0.9.3
- [x] Have you looked trough recent issues and checked this isn't a duplicate?
This isn't really clear to me from the documentation, but it seems Rosetta requires the Django admin to be enabled for a few css files. The pages work ok, but lacks all styling.
Is it possible for Rosetta to provide a (minimal) version of these css files in case the admin is not enabled. Placing Rosetta lower than the admin in the INSTALLED_APPS will not override the admin css if it is enabled, or is there a way to avoid this?
As far as I can tell, only the following files are needed:
- /admin/css/base.css
- /admin/css/forms.css
- /admin/css/changelists.css
This would be useful for frameworks which include rosetta as part of a distinct admin-like dashboard, such as https://github.com/scaryclam/django-oscar-rosetta
I'd suggest to generalize this topic and call it "Separate Rosetta cleanly from Django Admin".
Why? – Because currently, Rosetta is not even cleanly integrated with the Admin:
- From the user interface, it's not possible to navigate back to the admin (although it seems to be visually integrated)
- Rosetta's templates don't inherit from Django's
admin/base.html
, which makes it tedious to customize its look and feel
If there were a clean separation it should be easy to allow for a Django setting to use either an integrated Django admin user experience, or a completely independent, stand-alone app appearance and behavior.
That would then potentially obsolete or replace settings like ROSETTA_SHOW_AT_ADMIN_PANEL
.