Administering your Django website
Overview
The admin site
The site is just another app. you can use the built-in administration app by adding it to your settings.py file. By default it's already added.
The code
open the blog's admin.py file in a text editor:
nano script_builder/admin.py
from django.contrib import admin
from .models import Author, Genre, Book, BookInstance
admin.site.register(Book)
admin.site.register(Author)
admin.site.register(Genre)
admin.site.register(BookInstance)
python manage.py createsuperuser
python3 manage.py runserver
Go to
Adding Functionality
Option 1: Import/Export
External Resources
- custom admin buttons
- https://www.loopwerk.io/articles/2023/adding-custom-actions-django-admin/
- https://saxix.github.io/django-admin-extra-buttons/howto/
- https://medium.com/@asif-biswas/learn-how-to-add-a-custom-button-to-django-admin-panel-the-easiest-way-c11d5d8781a6
- https://django-admin-extra-buttons.readthedocs.io/en/latest/
- https://hakibenita.com/how-to-add-custom-action-buttons-to-django-admin
- https://stackoverflow.com/questions/40760880/add-custom-button-to-django-admin-panel
- https://github.com/crccheck/django-object-actions
- https://docs.djangoproject.com/en/5.2/ref/contrib/admin/
- https://docs.djangoproject.com/en/5.2/ref/contrib/admin/actions/
- https://dev.to/rockandnull/effortless-django-model-import-export-from-the-admin-panel-h7p
- https://docs.djangoproject.com/en/5.2/ref/contrib/admin/
- https://www.lune.dev/questions/9016/how-can-i-add-a-custom-django-admin-button-to-import-json-data-for-creating-or-u
- django admin adders
- update fields: