python - How to create a table and its related model.py automatically from a csv file in Django -
Think about this:
You create some kind of CMS, which gives you an application Name for the name and a CSV file for that application then automatically creates that app on the flyer, making the necessary model.py depending on the CSV column The admin page is activated for this and allows you to get full permission from this new table through the DEGENGO only. Administrator then adds this application to url.py and creates a vera package for this too.
Then what you have to do, upload a CSV, give your app and name! , You have an admin page to play.
Now, is there any way to make any app or at least one model / django out of a csv file or is there any django-app that can do this?
Note: (./manage.py Observatory> models.py)
Although this is not included to create a real models.py and applications, you may want to look into it. You can have "meta" models that store information on dynamic models, and then import your CSV view data into those models, create classes, and register them with the administrator or something like that.
Creating a real application directory with models.py, views.py, and so on is quite easy (just create a directory, create a file, and write formatted strings to them based on CSV data) Editing the project settings.py and urls.py, and reloading the module, will not be too difficult either. But, I will count on automatically generated Django applications without looking.
Comments
Post a Comment