Sorry. `inspect` -> `inspectdb` .

On Fri, Jan 8, 2016 at 12:54 AM, whycrying <[email protected]> wrote:

> Using django-pyodbc for connecting to SQL Server as Sid said.
>
> Then use the `inspect` management command to build the models ::
>
>     $ python manage.py inspectdb > models.py
>
> via:
> https://docs.djangoproject.com/en/1.8/howto/legacy-databases/#auto-generate-the-models
>
> Modified models generated to fit your styles.
>
>
> On Fri, Jan 8, 2016 at 12:19 AM, Sid <[email protected]> wrote:
>
>> I think if you install sql_server.pyodbc it should be fine
>>
>> UNDER databases in *settings.py *
>> 'default': {
>>         'ENGINE': 'sql_server.pyodbc',
>>         'NAME': '----------',
>>         'HOST': '--------',
>>         'USER': '---------',
>>         'PASSWORD': '---------'
>> documentation: *https://pypi.python.org/pypi/django-pyodbc
>> <https://pypi.python.org/pypi/django-pyodbc>*
>> coding to pull data from sql:
>> * https://code.google.com/p/pyodbc/wiki/Cursor
>> <https://code.google.com/p/pyodbc/wiki/Cursor>*
>>
>> read the documentation for twice you should be fine
>>
>>
>>
>> On Thursday, January 7, 2016 at 10:34:34 AM UTC-5, Gerry Seidl wrote:
>>>
>>> Can someone please provide me the details, or point me to documentation
>>> on how to connect an existing SQL Server database to a new Django app?
>>>
>>> How would the models be built from it?
>>>
>>> Thanks,
>>>
>>> Gerry
>>>
>>>
>>>
>>>
>>>
>>>
>>> --------------------------------------------------------
>>> The information transmitted in this email and any of its attachments is
>>> intended only for the person or entity to which it is addressed and may
>>> contain information concerning Cablevision and/or its affiliates and
>>> subsidiaries that is proprietary, privileged, confidential and/or subject
>>> to copyright. Any review, retransmission, dissemination or other use of, or
>>> taking of any action in reliance upon, this information by persons or
>>> entities other than the intended recipient(s) is prohibited and may be
>>> unlawful. If you received this in error, please contact the sender
>>> immediately and delete and destroy the communication and all of the
>>> attachments you have received and all copies thereof.
>>> --------------------------------------------------------
>>>
>>> ...
>
>
-- 
https://www.zhangkaizhao.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 [email protected].
To post to this group, send email to [email protected].
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/CACKDpmfzDBD96oNZWBdOFn4fG1PFkNq8Rbbndh95b1JG1J%2ByLA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to