I am trying to register my model into the admin view using the code:
from django.contrib import admin from mysite.polls.models import Choice, Question # Register your models here. admin.site.register(Question) admin.site.register(Choice)
But i am getting the error: (mysite is the project name and polls is the app name)
from mysite.polls.models import Choice, Question ModuleNotFoundError: No module named 'mysite.polls'
I am following the 3.1 documentation which tells us to use:
from django.contrib import admin from myproject.myapp.models import Author admin.site.register(Author)
While registering your model in admin.py