On 3/20/07, Merric Mercer <[EMAIL PROTECTED]> wrote:
>
> Another observation after more investigation.
>
> I decided to do the following:-
>
> 1. Drop the table (again) from the DB.
> 2. Alter the Model in Django.  This time I deleted one of the original
> fields named "rrp".
>
> Then:-
>
> 1.  I re-ran syncdb.  This confirmed  the creating of a new table in the db
> 2.  I checked  the db and the admin - again both of these showed up
> correctly with all the fields  from my Model.
> 3.  In the shell I then tried to run a query set on the table.   I got
> the following error
>
> " OperationError: (1054, "unknown column 'promotions_product.rrp' in
> field list)"
>
> This was the field that I deleted from the model.
>
> This is making me conclude that django is using two versions of the
> information in my Models.  The updated version is being used to
> correctly update the database and the admin - but the older version is
> being used to run the query sets.

Are you opening a new Python shell (with the myproject.promotions import)
after any of your model/database modifications or have been
maintaining the same shell session open from before you started
these mods?.

Regards,

-- 
 Ramiro Morales

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to