Use Different Forms For Different Users - Django Wednesdays #30

preview_player
Показать описание
In this video I'll show you how to use Different Forms For Different Users for your Django App.

We don't want any user to be able to assign a manager to any event, we only want the Admin user to be able to do that.

We only want regular users to be able to assign themselves as event manager.

We can solve this by creating two different Event Forms and using one for the Admin and one for regular users.

#django #codemy #JohnElder

Timecodes

0:00​​ - Introduction
2:10 - Create A Second Event Form For Admin
4:40 - Tweak Add_Event View
7:03 - Assign Manager To Event For Regular User
10:34 - Tweak Update Event View
12:51 - Conclusion
Рекомендации по теме
Комментарии
Автор

▶️ Watch Entire Django Wednesdays Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:
▶️ Get The Code

Codemycom
Автор

You should see how my Django skills improved since I started watching your videos.

theprophecy
Автор

Really amazing sir, i am glad to have this kind of teacher, really great effort sir thank you so much.

sarwechimdad
Автор

Hi, I'm having a strange behavior on this part when I'm logged in as a superuser in adding an event "This field is required" appears above the event name and date of the event and if I'm not a superuser these labels are not there. and I copied the form one to one with the difference that in "Admin" I removed the manager field like you. Please give me any clue. Thanks

januszgrazyniak
Автор

Hello John, did you observe that the attendee wasn't added at 10:20 ?

Kennerdoll
Автор

am glad for this video, but I will be glad if you can do something on multiple user login

adeyinkanewton