Thursday, October 29, 2015

Re: MySQL queries-connection to django

So there is any way before creating model we can connect django sql server 2012

On Wednesday, October 28, 2015 at 11:18:37 PM UTC-4, Mike Dewhirst wrote:
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+unsubscribe@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.

--
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-users@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/ac0ee56a-5e78-42db-9c62-33fe5bbefbd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment