Files
@ 90fac7c6abb9
Branch filter:
Location: conntrackt/conntrackt/urls.py - annotation
90fac7c6abb9
1.5 KiB
text/x-python
Renamed the tags library. Removed the line stripper middleware, and replaced it with some custom code that will remove all blank lines. The iptables rule rendering has been rewritten to accomodate this change (a utility function has been added for generating them). Fixed some code styling.
2b65280e6407 2b65280e6407 576954d47c4c c5c40a039ec4 18ff99706db5 c5c40a039ec4 ad556f8e81bd 7f5dcd5234b0 2b65280e6407 3c652f6dc038 2b65280e6407 90fac7c6abb9 b38bff5ff039 576954d47c4c 3c652f6dc038 2b65280e6407 b38bff5ff039 2b65280e6407 ad556f8e81bd 3c652f6dc038 ad556f8e81bd 90fac7c6abb9 ad556f8e81bd 2b65280e6407 90fac7c6abb9 02c5e6c3ba98 90fac7c6abb9 02c5e6c3ba98 90fac7c6abb9 18ff99706db5 18ff99706db5 18ff99706db5 576954d47c4c 576954d47c4c | # Import basic functions for URL pattern processing.
from django.conf.urls import patterns, url
# For logging-in the users
from django.contrib.auth.views import login, logout
# For plain generic views
from conntrackt.models import Entity
from django.views.generic import DetailView
# Import some app-specific views.
from conntrackt.views import IndexView, ProjectView, EntityView, entity_iptables, project_iptables
urlpatterns = patterns(
'conntrackt.views',
# Homepage/index view.
url(r'^$', IndexView.as_view(), name="index"),
# View for showing information about a project.
url(r'^project/(?P<pk>\d+)/$', ProjectView.as_view(),
name = 'project'),
# View for showing information about an 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/$', 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/$', 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/$', 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"),
)
|