mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 13:14:46 +02:00

Don't redirect permanently in main view because the first URL needs to point to the current release, so use permanent = False to return a 302.. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
from django.conf.urls import patterns, include, url
|
|
|
|
from rrs.models import Release, Milestone
|
|
from rrs.views import RecipeListView, recipes_report, RecipeDetailView, MaintainerListView
|
|
|
|
urlpatterns = patterns('',
|
|
url(r'^$', redirect_to,
|
|
{'url' :
|
|
reverse_lazy('recipes',
|
|
args = (
|
|
Release.get_current().name,
|
|
Milestone.get_current(Release.get_current()).name,
|
|
)
|
|
),
|
|
'permanent' : False
|
|
},
|
|
name='frontpage'),
|
|
url(r'^recipes/(?P<release_name>.*)/(?P<milestone_name>.*)/$',
|
|
RecipeListView.as_view(
|
|
template_name='rrs/recipes.html'),
|
|
name='recipes'),
|
|
url(r'^recipesreport/(?P<release_name>.*)/(?P<milestone_name>.*)/$',
|
|
recipes_report,
|
|
name="recipesreport"),
|
|
url(r'^recipedetail/(?P<pk>\d+)/$',
|
|
RecipeDetailView.as_view(
|
|
template_name='rrs/recipedetail.html'),
|
|
name='recipedetail'),
|
|
url(r'^maintainers/(?P<release_name>.*)/(?P<milestone_name>.*)/$',
|
|
MaintainerListView.as_view(
|
|
template_name='rrs/maintainers.html'),
|
|
name="maintainers"),
|
|
)
|