|
@@ -9,7 +9,7 @@ from conntrackt.models import Entity
|
|
|
from django.views.generic import DetailView
|
|
|
|
|
|
# Import some app-specific views.
|
|
|
from conntrackt.views import IndexView, IptablesView, ProjectView, get_project_iptables
|
|
|
from conntrackt.views import IndexView, ProjectView, EntityView, entity_iptables, project_iptables
|
|
|
|
|
|
urlpatterns = patterns(
|
|
|
'conntrackt.views',
|
|
@@ -19,14 +19,14 @@ urlpatterns = patterns(
|
|
|
url(r'^project/(?P<pk>\d+)/$', ProjectView.as_view(),
|
|
|
name = 'project'),
|
|
|
# View for showing information about an entity.
|
|
|
url(r'^entity/(?P<pk>\d+)/$', DetailView.as_view(model = Entity),
|
|
|
url(r'^entity/(?P<pk>\d+)/$', EntityView.as_view(),
|
|
|
name = 'entity'),
|
|
|
# View for rendering iptables rules for a specific entity.
|
|
|
url(r'^entity/(?P<pk>\d+)/iptables/$', IptablesView.as_view(), name="entity_iptables"),
|
|
|
url(r'^entity/(?P<pk>\d+)/iptables/$', entity_iptables, name="entity_iptables"),
|
|
|
# View for rendering zip file with iptables rules for all entities in a project.
|
|
|
url(r'^project/(?P<project_id>\d+)/iptables/$', get_project_iptables, name="project_iptables"),
|
|
|
url(r'^project/(?P<project_id>\d+)/iptables/$', project_iptables, name="project_iptables"),
|
|
|
# View for rendering zip file with iptables rules for all entities in a project for a specific location.
|
|
|
url(r'^project/(?P<project_id>\d+)/location/(?P<location_id>\d+)/iptables/$', get_project_iptables, name="project_location_iptables"),
|
|
|
url(r'^project/(?P<project_id>\d+)/location/(?P<location_id>\d+)/iptables/$', project_iptables, name="project_location_iptables"),
|
|
|
# Views for logging-in/out the users.
|
|
|
url(r'^login/$', login, {'template_name': 'conntrackt/login.html'}, name = "login"),
|
|
|
url(r'^logout/$', logout, name = "logout"),
|