Django Admin Créer un superutilisateur
$ python manage.py createsuperuser
Defeated Dog
$ python manage.py createsuperuser
python manage.py createsuperuser
#Put this in your terminal, then input your username, email address, and password twice.
class BookAdmin(admin.ModelAdmin):
readonly_fields = ('id',)
admin.site.register(Book, BookAdmin)
from django.contrib import admin
class BookInline(admin.TabularInline):
model = Book
class AuthorAdmin(admin.ModelAdmin):
inlines = [
BookInline,
]