.save() is not working for me either with models or with forms in
django.

I'll start with a simple example, on a single non related table.

from views.py

def testit():
    from myproject.models import NewCust
    p1 = NewCust()              ## Create blank instance
    p1.zipcode = '2222222' ## Load something into it.
    p1.last_name = 'Smith'
    p1.save()                          ## Save it

In Django this does not work.

Now from the Python command line
it works like clockwork.

>>>    from myproject.models import NewCust
>>>    p1 = NewCust()              ## Create blank instance
>>>    p1.zipcode = '2222222' ## Load something into it.
>>>    p1.last_name = 'Smith'
>>>    p1.save()                          ## Save it
...creates a record every time...

My attempts to get this to work have included deleting
NewCust from my PostGres SQL tables and revalidating
and recreating them via manage.py to make sure their
is not problem in the table.

I'm baffled why this simple data operation as outlined in
Django Chapter 5 - Interacting with a Database does not
work in this case.

Any clues appreciated.

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