I'm struggling to get a project going. I'm new to python and django.
Is django_pyodbc supported on Python 3.5.1 and django 1.9? If not could you suggest a combination of python & django that is known to work with MS SQL Server 2012?
Here are the details of my virtual environment
windows 7 64 bit,
python 3.5.1 64 bit,
packages installed:
Django (1.9)
django-pyodbc (0.4.1)
pip (8.1.2)
pyodbc (3.0.10)
pywin32 (219)
setuptools (19.1)
wheel (0.26.0)
The database definition in settings.py:
DATABASES = {
'default': {
'ENGINE': 'django_pyodbc',
'HOST': '192.168.10.47',
'PORT': '1433',
'USER': '*********',
'PASSWORD': '*******',
'NAME': 'my_db',
'OPTIONS' : {
'driver' : 'SQL Server Native Client 11.0',
'MARS_Connection' : True,
'driver_supports_utf8' : True,
},
}
}
When I try to run the development server I'm getting these errors:
(my_db) PS F:\my_db\my_db> python .\manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
DRIVER={SQL Server Native Client 11.0};SERVER=192.168.10.47;PORT=1433;UID=*****;PWD=******;DATABASE=my_db;MARS_Connection=yes
Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000000004000D90>
Traceback (most recent call last):
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\commands\runserver.py", line 117, in inner_run
self.check_migrations()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\core\management\commands\runserver.py", line 163, in check_migrations
executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\executor.py", line 20, in __init__
self.loader = MigrationLoader(self.connection)
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\loader.py", line 49, in __init__
self.build_graph()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\loader.py", line 176, in build_graph
self.applied_migrations = recorder.applied_migrations()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\recorder.py", line 65, in applied_migrations
self.ensure_schema()
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\migrations\recorder.py", line 56, in ensure_schema
with self.connection.schema_editor() as editor:
File "C:\Users\eroberts\AppData\Local\Programs\Python\Python35\lib\site-packages\django\db\backends\base\base.py", line 604, in schema_editor
'The SchemaEditorClass attribute of this database wrapper is still None')
NotImplementedError: The SchemaEditorClass attribute of this database wrapper is still None
an email to django-users+unsubscribe@googlegroups.com
<mailto:django-users+unsubscrib...@googlegroups.com>.
To post to this group, send email to django...@googlegroups.com
<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/90dab5d0-2f51-4bab-8b93-bdb6e507d6c6%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/90dab5d0-2f51-4bab-8b93-bdb6e507d6c6%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/69a83296-7540-755f-898c-241a831cb6bf%40dewhirst.com.au.
Hi Mike,
Hi John,
PS F:\my_db\my_db> .\env\Scripts\Activate.ps1(env) PS F:\my_db\my_db> pythonPython 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> import pyodbc>>> cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=***;PORT=1433;DATABASE=my_db;UID=*****;PWD=*****')>>> cursor = cnxn.cursor()>>> cursor.execute("select name,siteid from cpd_customer")<pyodbc.Cursor object at 0x00000000028003F0>>>> row=cursor.fetchone()>>> row('A***, *****', '000****1')>>> row=cursor.fetchone()>>> row('A******', '0011****1')>>> row = cursor.fetchone()>>> row[0]'A******'>>> row[1]'0011****1'>>> row.name'A******'>>> row.siteid'0011****1'>>>
Django (1.9.9)
django-pyodbc-azure (1.9.9.0)
pip (8.1.2)
pyodbc (3.0.10)
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'HOST': '192.168.**.**',
'PORT': '1433',
'USER': '*******',
'PASSWORD': '******',
'NAME': 'mydb',
}
}
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d138baf7-f035-4b28-b6ab-0c279dbf5c0a%40googlegroups.com.