The new URL pattern expects a program ID and allows a program name to be included, if desired. It will match paths like 'programs/123/' and 'programs/123/foo/', but not 'programs/123/foo/bar/'. The given ID is passed to the view, where it will be used to retrieve program data. Part of ECOM-4415.
12 lines
404 B
Python
12 lines
404 B
Python
"""Learner dashboard URL routing configuration"""
|
|
from django.conf.urls import url
|
|
|
|
from . import views
|
|
|
|
|
|
urlpatterns = [
|
|
url(r'^programs/$', views.view_programs, name='program_listing_view'),
|
|
# Matches paths like 'programs/123/' and 'programs/123/foo/', but not 'programs/123/foo/bar/'.
|
|
url(r'^programs/(?P<program_id>\d+)/[\w\-]*/?$', views.program_details, name='program_details_view'),
|
|
]
|