【发布时间】:2013-07-29 10:59:36
【问题描述】:
好的,我正在使用此链接编写应用程序:https://docs.djangoproject.com/en/1.5/intro/tutorial02/
整篇文章都说我必须使用我的目录中不存在的 admin.py(它不是创建的)。例如,这里是类
class ChoiceInline(admin.StackedInline):
model = Choice
extra = 3
我在 models.py 中工作。我已将“管理员”一词更改为“模型”一词。
我拥有的进口商品:
from django.db import models
from django.contrib import admin
from django.contrib.auth.models import AbstractUser
Manage.py syncdb 说:
AttributeError: 'module' object has no attribute 'StackedInline'
那我该怎么办?
非常感谢。
附:实际上,我不能只在我的目录中创建 admin.py,对吗?
【问题讨论】:
标签: mysql django django-models django-admin