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 7928239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:41:02+00:00 2026-06-03T19:41:02+00:00

Sorry if this question was supposed to be in Server Vault. I couldn’t really

  • 0

Sorry if this question was supposed to be in Server Vault. I couldn’t really tell whether it’s a programming error or a server configuration error.

I recently pushed my git commits to the live server and I noticed something very frustrating.

No matter how I edit the urls.py, I can’t seem to update RedirectView!

Here is my root mysite/urls.py

urlpatterns = patterns('',
    url(r'^$', RedirectView.as_view(url=reverse_lazy('order_list')), name='home'),
    url(r'^doors/', include('doors.urls')),
    url(r'^accounts/', include('registration.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^{}/'.format(settings.DAJAXICE_MEDIA_PREFIX), include('dajaxice.urls')),
)

The named URL order_list comes from one of my app’s urls.py

urlpatterns = patterns('doors.views',
    url(r'^order/$', OrderListView.as_view(), name='order_list'),
    # And more URL patterns...
)

So basically I simply changed r'^orders/$' to r'^order/$' in the last commit. But whenever I do {% url home %}, I noticed the server keeps trying to redirect to the old path of /doors/orders/ instead of /doors/order/. I also noticed that the redirect is a 301 Moved Permanently.

So I tried to add permenant=False to RedirectView and restarted the server. But it still goes to /doors/orders/ and the redirect is still 301 (it should have been 302)!

Why isn’t my RedirectView redirecting to the updated URL?


Server info

Running Apache 2.2.21 using mod_wsgi with Django 1.4 on Gentoo Linux

  • 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-06-03T19:41:03+00:00Added an answer on June 3, 2026 at 7:41 pm

    It turned out that the 301 redirections are cached on the browser!

    So I cleared my browser’s cache and everything worked. It was hard knowing where to look for the error when I didn’t really understand the difference between 301 and 302 that well. I also realized that since my RedirectView is basically a placeholder until I write a real home template. I should be using permanent=False to always create a 302. Take a look at the docs for details.

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

Sidebar

Related Questions

Sorry if this question is framed incorrectly. I am working on an iPad application
Sorry if this question is too vague, but I'd rather not muddy it's point
Sorry if this question is very easy, but I can't find the answer anywhere.
Sorry since this question is specific to my problem. While learning reflections i did
sorry for this question, but i dont know where to search for it, or
Sorry if this question is somewhat subjective. I am new to 'could store', 'distributed
Sorry if this question will sound too chaotic, feel free to edit it. I
Sorry if this question is answered already, but I didn't find a suitable answer.
Sorry if this question sounds a little silly, but I am not sure what
Sorry if this question is answered somewhere else but I tried searching several pages

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.