Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread lingrlongr

Are we still on this!?!?  There are SPAM filters (like Spam Assassin)
that automatically add this in the subject if it this an email is
SPAM.  Relax!

On Sep 14, 9:19 pm, n00m <[EMAIL PROTECTED]> wrote:
> Next time you open your own thread
> let me know:
> I'll mark it as ***SPAM***
> and we'll see how tolerant *you* are.
>
> On Sep 15, 1:47 am, Martin Diers <[EMAIL PROTECTED]> wrote:
>
> > Chill out. It's a personal website - no product being sold or  
> > advertised.
>
> > If this group were moderated, you would no doubt be bounced for that  
> > comment. If you treat others here with such disdain, do not expect to  
> > be treated any better.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread n00m


Next time you open your own thread
let me know:
I'll mark it as ***SPAM***
and we'll see how tolerant *you* are.


On Sep 15, 1:47 am, Martin Diers <[EMAIL PROTECTED]> wrote:

> Chill out. It's a personal website - no product being sold or  
> advertised.
>
> If this group were moderated, you would no doubt be bounced for that  
> comment. If you treat others here with such disdain, do not expect to  
> be treated any better.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Martin Diers

On Sep 14, 2008, at 12:59 PM, n00m wrote:

>
> What is the http://www.thomas-guettler.de/?
>
> Remove from your sig this link to your f**king spam-like site.
>
> On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>> Thomas Guettler,http://www.thomas-guettler.de/
>

Chill out. It's a personal website - no product being sold or  
advertised.

If this group were moderated, you would no doubt be bounced for that  
comment. If you treat others here with such disdain, do not expect to  
be treated any better.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Steve Holden

Steve Holden wrote:
> n00m wrote:
>> What is the http:[...]?
>>
>> Remove from your sig this link to your f**king spam-like site.
>>
>> On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>>   
>>> Thomas Guettler[...]
> If you think it's spam, why add another link to Google by quoting the
> URL (twice) in your message?
> 
Aah, don't you just love the days you make the same mistake you
criticize other people for?
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread Steve Holden

n00m wrote:
> What is the http://www.thomas-guettler.de/?
>
> Remove from your sig this link to your f**king spam-like site.
>
> On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
>   
>> Thomas Guettler,http://www.thomas-guettler.de/
If you think it's spam, why add another link to Google by quoting the
URL (twice) in your message?


regards
 Steve


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-14 Thread n00m

What is the http://www.thomas-guettler.de/?

Remove from your sig this link to your f**king spam-like site.

On Sep 12, 4:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Thomas Guettler,http://www.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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m


On Sep 12, 8:04 pm, David Thole <[EMAIL PROTECTED]> wrote:
> Just curious,  are you using the django built in web server for
> development?  The reason why I'm asking is because I don't recall
> having any problems at all when changing a view and it not picking up
> the change.  Every time I save a file, the build in web server
> automatically updates it.
>
> If you're using apache - do you mind if I ask what advantages you have
> with Apache that the built in web server doesn't have?  Not
> questioning, just very curious is all.
>
> -Davidhttp://www.thedarktrumpet.com

Of course, I know the built-in web server (and its
autoreloading mechanics) but I use Apache (+ mod_python)
instead, mostly for to keep my eye on how css works etc.
Moreover, for me it's not a hard deed to click on "Restart"
in Apache's icon in systray.
But how can I do that on an hoster's machine if I want to
see changes in my views_.py right here, right now?

PS I'm quite aware of option MaxRequestsPerChild, but
again it's not for hosting environment, it's for "home" use.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread Graham Dumpleton



On Sep 12, 11:36 pm, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I use apachemod_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).

I would recommend against maximum-requests=1 for mod_wsgi daemon mode.
This will give worse performance than Python development server.

Read:

  http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode

In there you will see that for mod_wsgi daemon mode, to cause a
restart you just need to touch the WSGI script after having made a set
of changes.

If you are too lazy to touch the WSGI script file, then see the in
process restart monitor in section 'Restarting Daemon Processes'. With
this, at least it only restarts when code changes and not on every
request regardless of whether a change is made or not.

Graham

>  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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread James Matthews
He might be using --no-reload

On Fri, Sep 12, 2008 at 10:04 AM, David Thole <[EMAIL PROTECTED]> wrote:

>
> Just curious,  are you using the django built in web server for
> development?  The reason why I'm asking is because I don't recall
> having any problems at all when changing a view and it not picking up
> the change.  Every time I save a file, the build in web server
> automatically updates it.
>
> If you're using apache - do you mind if I ask what advantages you have
> with Apache that the built in web server doesn't have?  Not
> questioning, just very curious is all.
>
> -David
> http://www.thedarktrumpet.com
>
> On Sep 12, 11:00 am, n00m <[EMAIL PROTECTED]> wrote:
> > On Sep 12, 6:11 pm, "Keith Eberle" <[EMAIL PROTECTED]> wrote:
> >
> > > i don't think he marked it as spam, but rather "spam assassin" did...
> >
> > > keith
> >
> > If so then my sincere apologies to Thomas Guettler
>
> >
>


-- 
http://www.goldwatches.com/

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread David Thole

Just curious,  are you using the django built in web server for
development?  The reason why I'm asking is because I don't recall
having any problems at all when changing a view and it not picking up
the change.  Every time I save a file, the build in web server
automatically updates it.

If you're using apache - do you mind if I ask what advantages you have
with Apache that the built in web server doesn't have?  Not
questioning, just very curious is all.

-David
http://www.thedarktrumpet.com

On Sep 12, 11:00 am, n00m <[EMAIL PROTECTED]> wrote:
> On Sep 12, 6:11 pm, "Keith Eberle" <[EMAIL PROTECTED]> wrote:
>
> > i don't think he marked it as spam, but rather "spam assassin" did...
>
> > keith
>
> If so then my sincere apologies to Thomas Guettler

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m


On Sep 12, 6:11 pm, "Keith Eberle" <[EMAIL PROTECTED]> wrote:
> i don't think he marked it as spam, but rather "spam assassin" did...
>
> keith

If so then my sincere apologies to Thomas Guettler

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m


Much better just to keep in views.py a "secret",
not for public, "reloader" page:

===
views.py
===

import views_base

def reloader(request):
reload(views_base)
return views_base.HttpResponse('views_base.py reloaded!')

...
...

def test(request):
return views_base.test(request)

def index(request):
return views_base.index(request)

def tables(request, table_name=None, cur_page=1):
return views_base.tables(request, table_name, cur_page)

===

After each visiting the reloader page
the whole site get silently refreshed.

All the rest defs here are just thin wrappers around
"true" defs from "true views.py" == views_base.py.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread Keith Eberle
i don't think he marked it as spam, but rather "spam assassin" did...

keith


On Fri, Sep 12, 2008 at 10:47 AM, n00m <[EMAIL PROTECTED]> wrote:

>
> > This way I don't need to change any code
>
> Seems you absolutely misunderstand what I was talking about but
> you dared, in bold manner, to label my subject as a spam.
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m

> This way I don't need to change any code

Seems you absolutely misunderstand what I was talking about but
you dared, in bold manner, to label my subject as a spam.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread n00m


Hi, Tom!

Now imagine production environment on an hoster machine
on which Apache is running in 24/7 mode.
===
Of course, I didn't mean my trick for home/localhost

Cheers!


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: ***SPAM*** A trick to force autoreloading, in case of changes in views.py

2008-09-12 Thread Thomas Guettler

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
-~--~~~~--~~--~--~---