diff --git a/app/rooms/examples/eg001_create_room_with_data/views.py b/app/rooms/examples/eg001_create_room_with_data/views.py index 2c86868d..3fe870e6 100644 --- a/app/rooms/examples/eg001_create_room_with_data/views.py +++ b/app/rooms/examples/eg001_create_room_with_data/views.py @@ -53,5 +53,6 @@ def get_view(): return render_template( "eg001_create_room_with_data.html", title="Creating a room with data", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", ) diff --git a/app/rooms/examples/eg002_create_room_with_template/views.py b/app/rooms/examples/eg002_create_room_with_template/views.py index 57b78c99..ead506a1 100644 --- a/app/rooms/examples/eg002_create_room_with_template/views.py +++ b/app/rooms/examples/eg002_create_room_with_template/views.py @@ -66,6 +66,7 @@ def get_view(): return render_template( "eg002_create_room_with_template.html", title="Creating a room with a template", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", templates=templates ) diff --git a/app/rooms/examples/eg003_export_data_from_room/views.py b/app/rooms/examples/eg003_export_data_from_room/views.py index 02b62533..7bcfe8c7 100644 --- a/app/rooms/examples/eg003_export_data_from_room/views.py +++ b/app/rooms/examples/eg003_export_data_from_room/views.py @@ -62,6 +62,7 @@ def get_view(): return render_template( "eg003_export_data_from_room.html", title="Exporting data from a room", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", rooms=rooms, ) diff --git a/app/rooms/examples/eg004_add_forms_to_room/views.py b/app/rooms/examples/eg004_add_forms_to_room/views.py index aaaaba52..08cf6bfc 100644 --- a/app/rooms/examples/eg004_add_forms_to_room/views.py +++ b/app/rooms/examples/eg004_add_forms_to_room/views.py @@ -65,7 +65,8 @@ def get_view(): return render_template( "eg004_add_forms_to_room.html", title="Adding forms to a room", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", rooms=rooms, forms=forms ) diff --git a/app/rooms/examples/eg005_get_rooms_with_filters/views.py b/app/rooms/examples/eg005_get_rooms_with_filters/views.py index b7df7db3..de809f92 100644 --- a/app/rooms/examples/eg005_get_rooms_with_filters/views.py +++ b/app/rooms/examples/eg005_get_rooms_with_filters/views.py @@ -69,7 +69,8 @@ def get_view(): return render_template( "eg005_get_rooms_with_filters.html", title="Getting rooms with filters", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", rooms=rooms, start=start_date.strftime("%Y-%m-%d"), end=end_date.strftime("%Y-%m-%d") diff --git a/app/rooms/examples/eg006_create_external_form_fill_session/views.py b/app/rooms/examples/eg006_create_external_form_fill_session/views.py index 65822601..8eab8b8d 100644 --- a/app/rooms/examples/eg006_create_external_form_fill_session/views.py +++ b/app/rooms/examples/eg006_create_external_form_fill_session/views.py @@ -64,7 +64,8 @@ def get_view(): return render_template( "eg006_create_external_form_fill_session.html", title="Create an external form fill session", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", rooms=rooms, ) @@ -93,7 +94,8 @@ def get_forms(): return render_template( "eg006_create_external_form_fill_session.html", title="Create an external form fill session", - source_file=path.basename(path.dirname(__file__)) + "/controller.py", + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", forms=forms, room_id=args["room_id"], room_name=room.name diff --git a/app/rooms/examples/eg007_create_form_group/views.py b/app/rooms/examples/eg007_create_form_group/views.py index c733e120..fb00d761 100644 --- a/app/rooms/examples/eg007_create_form_group/views.py +++ b/app/rooms/examples/eg007_create_form_group/views.py @@ -53,5 +53,6 @@ def get_view(): return render_template( "eg007_create_form_group.html", title="Creating a form group", - source_file=path.basename(path.dirname(__file__)) + "/controller.py" + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", ) diff --git a/app/rooms/examples/eg008_grant_office_access_to_form_group/views.py b/app/rooms/examples/eg008_grant_office_access_to_form_group/views.py index e7112a64..09225778 100644 --- a/app/rooms/examples/eg008_grant_office_access_to_form_group/views.py +++ b/app/rooms/examples/eg008_grant_office_access_to_form_group/views.py @@ -1,6 +1,8 @@ from docusign_rooms.client.api_exception import ApiException from flask import Blueprint, render_template, current_app +from os import path + from app.docusign import authenticate from app.error_handlers import process_error from .controller import Eg008Controller @@ -63,5 +65,7 @@ def get_view(): return render_template( "eg008_grant_office_access_to_form_group.html", offices=offices, - form_groups=form_groups + form_groups=form_groups, + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", ) diff --git a/app/rooms/examples/eg009_assign_form_to_form_group/views.py b/app/rooms/examples/eg009_assign_form_to_form_group/views.py index 70a412e1..3e0586f1 100644 --- a/app/rooms/examples/eg009_assign_form_to_form_group/views.py +++ b/app/rooms/examples/eg009_assign_form_to_form_group/views.py @@ -1,4 +1,5 @@ import json +from os import path from docusign_rooms.client.api_exception import ApiException from flask import Blueprint, render_template, current_app @@ -73,5 +74,7 @@ def get_view(): return render_template( "eg009_assign_form_to_form_group.html", forms=forms, - form_groups=form_groups + form_groups=form_groups, + source_file=path.relpath(path.dirname(__file__), start='app') + "/controller.py", + source_url="https://github.com/docusign/code-examples-python/tree/master/app/" + path.relpath(path.dirname(__file__), start='app') + "/controller.py", ) diff --git a/app/rooms/templates/eg001_create_room_with_data.html b/app/rooms/templates/eg001_create_room_with_data.html index c36b430e..0e6a3318 100644 --- a/app/rooms/templates/eg001_create_room_with_data.html +++ b/app/rooms/templates/eg001_create_room_with_data.html @@ -12,6 +12,9 @@
+ View source file {{ source_file }} on GitHub. +