Automating the process of creating models from the data file provided

72 views
Skip to first unread message

Abhilasha Jha

unread,
Feb 7, 2019, 6:34:21 AM2/7/19
to Django developers (Contributions to Django itself)
Hi all,
I was thinking if a feature could be added to Django models, such that when the CSV/ text or any other commonly used data file is added to the project and the models are automatically created and populated. I have not tried to go through nitty-gritty of the feature, but am thinking of doing this and contributing to Django, and needed some guidance on same.

Thanking you
Abhilasha

Carlton Gibson

unread,
Feb 7, 2019, 8:58:22 AM2/7/19
to Django developers (Contributions to Django itself)
Hi Abhilasha, 

There's any number of ways you could go... 🙂

But...

Have a look at Simon Willison's Datasette project. 

In particular see the various ...-to-sqlite tools listed here: 

If you can get that far then the existing `inspectdb` tool can get you to model files. 

No doubt you could improve the workflow but that should give you some guide to get started. 

Kind Regards,

Carlton

Collin Anderson

unread,
Feb 7, 2019, 9:44:30 AM2/7/19
to django-d...@googlegroups.com
Hi Abhilasha,

This is ringing a bell. I almost started working on an "inspectfile" feature many years ago as a Google Summer of Code project.



I ended up deciding not to do it, so I don't have much else to offer you for guidance :)

Collin

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/122a2d14-088b-4f9e-9bbc-0ea9dc0c7562%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Abhilasha Jha

unread,
Feb 14, 2019, 2:21:03 PM2/14/19
to Django developers (Contributions to Django itself)
Hi Carlton,
Thanks for the reply, saw it today. Will go through the links you have given.

Best regards
Abhilasha

Abhilasha Jha

unread,
Feb 14, 2019, 2:23:31 PM2/14/19
to Django developers (Contributions to Django itself)
Hi Collin
Thanks for the reply. I will see what I can do, and if this project is worth pursuing.

Best regards
Abhilasha

Reply all
Reply to author
Forward
0 new messages