Django website toggling between latest and previous state on reload - django

today, I have recognized a strange behaviour of my Apache served Django 2.0.2 (Webfaction) website. After I have made a change and restarted the Apache server, the reloaded website shows the latest change. But when I hit F5 (reload) again, the view of the previous state is displayed again. Another reload and the latest state is displayed. That continues back and forth. For example, see the smallcaps and line-break changes:
Before, the same happened to the background opacity, too, so it's not limited to the font.
It happens on Firefax (PC) as well as on Opera and Chrome browsers (on mobile dev). So, I assume the issue lies in Apache - or Django. I've never seen such a behaviour, before. Does anyone have an idea what causes this effect?
Not sure whether it is of help (because the site will soon change), but for reproduction of the error, this is the site: http://campfire.skylet.de/
Thank you
Michael

Related

Django Not Reflecting Changes Made to App

I've written an app and have been testing it within a project. Any change I make to the project is reflected immediately. But when I make a change to the app and run the install script again, none of the changes are shown. I even look at the files in the site-packages directory and see that the change has been installed.
I've tried clearing the browser cache, restarting the browser, trying a different browser, shutting down and restarting the django server, re-sourcing the virtual environment, setting $PYTHON_PATH, and even restarted my system to no avail.
This has happened just recently, within the past hour. I was able to make django reflect the changes when I set $PYTHON_PATH and, afterword, re-sourcing the virtual env. But now that won't work, either.
I keep thinking it's a caching issue, but I'm not seeing anything on the django cache that would cause this problem.
I'm using lighttpd as the server backend if that's an issue.
If your using google chrome:
Open your site to the page where the changes are not reflecting.
press f12 to open inspect window, the developer tool in chrome.
Now left click on the reload button for a longer duration continuously, about one second long.
You will get three options Go for empty cache and hard reload in this case.
Done!

rails 4, turbolinks and cached views - strange behaviour

I have a strange problem on the production env. I'm using rails 4, ruby 1.9.3, nginx, and unicorn, there are no suitable caching, except that which in in standard rails.
I suspect that the problem is related with turbolinks, but not necessarily, the point is that as I pass between the sites, and return back to them, I still see the old versions of those sites, for example, appears new order, I'm going to orders page and I see the old data, then after refreshing page I get new data, another example when I'm logging in, flash message appears, than after clicking to another pages and returning to old one I still have this flash message (pls note, Im not using back button in browser).
Do you have any idea what is going on?
In dev mode, everything is ok (and Im using turbolinks as well)
thanks in advance

310 Redirect loop error in chrome due to Machii Redirect event

I am getting a 310: Too many redirects error in Chrome when I run my website. However this is not the case for IE or Firefox.
I am using Mach-ii framework and this is the case where I am using redirect in an event-handler.
e.g:
<event-handler event="A">
<announce event="B">
<announce event="C">
</event-handler>
<event-handler event="C">
<redirect event="D">
</event-handler>
<event-handler event="D">
<view-page name="foo">
</event-handler>
So, if I get to this page, it renders perfectly. But if I hit browser back and then next button again, I get the error.
Some common solutions to this kind of error from Chrome could be
Delete all the site's cookies and restart your browser.
Synchronize your computers time. In the date and time settings for your computer, sync it to a time server.
I've also heard of different update channels having the issue and others not. As in the Beta channel for Chrome would not have this issue, but the Stable version does have the issue. I've heard of things like plugins (chrome scripts) being a problem. I suppose as a last solution remove Chrome completely and install it from fresh.
I personally dont think its a Mach-ii or Coldfusion issue. Hope you come right.

Django/IE8 Admin Interface Weirdness

Esteemed Django experts and users:
I have been using Django's admin interface for some data editing needs. I am using it on Windows Server 2008, and using django-mssql to connect to a SQL Server backend. Python 2.6.2 Django 1.1.0 final 0
As per usual w/ Django, this was fairly easy to set up, and works beautifully on Firefox, but using IE8 I intermittently get a puzzling 'Internet Explorer cannot display this webpage' when I save a record.
In the log, looks like typically on a save there's a POST request that returns a 302 status followed by a GET returning a lovely 200. This is on Firefox. On IE8 looks like sometimes POST works but GET doesn't.
So that's what I have going on. Any help w/ this will be appreciated. Thank you.
I suspect the bug is within IE8's refusal to process the redirect properly.
The 302 POST pushes to browser to the 200 GET, but if the browser never processes the 302 then the Django (or the server) will not log a 200 GET because the browser never opened the page (the server can only log what is accessed, ergo the browser is not making the call).
If you have Django behind something (IIS using FastCGI, or Apache, or something), bump up the logs to make sure there's no silent error in rendering. I had the same problem on Vista x64 Ultimate IE8 Beta 2, but compatibility mode appeared to fix the problem somewhat -- there was still some intermittently occurring refusal to redirect.
I realize this post is a bit old now, but I had the exact same symptoms recently. After a lot of digging around, I found that IE8 has issues accepting cookies with a life of less than 20 minutes.
In our Django project's settings.py we had the property SESSION_COOKIE_AGE set to 10 minutes. Once I bumped it to 20 minutes, IE8 had no problems logging in.

dev server hiccups after saving from in Django admin

This is starting bug me: whenever I use the django admin to add or edit a record, I hit save and expect a confirmation page, but the result is a page that tells me the website is experiencing an error (it's not a Django page with a traceback, just a default view in my browser). If I hit reload or back in the browser, it takes me back to the user form. Even though the confimation page doesn't display, it never fails to save my entry in the database, so it's apparently just a problem generating/serving the confirmation page.
Has anyone else had this problem? Am I missing something obvious?
My server: Django dev server
My browser: Internet Explorer 7 (but same problem occurs with any broswer I use)
My OS: Windows XP
I got such a behaiviour when I overwrote __init__ incorrectly. Or to be more precise when switching to a new version of Django with these worng __init__s. That was the day I started to love signals :D.
Can you post your models?
This is certainly not how it's supposed to work! Have you been messing around in the Django codebase at all? The first thing that comes to mind here is a "pdb.set_trace()" left by mistake somewhere in the change_list codepath. Off-hand I can't think what else would cause the server to simply not respond.