layerindex-web/rrs/urls.py
Aníbal Limón 06b0cfe8bf rrs: Add milestone selection bar for recipes and milestone.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-01-19 22:41:07 -06:00

28 lines
871 B
Python

from django.views.generic import TemplateView
from django.views.generic.simple import redirect_to
from django.core.urlresolvers import reverse_lazy
from django.conf.urls import patterns, url
from layerindex.views import EditProfileFormView
from rrs.models import Milestone
from rrs.views import RecipeListView
urlpatterns = patterns('',
url(r'^$', redirect_to, {'url' : reverse_lazy('recipes', args=(Milestone.get_current().name,))},
name='frontpage'),
url(r'^recipes/(?P<milestone_name>.*)/$',
RecipeListView.as_view(
template_name='rrs/recipes.html'),
name='recipes'),
url(r'^profile/$',
EditProfileFormView.as_view(
template_name='layerindex/profile.html'),
name="profile"),
url(r'^about/$',
TemplateView.as_view(
template_name='rrs/about.html'),
name="about"),
)