When you add a new field to a model you currently have to manually add
the field to the database as well.

With webfaction this is easiest to do by using the MysqlAdmin through
their control panel. If you aren't sure what type of field it needs to
be you can run the manage.py sql to get an output of the create table
statements from which you can determine the type of field and other
parameters.

--James


On 9/20/06, Tool69 <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I'm totally new to django, I've made a little blog application and my
> original template is like this one:
>
> class News(models.Model):
>     title = models.CharField(maxlength=255, verbose_name="Titre du
> billet")
>     text = models.TextField(verbose_name="Contenu")
>     keywords = models.CharField(maxlength=255, verbose_name="Mots
> clés")
>     date = models.DateTimeField(verbose_name="Date de publication")
>     etc.
>
> All is getting well but now (runnin it with MySQL on WebFaction), I
> wanted to stick an image with each post, so I added that field to my
> News class :
>
> post_image = models.ImageField(upload_to='entetes/', blank=True,
> help_text="Doit etre de 300px de large")
>
> But now, I received an error message saying :
> (1054, "Unknown column 'news_news.supplementary_image' in 'field
> list'")
>
> What's going wrong ?
> Thanks a lot :
> 6TooL9
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to