Thursday, March 28, 2013

Re: Redirects working locally but not in live server

Thanks for the tips! I am absolutely sure that I restarted both nginx and gunicorn. But I'm gonna check with the server dudes if they can give me some insight into the inner workings of their universe. 

/Angelika

On Thursday, March 28, 2013 6:18:59 PM UTC+1, ke1g wrote:
Are you sure that you restarted after making redirection changes in production?  Unlike runserver, most deployment schemes do not automatically restart when a .py file is changed, so changes to them are not picked up.  You would have restarted when you switched DEBUG on and off, and other changes would have been picked up at that time.

But it could be cacheing, and that is somewhat outside Django's scope.  While you can arrange particular cache control headers to control which pages are cacheable and for how long, proxy caches (e.g.; varnish on your server, others in the great wide world), and even browsers, may have their own ideas.  If you are running a proxy cache on your server, you should look up the commands required to purge it, assuming your hosting provider allows that.  (But only purge it if you seem to be having cacheing problems, particularly if it is shared.)

On Thu, Mar 28, 2013 at 11:21 AM, angelika <angelik...@gmail.com> wrote:
Hm, well, I've solved it myself, I guess. It must have been a caching problem. I changed Debug to True in settings.py to look for errors, and then it started working. Something must have reloaded, cuz it still works when I change it back. 

For future reference, does anyone know how I can get this type of reload/empty cache of the server without having to edit my settings.py?

/Angelika


On Thursday, March 28, 2013 4:10:24 PM UTC+1, angelika wrote:
Hi,

I've created a couple of redirect objects in the admin interface and when I run it locally it works fine, but when I do the same thing on my live server it has no effect. The regular 404 page is showing in stead. The installation is very simple, just a couple of settings and a db table and nothing went wrong there as far as I can see. What am I missing? Locally I run the site with runserver, my liveserver is running nginx and gunicorn. I've restarted both, but it makes no difference. 

Thoughts? Guesses?

/Angelika

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment