Reputation: 113
OK, I`m writing an app using this link: https://docs.djangoproject.com/en/1.5/intro/tutorial02/
The whole article says that I must work with admin.py which does not exist in my directory (it wasn`t created). For example, here is the class
class ChoiceInline(admin.StackedInline):
model = Choice
extra = 3
I work in models.py. I`ve change the word 'admin' to a word 'models'.
Imports I have:
from django.db import models
from django.contrib import admin
from django.contrib.auth.models import AbstractUser
Manage.py syncdb says:
AttributeError: 'module' object has no attribute 'StackedInline'
So what should I do?
Thanks a lot.
P.S. Actually, I couldn`t just create admin.py in my directory, could I?
Upvotes: 0
Views: 99
Reputation: 397
I`ve change the word 'admin' to a word 'models'.
You should not do that.
Upvotes: 0