1. I have this problem with DB records. I get the record from the DB like this;

def bolgeTextProcess(request, bolge, edit=None):
[......]
                if not errors:
                        try:
                                p = BolteText.objects.get(Id=edit)
                        except:
                                p = BolgeText()
                                p.TarihYarat=date.today().isoformat()
                                p.Durum=0
[.....]

but when I save this instance it creates a new record instead of updating it.

2. When I request the records from DB, I have to rewrite the default values one by one, doesn't django have a simple converter for this? All I want to do is something like;

convertToDefaults(BolgeText.objects.get(Id=edit)

Thanks.

--
Omer Barlas
omer.bar...@gmail.com

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-us...@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