I edited a model in django and as a result I get the error: "table reserve_time has no column named reservation" for the below models:
from django.db import models
import datetime
class Club(models.Model):
establishment = models.CharField(max_length=200)
address = models.CharField(max_length=200)
def __unicode__(self):
return self.establishment
class Day(models.Model):
club = models.ForeignKey(Club)
day = models.DateField('day')
def __unicode__(self):
return unicode(self.day)
class Court(models.Model):
club = models.ForeignKey(Club)
day = models.ForeignKey(Day)
court = models.IntegerField(max_length=200)
def __unicode__(self):
return unicode(self.court)
class Time(models.Model):
club = models.ForeignKey(Club)
day = models.ForeignKey(Day)
court = models.ForeignKey(Court)
time = models.TimeField('time')
reservation = models.CharField(max_length=200)
def __unicode__(self):
return unicode(self.time)
I ran python manage.py syncdb and python manage.py runserver after, but I still get the above error. Any ideas on how to fix this? If I remove the "reservation" field, it works fine. In the admin, the textbox for "reservation" appears but the error comes up when I try save.