when I've got my model.py like below:

from django.db import models
from django.core.files import File
import datetime
from django.utils import timezone

class Video(models.Model):
    title = models.CharField(max_length = 200)
    pub_date = models.DateTimeField('date published')
    video = models.FileField(upload_to = 'videos')

    def __unicode__(self):
        return self.title

and got admin.py like this:
from videopage.models import Video
from django.contrib import admin

admin.site.register(Video)

and I manage.py sql videopage before I ran the server, It' normal at
the main interface, but when I got into the videos page,it went
wrong ,and the page says

DatabaseError at /admin/videopage/video/
no such column: videopage_video.title
Request Method: GET
Request URL:    http://127.0.0.1:8000/admin/videopage/video/
Django Version: 1.4
Exception Type: DatabaseError
Exception Value:
no such column: videopage_video.title
Exception Location:     C:\Python27\lib\site-packages\django\db\backends
\sqlite3\base.py in execute, line 337
Python Executable:      C:\Python27\python.exe
Python Version: 2.7.2
Python Path:
['C:\\Python27\\mysite',
 'C:\\WINDOWS\\system32\\python27.zip',
 'C:\\Python27\\DLLs',
 'C:\\Python27\\lib',
 'C:\\Python27\\lib\\plat-win',
 'C:\\Python27\\lib\\lib-tk',
 'C:\\Python27',
 'C:\\Python27\\lib\\site-packages',
 'C:\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode']
Server time:    Sun, 10 Jun 2012 17:14:43 +0800

how to cope with that?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to