urls.py 764 B

12345678910111213141516171819202122
  1. # -*- coding: utf-8 -*-
  2. from __future__ import unicode_literals
  3. from django.conf.urls import patterns, url
  4. from .views import VPNView, VPNGeneratePasswordView, get_graph
  5. urlpatterns = patterns(
  6. "",
  7. # This is part of the generic configuration interface (the "name" is
  8. # the same as the "backend_name" of the model).
  9. url(
  10. r"^(?P<pk>\d+)$", VPNView.as_view(template_name="vpn/vpn.html"), name="details"
  11. ),
  12. url(
  13. r"^password/(?P<pk>\d+)$",
  14. VPNGeneratePasswordView.as_view(template_name="vpn/fragments/password.html"),
  15. name="generate_password",
  16. ),
  17. url(r"^graph/(?P<vpn_id>[0-9]+)/(?P<period>[a-z]+)$", get_graph, name="get_graph"),
  18. url(r"^graph/(?P<vpn_id>[0-9]+)$", get_graph, name="get_graph"),
  19. )