Commit 860aa4165bc07aba8356a8b4763c8b781c2fd97e

Authored by Alexis Koralewski
1 parent a98ca72e
Exists in dev

Adding new version of Django (4.1), fixing urls with that change

install/requirements.txt
1 1 anyjson==0.3.3
2 2 click==8.0.3
3 3 DateTime==4.3
4   -Django==3.2
  4 +Django==4.1
5 5 django-admin-tools==0.9.1
6 6 django-bootstrap3==21.1
7 7 django-extensions==3.1.5
... ...
src/core/pyros_django/alert_manager/urls.py
1   -from django.conf.urls import url
  1 +from django.urls import include, path # For django versions from 2.0 and up
2 2 from . import views
3 3  
4 4 urlpatterns = [
5   - url(r'^start_simulation', views.start_simulation, name="start_simulation"),
6   - url(r'^change_obs_strategy/(?P<alert_id>\d+)$', views.change_obs_strategy, name="change_obs_strategy"),
7   - url(r'^change_obs_strategy_validate/(?P<alert_id>\d+)$', views.change_obs_strategy_validate, name="change_obs_strategy_validate"),
8   - url(r'^alerts$', views.alerts_list, name='alerts_list'),
9   - url(r'^change_default_strategy/(?P<strat_id>\d+)$', views.change_default_strategy, name='change_default_strategy'),
  5 + path('start_simulation', views.start_simulation, name="start_simulation"),
  6 + path('change_obs_strategy/(?P<alert_id>\d+)$', views.change_obs_strategy, name="change_obs_strategy"),
  7 + path('change_obs_strategy_validate/(?P<alert_id>\d+)$', views.change_obs_strategy_validate, name="change_obs_strategy_validate"),
  8 + path('alerts$', views.alerts_list, name='alerts_list'),
  9 + path('change_default_strategy/(?P<strat_id>\d+)$', views.change_default_strategy, name='change_default_strategy'),
10 10 ]
... ...
src/core/pyros_django/analyzer/urls.py
1   -from django.conf.urls import url
  1 +
