Interesting! Didn't know document_root would figure out relative
paths. Glad you got it working.
Re. media -- yeah, sorry about that, I've taken to renaming the
admin's to media_admin.
On Jul 20, 12:26 pm, cjl <[EMAIL PROTECTED]> wrote:
> Nathan:
>
> Thank you for your reply.
>
> Your solution s
Nathan:
Thank you for your reply.
Your solution seems practical, but I found another solution. In
'settings.py' I have:
MEDIA_ROOT = './static/'
MEDIA_URL = 'static/'
and in 'urls.py' I have:
(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': 'static'}),
Then in the template
Assuming cwd is the projects folder:
settings.py:
import os.path
MEDIA_ROOT = os.abspath('./media')
urls.py:
from django.conf import settings
urlpatterns = patterns('',
(r'^media/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),
)
On Jul 20, 6:13 am, cjl <[EMA
Djangoholics:
I am working on a portable Django development environment for windows,
and I'm trying to write a tutorial for newbies to go along with it.
My initial -- poorly executed and incomplete -- website is at
http://www.instantdjango.com
One problem I am trying to overcome is how to make
4 matches
Mail list logo