Files
@ 3d702d4d7154
Branch filter:
Location: conntrackt/conntrackt/urls.py - annotation
3d702d4d7154
4.9 KiB
text/x-python
CONNT-25: Updating application and project to use Django 1.9.x:
- Updated the html_link tag implementation to produce safe output, and
added tests for it.
- Updated URL configuration in both the application and test project
according to deprecation warning.
- Updated views that return customized forms to ensure the form_class
passed in to get_form is optional.
- Bumped Django in both setup script and development requirements to
version 1.9.x.
- Updated test project configuration to match the version produced by
Django 1.9.x admin commands.
- Updated the html_link tag implementation to produce safe output, and
added tests for it.
- Updated URL configuration in both the application and test project
according to deprecation warning.
- Updated views that return customized forms to ensure the form_class
passed in to get_form is optional.
- Bumped Django in both setup script and development requirements to
version 1.9.x.
- Updated test project configuration to match the version produced by
Django 1.9.x admin commands.
265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 265b2706e075 f397b9db8183 3d702d4d7154 18ff99706db5 c5c40a039ec4 f397b9db8183 177ec38976ba 018e7beed874 018e7beed874 5deeefd8d0fc 72d37f849053 744593ed423d 8fe010d0a605 b38bff5ff039 f397b9db8183 3d702d4d7154 2b65280e6407 b38bff5ff039 018e7beed874 2b65280e6407 ad556f8e81bd f397b9db8183 e7f270f1c28d 509ed963b5e1 509ed963b5e1 509ed963b5e1 509ed963b5e1 509ed963b5e1 018e7beed874 018e7beed874 018e7beed874 018e7beed874 018e7beed874 018e7beed874 018e7beed874 018e7beed874 ad556f8e81bd 90fac7c6abb9 f397b9db8183 7086387253d4 7086387253d4 5deeefd8d0fc 5deeefd8d0fc b9fabc69b505 b9fabc69b505 7086387253d4 2a0c8cb4797c 2a0c8cb4797c 72d37f849053 72d37f849053 72d37f849053 72d37f849053 2a0c8cb4797c 744593ed423d 744593ed423d 744593ed423d 744593ed423d 744593ed423d 744593ed423d 744593ed423d 2b65280e6407 90fac7c6abb9 02c5e6c3ba98 90fac7c6abb9 02c5e6c3ba98 90fac7c6abb9 9b889983cd7b 177ec38976ba 177ec38976ba 177ec38976ba 18ff99706db5 f397b9db8183 f397b9db8183 843dbaebdae4 843dbaebdae4 843dbaebdae4 8fe010d0a605 8fe010d0a605 8fe010d0a605 3d702d4d7154 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Branko Majic
#
# This file is part of Django Conntrackt.
#
# Django Conntrackt is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option) any
# later version.
#
# Django Conntrackt is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# Django Conntrackt. If not, see <http://www.gnu.org/licenses/>.
#
# Django imports.
from django.conf.urls import url
from django.contrib.auth.views import login, logout
# Application imports.
from .views import IndexView, EntityView, entity_iptables, project_iptables, project_diagram
from .views import ProjectView, ProjectCreateView, ProjectUpdateView, ProjectDeleteView
from .views import LocationCreateView, LocationUpdateView, LocationDeleteView
from .views import EntityCreateView, EntityUpdateView, EntityDeleteView
from .views import InterfaceCreateView, InterfaceUpdateView, InterfaceDeleteView
from .views import CommunicationCreateView, CommunicationUpdateView, CommunicationDeleteView
from .views import SearchView, APISearchView
urlpatterns = [
# 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 creating a new project.
url(r'^project/add/$', ProjectCreateView.as_view(), name="project_create"),
# View for updating an existing project.
url(r'^project/(?P<pk>\d+)/edit/$', ProjectUpdateView.as_view(), name="project_update"),
# View for deleting a project.
url(r'^project/(?P<pk>\d+)/remove/$', ProjectDeleteView.as_view(), name="project_delete"),
# View for creating a new location.
url(r'^location/add/$', LocationCreateView.as_view(), name="location_create"),
# View for updating an existing location.
url(r'^location/(?P<pk>\d+)/edit/$', LocationUpdateView.as_view(), name="location_update"),
# View for deleting a location.
url(r'^location/(?P<pk>\d+)/remove/$', LocationDeleteView.as_view(), name="location_delete"),
# View for showing information about an entity.
url(r'^entity/(?P<pk>\d+)/$', EntityView.as_view(),
name='entity'),
# View for creating a new entity.
url(r'^entity/add/$', EntityCreateView.as_view(), name="entity_create"),
# View for updating an existing entity.
url(r'^entity/(?P<pk>\d+)/edit/$', EntityUpdateView.as_view(), name="entity_update"),
# View for deleting an entity.
url(r'^entity/(?P<pk>\d+)/remove/$', EntityDeleteView.as_view(), name="entity_delete"),
# View for creating a new interface.
url(r'^interface/add/$', InterfaceCreateView.as_view(), name="interface_create"),
# View for updating an existing interface.
url(r'^interface/(?P<pk>\d+)/edit/$', InterfaceUpdateView.as_view(), name="interface_update"),
# View for deleting an interface.
url(r'^interface/(?P<pk>\d+)/remove/$', InterfaceDeleteView.as_view(), name="interface_delete"),
# View for creating a new communucation.
url(r'^communication/add/$', CommunicationCreateView.as_view(), name="communication_create"),
# View for updating an existing communication.
url(r'^communication/(?P<pk>\d+)/edit/$', CommunicationUpdateView.as_view(), name="communication_update"),
# View for deleting a communication.
url(r'^communication/(?P<pk>\d+)/remove/$', CommunicationDeleteView.as_view(), name="communication_delete"),
# 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"),
# View for showing project communications in a diagram.
url(r'^project/(?P<pk>\d+)/diagram/$', project_diagram, name="project_diagram"),
# Views for logging-in/out the users.
url(r'^login/$', login, {'template_name': 'conntrackt/login.html'}, name="login"),
url(r'^logout/$', logout, name="logout"),
# View for displaying the search page.
url(r'^search/$', SearchView.as_view(), name="search"),
# View for getting the search results in JSON format.
url(r'^api/search/(?P<search_term>.*)$', APISearchView.as_view(), name="api_search"),
]
|