MODEL ADMIN IN admin,py
ADMIN.PY:
from django.contrib import admin
from .models import Student
# Register your models here.
class kk(admin.ModelAdmin):
list_display=('id','stuid','name','email','password')
admin.site.register(Student,kk)
MODEL.PY
1.normally likhbo
2.sudhu __str__ method badd debo
from django.db import models
# Create your models here.
class Student(models.Model):
stuid=models.IntegerField()
name=models.CharField(max_length=50)
email=models.EmailField(max_length=50)
password=models.CharField(max_length=50)
Comments
Post a Comment