Django how to add app model in admin panel

Open admin.py in app folder and past this code

 

from django.contrib import admin

from myapp.models import Person

admin.site.register(Person)

 

Person :- this is a class defined in models  (myapp/models.py)

  Like
Author: bm on July 8, 2014
Category: Python Django

Your comment:

Your Name

Comment:




Last articles