[yocto] [layerindex-web] [PATCH 1/3] layerindex/urls.py: Allow branches with a '.' in the name

Mark Hatle mark.hatle at kernel.crashing.org
Sat Oct 12 18:56:31 PDT 2019


Without this change the system will fail parsing various URL components

Signed-off-by: Mark Hatle <mark.hatle at kernel.crashing.org>
---
 layerindex/urls.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/layerindex/urls.py b/layerindex/urls.py
index 7f4e545..89e70a2 100644
--- a/layerindex/urls.py
+++ b/layerindex/urls.py
@@ -107,7 +107,7 @@ urlpatterns = [
         BulkChangeDeleteView.as_view(
             template_name='layerindex/deleteconfirm.html'),
         name="bulk_change_delete"),
-    url(r'^branch/(?P<branch>[-\w]+)/',
+    url(r'^branch/(?P<branch>[-.\w]+)/',
         include('layerindex.urls_branch')),
     url(r'^updates/$',
         UpdateListView.as_view(
@@ -146,17 +146,17 @@ urlpatterns = [
         ClassicRecipeDetailView.as_view(
             template_name='layerindex/classicrecipedetail.html'),
         name='classic_recipe'),
-    url(r'^comparison/recipes/(?P<branch>[-\w]+)/$',
+    url(r'^comparison/recipes/(?P<branch>[-.\w]+)/$',
         ClassicRecipeSearchView.as_view(
             template_name='layerindex/classicrecipes.html'),
         name='comparison_recipe_search'),
-    url(r'^comparison/search-csv/(?P<branch>[-\w]+)/$',
+    url(r'^comparison/search-csv/(?P<branch>[-.\w]+)/$',
         ClassicRecipeSearchView.as_view(
             template_name='layerindex/classicrecipes_csv.txt',
             paginate_by=0,
             content_type='text/csv'),
         name='comparison_recipe_search_csv'),
-    url(r'^comparison/stats/(?P<branch>[-\w]+)/$',
+    url(r'^comparison/stats/(?P<branch>[-.\w]+)/$',
         ClassicRecipeStatsView.as_view(
             template_name='layerindex/classicstats.html'),
         name='comparison_recipe_stats'),
@@ -185,11 +185,11 @@ urlpatterns = [
     url(r'^stoptask/(?P<task_id>[-\w]+)/$',
         task_stop_view,
         name='task_stop'),
-    url(r'^ajax/layerchecklist/(?P<branch>[-\w]+)/$',
+    url(r'^ajax/layerchecklist/(?P<branch>[-.\w]+)/$',
         LayerCheckListView.as_view(
             template_name='layerindex/layerchecklist.html'),
         name='layer_checklist'),
-    url(r'^ajax/classchecklist/(?P<branch>[-\w]+)/$',
+    url(r'^ajax/classchecklist/(?P<branch>[-.\w]+)/$',
         BBClassCheckListView.as_view(
             template_name='layerindex/classchecklist.html'),
         name='class_checklist'),
-- 
2.17.1



More information about the yocto mailing list