On Tue, Oct 21, 2008 at 6:55 AM, Micha Pietsch <[EMAIL PROTECTED]> wrote:

>
> Hi,
> I've got a model "Note" with a DateTimeField "updated". I ran dbsync and
> entered some data but making the query
> "n = Note.objects.filter(owner=request.user.id
> ).exclude(updated__tle=datetime.datetime.now())"
> tells me that "updated" is "not defined". Without the exclude statement it
> works, I also imported "datetime".
> Anybody got an idea of what could be the problem?
>

It is a little hard to be sure because your problem description is not very
precise.

It is unclear if you created a model Note with a field named updated, or
added a field named updated to an existing model Note.  If the latter,
syncdb would not do anything -- syncdb only creates tables, it does not make
changes like adding/changing/removing columns.

The actual error you received (including traceback) would make it clear if
this was the problem, since it would show if it was the database or Django
code that objected to "updated" on the grounds it was "not defined".  This
condensing of the actual error you see into summary form makes it hard to
tell where it is really coming from, though.

Karen

--~--~---------~--~----~------------~-------~--~----~
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