urls.py 1.8 KB

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