I thought so, have tried so, but got "This code isn't under
transaction management", and opened this thread :)
Environment:
Request Method: GET
Request URL:
http://localhost:8000/
Django Version: 1.2 beta 1
Python Version: 2.6.4
Installed Applications:
['testapp']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware')
Traceback:
File "/usr/lib/python2.6/dist-packages/django/core/handlers/base.py"
in get_response
100. response = callback(request,
*callback_args, **callback_kwargs)
File "/home/idle/projects/gitdev/django-tests/testapp/views.py" in
test
22. transaction.commit(using='test')
File "/usr/lib/python2.6/dist-packages/django/db/transaction.py" in
commit
200. set_clean(using=using)
File "/usr/lib/python2.6/dist-packages/django/db/transaction.py" in
set_clean
125. raise TransactionManagementError("This code isn't under
transaction management")
Exception Type: TransactionManagementError at /
Exception Value: This code isn't under transaction management
On 29 апр, 09:07, Russell Keith-Magee <
freakboy3...@gmail.com> wrote: