First version that works with Debian 9.. kind of
[ais.git] / bin / djais / urls.py
1 from django.conf.urls import url
2 from django.conf import settings
3 from django.conf.urls.static import static
4 from django.contrib.staticfiles import views
5 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
6
7
8
9 import ais.djais.views
10
11 # Uncomment the next two lines to enable the admin:
12 # from django.contrib import admin
13 # admin.autodiscover()
14
15 urlpatterns = [
16     url('^$', ais.djais.views.index),
17     url('^fleet/$', ais.djais.views.fleets),
18     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/$', ais.djais.views.fleet),
19     url('^fleet/add$', ais.djais.views.fleet_edit, { 'fleetname': None}),
20     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/edit$', ais.djais.views.fleet_edit),
21     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/list$', ais.djais.views.fleet_vessels),
22     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/add$', ais.djais.views.fleet_vessel_add),
23     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/add_vessel$', ais.djais.views.fleet_vessel_add2),
24     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/remove_vessel$', ais.djais.views.fleet_vessel_remove),
25     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/users$', ais.djais.views.fleet_users),
26     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/lastpos$', ais.djais.views.fleet_lastpos),
27     url('^fleet/(?P<fleetname>[ a-zA-Z0-9_]+)/history$', ais.djais.views.fleet_history),
28
29     url('^vessel/$', ais.djais.views.vessel_search),
30     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/$', ais.djais.views.vessel),
31     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/lastpos$', ais.djais.views.vessel_lastpos),
32     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/manual_input$', ais.djais.views.vessel_manual_input),
33     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/history$', ais.djais.views.vessel_history),
34     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/track$', ais.djais.views.vessel_history, {'format': 'track'}),
35     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/animation$', ais.djais.views.vessel_history, {'format': 'animation'}),
36     url('^vessel/(?P<strmmsi>[0-9A-Z]{9})/csv$', ais.djais.views.vessel_history, {'format': 'csv'}),
37     url('^user/$', ais.djais.views.users),
38     url('^user/(?P<login>[a-zA-Z0-9_]+)/$', ais.djais.views.user_detail),
39     url('^user/(?P<login>[a-zA-Z0-9_]+)/edit$', ais.djais.views.user_edit),
40     url('^user/add$', ais.djais.views.user_edit, {'login': None} ),
41     url('^user/(?P<login>[a-zA-Z0-9_]+)/change_password$', ais.djais.views.user_change_password),
42     url('^user/(?P<login>[a-zA-Z0-9_]+)/delete$', ais.djais.views.user_delete),
43     url('^job/$', ais.djais.views.jobs_index),
44     url('^job/(?P<jobid>[A-Z0-9]+)/$', ais.djais.views.job_detail),
45     url('^job/(?P<jobid>[A-Z0-9]+)/download$', ais.djais.views.job_get),
46     url('^job/(?P<jobid>[A-Z0-9]+)/log$', ais.djais.views.job_log),
47     url('^source/$', ais.djais.views.sources_index),
48     url('^source/stats$', ais.djais.views.sources_stats),
49     url('^news/(?P<page>\d*)$', ais.djais.views.news),
50     url('^news/feed', ais.djais.views.news_atom),
51     url('^logout$', ais.djais.views.logout),
52
53     # Example:
54     # ('^ais2/', include('ais2.foo.urls')),
55
56     # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
57     # to INSTALLED_APPS to enable admin documentation:
58     # ('^admin/doc/', include('django.contrib.admindocs.urls')),
59
60     # Uncomment the next line to enable the admin:
61     # ('^admin/(.*)', admin.site.root),
62 #    url(r'^(?P<path>.*)$', views.serve),
63
64 ]  + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
65 #]
66
67
68 #urlpatterns += staticfiles_urlpatterns()