Interface per user
isik-kaplan opened this issue · 9 comments
Hey there!
I'm ending up implementing a a per-user theme every time I'm writing a new project (Yes, I use this project literally every time I use django haha). I'm doing it by adding a foreign key to Theme
from User
model and changing the get_admin_interface_theme
tag.
So I think in would be amazing to have an option such as:
class User(BaseUser):
theme = ThemeField()
Hi @isik-kaplan ,
I'm glad you like this package, I also use it in all projects!
This is the first time I hear about this usage, could you explain me in detail why you associate a theme to each user?
You are asking me to add a field which just extends the ForeignKey
, is it correct?
So that each user can create their own theme and use the admin panel with the colors they want, I know it wouldn't probably make sense for logo and favicon; but for the rest, it would make the admin panel more customizable for each user.
And if this happens, it would make even more sense to allow each user to customize the dashboard for themselves.
Not asking from you btw, if you like the idea I can send a pr in couple of days.
This is really interesting, personally I never had this need, but I'm open to new features that could be useful to many people.
Yes, the horinzontal menu would be very nice, now I'm waiting for a response, if I don't receive any feedback I think I will implement it by myself.
If you can send a PR including tests it would be appreciated.
(I would name the field more specifically, such as AdminInterfaceThemeField
)
Kinda OT, @fabiocaccamo are you working on the horizontal menù already? If not I may have some free time this weekend to work on it and submit a basic PR
@lorenzomorandini I’m not working on it, if you could submit a PR it would be great!!!
@isik-kaplan could you provide your field and template tag implementation please?
Now that django 3.1 admin has the navigation sidebar, do you think that the horizontal menu could still be an interesting feature?
Hey, sorry I've been rather busy lately, hadn't had a change to open a pr yet. I'll check the 3.1 interface and see if it actually works with field and get back to you as soon as I can.
@isik-kaplan any update?
@isik-kaplan I close this due to inactivity, if you find the time to send a well tested PR it will be appreciated.