urls.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. from django.conf.urls import patterns, url
  2. from django.views.i18n import javascript_catalog
  3. from jet import dashboard
  4. from jet.views import add_bookmark_view, remove_bookmark_view, toggle_application_pin_view, \
  5. update_dashboard_modules_view, add_user_dashboard_module_view, update_dashboard_module_collapse_view, \
  6. remove_dashboard_module_view, UpdateDashboardModuleView, load_dashboard_module_view, model_lookup_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'^add_bookmark/$',
  16. add_bookmark_view,
  17. name='add_bookmark'
  18. ),
  19. url(
  20. r'^remove_bookmark/$',
  21. remove_bookmark_view,
  22. name='remove_bookmark'
  23. ),
  24. url(
  25. r'^toggle_application_pin/$',
  26. toggle_application_pin_view,
  27. name='toggle_application_pin'
  28. ),
  29. url(
  30. r'^update_dashboard_modules/$',
  31. update_dashboard_modules_view,
  32. name='update_dashboard_modules'
  33. ),
  34. url(
  35. r'^add_user_dashboard_module/$',
  36. add_user_dashboard_module_view,
  37. name='add_user_dashboard_module'
  38. ),
  39. url(
  40. r'^update_dashboard_module_collapse/$',
  41. update_dashboard_module_collapse_view,
  42. name='update_dashboard_module_collapse'
  43. ),
  44. url(
  45. r'^remove_dashboard_module/$',
  46. remove_dashboard_module_view,
  47. name='remove_dashboard_module'
  48. ),
  49. url(
  50. r'^load_dashboard_module/(?P<pk>\d+)/$',
  51. load_dashboard_module_view,
  52. name='load_dashboard_module'
  53. ),
  54. url(
  55. r'^model_lookup/$',
  56. model_lookup_view,
  57. name='model_lookup'
  58. ),
  59. url(
  60. r'^jsi18n/$',
  61. javascript_catalog,
  62. {'packages': ('jet',)},
  63. name='jsi18n'
  64. ),
  65. )
  66. urlpatterns += dashboard.urls.get_urls()