Solved

use mssql with django

Posted on 2014-02-21
12
158 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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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 24

Author Comment

by:dgrafx
Comment Utility
thanks Dave - will check it out
0
 
LVL 24

Author Comment

by:dgrafx
Comment Utility
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
 
LVL 82

Expert Comment

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

Author Comment

by:dgrafx
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 24

Author Comment

by:dgrafx
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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 24

Accepted Solution

by:
dgrafx earned 0 total points
Comment Utility
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 82

Expert Comment

by:Dave Baldwin
Comment Utility
Good for you, glad you figured it out.
0
 
LVL 24

Author Comment

by:dgrafx
Comment Utility
thanks Dave
0
 
LVL 24

Author Closing Comment

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

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…

771 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

11 Experts available now in Live!

Get 1:1 Help Now