Hi Tom,
Thanks a lot for your efforts. It worked with savepoint called before
update query.
Thank you
Regards,
Simran
On Monday, May 11, 2015 at 4:27:50 PM UTC+5:30, Simran Singh wrote:
>
> I am really new to Django and I am using Django 1.8. Many of the
> manual_transaction features have be
Hi James,
Yes, it workedd :)
I created the object outside the method and called it at every transaction
point in the loop and when there is rollback, it rollbacks all the queries.
Thanks James
Regards,
Simran
On Monday, May 11, 2015 at 4:27:50 PM UTC+5:30, Simran Singh wrote:
>
> I am really
Did you try changing the position of the save point like I mentioned?
-James
On May 13, 2015 9:33 PM, "Simran Singh" wrote:
> Hi James,
>
> Thanks for your feedback. I basically want to rollback that query where I
> update the db. Basically I want to rollback all the updates that were made
> dur
Hi James,
Thanks for your feedback. I basically want to rollback that query where I
update the db. Basically I want to rollback all the updates that were made
during that transaction. Tried out the method of custom Exception as
suggested by Tom but somehow my bad luck that it is still not worki
Hi Tom,
I tried the code that you posted but somehow it is giving*
UnexpectedNoAssetSpecificationException at /reservation/ *error. I am not
sure but when this exception is raised, then control is not going to
class UnexpectedNoAssetSpecificationException(Exception):
pass
and when it goes
> asset_spec =
AssetSpecification.objects.filter(asset_id_id=inventory,utilized_value=0).values_list('asset_id',
flat=True)
> trans = transaction.savepoint() // Here I am trying
not to commit the code and store it in transaction.
>
> if
Hi Tom,
All these conditions are to be verified before data received from the form
is saved in database.
I tried this Exception method but when the control goes to except block,
new page is rendered but *all the transactions that were completed till
this point are committed after this point*.
On Wed, May 13, 2015 at 9:37 AM, Simran Singh
wrote:
> Tom, basically I want to discard everything that is stored in
> transaction.savepoint. As per my current case, it is getting committed no
> matter where the flow goes.
Yes, so you don't want savepoints. Savepoints are for rolling back a
*subs
Tom, basically I want to discard everything that is stored in
transaction.savepoint. As per my current case, it is getting committed no
matter where the flow goes.
Regards,
Simran
On Monday, May 11, 2015 at 4:27:50 PM UTC+5:30, Simran Singh wrote:
>
> I am really new to Django and I am using Dj
On Wed, May 13, 2015 at 6:36 AM, Simran Singh
wrote:
> Hi Tom,
>
> If you see then in if block, I am creating my savepoint. At any point of
> time, if the condition is not met and control goes to else block then I want
> to rollback all the changes that are saved in transaction and redirect it to
Hi Tom,
If you see then in *if *block, I am creating my savepoint. At any point of
time, if the condition is not met and control goes to *else* block then I
want to rollback all the changes that are saved in transaction and redirect
it to some other page and not commit anything to db. I am able
On Tue, May 12, 2015 at 7:47 AM, Simran Singh
wrote:
> Thanks Tom for your response. I am attaching piece of code of what I have
> done. I hope this could help.
>
> @transaction.atomic(None, True)
> def reservation(request):
>
> if request.method == 'POST':
> reservation_form = Reserva
Thanks Tom for your response. I am attaching piece of code of what I have
done. I hope this could help.
@transaction.atomic(None, True)
def reservation(request):
if request.method == 'POST':
reservation_form = ReservationForm(request.POST)
if reservation_form.is_valid():
On Mon, May 11, 2015 at 11:44 AM, Simran Singh
wrote:
> I am really new to Django and I am using Django 1.8. Many of the
> manual_transaction features have been depreciated in this. I have used
> @transaction.atomic(None, True)
nit; these are the defaults. You might as well just say:
@transact
14 matches
Mail list logo