Reputation: 61
I am able to follow the instructions for Creation and Activation for Database Model from the book "Django for Beginners" by William S. Vincent. I am able to reach the first image, but then after that 'get' and 'post' requests probably are not working. adding my code for models.py :
from django.db import models
class Post(models.Model):
text = models.TextField()
The following is from admin.py file:
from django.contrib import admin
from .models import Post
admin.site.register(Post)
Upvotes: 0
Views: 170
Reputation: 801
This error occurs when you missed makemigrations or migrate thus the table is not available in the DB itself.
So run the following commands:
If the above didn't work, drop the DB and try these once again.
Upvotes: 1