DJango manage.py not running syncdb command and opens up the code editor

I am trying to build a simple blog using DJango, this is my first experience with DJango. So for I have created a simple project by running django-admin.py startproject mysite, ran the dev server (manage.py runserver) and tested it in the web browser, it was running properly.

Now I wanted to create a simple blog, so I did this, manage.py startapp blog, DJango created it successfully. Following is the code for models.py in blog app.

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

After this I created a database file as django.db in mysite directory (using sqlite manager). Then I specified the path for the database file and database engine as sqlite3 inside settings.py.

When I tried to run manage.py syncdb command, nothing happened to the database file, no table is created for models.py, but it opens up the eclipse (using for coding) when I run syncdb command.

Does anyone know what's happening to my project? I am using Windows 7.

链接地址: http://www.djcxy.com/p/59784.html

上一篇: 使用xcodebuild命令行工具控制构建位置

下一篇: DJango manage.py不运行syncdb命令并打开代码编辑器