layerindex-web/layerindex/urls_branch.py
Paul Eggleton 4d6894ccbb Explicitly specify temporary redirection
Django 1.8 warns that the default for the "permanent" parameter to
RedirectView is changing in 1.9 from True to False, but I believe we
should be specifying False for these redirections - these are not just
redirections from old URLs and may in fact change in the future if the
site structure changes.

Part of the implementation for [YOCTO #9620].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-06-12 11:33:08 +12:00

37 lines
1.5 KiB
Python

# layerindex-web - Branch-based URL definitions
#
# Copyright (C) 2013 Intel Corporation
#
# Licensed under the MIT license, see COPYING.MIT for details
from django.conf.urls import *
from django.views.defaults import page_not_found
from django.core.urlresolvers import reverse_lazy
from layerindex.views import LayerListView, RecipeSearchView, MachineSearchView, PlainTextListView, LayerDetailView, edit_layer_view, delete_layer_view, edit_layernote_view, delete_layernote_view, RedirectParamsView, DuplicatesView
urlpatterns = patterns('',
url(r'^$',
RedirectParamsView.as_view(permanent=False), {'redirect_name': 'layer_list'}),
url(r'^layers/$',
LayerListView.as_view(
template_name='layerindex/layers.html'),
name='layer_list'),
url(r'^layer/(?P<slug>[-\w]+)/$',
LayerDetailView.as_view(
template_name='layerindex/detail.html'),
name='layer_item'),
url(r'^recipes/$',
RecipeSearchView.as_view(
template_name='layerindex/recipes.html'),
name='recipe_search'),
url(r'^machines/$',
MachineSearchView.as_view(
template_name='layerindex/machines.html'),
name='machine_search'),
url(r'^edit/(?P<slug>[-\w]+)/$', edit_layer_view, {'template_name': 'layerindex/editlayer.html'}, name="edit_layer"),
url(r'^duplicates/$',
DuplicatesView.as_view(
template_name='layerindex/duplicates.html'),
name='duplicates'),
)