1

Hello I am new to using Django and would like to create a datatable with data that is stored in a database of an MSSQL server. I have managed to connect Django via django_mssql but I do not know how to access a table since there are many in the database. Thanks for your help.

FlipperPA
  • 13,607
  • 4
  • 39
  • 71
Hugo Alain Oliva
  • 237
  • 1
  • 10
  • take a look at django tutorial, it has object database mapping so there is no need to access table, you just fetch all objects of given type and it takes care of accessing for you https://docs.djangoproject.com/en/1.11/topics/db/queries/ – cerkiewny Jul 04 '17 at 14:26
  • I would also recommend taking a look at `django-pyodbc-azure`, which works for both SQL Server and Azure. In my experience, it is the best maintained SQL Server engine for Django. https://github.com/michiya/django-pyodbc-azure – FlipperPA Jul 04 '17 at 15:47
  • Thanks for your help guys got it to work – Hugo Alain Oliva Jul 11 '17 at 12:47

1 Answers1

0

first configure your db in Django setting and then read this docfile https://docs.djangoproject.com/en/1.11/howto/legacy-databases/

Mauricio Cortazar
  • 4,049
  • 2
  • 17
  • 27