How to reload Django models without losing my locals in an interactive session?

Posted by Gj on Stack Overflow See other posts from Stack Overflow or by Gj
Published on 2010-04-20T18:32:38Z Indexed on 2010/04/20 18:33 UTC
Read the original article Hit count: 272

Filed under:
|
|
|

I'm doing some research with an interactive shell and using a Django app (shell_plus) for storing data and browsing it using the convenient admin.

Occasionally I add or change some of the app models, and run a syncdb (or South migration when changing a model). The changes to the models don't take effect in my interactive session even if I re-import the app models. Thus I'm forced to restart the shell_plus and lose my precious locals() in the process.

Is there any way to reload the models during a session? Thanks!!

© Stack Overflow or respective owner

Related posts about python

Related posts about django