Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:22:10+00:00 2026-06-17T04:22:10+00:00

I have read Django transactions and going to use it in my project but

  • 0

I have read Django transactions and going to use it in my project but here are few questions that I want to know about it. Actually I want transactions to use while registration, I am doing insert at 2-3 places while registration, so I want that if any query fail, then no insertion should be performed. So according to Django docs, I guess I need to use commit_on_success type of transaction.

But I want to know is these transactions dependents on Database or it is all internal of Django? Whether I need to change DB storage engine for it or not? What if I will have to use it on different storage engines or even in future different Database like one table in SQL and one in nosql? Or this just don’t matter?

Also if I will be using it like:

from django.db import transaction

def function1():
    #code here without transaction

@commit_on_success
def function2():
    #code here with transaction

Then function 2 will work with commit if all method code will be successful but what will happen with function1 as before it transaction is imported? What type of transaction will be applied on function1 ? I want function1 to not have any transaction but to behave normally as it work in other model of form code so what should I do?

So my questions are that what to do have every thing behave normally without transactions but having one method with transaction? Will it work by using decorator and other methods will behave normally or I will need to do something else? And do these transactions depends upon database and database storage engine like InnoDB too these transactions are just Django internal transactions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:22:11+00:00Added an answer on June 17, 2026 at 4:22 am
    • Django uses DB transactions.
    • You don’t need to change DB storage engine.
    • Not all DB engines are transactions capable
    • If you use transaction management while your DB engine doesn’t support it (eg MySQL with MyISAM tables) everything still works, without transactions.

    I.e. it is safe to use @commit_on_success in one method. Nothing will break if you will change to DB without transaction support in future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read few articles about table partioning but still I am bit confused
I have read some of the questions and answers here, but it none match
I have read other questions on this topic but none that actually answers my
I have read in a several places (e.g. here ) that I can use
I have read many answers to questions about dynamically resizing NSWindows and nothing has
I have read Django - CSRF verification failed and several questions (and answers) related
I have read the Django documentation (For reference, https://docs.djangoproject.com/en/1.3/intro/tutorial01/ ), but I'm still having
I have read under SDK release notes 1.7.3 that GAE supports Django 1.4. I
I am starting to use Django and while I have read the book and
I want to use Django admin to browse and existing database but I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.