Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widgets_FEKK
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kyla Martin
widgets_FEKK
Commits
087073ca
Commit
087073ca
authored
May 18, 2022
by
Emmanuel Linus T. Evangelista
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add support for media upload
parent
ddcac344
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
settings.py
WidgetFEKK/WidgetFEKK/settings.py
+3
-1
urls.py
WidgetFEKK/WidgetFEKK/urls.py
+5
-0
No files found.
WidgetFEKK/WidgetFEKK/settings.py
View file @
087073ca
...
@@ -10,7 +10,7 @@ For the full list of settings and their values, see
...
@@ -10,7 +10,7 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
"""
from
os
import
getenv
from
os
import
getenv
,
path
from
pathlib
import
Path
from
pathlib
import
Path
from
dotenv
import
load_dotenv
from
dotenv
import
load_dotenv
...
@@ -19,6 +19,8 @@ load_dotenv()
...
@@ -19,6 +19,8 @@ load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR
=
Path
(
__file__
)
.
resolve
()
.
parent
.
parent
BASE_DIR
=
Path
(
__file__
)
.
resolve
()
.
parent
.
parent
MEDIA_ROOT
=
path
.
join
(
BASE_DIR
,
'media'
)
MEDIA_URL
=
'/uploads/'
# Quick-start development settings - unsuitable for production
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
...
...
WidgetFEKK/WidgetFEKK/urls.py
View file @
087073ca
...
@@ -13,6 +13,8 @@ Including another URLconf
...
@@ -13,6 +13,8 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
"""
from
django.conf
import
settings
from
django.conf.urls.static
import
static
from
django.contrib
import
admin
from
django.contrib
import
admin
from
django.urls
import
path
,
include
from
django.urls
import
path
,
include
import
Announcements.views
as
Announcements_views
import
Announcements.views
as
Announcements_views
...
@@ -34,3 +36,6 @@ urlpatterns = [
...
@@ -34,3 +36,6 @@ urlpatterns = [
]
]
if
settings
.
DEBUG
:
urlpatterns
+=
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment