Answer the question
In order to leave comments, you need to log in
The model does not appear in the admin panel?
#models.py
from django.db import models
class Articles(models.Model):
title=models.CharField(max_length=120)
post=models.TextField()
date=models.DateTimeField()
def __str__(self):
return self.title
class Projects(models.Model):
title=models.CharField(max_length=120)
post=models.TextField()
date=models.DateTimeField()
def __str__(self):
return self.title
class Proj(models.Model):
title=models.CharField(max_length=120)
post=models.TextField()
date=models.DateTimeField()
def __str__(self):
return self.title
#admin.py
from django.contrib import admin
from news.models import Articles,Projects,Proj
admin.register(Articles)
admin.register(Projects)
admin.register(Proj)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question