from django.conf.urls import patterns, url
from coin.vpn.views import VPNView, generate_password, get_graph

urlpatterns = patterns(
    '',
    # This is part of the generic configuration interface (the "name" is
    # the same as the "backend_name" of the model).
    url(r'^([0-9]+)$', VPNView.as_view(template_name="vpn/vpn.html"), name="openvpn_ldap"),
    url(r'^password/(?P<vpn_id>.+)$', generate_password, name="generate_password"),
    url(r'^graph/(?P<vpn_id>.+)/(?P<period>[a-z]+)$', get_graph, name="get_graph"),
    url(r'^graph/(?P<vpn_id>.+)$', get_graph, name="get_graph"),
)
