Closed alendit closed 11 years ago
Ah. That would be so much magic :-)
We already need standard django apps when we have to use django model api with importd. importd basically only gets rid of settings/manage/urls.py.
Can you post some more detail on how it would be done, what you suggested?
You can get the source of the views with inspect.getsource
and render a views.py file from it, but you'll need vanila methods (not wrapped ones) for it. Then, you'll "just" need to generate url.py from the d.urlpattern and settings.py from the settings.
If you think it would be a nice functionality to have, I could look into it.
I really like importd for some prototyping, but for something extensive the standard django structure is still the king.
It would be awesome if you could just run
python app.py convert
and get the usual project structure.Not sure, what the best approach would be here. Some
inspect
-magic, maybe?EDIT: should have been "standard django project" in the title.