Hi Chris,

please explain in more depth what you want to do. If you
do rollback, all changes won't be written to the database. Even
all savepoints won't be stored.

Why do you want to rollback? If you want your changes
to get saved, you need to call transaction.commit() at the end.

ChrisStoyles schrieb:
> Hi All,
> 
> I just wanted to quickly reach out to the group for ideas as to why I
> cannot get this to work:
> 
> @transaction.commit_manually
> def some_view(request):
>     # some view logic goes here
> 
>     sid = transaction.savepoint()
>     le = models.LogEntry()
>     le.message = 'A test log message'
>     le.save()
>     transaction.savepoint_commit(sid)
> 
>     transaction.rollback()
> 
> My database back end is Postgres 8.3 and the engine I am using is
> postgresql_psycopg2. Any ideas as to why my LogEntry would not be
> committed to the database? I am not getting any exceptions being
> raised, the code executes as though it has all worked perfectly.


-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to