spetrovi / songbook

GNU General Public License v3.0
2 stars 0 forks source link

Admin page #21

Closed spetrovi closed 9 months ago

spetrovi commented 9 months ago

Try implementing some basic admin page that would allow us to manage the insides of the database

I.e. Create/Delete/Edit Users custom Songbooks/Entries

spetrovi commented 9 months ago

Have basic admin views now, although we still need to correctly implement the admin decorator, so only logged in admin user can view the url.

Also, it would probably be better if we go through the models to kind of standardise their fields and methods, so that every class have id and add() delete() not user_id, delete_user(), delete_songbook(), etc...

spetrovi commented 9 months ago

Added manage.py with createsuperuser. User model now has bool field is_admin The admin_login_required decorator uses is_authenticated first and then checks the database for is_admin field associated with that user_id.