I cannot update Django RedirectView. It continues to link to the old URL with a status of 301 Moved Permenantly

Sorry if this question should have been in Server Vault. I could not say if this was a programming error or a server configuration error.

I recently pushed my git to a server and I noticed something very unpleasant.

No matter how I edit urls.py, I can’t 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')),
)

Named URL order_listcomes from one of my applicationsurls.py

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

r'^orders/$' r'^order/$' . , {% url home %}, , /doors/orders/ /doors/order/. , - 301 Moved Permanently.

, permenant=False RedirectView . - /doors/orders/, 301 ( 302)!

RedirectView URL?


Apache 2.2.21 mod_wsgi Django 1.4 Gentoo Linux

+5
1

, 301 !

, , . , , 301 302. , , RedirectView , . permanent=False, 302. . docs.

+13

All Articles