MySQL queries-connection to django

49 views
Skip to first unread message

Sid

unread,
Oct 28, 2015, 7:17:37 PM10/28/15
to Django users
I am new to DJANGO...
so i have installed django,python and using Visual studio as interface,
so my question is I have database name :siddharth  in sql server: 63-W7-MJ021R04\ALMDATA i want to connect my database(siddharth) to django using settings.py, But i am not understanding how to do it
There are any other installations I have to do it to connect or I can use my database directly.
Can anyone please tell me the procedure it wil be very helpful

Your help is much appreciated.
Thanks

Mike Dewhirst

unread,
Oct 28, 2015, 11:18:37 PM10/28/15
to django...@googlegroups.com
On 29/10/2015 7:00 AM, Sid wrote:
> I am new to DJANGO...

You can connect to your database using Django but first Django needs to
have a model of each table in your database so it knows what to look
for. https://docs.djangoproject.com/en/1.8/howto/legacy-databases/

There is a management command which will analyse your database and
automatically create those models.
https://docs.djangoproject.com/en/1.8/howto/legacy-databases/#auto-generate-the-models

But if you are new to Django it would be best to come up to speed with a
broader knowledge of the way things work. There is an excellent tutorial
... https://docs.djangoproject.com/en/1.8/ ... which will take you step
by step through the general learning curve.

Welcome and good luck

Mike


> so i have installed django,python and using Visual studio as interface,
> so my question is I have database name :*siddharth* Â in sql server:Â
> *63-W7-MJ021R04\ALMDATA* i want to connect my database(siddharth) to
> django using settings.py, But i am not understanding how to do it
> There are any other installations I have to do it to connect or I can
> use my database directly.
> Can anyone please tell me the procedure it wil be very helpful
>
> Your help is much appreciated.
> Thanks
>
> --
> 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...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/11363af6-28e1-43e4-bbad-40aea634e23c%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/11363af6-28e1-43e4-bbad-40aea634e23c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Sid

unread,
Oct 29, 2015, 9:41:40 PM10/29/15
to Django users
So there is any way before creating model we can connect django sql server 2012

Dheerendra Rathor

unread,
Oct 29, 2015, 9:53:34 PM10/29/15
to Django users
Hi, Django docs discuss about mysql connection here https://docs.djangoproject.com/en/1.8/ref/databases/#mysql-db-api-drivers

> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.com>.
--
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...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages