+ 1

Django-CMS append Label to searchfield

I want to append a label in the admin-template for MyModel search-field, so that the users know, that they can search by title. In my admin.py: class MyModelAdmin(admin.ModelAdmin): search_fields = ['title'] admin.site.register(MyModel, MyModelAdmin)

13th Jul 2021, 11:21 AM
Fu Foy
Fu Foy - avatar
4 ответов
+ 1
I am not sure, but why you let ordinary users to enter admin panel??? if you want to make a search bar by title then why don't you just put search bar in website header?
13th Jul 2021, 11:32 AM
Shadoff
Shadoff - avatar
0
I'd like to use lookup the entries in my table in my admin panel. Staff-users with permission can access this model/table from within the admin panel, so it would be nice to add a label for the search bar, but I don't know how. It's also not for an actual project, but just for me to practice :)
13th Jul 2021, 11:39 AM
Fu Foy
Fu Foy - avatar
17th Jul 2021, 11:54 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
0
Fu Foy have you got any solution??
25th Jul 2021, 10:41 AM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar