c# .net Adsense ADO.NET Linq Viruses/security asp.net MVC JQuery Angular-js Node-js SEO Java C++ SQL API Networking vb.net .Net Css JavaScript Generics c#.Net entity framework HTML Website host Website Construction Guide HTTP tutorial W3C tutorial Web Services JSON Psychology Ionic framework Angular ReactJS Python Computer Android
Python

ProgrammingError at /admin/ Table 'django_session' doesn't exist python

| | django , python

I got this following error while running django project "ProgrammingError at /admin/ Table 'django_session' doesn't exist".

ProgramminError

SOLUTION:

This error you will get, when you're not migrated the django model.

CODE:

import datetime

from django.db import models
import os
from django.db import models

def getFileName(request,filename):
now_time=datetime.datetime.now().strftime("%Y%m%d%H:%M:%S")
new_filename="%s%s"%(now_time,filename)
return os.path.join('uploads/', new_filename)

class Category(models.Model):
name=models.CharField(max_length=150,null=False,blank=False)
image=models.ImageField(upload_to=getFileName,null=True,blank=True)
description=models.TextField(max_length=500,null=False,blank=False)
status=models.BooleanField(default=False,help_text="0-Show,1-Hidden")
created_at=models.DateTimeField(auto_now_add=True)

def __str__(self):
return self.name
python manage.py makemigrations
python manage.py migrate
After completing migrations create super user
python manage.py createsuperuser


SOLUTION:

pip install matplotlib

VIDEO GUIDE: