mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00

Recipe detail page gives information about Recipe like summary, section, license, file, etc. also display's upgrade history. rrs/models.py: Milestone add get_by_date and rewrite get_current for use get_by_date and RecipeDistro add get_distros_by_recipe. rrs/urls.py: Add url for recipe_detail with pk. rrs/views.py: Add RecipeUpgradeDetail view. templates/rrs/recipedetail.html: Add recipedetail template. templates/rrs/recipes.html: Add link to Recipe detail by row. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
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, RecipeDetailView
|
|
|
|
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'^recipedetail/(?P<pk>\d+)/$',
|
|
RecipeDetailView.as_view(
|
|
template_name='rrs/recipedetail.html'),
|
|
name='recipedetail'),
|
|
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"),
|
|
)
|