Re:Show HN: Django Model Parsing with Python's AST module
by lmz on Saturday October 13, 2012 @02:31PM
(#4649250)
doesn't that import the modules i.e. execute them?
[ Parent
| on HN ]
Re:Show HN: Django Model Parsing with Python's AST module
by natrius on Saturday October 13, 2012 @02:34PM
(#4649259)
This project is a Python module. It has to be executed at some point. Presumably, you'd generate the SQL locally by running manage.py sqlall, then get the SQL to your database in the appropriate manner. That's the same process the eventual product of this module would require.
Re:Show HN: Django Model Parsing with Python's AST module
by shabble on Saturday October 13, 2012 @11:03PM
(#4650454)
That assumes your end goal is actually using the provided models in your application. It sounds like this is using them as pure data only.
I can think of a couple of reasons why you might want that, maybe if you wanted to create a relationship graph like django-extensions 'graph_models'[1], or build some sort of introspective API scaffold generator or something.
[1] https://github.com/django-extensions/django-extensions/blob/...