Solved

use mssql with django

Posted on 2014-02-21
12
161 Views
Last Modified: 2014-03-02
i'm brand new - still installing

how do i "install" the ability to use an mssql db?
0
Comment
Question by:dgrafx
  • 7
  • 5
12 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39877447
You would apparently have to write your own interface code because it is not one of the 'supported' databases.  https://docs.djangoproject.com/en/1.6/topics/install/#database-installation

Looks like someone else may have already done that:  http://django-mssql.readthedocs.org/en/latest/
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39877468
thanks Dave - will check it out
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39877482
Dave - earlier before you posted I was reading the docs and came across code like this:
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'mydatabase'
    }
}

WHERE can i find this code?
Is this a python file? extension of .py?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39877668
SQLite comes with Django.  See here for more info: https://docs.djangoproject.com/en/1.6/ref/settings/#std:setting-DATABASES
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39877834
Dave
What i mean is where are the files that code like this is in?
They appear to be config files - where are they?

I didn't mean what is SQlite.

as i said in the beginning i am brand new to django and also python.
i don't know anything.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39877906
Then you need to first go thru the installation procedure and then do the tutorial.  There is too much to answer here and the docs are your best friend for this.

https://docs.djangoproject.com/en/1.6/intro/install/

https://docs.djangoproject.com/en/1.6/intro/tutorial01/
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39877949
Dave
I have Django 1.7 & Python 3.3 installed already.

What I'm doing now is asking questions where I'm having difficulty.
I already have link to online docs ...
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39878166
The install instructions and the tutorial answer the questions you've asked so far including where to put the files and where that database directive goes.  I even found the 'alternate' database info there when I looked again.  You should install and run the tutorial to get a better understanding.
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 0 total points
ID: 39887475
The problem was that the 3.x versions of Python don't seem to work with the Django-mssql package.
And since I am a complete newb I didn't know what I was doing wrong or what instructions I was misreading.
So I uninstalled and started from scratch using Python 2.7 and zero issues getting everything installed - distribute - pip - django - mssql
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 39887542
Good for you, glad you figured it out.
0
 
LVL 25

Author Comment

by:dgrafx
ID: 39887545
thanks Dave
0
 
LVL 25

Author Closing Comment

by:dgrafx
ID: 39898369
This is the solution to why I couldn't get mssql installed
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show the steps for installing Python on Ubuntu Operating System. I have created a virtual machine with Ubuntu Operating system 8.10 and this installing process also works with upgraded version of Ubuntu OS. For installing Py…
Introduction On September 29, 2012, the Python 3.3.0 was released; nothing extremely unexpected,  yet another, better version of Python. But, if you work in Microsoft Windows, you should notice that the Python Launcher for Windows was introduced wi…
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now