You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/09/24 20:52:02 UTC
[airavata-django-portal] branch develop updated (7e79e1e -> 01268ae)
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git.
from 7e79e1e AIRAVATA-2809 Cleaning up lint errors, generating lock files
add 13a8dca tutorial: copy to clipboard button
add 503e96b Update sdk to 1.2.2: fixes returning 404 when file not found
add dd523d2 tutorial: adding copy to clipboard buttons
new d0628f8 AIRAVATA-3513 Remove vendored import
new 41323ab AIRAVATA-3513 set DEFAULT_AUTO_FIELD
new ab11ba0 AIRAVATA-3513 Fixing warnings
new 507572c AIRAVATA-3513 Upgrade Django, DRF and Wagtail
new 01268ae Merge branch 'django32-upgrade' into develop
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
django_airavata/apps/admin/urls.py | 25 ++-
django_airavata/apps/api/signals.py | 3 +-
django_airavata/apps/api/thrift_utils.py | 4 +-
django_airavata/apps/api/urls.py | 109 ++++++-----
django_airavata/apps/auth/urls.py | 56 +++---
django_airavata/apps/dataparsers/urls.py | 12 +-
django_airavata/apps/groups/urls.py | 8 +-
django_airavata/apps/workspace/urls.py | 26 +--
django_airavata/settings.py | 2 +
django_airavata/urls.py | 38 ++--
.../base/migrations/0026_auto_20210923_2212.py | 48 +++++
docs/assets/js/clipboard.min.js | 7 +
docs/assets/js/clipboard_init.js | 1 +
docs/dev/new_django_app.md | 4 +-
docs/tutorial/custom_ui_tutorial.md | 199 ++++++++++++++++++---
mkdocs.yml | 4 +
requirements.txt | 8 +-
17 files changed, 381 insertions(+), 173 deletions(-)
create mode 100644 django_airavata/wagtailapps/base/migrations/0026_auto_20210923_2212.py
create mode 100644 docs/assets/js/clipboard.min.js
create mode 100644 docs/assets/js/clipboard_init.js
[airavata-django-portal] 04/05: AIRAVATA-3513 Upgrade Django,
DRF and Wagtail
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 507572ca639f5fb0b0f5e01c77162f7a20ee7276
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Sep 23 18:15:41 2021 -0400
AIRAVATA-3513 Upgrade Django, DRF and Wagtail
---
.../base/migrations/0026_auto_20210923_2212.py | 48 ++++++++++++++++++++++
requirements.txt | 6 +--
2 files changed, 51 insertions(+), 3 deletions(-)
diff --git a/django_airavata/wagtailapps/base/migrations/0026_auto_20210923_2212.py b/django_airavata/wagtailapps/base/migrations/0026_auto_20210923_2212.py
new file mode 100644
index 0000000..5299641
--- /dev/null
+++ b/django_airavata/wagtailapps/base/migrations/0026_auto_20210923_2212.py
@@ -0,0 +1,48 @@
+# Generated by Django 3.2.7 on 2021-09-23 22:12
+
+from django.db import migrations
+import wagtail.core.blocks
+import wagtail.core.fields
+import wagtail.documents.blocks
+import wagtail.embeds.blocks
+import wagtail.images.blocks
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('django_airavata_wagtail_base', '0025_auto_20210319_2247'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='cybergatewayhomepage',
+ name='contact',
+ field=wagtail.core.fields.StreamField([('paragraph_block', wagtail.core.blocks.StructBlock([('custom_class', wagtail.core.blocks.TextBlock(blank=True, help_text='control this element by giving unique class names separated by space and styling the class in css', required=False)), ('body', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.Ch [...]
+ ),
+ migrations.AlterField(
+ model_name='cybergatewayhomepage',
+ name='footer',
+ field=wagtail.core.fields.StreamField([('paragraph_block', wagtail.core.blocks.StructBlock([('custom_class', wagtail.core.blocks.TextBlock(blank=True, help_text='control this element by giving unique class names separated by space and styling the class in css', required=False)), ('body', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.Ch [...]
+ ),
+ migrations.AlterField(
+ model_name='footertext',
+ name='footer',
+ field=wagtail.core.fields.StreamField([('paragraph_block', wagtail.core.blocks.StructBlock([('custom_class', wagtail.core.blocks.TextBlock(blank=True, help_text='control this element by giving unique class names separated by space and styling the class in css', required=False)), ('body', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.Ch [...]
+ ),
+ migrations.AlterField(
+ model_name='homepage',
+ name='body',
+ field=wagtail.core.fields.StreamField([('paragraph_block', wagtail.core.blocks.StructBlock([('custom_class', wagtail.core.blocks.TextBlock(blank=True, help_text='control this element by giving unique class names separated by space and styling the class in css', required=False)), ('body', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.Ch [...]
+ ),
+ migrations.AlterField(
+ model_name='rowblankpagerelation',
+ name='body',
+ field=wagtail.core.fields.StreamField([('paragraph_block', wagtail.core.blocks.StructBlock([('custom_class', wagtail.core.blocks.TextBlock(blank=True, help_text='control this element by giving unique class names separated by space and styling the class in css', required=False)), ('body', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.Ch [...]
+ ),
+ migrations.AlterField(
+ model_name='rowcybergatewayhomepagerelation',
+ name='body',
+ field=wagtail.core.fields.StreamField([('paragraph_block', wagtail.core.blocks.StructBlock([('custom_class', wagtail.core.blocks.TextBlock(blank=True, help_text='control this element by giving unique class names separated by space and styling the class in css', required=False)), ('body', wagtail.core.blocks.RichTextBlock())])), ('image_block', wagtail.core.blocks.StructBlock([('image', wagtail.images.blocks.ImageChooserBlock(required=True)), ('caption', wagtail.core.blocks.Ch [...]
+ ),
+ ]
diff --git a/requirements.txt b/requirements.txt
index 0970edd..dce7784 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,13 +1,13 @@
# Pin these dependencies
-Django==2.2.23
+Django==3.2.7
requests==2.25.1
requests-oauthlib==0.7.0
thrift==0.10.0
thrift_connector==0.24
-djangorestframework==3.11.2
+djangorestframework==3.12.4
django-webpack-loader==0.6.0
-wagtail==2.11.8
+wagtail==2.13.4
wagtailfontawesome==1.2.1
wagtail-draftail-anchors==0.2.0
wagtailcodeblock==1.17.1.0
[airavata-django-portal] 02/05: AIRAVATA-3513 set DEFAULT_AUTO_FIELD
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 41323abe86fac63b9016f20f74738e01568b90e2
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Sep 23 17:40:32 2021 -0400
AIRAVATA-3513 set DEFAULT_AUTO_FIELD
---
django_airavata/settings.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/django_airavata/settings.py b/django_airavata/settings.py
index 68ba46c..3bae1dd 100644
--- a/django_airavata/settings.py
+++ b/django_airavata/settings.py
@@ -169,6 +169,8 @@ DATABASES = {
}
}
+DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
+
# Password validation
# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators
[airavata-django-portal] 01/05: AIRAVATA-3513 Remove vendored import
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit d0628f88215db46b3256bebdbbaac898dd20b340
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Sep 22 17:43:56 2021 -0400
AIRAVATA-3513 Remove vendored import
django.utils.six was removed in Django 3.0 - https://docs.djangoproject.com/en/3.2/releases/3.0/#removed-private-python-2-compatibility-apis
---
django_airavata/apps/api/thrift_utils.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/django_airavata/apps/api/thrift_utils.py b/django_airavata/apps/api/thrift_utils.py
index 4766faf..70d2eb7 100644
--- a/django_airavata/apps/api/thrift_utils.py
+++ b/django_airavata/apps/api/thrift_utils.py
@@ -5,7 +5,6 @@ import copy
import datetime
import logging
-from django.utils import six
from rest_framework.serializers import (
BooleanField,
CharField,
@@ -116,8 +115,7 @@ def create_serializer_class(thrift_data_type, enable_date_time_conversion=False)
attrs[field[2]] = field_serializer
return super().__new__(cls, name, bases, attrs)
- @six.add_metaclass(CustomSerializerMeta)
- class CustomSerializer(Serializer):
+ class CustomSerializer(Serializer, metaclass=CustomSerializerMeta):
"""
Custom Serializer which handle the list fields which holds custom class objects
"""
[airavata-django-portal] 03/05: AIRAVATA-3513 Fixing warnings
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit ab11ba0b1b9421f01fee97820cf58186e328bede
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Thu Sep 23 17:55:30 2021 -0400
AIRAVATA-3513 Fixing warnings
---
django_airavata/apps/admin/urls.py | 25 ++++---
django_airavata/apps/api/signals.py | 3 +-
django_airavata/apps/api/urls.py | 109 +++++++++++++++----------------
django_airavata/apps/auth/urls.py | 56 ++++++++--------
django_airavata/apps/dataparsers/urls.py | 12 ++--
django_airavata/apps/groups/urls.py | 8 +--
django_airavata/apps/workspace/urls.py | 26 ++++----
django_airavata/urls.py | 38 +++++------
docs/dev/new_django_app.md | 4 +-
9 files changed, 140 insertions(+), 141 deletions(-)
diff --git a/django_airavata/apps/admin/urls.py b/django_airavata/apps/admin/urls.py
index 9404e64..24a4b90 100644
--- a/django_airavata/apps/admin/urls.py
+++ b/django_airavata/apps/admin/urls.py
@@ -1,20 +1,19 @@
-from django.conf.urls import url
-from django.urls import path
+from django.urls import path, re_path
from . import views
app_name = 'django_airavata_admin'
urlpatterns = [
- url(r'^$', views.home, name='home'),
- url(r'^applications/', views.app_catalog, name='app_catalog'),
- url(r'^credentials/', views.credential_store, name='credential_store'),
- url(r'^experiment-statistics/', views.experiment_statistics,
- name="experiment-statistics"),
- url(r'^group-resource-profiles/', views.group_resource_profile,
- name='group_resource_profile'),
- url(r'^gateway-resource-profile/', views.gateway_resource_profile,
- name='gateway_resource_profile'),
- url(r'^notices/', views.notices, name='notices'),
- url(r'^users/', views.users, name='users'),
+ re_path(r'^$', views.home, name='home'),
+ re_path(r'^applications/', views.app_catalog, name='app_catalog'),
+ re_path(r'^credentials/', views.credential_store, name='credential_store'),
+ re_path(r'^experiment-statistics/', views.experiment_statistics,
+ name="experiment-statistics"),
+ re_path(r'^group-resource-profiles/', views.group_resource_profile,
+ name='group_resource_profile'),
+ re_path(r'^gateway-resource-profile/', views.gateway_resource_profile,
+ name='gateway_resource_profile'),
+ re_path(r'^notices/', views.notices, name='notices'),
+ re_path(r'^users/', views.users, name='users'),
path('developers/', views.developers, name='developers'),
]
diff --git a/django_airavata/apps/api/signals.py b/django_airavata/apps/api/signals.py
index a3aa065..ceab29b 100644
--- a/django_airavata/apps/api/signals.py
+++ b/django_airavata/apps/api/signals.py
@@ -11,7 +11,8 @@ log = logging.getLogger(__name__)
# Signals
-user_added_to_group = Signal(providing_args=["user", "groups", "request"])
+# providing_args=["user", "groups", "request"]
+user_added_to_group = Signal()
# Receivers
diff --git a/django_airavata/apps/api/urls.py b/django_airavata/apps/api/urls.py
index cc016f5..61b2717 100644
--- a/django_airavata/apps/api/urls.py
+++ b/django_airavata/apps/api/urls.py
@@ -1,6 +1,5 @@
import logging
-from django.conf.urls import url
from django.urls import re_path
from rest_framework import routers
from rest_framework.urlpatterns import format_suffix_patterns
@@ -49,63 +48,63 @@ router.register(r'unverified-email-users', views.UnverifiedEmailUserViewSet,
app_name = 'django_airavata_api'
urlpatterns = [
- url(r'^upload$', views.upload_input_file, name='upload_input_file'),
- url(r'^tus-upload-finish$', views.tus_upload_finish,
- name='tus_upload_finish'),
- url(r'^download', views.download_file, name='download_file'),
- url(r'^delete-file$', views.delete_file, name='delete_file'),
- url(r'^data-products', views.DataProductView.as_view(),
- name='data-products-detail'),
- url(r'^job/submission/local', views.LocalJobSubmissionView.as_view(),
- name="local_job_submission"),
- url(r'^job/submission/cloud', views.CloudJobSubmissionView.as_view(),
- name="cloud_job_submission"),
- url(r'^job/submission/globus', views.GlobusJobSubmissionView.as_view(),
- name="globus_job_submission"),
- url(r'^job/submission/ssh', views.SshJobSubmissionView.as_view(),
- name="ssh_job_submission"),
- url(r'^job/submission/unicore', views.UnicoreJobSubmissionView.as_view(),
- name="unicore_job_submission"),
- url(r'^data/movement/gridftp', views.GridFtpDataMovementView.as_view(),
- name="grid_ftp_data_movement"),
- url(r'^data/movement/local', views.LocalDataMovementView.as_view(),
- name="local_ftp_data_movement"),
- url(r'^data/movement/unicore', views.UnicoreDataMovementView.as_view(),
- name="unicore_ftp_data_movement"),
- url(r'^data/movement/scp', views.ScpDataMovementView.as_view(),
- name="scp_ftp_data_movement"),
- url(r'^gateway-resource-profile',
- views.CurrentGatewayResourceProfile.as_view(),
- name="current_gateway_resource_profile"),
- url(r'^workspace-preferences',
- views.WorkspacePreferencesView.as_view(),
- name="workspace-preferences"),
- url(r'^user-storage/~/(?P<path>.*)$',
- views.UserStoragePathView.as_view(),
- name="user-storage-items"),
+ re_path(r'^upload$', views.upload_input_file, name='upload_input_file'),
+ re_path(r'^tus-upload-finish$', views.tus_upload_finish,
+ name='tus_upload_finish'),
+ re_path(r'^download', views.download_file, name='download_file'),
+ re_path(r'^delete-file$', views.delete_file, name='delete_file'),
+ re_path(r'^data-products', views.DataProductView.as_view(),
+ name='data-products-detail'),
+ re_path(r'^job/submission/local', views.LocalJobSubmissionView.as_view(),
+ name="local_job_submission"),
+ re_path(r'^job/submission/cloud', views.CloudJobSubmissionView.as_view(),
+ name="cloud_job_submission"),
+ re_path(r'^job/submission/globus', views.GlobusJobSubmissionView.as_view(),
+ name="globus_job_submission"),
+ re_path(r'^job/submission/ssh', views.SshJobSubmissionView.as_view(),
+ name="ssh_job_submission"),
+ re_path(r'^job/submission/unicore', views.UnicoreJobSubmissionView.as_view(),
+ name="unicore_job_submission"),
+ re_path(r'^data/movement/gridftp', views.GridFtpDataMovementView.as_view(),
+ name="grid_ftp_data_movement"),
+ re_path(r'^data/movement/local', views.LocalDataMovementView.as_view(),
+ name="local_ftp_data_movement"),
+ re_path(r'^data/movement/unicore', views.UnicoreDataMovementView.as_view(),
+ name="unicore_ftp_data_movement"),
+ re_path(r'^data/movement/scp', views.ScpDataMovementView.as_view(),
+ name="scp_ftp_data_movement"),
+ re_path(r'^gateway-resource-profile',
+ views.CurrentGatewayResourceProfile.as_view(),
+ name="current_gateway_resource_profile"),
+ re_path(r'^workspace-preferences',
+ views.WorkspacePreferencesView.as_view(),
+ name="workspace-preferences"),
+ re_path(r'^user-storage/~/(?P<path>.*)$',
+ views.UserStoragePathView.as_view(),
+ name="user-storage-items"),
re_path(r'^experiment-storage/(?P<experiment_id>[^/]+)/(?P<path>.*)$',
views.ExperimentStoragePathView.as_view(),
name="experiment-storage-items"),
- url(r'^experiment-statistics',
- views.ExperimentStatisticsView.as_view(),
- name="experiment-statistics"),
- url(r'ack-notifications/<slug:id>/',
- views.AckNotificationViewSet.as_view(), name="ack-notifications"),
- url(r'ack-notifications/', views.AckNotificationViewSet.as_view(),
- name="ack-notifications"),
- url(r'^log', views.LogRecordConsumer.as_view(), name='log'),
- url(r'^settings', views.SettingsAPIView.as_view(), name='settings'),
- url(r'^api-status-check/',
- views.APIServerStatusCheckView.as_view(),
- name='api-status-check'),
- url(r'^notebook-output',
- views.notebook_output_view, name="notebook-output"),
- url(r'^html-output',
- views.html_output_view, name="html-output"),
- url(r'^image-output',
- views.image_output_view, name="image-output"),
- url(r'^link-output',
- views.link_output_view, name="link-output"),
+ re_path(r'^experiment-statistics',
+ views.ExperimentStatisticsView.as_view(),
+ name="experiment-statistics"),
+ re_path(r'ack-notifications/<slug:id>/',
+ views.AckNotificationViewSet.as_view(), name="ack-notifications"),
+ re_path(r'ack-notifications/', views.AckNotificationViewSet.as_view(),
+ name="ack-notifications"),
+ re_path(r'^log', views.LogRecordConsumer.as_view(), name='log'),
+ re_path(r'^settings', views.SettingsAPIView.as_view(), name='settings'),
+ re_path(r'^api-status-check/',
+ views.APIServerStatusCheckView.as_view(),
+ name='api-status-check'),
+ re_path(r'^notebook-output',
+ views.notebook_output_view, name="notebook-output"),
+ re_path(r'^html-output',
+ views.html_output_view, name="html-output"),
+ re_path(r'^image-output',
+ views.image_output_view, name="image-output"),
+ re_path(r'^link-output',
+ views.link_output_view, name="link-output"),
]
urlpatterns = router.urls + format_suffix_patterns(urlpatterns)
diff --git a/django_airavata/apps/auth/urls.py b/django_airavata/apps/auth/urls.py
index 45936ba..89909a5 100644
--- a/django_airavata/apps/auth/urls.py
+++ b/django_airavata/apps/auth/urls.py
@@ -1,6 +1,6 @@
-from django.conf.urls import include, url
-from django.urls import path
+from django.conf.urls import include
+from django.urls import path, re_path
from rest_framework import routers
from . import views
@@ -9,31 +9,31 @@ router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet, basename='user')
app_name = 'django_airavata_auth'
urlpatterns = [
- url(r'^', include(router.urls)),
- url(r'^login$', views.start_login, name='login'),
- url(r'^login-password$', views.start_username_password_login,
- name='login_with_password'),
- url(r'^redirect_login/(\w+)/$', views.redirect_login,
- name='redirect_login'),
- url(r'^handle_login$', views.handle_login, name='handle_login'),
- url(r'^logout$', views.start_logout, name='logout'),
- url(r'^callback-error/(?P<idp_alias>\w+)/$', views.callback_error,
- name='callback-error'),
- url(r'^callback/$', views.callback, name='callback'),
- url(r'^create-account$', views.create_account, name='create_account'),
- url(r'^verify-email/(?P<code>[\w-]+)/$', views.verify_email,
- name="verify_email"),
- url(r'^resend-email-link/', views.resend_email_link,
- name="resend_email_link"),
- url(r'^forgot-password/$', views.forgot_password, name="forgot_password"),
- url(r'^reset-password/(?P<code>[\w-]+)/$', views.reset_password,
- name="reset_password"),
- url(r'^login-desktop/$', views.login_desktop, name="login_desktop"),
- url(r'^login-desktop-success/$',
- views.login_desktop_success, name="login_desktop_success"),
- url(r'^refreshed-token-desktop$', views.refreshed_token_desktop,
- name="refreshed_token_desktop"),
- url(r'^access-token-redirect$', views.access_token_redirect, name="access_token_redirect"),
- url(r'^user-profile/', views.user_profile, name="user_profile"),
+ re_path(r'^', include(router.urls)),
+ re_path(r'^login$', views.start_login, name='login'),
+ re_path(r'^login-password$', views.start_username_password_login,
+ name='login_with_password'),
+ re_path(r'^redirect_login/(\w+)/$', views.redirect_login,
+ name='redirect_login'),
+ re_path(r'^handle_login$', views.handle_login, name='handle_login'),
+ re_path(r'^logout$', views.start_logout, name='logout'),
+ re_path(r'^callback-error/(?P<idp_alias>\w+)/$', views.callback_error,
+ name='callback-error'),
+ re_path(r'^callback/$', views.callback, name='callback'),
+ re_path(r'^create-account$', views.create_account, name='create_account'),
+ re_path(r'^verify-email/(?P<code>[\w-]+)/$', views.verify_email,
+ name="verify_email"),
+ re_path(r'^resend-email-link/', views.resend_email_link,
+ name="resend_email_link"),
+ re_path(r'^forgot-password/$', views.forgot_password, name="forgot_password"),
+ re_path(r'^reset-password/(?P<code>[\w-]+)/$', views.reset_password,
+ name="reset_password"),
+ re_path(r'^login-desktop/$', views.login_desktop, name="login_desktop"),
+ re_path(r'^login-desktop-success/$',
+ views.login_desktop_success, name="login_desktop_success"),
+ re_path(r'^refreshed-token-desktop$', views.refreshed_token_desktop,
+ name="refreshed_token_desktop"),
+ re_path(r'^access-token-redirect$', views.access_token_redirect, name="access_token_redirect"),
+ re_path(r'^user-profile/', views.user_profile, name="user_profile"),
path('settings-local/', views.download_settings_local, name="download_settings_local"),
]
diff --git a/django_airavata/apps/dataparsers/urls.py b/django_airavata/apps/dataparsers/urls.py
index 7efc23d..3d15d75 100644
--- a/django_airavata/apps/dataparsers/urls.py
+++ b/django_airavata/apps/dataparsers/urls.py
@@ -1,14 +1,14 @@
-from django.conf.urls import url
+from django.urls import re_path
from . import views
app_name = 'django_airavata_dataparsers'
urlpatterns = [
- url(r'^$', views.home, name='home'),
- url(r'^parsers/(?P<parser_id>[^/]+)/$',
- views.parser_details, name="parser_details"),
- url(r'^edit/(?P<parser_id>[^/]+)/$',
- views.edit_parser, name='edit_parser'),
+ re_path(r'^$', views.home, name='home'),
+ re_path(r'^parsers/(?P<parser_id>[^/]+)/$',
+ views.parser_details, name="parser_details"),
+ re_path(r'^edit/(?P<parser_id>[^/]+)/$',
+ views.edit_parser, name='edit_parser'),
]
diff --git a/django_airavata/apps/groups/urls.py b/django_airavata/apps/groups/urls.py
index c270f5d..9adc562 100755
--- a/django_airavata/apps/groups/urls.py
+++ b/django_airavata/apps/groups/urls.py
@@ -1,11 +1,11 @@
-from django.conf.urls import url
+from django.urls import re_path
from . import views
app_name = 'django_airavata_groups'
urlpatterns = [
- url(r'^$', views.groups_manage, name="manage"),
- url(r'^create/', views.groups_create, name='create'),
- url(r'^edit/(?P<group_id>[^/]+)/$', views.edit_group, name='edit'),
+ re_path(r'^$', views.groups_manage, name="manage"),
+ re_path(r'^create/', views.groups_create, name='create'),
+ re_path(r'^edit/(?P<group_id>[^/]+)/$', views.edit_group, name='edit'),
]
diff --git a/django_airavata/apps/workspace/urls.py b/django_airavata/apps/workspace/urls.py
index f06f529..50bbff4 100644
--- a/django_airavata/apps/workspace/urls.py
+++ b/django_airavata/apps/workspace/urls.py
@@ -1,20 +1,20 @@
-from django.conf.urls import url
+from django.urls import re_path
from . import views
app_name = 'django_airavata_workspace'
urlpatterns = [
- url(r'^projects$', views.projects_list, name='projects'),
- url(r'^projects/(?P<project_id>[^/]+)/$', views.edit_project,
- name='edit_project'),
- url(r'^experiments/(?P<experiment_id>[^/]+)/edit$', views.edit_experiment,
- name='edit_experiment'),
- url(r'^experiments/(?P<experiment_id>[^/]+)/$', views.view_experiment,
- name='view_experiment'),
- url(r'^experiments$', views.experiments_list, name='experiments'),
- url(r'^applications/(?P<app_module_id>[^/]+)/create_experiment$',
- views.create_experiment, name='create_experiment'),
- url(r'^dashboard$', views.dashboard, name='dashboard'),
- url(r'^storage', views.user_storage, name='storage'),
+ re_path(r'^projects$', views.projects_list, name='projects'),
+ re_path(r'^projects/(?P<project_id>[^/]+)/$', views.edit_project,
+ name='edit_project'),
+ re_path(r'^experiments/(?P<experiment_id>[^/]+)/edit$', views.edit_experiment,
+ name='edit_experiment'),
+ re_path(r'^experiments/(?P<experiment_id>[^/]+)/$', views.view_experiment,
+ name='view_experiment'),
+ re_path(r'^experiments$', views.experiments_list, name='experiments'),
+ re_path(r'^applications/(?P<app_module_id>[^/]+)/create_experiment$',
+ views.create_experiment, name='create_experiment'),
+ re_path(r'^dashboard$', views.dashboard, name='dashboard'),
+ re_path(r'^storage', views.user_storage, name='storage'),
]
diff --git a/django_airavata/urls.py b/django_airavata/urls.py
index 2bc487a..2ee2ac1 100644
--- a/django_airavata/urls.py
+++ b/django_airavata/urls.py
@@ -14,10 +14,10 @@ Including another URLconf
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf import settings
-from django.conf.urls import include, url
+from django.conf.urls import include
from django.conf.urls.static import static
from django.contrib import admin
-from django.urls import path
+from django.urls import path, re_path
from wagtail.admin import urls as wagtailadmin_urls
from wagtail.core import urls as wagtail_urls
from wagtail.documents import urls as wagtaildocs_urls
@@ -25,22 +25,22 @@ from wagtail.documents import urls as wagtaildocs_urls
from . import views
urlpatterns = [
- url(r'^djadmin/', admin.site.urls),
- url(r'^admin/', include('django_airavata.apps.admin.urls')),
- url(r'^auth/', include('django_airavata.apps.auth.urls')),
- url(r'^workspace/', include('django_airavata.apps.workspace.urls')),
- url(r'^api/', include('django_airavata.apps.api.urls')),
- url(r'^groups/', include('django_airavata.apps.groups.urls')),
- url(r'^dataparsers/', include('django_airavata.apps.dataparsers.urls')),
+ re_path(r'^djadmin/', admin.site.urls),
+ re_path(r'^admin/', include('django_airavata.apps.admin.urls')),
+ re_path(r'^auth/', include('django_airavata.apps.auth.urls')),
+ re_path(r'^workspace/', include('django_airavata.apps.workspace.urls')),
+ re_path(r'^api/', include('django_airavata.apps.api.urls')),
+ re_path(r'^groups/', include('django_airavata.apps.groups.urls')),
+ re_path(r'^dataparsers/', include('django_airavata.apps.dataparsers.urls')),
path('sdk/', include('airavata_django_portal_sdk.urls')),
- url(r'^home$', views.home, name='home'),
- url(r'^cms/', include(wagtailadmin_urls)),
- url(r'^documents/', include(wagtaildocs_urls)),
+ re_path(r'^home$', views.home, name='home'),
+ re_path(r'^cms/', include(wagtailadmin_urls)),
+ re_path(r'^documents/', include(wagtaildocs_urls)),
# For testing, developing error pages
- url(r'^400/', views.error400),
- url(r'^403/', views.error403),
- url(r'^404/', views.error404),
- url(r'^500/', views.error500),
+ re_path(r'^400/', views.error400),
+ re_path(r'^403/', views.error403),
+ re_path(r'^404/', views.error404),
+ re_path(r'^500/', views.error500),
]
handler400 = views.error400
@@ -56,9 +56,9 @@ for custom_django_app in settings.CUSTOM_DJANGO_APPS:
custom_django_app,
'url_prefix',
custom_django_app.label)
- urlpatterns.append(url(r'^' + url_prefix + '/',
- include(custom_django_app.name + ".urls")))
+ urlpatterns.append(re_path(r'^' + url_prefix + '/',
+ include(custom_django_app.name + ".urls")))
urlpatterns += [
- url(r'', include(wagtail_urls)),
+ re_path(r'', include(wagtail_urls)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
diff --git a/docs/dev/new_django_app.md b/docs/dev/new_django_app.md
index 9bdd819..071a8fe 100644
--- a/docs/dev/new_django_app.md
+++ b/docs/dev/new_django_app.md
@@ -144,13 +144,13 @@ Let's add a starter home page and urls.py config for this app. Create a
`urls.py` file in `myapp/`:
```python
-from django.conf.urls import url
+from django.urls import path
from . import views
app_name = 'django_airavata_myapp'
urlpatterns = [
- url(r'^home$', views.home, name='home'),
+ path('home/', views.home, name='home'),
]
```
[airavata-django-portal] 05/05: Merge branch 'django32-upgrade'
into develop
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git
commit 01268aed7045eab69e1b846ccf65a9d3d75bd573
Merge: 7e79e1e 507572c
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Sep 24 16:51:26 2021 -0400
Merge branch 'django32-upgrade' into develop
django_airavata/apps/admin/urls.py | 25 ++-
django_airavata/apps/api/signals.py | 3 +-
django_airavata/apps/api/thrift_utils.py | 4 +-
django_airavata/apps/api/urls.py | 109 ++++++-----
django_airavata/apps/auth/urls.py | 56 +++---
django_airavata/apps/dataparsers/urls.py | 12 +-
django_airavata/apps/groups/urls.py | 8 +-
django_airavata/apps/workspace/urls.py | 26 +--
django_airavata/settings.py | 2 +
django_airavata/urls.py | 38 ++--
.../base/migrations/0026_auto_20210923_2212.py | 48 +++++
docs/assets/js/clipboard.min.js | 7 +
docs/assets/js/clipboard_init.js | 1 +
docs/dev/new_django_app.md | 4 +-
docs/tutorial/custom_ui_tutorial.md | 199 ++++++++++++++++++---
mkdocs.yml | 4 +
requirements.txt | 8 +-
17 files changed, 381 insertions(+), 173 deletions(-)