Django Admin - Administration Module - 08

The next step once the master template is registered is to register the models in Django admin so that we can manage them, that is, be able to create some example Data. So for that we start from what we have already done; we create the superuser:

$ python manage.py createsuperuser

We then proceed to register some models to be able to use Django Admin:

mystore\elements\admin.py

from django.contrib import admin

from .models import Element, Category, Type

# Register your models here.
admin.site.register(Element)
admin.site.register(Category)
admin.site.register(Type)

I agree to receive announcements of interest about this Blog.

Let's assign the models and create the superuser.

- Andrés Cruz

En español

This material is part of my complete course and book; You can purchase them from the books and/or courses section, Curso y Libro desarrollo web con Django 5 y Python 3 + integración con Vue 3, Bootstrap y Alpine.js.