amitu / importd

django based mini framework inspired from sinatra. fully compatible with django.
http://amitu.com/importd/
BSD 3-Clause "New" or "Revised" License
510 stars 30 forks source link

No reload on file change #3

Closed alendit closed 11 years ago

alendit commented 11 years ago

Since runserver is started by an atexit-hook, the application module is not in sys.modules.

Specifying no_atexit=True and starting server in a if __name__ == "__main__"-clause _handle_management_command("runserver") works as intended.

As awesome as I find the atexit idea, I am not sure, if a more flasky approach with explicit app start would be more useful (and, maybe, more pythonic).

amitu commented 11 years ago

I tried removing atexit, and I do say it feels lot more pythonic now. :-) Does solve reloading issue too.

You like the d.do() and d.main() methods?

alendit commented 11 years ago

Like it very much!