urls.py 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. from django.conf.urls import patterns, url
  2. from django.views.i18n import javascript_catalog
  3. from jet.dashboard import dashboard
  4. from jet.dashboard.views import update_dashboard_modules_view, add_user_dashboard_module_view, \
  5. update_dashboard_module_collapse_view, remove_dashboard_module_view, UpdateDashboardModuleView, \
  6. load_dashboard_module_view, reset_dashboard_view
  7. urlpatterns = patterns(
  8. '',
  9. url(
  10. r'^module/(?P<pk>\d+)/$',
  11. UpdateDashboardModuleView.as_view(),
  12. name='update_module'
  13. ),
  14. url(
  15. r'^update_dashboard_modules/$',
  16. update_dashboard_modules_view,
  17. name='update_dashboard_modules'
  18. ),
  19. url(
  20. r'^add_user_dashboard_module/$',
  21. add_user_dashboard_module_view,
  22. name='add_user_dashboard_module'
  23. ),
  24. url(
  25. r'^update_dashboard_module_collapse/$',
  26. update_dashboard_module_collapse_view,
  27. name='update_dashboard_module_collapse'
  28. ),
  29. url(
  30. r'^remove_dashboard_module/$',
  31. remove_dashboard_module_view,
  32. name='remove_dashboard_module'
  33. ),
  34. url(
  35. r'^load_dashboard_module/(?P<pk>\d+)/$',
  36. load_dashboard_module_view,
  37. name='load_dashboard_module'
  38. ),
  39. url(
  40. r'^reset_dashboard/$',
  41. reset_dashboard_view,
  42. name='reset_dashboard'
  43. ),
  44. url(
  45. r'^jsi18n/$',
  46. javascript_catalog,
  47. {'packages': ('jet',)},
  48. name='jsi18n'
  49. ),
  50. )
  51. urlpatterns += dashboard.urls.get_urls()