Giter VIP home page Giter VIP logo

Comments (6)

dlo avatar dlo commented on June 12, 2024

Interesting. Besides syncdb, what other ramifications does this change have?

from django-pyodbc.

markhepburn avatar markhepburn commented on June 12, 2024

Good question; I'm not 100% sure about all of it. I just had a skim through a couple of management commands (eg, loaddata as well), but I can't actually see how it works. They call transaction.commit_unless_managed(), but I don't otherwise see where it would get committed! (I did a quick test with 1.5, and even explicitly setting autocommit to False syncdb will still create tables). I think I've just confused myself.

from django-pyodbc.

8one6 avatar 8one6 commented on June 12, 2024

I think I'm having this exact issue. Everything worked great for me under 1.5 (and django-pyodbc 0.2). But after upgrading to 1.6 and 0.2.3, it's all gone to crap. syncdb looks like its doing fine. But no tables created. Was there a quick fix with a setting somewhere?

from django-pyodbc.

markhepburn avatar markhepburn commented on June 12, 2024

@8one6 I'm relying on my notes now because I haven't touched that in a while (and I switched to using django-pyodbc-azure for our purposes anyway), but I think adding

    'OPTIONS': {
        'autocommit': True
    }

should be enough.

from django-pyodbc.

8one6 avatar 8one6 commented on June 12, 2024

Which version of Django are you using? Out of curiosity, why the switch to django-pyodbc-azure? I'm mostly trying to sort out the pros and cons of various approaches for getting things to work smoothly with multiple databases.

from django-pyodbc.

markhepburn avatar markhepburn commented on June 12, 2024

I was using Django 1.6.

I was writing a geodjango driver for SQL Server, and wanted to support SQL Azure as well -- plus the autocommit issue I discovered here and django-pyodbc-azure just worked for my particular configuration. It was a little while ago so I don't recall any other details, I'm sorry.

from django-pyodbc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.