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
83bd74d0
Commit
83bd74d0
authored
4 years ago
by
Piotr Gawron
Browse files
Options
Downloads
Patches
Plain Diff
MEDIA files were not served by gunicorn when DEBUG=False
parent
69a377e9
No related branches found
No related tags found
1 merge request
!302
Deb issues
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
smash/smash/urls.py
+10
-7
10 additions, 7 deletions
smash/smash/urls.py
with
10 additions
and
7 deletions
smash/smash/urls.py
+
10
−
7
View file @
83bd74d0
...
...
@@ -13,20 +13,23 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r
'
^blog/
'
, include(
'
blog.urls
'
))
"""
import
re
from
django.conf
import
settings
from
django.conf.urls
import
url
,
include
from
django.conf.urls.static
import
static
from
django.contrib
import
admin
from
django.urls
import
re_path
from
django.views.static
import
serve
from
two_factor.urls
import
urlpatterns
as
tf_urls
from
web
import
api_urls
from
web
import
urls
urlpatterns
=
[
url
(
r
'
^admin/
'
,
admin
.
site
.
urls
),
url
(
r
''
,
include
(
urls
)),
url
(
r
'
^api/
'
,
include
(
api_urls
)),
url
(
r
''
,
include
(
tf_urls
)),
]
+
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
url
(
r
'
^admin/
'
,
admin
.
site
.
urls
),
url
(
r
''
,
include
(
urls
)),
url
(
r
'
^api/
'
,
include
(
api_urls
)),
url
(
r
''
,
include
(
tf_urls
)),
re_path
(
r
'
^%s(?P<path>.*)$
'
%
re
.
escape
(
settings
.
MEDIA_URL
.
lstrip
(
'
/
'
)),
serve
,
{
'
document_root
'
:
settings
.
MEDIA_ROOT
})
]
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