Open alvra opened 5 years ago
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:
admin/base.html
, which makes it tedious to customize its look and feelIf 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
.
Since the latest django admin comes with a dark theme I thought I try extending admin/base.html
from rosetta/base.html
and it was fairly straightforward to get it working and styled properly:
@mbi Would you accept a PR for that, or rather go in the opposite direction and have this completely decoupled from the django admin?
Btw, if someone doesn't want django admin in INSTALLED_APPS
, then I guess they can also copy those three css files to their project's own static files.
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: