On 6 Jun 2006, at 06:39, Adrian Holovaty wrote:

> * Currently this assumes the model has no field named "defaults". This
> is a bit of a smell. Better solutions?

It could take two dictionaries instead of using keyword arguments:

     obj = Person.objects.get_or_create(
         {'first_name': 'John', 'last_name': 'Lennon',
         {'birthday': date(1940, 10, 9)}
     )

Cheers,

Simon

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to