Skip to content

Commit 8d26677

Browse files
committed
The changes made in this commit include:
- Added `MAIN_PAGE` variable to `settings.py` file. - Modified `urls.py` file to include `settings.MAIN_PAGE` in the path. These changes add a new variable `MAIN_PAGE` to the `settings.py` file, which retrieves its value from the environment variable `MAIN_PAGE`. In the `urls.py` file, the path for the signals app is modified to include `settings.MAIN_PAGE` as the prefix for the URL.
1 parent cc040f8 commit 8d26677

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/signal_documentation/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@
181181
MEDIA_ROOT: str = os.path.join(BASE_DIR, 'media')
182182

183183

184+
MAIN_PAGE = os.environ.get('MAIN_PAGE', '')
185+
184186
# Default primary key field type
185187
# https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field
186188

src/signal_documentation/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
urlpatterns: list[URLResolver] = [
3939
path('admin/', admin.site.urls),
4040
path('__debug__/', include('debug_toolbar.urls')),
41-
path('', include('signals.urls')),
41+
path(settings.MAIN_PAGE, include('signals.urls')),
4242
]
4343

4444
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # type: ignore

0 commit comments

Comments
 (0)