[1] http://www.djangoproject.com/documentation/db-api/#get-or-create-kwargs
--
Mfg.
Jens Diemer
----
A django powered CMS: http://www.pylucid.org
The shortcut already exists, it's called save().
http://www.djangoproject.com/documentation/db-api/#how-django-knows-
to-update-vs-insert
Don
One exists as a patch_. I've been using it with the current svn for a
while without problems. I find that an update_or_create() shortcut is
particularly helpful working with newforms and use it in quite a few
places. The patch gets pinged every so often [1]_; it will likely make
it into trunk eventually.
.. patch: http://code.djangoproject.com/ticket/3182
.. [1] http://groups.google.com/group/django-developers/search?group=django-developers&q=3182
- whiteinge