python mysite/manage.py inspectdb > mysite/myapp/models.pyYou can then clean up the result as explained in chpt 18 of the Djangobook: http://www.djangobook.com/en/2.0/chapter18.html
Recursive algorithms can be slow because they end up solving the same little problems over and over again. To speed them up, you can use a technique called "memoization." Memoization allows algorithms go much more quickly by remembering solutions to problems they have already solved. I’m the recursive algorithm. This blog is my memoization.
Friday, November 28, 2014
cool tool in django: inspectdb
Say you have a legacy database and you want to put django on top of it. One line will construct python models for the database structure:
Labels:
awesomeness,
databases,
django,
legacy code,
python
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment