Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
panikdb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
radiopanik
panikdb
Commits
0ca2f7cf
Commit
0ca2f7cf
authored
Apr 12, 2013
by
fred
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
service static & media files
parent
e895713c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
panikdb/settings.py
panikdb/settings.py
+2
-1
panikdb/urls.py
panikdb/urls.py
+7
-0
No files found.
panikdb/settings.py
View file @
0ca2f7cf
...
...
@@ -54,7 +54,7 @@ MEDIA_ROOT = os.path.join(PROJECT_PATH, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
MEDIA_URL
=
''
MEDIA_URL
=
'
/media/
'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
...
...
@@ -67,6 +67,7 @@ STATIC_ROOT = os.path.join(PROJECT_PATH, 'static')
STATIC_URL
=
'/static/'
CKEDITOR_UPLOAD_PATH
=
os
.
path
.
join
(
MEDIA_ROOT
,
'uploads'
)
CKEDITOR_UPLOAD_PREFIX
=
'/media/uploads/'
# Additional locations of static files
STATICFILES_DIRS
=
(
...
...
panikdb/urls.py
View file @
0ca2f7cf
from
django.conf.urls
import
patterns
,
include
,
url
from
django.conf
import
settings
from
django.contrib
import
admin
admin
.
autodiscover
()
...
...
@@ -14,3 +15,9 @@ urlpatterns = patterns('',
url
(
r
'^admin/'
,
include
(
admin
.
site
.
urls
)),
)
from
django.contrib.staticfiles.urls
import
staticfiles_urlpatterns
urlpatterns
+=
staticfiles_urlpatterns
()
from
django.conf.urls.static
import
static
urlpatterns
+=
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
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