These are chat archives for django/django

18th
Dec 2017
Praful-cs
@Praful-cs
Dec 18 2017 15:51 UTC

@Praful-cs

I need little help with connecting django with SQL server 2008. Can any one please help me with connections settings , requirements and what's steps need to be followed from basic as I am new to django (if any simple example on how to use data from database , test the connection with server and deploy app in production will be great) , never deployed any application in production ( working in mainframes 😉).

I have tried searching on Google for this but didn't find any useful documents / videos related to this. Only got to know about MySQL , ngix, appache etc ..

Also i tried installing pyodbc getting error (pip install pyodbc ) ,I tried all possibilities (error : mircosoft visual c++ redistributial 14.0 required -- I installed this version too) but same error ..little background : python version 3.6, django version : 2.0, sql server 2008 to which i m trying to connect . Don't know if django support MSSQL server 2008 ..do you have any idea?
if any one know about error

Capture2.PNG
Praful-cs
@Praful-cs
Dec 18 2017 15:56 UTC
Capture1.PNG
getting above error
does anybody has any idea???
James Daley
@Ketzalkotal
Dec 18 2017 16:51 UTC
@Praful-cs have you downloaded and installed the odbc driver for windows?
Marios Panagopoulos
@MariosPanag
Dec 18 2017 21:21 UTC
class Favorites(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    collection = models.ForeignKey(Collection, on_delete=models.CASCADE)
can someone tell me how my serializer should be so I can post user_id and collection_id and create a relationship?
Marios Panagopoulos
@MariosPanag
Dec 18 2017 21:44 UTC
nvm i found it