Closed mverteuil closed 10 years ago
views.py
widgets.py
router.register(views.GitHubIssuesWidget, 'github-issues', github_user="[A-Za-z0-9_-]+", repository="[A-Za-z0-9_-]+") router.register(views.GitHubPullRequestsWidget, 'total-prs') urlpatterns = patterns( '', url(r'^legacy/github-issues/(?P<github_user>[A-Za-z0-9_-]+)/(?P<repository>[A-Za-z0-9_-]+)/?', views.GitHubIssuesWidget.as_view(), name='github-issues'), url(r'^legacy/total-prs/?', views.GitHubPullRequestsWidget.as_view(), name='total-prs'), ) + widget_router.urls
Resulting in:
^dashboard/ ^legacy/github-issues/(?P<github_user>[A-Za-z0-9_-]+)/(?P<repository>[A-Za-z0-9_-]+)/? [name='github-issues'] ^dashboard/ ^legacy/total-prs/? [name='total-prs'] ^dashboard/ ^$ [name='dashboard'] ^dashboard/ ^widgets/github-issues/(P<github_user>[A-Za-z0-9_-]+)/(P<repository>[A-Za-z0-9_-]+) [name='widget_github-issues'] ^dashboard/ ^widgets/total-prs/ [name='widget_total-prs']
Thanks for your input, I'm adding this change to the docs
Thanks for quickly accepting :)
Overview
views.py
andwidgets.py
.Example
Resulting in: