Re: import my data and generating models.py

2020-06-18 Thread Mohsen Pahlevanzadeh


On Friday, June 19, 2020 at 10:36:11 AM UTC+4:30, Mohsen Pahlevanzadeh 
wrote:
>
> Hello,
>
> I have two sql files : 1.creating tables 2.INSERT data
>
> Now I want to import to my database and generating my models.py according 
> to my sql files.
>
> Is it possible?
>
>
> if true, please guide me.
>



You can use ./manage.py  inspectdb 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/06538393-59ea-45a0-a5bb-80fbfe9dd3c7o%40googlegroups.com.


Re: import my data and generating models.py

2020-06-18 Thread RANGA BHARATH JINKA
Hi,

Try this.
https://simpleisbetterthancomplex.com/packages/2016/08/11/django-import-export.html

https://docs.djangoproject.com/en/3.0/howto/initial-data/

https://django-import-export.readthedocs.io/en/latest/getting_started.html

On Fri, Jun 19, 2020 at 11:37 AM Mohsen Pahlevanzadeh <
m.pahlevanza...@gmail.com> wrote:

> Hello,
>
> I have two sql files : 1.creating tables 2.INSERT data
>
> Now I want to import to my database and generating my models.py according
> to my sql files.
>
> Is it possible?
>
>
> if true, please guide me.
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7dc184da-2dac-4f9a-940c-6ddeefdad86ao%40googlegroups.com
> 
> .
>


-- 
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK5m314E_%3D73XOe4h45%3DoAKDqDM7%2Bwg0-1nSAH_4dunP3m94FQ%40mail.gmail.com.