Hi,

I use apache mod_wsgi (WSGIDaemonProcess) and for development 
maximum-requests=1.

This way I don't need to change any code for reloading: Just hit ctrl-r 
(reload in firefox).

 Thomas

n00m schrieb:
> 1.
> Rename views.py to (say) views_base.py
>
> 2.
> Create a new views.py file, with code like this:
>
>
> import os.path
> import views_base
>
> def test(request):
>     if os.path.isfile(__file__ + '1'):
>         reload(views_base)
>     return views_base.test(request)
>
> def tables(request, table_name=None, cur_page=1):
>     if os.path.isfile(__file__ + '1'):
>         reload(views_base)
>     return views_base.tables(request, table_name, cur_page)
>
> ..............
> ..............
> ..............
>
>
> Idea is straightforward:
>
> functions test, tables etc are from views_base.py (former views.py);
> if exists dummy file views.py1, which existence is a sign of changes
> made in views_base.py, then reload the whole thing
>
> Just put this dummy empty file views.py1 into the dir of views.py
> (if at the time you need no AutoReload just delete or rename it).
>
> Now you can edit your views_base.py and see the changes in action,
> without restarting Web Server (except of args of defs(request, args).
>
> >
>   


-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to