Django

Code

Changeset 2728

Show
Ignore:
Timestamp:
04/23/06 16:21:51 (3 years ago)
Author:
adrian
Message:

magic-removal: Fixed #1674 -- Generic update_object() view now handles PKs named something other than 'id'

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/views/generic/create_update.py

    r2701 r2728  
    102102        raise Http404, "No %s found for %s" % (model._meta.verbose_name, lookup_kwargs) 
    103103 
    104     manipulator = model.ChangeManipulator(object.id, follow=follow) 
     104    manipulator = model.ChangeManipulator(getattr(object, object._meta.pk.name), follow=follow) 
    105105 
    106106    if request.POST: