Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
scheduling-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMASCH
scheduling-system
Commits
2f096418
Commit
2f096418
authored
1 year ago
by
Carlos Vega
Browse files
Options
Downloads
Patches
Plain Diff
improvement: added support for app url prefix
parent
482f67c5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!445
Support for Python 3.11
Pipeline
#81018
passed
1 year ago
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG
+2
-1
2 additions, 1 deletion
CHANGELOG
smash/smash/local_settings.py.template
+5
-0
5 additions, 0 deletions
smash/smash/local_settings.py.template
smash/smash/settings.py
+3
-0
3 additions, 0 deletions
smash/smash/settings.py
smash/smash/urls.py
+8
-4
8 additions, 4 deletions
smash/smash/urls.py
with
18 additions
and
5 deletions
CHANGELOG
+
2
−
1
View file @
2f096418
...
...
@@ -4,8 +4,9 @@ smasch (1.3.1-1) stable; urgency=medium
deprectation warnings
* dependencies: updated python related dependencies
* dependencies: updated npm packages and removed unused packages
* breaking change: dropped support for python < 3.9
* breaking change: dropped support for python < 3.9
(now supports python 3.11)
* docker: upgraded docker file and docker compose yml
* small improvement: allow the definition of a prefix to access as /smasch/*
-- Carlos Vega <carlos.vega@lih.lu> Tue, 7 Nov 2023 10:35:00 +0200
...
...
This diff is collapsed.
Click to expand it.
smash/smash/local_settings.py.template
+
5
−
0
View file @
2f096418
...
...
@@ -89,3 +89,8 @@ NPM_ROOT_PATH = '/path/to/smasch/'
AUTH_LDAP_SERVER_URI = "ldap://lcsb-cdc-lums-01.uni.lu"
AUTH_LDAP_BASE_DN = "cn=users,cn=accounts,dc=uni,dc=lu"
# In order to support a prefix in the path, we should define the following variable SMASCH_PATH_PREFIX and override the STATIC_URL and MEDIA_URL
# SMASCH_PATH_PREFIX = "smasch/"
# STATIC_URL = "/smasch/static/"
# MEDIA_URL = "/smasch/media/"
\ No newline at end of file
This diff is collapsed.
Click to expand it.
smash/smash/settings.py
+
3
−
0
View file @
2f096418
...
...
@@ -183,6 +183,9 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.10/howto/static-files/
# In order to support a prefix in the path, we should define the following variable SMASCH_PATH_PREFIX and override the STATIC_URL and MEDIA_URL
# this can be overriden in the local_settings.py file
SMASCH_PATH_PREFIX
=
""
STATIC_URL
=
"
/static/
"
MEDIA_URL
=
"
/media/
"
...
...
This diff is collapsed.
Click to expand it.
smash/smash/urls.py
+
8
−
4
View file @
2f096418
...
...
@@ -30,12 +30,16 @@ handler500 = "web.views.e500_error"
handler403
=
"
web.views.e403_permission_denied
"
handler400
=
"
web.views.e400_bad_request
"
if
settings
.
SMASCH_PATH_PREFIX
!=
""
:
url_prefix
=
settings
.
SMASCH_PATH_PREFIX
.
lstrip
(
"
/
"
).
rstrip
(
"
/
"
)
+
"
/
"
else
:
url_prefix
=
""
urlpatterns
=
[
re_path
(
r
"
^admin/
"
,
admin
.
site
.
urls
),
re_path
(
r
"
"
,
include
(
urls
)),
re_path
(
r
"
^api/
"
,
include
(
api_urls
)),
re_path
(
r
"
"
,
include
(
tf_urls
)),
re_path
(
r
f
"
^
{
url_prefix
}
admin/
"
,
admin
.
site
.
urls
),
re_path
(
r
f
"
{
url_prefix
}
"
,
include
(
urls
)),
re_path
(
r
f
"
^
{
url_prefix
}
api/
"
,
include
(
api_urls
)),
re_path
(
r
f
"
{
url_prefix
}
"
,
include
(
tf_urls
)),
]
if
settings
.
SERVE_STATIC
or
settings
.
DEBUG
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment