Re: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Yann
but on which method of the class view? the post method? On Feb 16, 12:03 pm, Matt Schinckel wrote: > You can use the @method_decorator decorator decorator. > > https://docs.djangoproject.com/en/dev/topics/class-based-views/#decor... -- You received this message because you

Re: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Matt Schinckel
You can use the @method_decorator decorator decorator. https://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-class-based-views -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Yann
Thanks. But the more important question is how to use commit_on_success with class based view? On Feb 16, 1:52 am, 赵帅 wrote: > The commit_on_success decorator only garrentees that one commit is done > when no exception is raised from the function and rollback if there is

Re: @commit_on_success with Class based view in Django 1.3

2012-02-15 Thread 赵帅
The commit_on_success decorator only garrentees that one commit is done when no exception is raised from the function and rollback if there is any . You have to ensure on your own hand the values in the two tables are equal. 2012/2/15 Yann > Hi, > > In a class view, I am

@commit_on_success with Class based view in Django 1.3

2012-02-15 Thread Yann
Hi, In a class view, I am trying to modify two instances of different models. There are some identical data stored in both tables. They should really be the same in any circumstance . Should I use "@commit_on_success"? If I should, how should i use it for the class based view? Should I do