2

I have a project that contains work with complex excel file(bank balance sheet), db and web interface. Naturally I would like to design diagram visually to autogenerate sql(Model-First approach in Entity framework), but I was rather surprised and frustrated not to find design surface options in python ORMs.

Is it the case and I left with Code-First option only? That will take a lot of time and effort in my case.

If Django orm and SQLalchemy lack design surface(I hope I'm wrong), what do Python programmers do usually in my case? If they always start with classes that's ok(maybe), but please let me know, because I need to know for sure that Model-first is not used in Python, so my stupid anxiety will go away.

Stan
  • 21
  • 3
  • you are asking about UML? try searching for `uml to django` ... but you can really just design your uml diagram with any of the free tools out there, and pretty easily translate it by hand to django models ... that said i think most django developers just kind of wing it and write classes (but its a great idea to mock up uml) (there are lots of options out there to go the opposite way(ie create UML from django models) – Joran Beasley Dec 28 '18 at 05:46
  • @JoranBeasley Thanks. `uml to django` is pretty much what i was searching. – Stan Dec 28 '18 at 06:41
  • thats strange the first link is a project that purports to do just that ... ahh it looks pretty old ... im not sure if its still works ... I think its probably easiest to just make your uml in some program, and then just convert it by hand to django models. .. – Joran Beasley Dec 28 '18 at 06:42
  • 1
    another option would be to use whatever tool you are talking about that includes this feature to create your db, then use [auto-generate-from-db](https://docs.djangoproject.com/en/2.1/howto/legacy-databases/#auto-generate-the-models) to create the models – Joran Beasley Dec 28 '18 at 06:48
  • @JoranBeasley first link project is indeed rather old, so i'll make models manually from light mockup – Stan Dec 28 '18 at 08:06
  • Related question: https://stackoverflow.com/questions/27361454/creating-pyramid-sqlalchemy-models-from-mysql-database – Stefan Jun 06 '19 at 10:02

0 Answers0