Re: disable django cache

2009-05-15 Thread Daniel Roseman

On May 15, 4:14 am, online  wrote:
> Thanks, this kind of design is interesting, not what i expected
> though.
>
> I thought the server is running whatever my script i want to use
>     return render_to_response('home.html')
> or
>     return render_to_response('index.html')

When you change content, of course you don't need to restart the
webserver. But when you change *code*, you do.
--
DR.
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-15 Thread zayatzz

Restart your apache every once and a while, if you want to see latest
changes.

Alan.

On May 15, 6:14 am, online  wrote:
> Thanks, this kind of design is interesting, not what i expected
> though.
>
> I thought the server is running whatever my script i want to use
>     return render_to_response('home.html')
> or
>     return render_to_response('index.html')
>
> On May 14, 7:55 pm, David Zhou  wrote:
>
> > On Thu, May 14, 2009 at 9:53 PM, online  
> > wrote:
>
> > > Whatever i changed 'home.html' to other page i always get the same
> > > result.
>
> > Are you restarting your serving?  If by "changed home.html to other
> > page" you mean you modified your view function to return a different
> > template, then make sure you restart your server.
>
> > -- dz
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-14 Thread online

Thanks, this kind of design is interesting, not what i expected
though.

I thought the server is running whatever my script i want to use
return render_to_response('home.html')
or
return render_to_response('index.html')



On May 14, 7:55 pm, David Zhou  wrote:
> On Thu, May 14, 2009 at 9:53 PM, online  wrote:
>
> > Whatever i changed 'home.html' to other page i always get the same
> > result.
>
> Are you restarting your serving?  If by "changed home.html to other
> page" you mean you modified your view function to return a different
> template, then make sure you restart your server.
>
> -- dz
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-14 Thread David Zhou

On Thu, May 14, 2009 at 9:53 PM, online  wrote:
>
> Whatever i changed 'home.html' to other page i always get the same
> result.

Are you restarting your serving?  If by "changed home.html to other
page" you mean you modified your view function to return a different
template, then make sure you restart your server.

-- dz

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-14 Thread Colin Bean

On Thu, May 14, 2009 at 6:53 PM, online  wrote:
>
> This is my code
>
>
> from django.http import HttpResponse
> from django.template import Context, loader
> from django.shortcuts import render_to_response
> from django.views.decorators.cache import cache_control
> @cache_control(no_cache=True)
> def index(request):
>        #t = loader.get_template('home.html')
>        return render_to_response('home.html')
>
>
> i don't think it was browser cache. I have tried both IE and firefox.
>
>
> Whatever i changed 'home.html' to other page i always get the same
> result.
>
>
> Thanks
>

What are the TEMPLATE_DIRS that you're using in your settings file? Do
they point to the same file you're editing?  Any chance you copied the
project from somewhere else and it's loading the templates from the
original location?

Colin

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-14 Thread online

This is my code


from django.http import HttpResponse
from django.template import Context, loader
from django.shortcuts import render_to_response
from django.views.decorators.cache import cache_control
@cache_control(no_cache=True)
def index(request):
#t = loader.get_template('home.html')
return render_to_response('home.html')


i don't think it was browser cache. I have tried both IE and firefox.


Whatever i changed 'home.html' to other page i always get the same
result.


Thanks



On May 14, 2:49 pm, John M  wrote:
> Are you sure it isn't your browser?  have you tried testing your
> concern with curl?
>
> On May 14, 12:19 pm, online  wrote:
>
> > Hi all,
>
> > I have a small project still under development. I don't set any cache
> > stuff yet. But for somehow django still cache all web pages.
>
> > Why django default uses cache?  How can i disable the all level
> > caches?
>
> > I tried
>
> > from django.views.decorators.cache import cache_control
>
> > @cache_control(private=True)
>
> > and
>
> > from django.views.decorators.cache import never_cache
>
> > @never_cache
>
> > on views.py but not working
>
> > Thanks for any help.
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-14 Thread John M

Are you sure it isn't your browser?  have you tried testing your
concern with curl?

On May 14, 12:19 pm, online  wrote:
> Hi all,
>
> I have a small project still under development. I don't set any cache
> stuff yet. But for somehow django still cache all web pages.
>
> Why django default uses cache?  How can i disable the all level
> caches?
>
> I tried
>
> from django.views.decorators.cache import cache_control
>
> @cache_control(private=True)
>
> and
>
> from django.views.decorators.cache import never_cache
>
> @never_cache
>
> on views.py but not working
>
> Thanks for any help.
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: disable django cache

2009-05-14 Thread Daniel Roseman

On May 14, 8:19 pm, online  wrote:
> Hi all,
>
> I have a small project still under development. I don't set any cache
> stuff yet. But for somehow django still cache all web pages.
>
> Why django default uses cache?  How can i disable the all level
> caches?
>
> I tried
>
> from django.views.decorators.cache import cache_control
>
> @cache_control(private=True)
>
> and
>
> from django.views.decorators.cache import never_cache
>
> @never_cache
>
> on views.py but not working
>
> Thanks for any help.

Django doesn't cache anything unless you tell it to. What makes you
think your pages are being cached? You will need to give us some
details of your setup before we can help.
--
DR.
--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



disable django cache

2009-05-14 Thread online

Hi all,

I have a small project still under development. I don't set any cache
stuff yet. But for somehow django still cache all web pages.

Why django default uses cache?  How can i disable the all level
caches?

I tried

from django.views.decorators.cache import cache_control

@cache_control(private=True)

and

from django.views.decorators.cache import never_cache

@never_cache

on views.py but not working




Thanks for any help.




--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---