首页 新闻 会员 周边 捐助

Django问题....

0
悬赏园豆:10 [已关闭问题] 关闭于 2011-10-01 22:35
Traceback (most recent call last):
File "D:\myspace\testone\testone\blog\models.py", line 4, in <module>
class BlogPost(models.Model):
File "F:\Python\Lib\site-packages\django\db\models\base.py", line 52, in __new__
kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range

用django建立个blog...其余都配置好了...结果出现这个问题.

 

models.py代码:

from django.db import models
from django.contrib import admin

class BlogPost(models.Model):
title = models.CharField(max_length=250)
body = models.TextField()
timestamp = models.DateTimeField()

admin.site.register(BlogPost)
Miss_Ay的主页 Miss_Ay | 初学一级 | 园豆:176
提问于:2011-10-01 22:02
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册