Given the next example, i was expecting to see printed the new value
of obj.casa and the last comment, but instead i have the new value of
obj.casa but the penultimate comment.

class JuegoAdmin(admin.ModelAdmin):

    ...

    def save_model(self, request, obj, form, change):

        obj.save()

        bns = obj.breaknew_set.all()
        bn = bns[len(bns) - 1]

        print obj.casa
        print bn.comment

Note too the way a obtained the last breaknew. I tried bns[-1] but it
raise an AssertionError (Negative indexing is not supported).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to