2 2 from . import views
3 3  
4 4 urlpatterns = [
... ...
src/core/pyros_django/devices/urls.py
1   -from django.conf.urls import url
  1 +from django.urls import include, path # For django versions from 2.0 and up
2 2 from . import views
3 3  
4 4  
5 5 urlpatterns = [
6   -url(r'^observation_status$', views.observation_status, name="observation_status"),
7   -url(r'^update_cagire_logs$', views.update_cagire_logs, name="update_cagire_logs"),
8   -url(r'^update_telescope_logs$', views.update_telescope_logs, name="update_telescope_logs"),
9   -url(r'^update_ddrago_r_logs$', views.update_ddrago_r_logs, name="update_ddrago_r_logs"),
10   -url(r'^update_ddrago_b_logs$', views.update_ddrago_b_logs, name="update_ddrago_b_logs"),
  6 +path('observation_status', views.observation_status, name="observation_status"),
  7 +path('update_cagire_logs', views.update_cagire_logs, name="update_cagire_logs"),
  8 +path('update_telescope_logs', views.update_telescope_logs, name="update_telescope_logs"),
  9 +path('update_ddrago_r_logs', views.update_ddrago_r_logs, name="update_ddrago_r_logs"),
  10 +path('update_ddrago_b_logs', views.update_ddrago_b_logs, name="update_ddrago_b_logs"),
11 11 ]
12 12 \ No newline at end of file
... ...
src/core/pyros_django/majordome/urls.py
1   -from django.conf.urls import url
  1 +
2 2 from . import views
3 3  
4 4 urlpatterns = []
... ...
src/core/pyros_django/monitoring/urls.py
1   -from django.conf.urls import url
  1 +
2 2 from django.urls import path
3 3 from . import views
4 4  
... ...
src/core/pyros_django/observation_manager/urls.py
1   -from django.conf.urls import url
  1 +
2 2 from . import views
3 3  
4 4 urlpatterns = [
... ...
src/core/pyros_django/pyros/urls.py
... ... @@ -16,7 +16,6 @@ Including another URLconf
16 16 from django.contrib import admin
17 17  
18 18 from django.conf import settings
19   -from django.conf.urls import include, url # For django versions before 2.0
20 19 from django.urls import include, path # For django versions from 2.0 and up
21 20  
22 21 from django.conf.urls.static import static
... ... @@ -29,21 +28,21 @@ urlpatterns = [
29 28 ]
30 29 '''
31 30 urlpatterns = [
32   - url(r'^admin/', admin.site.urls),
33   - url(r'^dashboard/', include('dashboard.urls')),
34   - url(r'^devices/', include('devices.urls')),
35   - url(r'^scheduler/', include('scheduler.urls')),
36   - url(r'^alert_manager/', include('alert_manager.urls')),
37   - url(r'^analyzer/', include('analyzer.urls')),
38   - url(r'^majordome/', include('majordome.urls')),
39   - url(r'^monitoring/', include('monitoring.urls')),
40   - url(r'^observation_manager/', include('observation_manager.urls')),
41   - url(r'^routine_manager/', include('routine_manager.urls')),
42   - url(r'^user_manager/', include('user_manager.urls')),
43   - url(r'^scientific_program/', include('scientific_program.urls')),
44   - url(r'^obs_config/', include('obsconfig.urls')),
45   - url(r'^api/', include('api.urls')),
46   - url(r'^$', dashboard.views.index)
  31 + path('admin/', admin.site.urls),
  32 + path('dashboard/', include('dashboard.urls')),
  33 + path('devices/', include('devices.urls')),
  34 + path('scheduler/', include('scheduler.urls')),
  35 + path('alert_manager/', include('alert_manager.urls')),
  36 + path('analyzer/', include('analyzer.urls')),
  37 + path('majordome/', include('majordome.urls')),
  38 + path('monitoring/', include('monitoring.urls')),
  39 + path('observation_manager/', include('observation_manager.urls')),
  40 + path('routine_manager/', include('routine_manager.urls')),
  41 + path('user_manager/', include('user_manager.urls')),
  42 + path('scientific_program/', include('scientific_program.urls')),
  43 + path('obs_config/', include('obsconfig.urls')),
  44 + path('api/', include('api.urls')),
  45 + path('', dashboard.views.index)
47 46 ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
48 47  
49 48 if settings.DEBUG:
... ...
src/core/pyros_django/routine_manager/urls.py
1   -from django.conf.urls import url
  1 +from django.urls import re_path
2 2 from django.urls import path
3 3 from . import views
4 4  
5 5 urlpatterns = [
6   - url(r'^$', views.sequences_list, name="sequences_list"),
7   - url(r'^(?P<status>-?\d)/(?P<message>.+)$',
  6 + re_path(r'^$', views.sequences_list, name="sequences_list"),
  7 + re_path(r'^(?P<status>-?\d)/(?P<message>.+)$',
8 8 views.sequences_list, name="sequences_list"),
9 9  
10   - url(r'^action_request/(?P<req_id>\d+)/(?P<action>[a-z_]{1,20})$',
  10 + re_path(r'^action_request/(?P<req_id>\d+)/(?P<action>[a-z_]{1,20})$',
11 11 views.action_request, name="action_request"),
12   - url(r'^action_request/(?P<req_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
  12 + re_path(r'^action_request/(?P<req_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
13 13 views.action_request, name="action_request_message"),
14 14  
15   - url(r'^action_sequence/(?P<seq_id>\d+)/(?P<action>[a-z_]{1,20})$',
  15 + re_path(r'^action_sequence/(?P<seq_id>\d+)/(?P<action>[a-z_]{1,20})$',
16 16 views.action_sequence, name="action_sequence"),
17   - url(r'^action_sequence/(?P<seq_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
  17 + re_path(r'^action_sequence/(?P<seq_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
18 18 views.action_sequence, name="action_sequence_message"),
19 19  
20   - url(r'^action_album/(?P<alb_id>\d+)/(?P<action>[a-z_]{1,20})$',
  20 + re_path(r'^action_album/(?P<alb_id>\d+)/(?P<action>[a-z_]{1,20})$',
21 21 views.action_album, name="action_album"),
22   - url(r'^action_album/(?P<alb_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
  22 + re_path(r'^action_album/(?P<alb_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
23 23 views.action_album, name="action_album_message"),
24 24  
25   - url(r'^action_plan/(?P<plan_id>\d+)/(?P<action>[a-z_]{1,20})$',
  25 + re_path(r'^action_plan/(?P<plan_id>\d+)/(?P<action>[a-z_]{1,20})$',
26 26 views.action_plan, name="action_plan"),
27   - url(r'^action_plan/(?P<plan_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
  27 + re_path(r'^action_plan/(?P<plan_id>\d+)/(?P<action>[a-z_]{1,20})/(?P<status>-?\d)/(?P<message>.+)$',
28 28 views.action_plan, name="action_plan_message"),
29 29  
30   - url(r'^request_validate/(?P<req_id>\d+)$',
  30 + re_path(r'^request_validate/(?P<req_id>\d+)$',
31 31 views.request_validate, name="request_validate"),
32   - url(r'^sequence_validate/(?P<seq_id>\d+)$',
  32 + re_path(r'^sequence_validate/(?P<seq_id>\d+)$',
33 33 views.sequence_validate, name="sequence_validate"),
34   - url(r'^album_validate/(?P<alb_id>\d+)$',
  34 + re_path(r'^album_validate/(?P<alb_id>\d+)$',
35 35 views.album_validate, name="album_validate"),
36   - url(r'^plan_validate/(?P<plan_id>\d+)$',
  36 + re_path(r'^plan_validate/(?P<plan_id>\d+)$',
37 37 views.plan_validate, name="plan_validate"),
38 38  
39   - url(r'^create_request$', views.create_request, name="create_request"),
40   - #url(r'^create_sequence/(?P<req_id>\d+)$', views.create_sequence, name="create_sequence"),
41   - url(r'^create_sequence/', views.create_sequence, name="create_sequence"),
42   - url(r'^create_album/(?P<seq_id>\d+)$',
  39 + re_path(r'^create_request$', views.create_request, name="create_request"),
  40 + #re_path(r'^create_sequence/(?P<req_id>\d+)$', views.create_sequence, name="create_sequence"),
  41 + re_path(r'^create_sequence/', views.create_sequence, name="create_sequence"),
  42 + re_path(r'^create_album/(?P<seq_id>\d+)$',
43 43 views.create_album, name="create_album"),
44   - url(r'^create_plan/(?P<alb_id>\d+)$', views.create_plan, name="create_plan"),
  44 + re_path(r'^create_plan/(?P<alb_id>\d+)$', views.create_plan, name="create_plan"),
45 45  
46   - url(r'^submit_request/(?P<req_id>\d+)/(?P<redir>[a-z_]{1,20})$',
  46 + re_path(r'^submit_request/(?P<req_id>\d+)/(?P<redir>[a-z_]{1,20})$',
47 47 views.submit_request, name="submit_request"),
48   - url(r'^unsubmit_request/(?P<req_id>\d+)$',
  48 + re_path(r'^unsubmit_request/(?P<req_id>\d+)$',
49 49 views.unsubmit_request, name="unsubmit_request"),
50 50  
51   - url(r'^export_request/(?P<req_id>\d+)$',
  51 + re_path(r'^export_request/(?P<req_id>\d+)$',
52 52 views.export_request, name="export_request"),
53   - url(r'^import_request$', views.import_request, name="import_request"),
  53 + re_path(r'^import_request$', views.import_request, name="import_request"),
54 54 # path("test_create_plan",views.test_create_plan,name="test_create_plan"),
55 55 path("edit_plan/<int:id>", views.edit_plan, name="edit_plan"),
56 56 path("delete_albums/<int:seq_id>", views.delete_albums, name="delete_albums"),
... ...
src/core/pyros_django/scheduler/urls.py
1   -from django.conf.urls import url
  1 +from django.urls import include, path # For django versions from 2.0 and up
2 2 from . import views
3 3  
4 4 from django.conf import settings
5 5 from django.conf.urls.static import static
6 6  
7 7 urlpatterns = [
8   - url(r'^$', views.current_schedule, name="current_schedule"),
9   - url(r'^retrieve_schedule$', views.retrieve_schedule, name="retrieve_schedule"),
10   - url(r'^simulation$', views.schedule_simulation, name="schedule_simulation"),
  8 + path('', views.current_schedule, name="current_schedule"),
  9 + path('retrieve_schedule', views.retrieve_schedule, name="retrieve_schedule"),
  10 + path('simulation', views.schedule_simulation, name="schedule_simulation"),
11 11 ]
12 12 \ No newline at end of file
... ...
src/core/pyros_django/scientific_program/urls.py
1   -from django.conf.urls import url
  1 +
2 2 from django.urls import path
3 3 from . import views
4 4  
... ...
src/core/pyros_django/user_manager/urls.py
1   -from django.conf.urls import url
2   -from django.urls import path
  1 +from django.urls import path, re_path
3 2 from . import views
4 3 from django.contrib.auth import views as auth_views
5 4 from .forms import UserPasswordResetForm
6 5  
7 6 urlpatterns = [
8 7 path('users', views.users, name="users"),
9   - url(r'^create$', views.create_user, name="create_user"),
10   - url(r'^forgotten_password$', views.forgotten_password, name="forgotten_password"),
11   - url(r'^creation_validate$', views.user_signup_validation, name="user_signup_validation"),
12   - url(r'^login$', views.login_validation, name="login_validation"),
13   - url(r'^logout$', views.user_logout, name="user_logout"),
  8 + re_path(r'^create$', views.create_user, name="create_user"),
  9 + re_path(r'^forgotten_password$', views.forgotten_password, name="forgotten_password"),
  10 + re_path(r'^creation_validate$', views.user_signup_validation, name="user_signup_validation"),
  11 + re_path(r'^login$', views.login_validation, name="login_validation"),
  12 + re_path(r'^logout$', views.user_logout, name="user_logout"),
14 13 path('signin', views.user_signin, name="user_signin"),
15 14 path('sp_profile', views.superoperator_return, name="sp_profile"),
16 15 path('users/<int:pk>', views.user_detail_view, name='user_detail'),
... ...