I am currently trying to make a learning app. The three main users would be the Admin, Teacher and Student. Should I use the django admin panel for the teachers ? It has a lot of features and is fully customizable and I can choose what a teacher can do or not from there. Is this a correct approach ?
-
1If a quick and dirty PoC then its fine. But normally you'll want to use Django in conjunction with some sort of javascript framework. You can use the Django admin template as a starting point if you like it, but over time you may find it overly restrictive. Great for quickly showing a working concept though.– sahutchiJan 16, 2018 at 23:10
3 Answers
While you can use the admin panel for all users, I don't recommend it. Security is tight, but not very flexible. Also, dedicated pages developed for your user functions can be better suited for the job from both the design and functionality standpoints.
Take the time to develop quality pages for your users. You won't regret it.
-
2You could also quote the Django documentation: "The admin’s recommended use is limited to an organization’s internal management tool. It’s not intended for building your entire front end around." (from Django admin site) Jan 16, 2018 at 22:52
-
The main reason I would answer no to the question is: Giving normal users
staff
privilege, even taking due precautions in setting up permissions correctly, makes it too easy for mistakes to slip in, where suddenly your users have unintended access to something, even if it's not directly visible to them. I would never give external usersstaff
permissions. Jan 16, 2018 at 22:56
Yes you can use admin panel for your teachers. for this Purpose you need to mark them as staff to login in admin panel and set for them permissions you want to add them.
-
But again, is this a correct approach ? Developers also do this usually ?– user9092892Jan 16, 2018 at 21:11
-
It depends of your skills. If you configured teacher well in admin it would be ok! else you need to create your own custom admin panel logic for teachers Jan 16, 2018 at 21:16
You should give an admin panel to all users. However, limit what certain users see.
Example: Students shouldn't be able to create courses in the panel but Admins could.