Making basic user:adding pdf files, admin:rates them

11 views
Skip to first unread message

Email1212xxpl

unread,
Aug 19, 2018, 6:15:44 PM8/19/18
to Django users
Hi guys, im trying to make a website where users add files and 1 superuser(admin) is rating them from 0-5. User cant modify the ratings but only can see them. What FK in database should i use and what models,views or "adding files" function should i use?

Mikhailo Keda

unread,
Aug 20, 2018, 2:56:35 AM8/20/18
to Django users
Create a file model with FileField, ForeignKey to user and rating column.
Create a view to upload files and to view files. Admin can rate them on admin page, so no view needed for this.
Reply all
Reply to author
Forward
0 new messages