Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
radiopanik
panikweb
Commits
3e956da2
Commit
3e956da2
authored
Aug 19, 2013
by
fred
Browse files
handle /media/ URLs
parent
cdd72568
Changes
2
Hide whitespace changes
Inline
Side-by-side
panikweb/settings.py
View file @
3e956da2
...
...
@@ -60,7 +60,7 @@ MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
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
...
...
panikweb/urls.py
View file @
3e956da2
from
django.conf.urls
import
patterns
,
include
,
url
from
django.conf
import
settings
from
django.views.generic
import
RedirectView
from
django.core.urlresolvers
import
reverse_lazy
...
...
@@ -21,6 +23,9 @@ urlpatterns = patterns('',
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
)
try
:
from
local_urls
import
*
except
ImportError
,
e
:
...
...
Write
Preview
Supports
Markdown
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