Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3932912
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:32:32+00:00 2026-05-19T23:32:32+00:00

I have a Django site where a strange bug is occurring. On the site

  • 0

I have a Django site where a strange bug is occurring.

On the site they can add “publications”, which is basically the same thing as a blog post under a different name.

Things gets weird when they modify an existing post. They first modify it in the admin and when they go on the site, the change isn’t visible. Like if the old version was cached.

In fact, at the beginning I was pretty sure it was a browser caching bug. But after some trials, things got a little weirder.

I found out that clearing browser cache or using a different browser does not solve the problem, but rather interestingly it toggles between the old version and the modified version upon refresh.

So if the body of the post was “Hello World” and I modify it to be “Goodbye cruel world” and then go to the site and refresh the page multiple times, I would see “Hello World”, then “Goodbye cruel world”, then “Hello World” and so on.. no matter how long I keep doing it.

But it doesn’t stop there .. after about 24h everything falls back into place and work normally. No permutation anymore, the site sticks to the new version…

I’m pretty much speechless because I built well over 50 other Django sites using the same server and I never had this problem before.

I’m using the latest django (1.3) with a MySQL DB and caching is not enabled..

Any ideas ?

Edit: A graceful restart of Apache solve the problem .. but restarting apache after each update isn’t the greatest thing..

Update: I’ve just re-setuped my dev environement and I found out the bug is far more acute with the dev server. The modified contend won’t show up until I kill/restart the dev server, no matter how often I refresh or clear my cache..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T23:32:33+00:00Added an answer on May 19, 2026 at 11:32 pm

    The problem is explicitly addressed in the generic views documentation. The querysets in your extra_context dictionary are evaluated once, when the urlconf is first processed, and each time after that they will continue to use the same values. That’s why they only change when you reset Apache or the dev server.

    The solution, as described on the linked page, is to use callables which return the querysets, rather than specifying the querysets in the dictionary itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a Django site in which users can have multiple 'accounts', so
I have constant problem with cookies on my Django site which is set up
After upgrading to Django 1.2 I have strange urls in my administration panel. They
I have a Django site in which I show a success message to the
I have a Django site in which the site admin inputs their Twitter Username/Password
I have a django site that's tightly coupled with a wordpress blog. I want
I have a django test site and I can see the admin site, but
I have a django site using the basic django registration framework. I have my
I currently have a django site, and it's kind of slow, so I want
I have a django server that serves the basic site with user, auth etc

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.