Tuesday, May 22, 2018

Re: Open Sqlite database file directly in django

Thanks for the tip, I didn't notice this management command before.


Eric


From: django-users@googlegroups.com <django-users@googlegroups.com> on behalf of Vinicius Assef <viniciusban@gmail.com>
Sent: Tuesday, May 22, 2018 6:56:20 PM
To: django-users@googlegroups.com
Subject: Re: Open Sqlite database file directly in django
 
It depends.

If tables have always the same schema and only their data is
different, you can use `manage.py inspectdb` [0] to create models and
develop your views.


[0] https://docs.djangoproject.com/en/2.0/ref/django-admin/#inspectdb



On 22 May 2018 at 11:01, PASCUAL Eric <eric.pascual@cstb.fr> wrote:
> Re,
>
>
> But you'll not be able to access the sqlite DB through Django models, since
> it will not have the proper schema.
>
>
> Eric
> ________________________________
> From: PASCUAL Eric
> Sent: Tuesday, May 22, 2018 3:59:35 PM
> To: Django users
> Subject: Re: Open Sqlite database file directly in django
>
>
> Hi Jaiswal,
>
>
> You can use the Python sqlite3 standard lib for opening this database and
> manipulate it, and then display data using views written with Django.
>
>
> Eric
>
> ________________________________
> From: django-users@googlegroups.com <django-users@googlegroups.com> on
> behalf of Sourabh Jaiswal <sourabhjaiswal92@gmail.com>
> Sent: Tuesday, May 22, 2018 8:02:03 AM
> To: Django users
> Subject: Open Sqlite database file directly in django
>
> Hi,
>
> Is there any way to open sqlite db directly in django.
>
> I am working on an application for which a back end script creates a
> database for every execution.
> The database consists of multiple tables and I have to show those tables on
> the web site made in django.
>
> Is there any other way around for this?
>
> Any help will be greatly appreciated.
>
> Thanks,
> Jaiswal.
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d24eda2f-8051-42eb-9081-b986dfd234c3%40googlegroups.com.
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/DB7P193MB0331365FA7C61731D9F3F0D68C940%40DB7P193MB0331.EURP193.PROD.OUTLOOK.COM.
>
> 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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFmXjSBwpOAXa-ZsAj8kZnvVetjrodkaeaXssc4B2-FerjcHnA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment