Re: AW: MEDIA_URL not treated like static

2011-03-28 Thread galgal
Thanks, I didn't know that. All works fine now.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: AW: MEDIA_URL not treated like static

2011-03-28 Thread Amao Zhao
Dear galgal:
according to the django docs for 1.3, The most likely example is
user-uploaded content in
MEDIA_ROOT
. staticfiles is intended for static assets and has no built-in handling for
user-uploaded files, but you can have Django serve your
MEDIA_ROOT
by
appending something like this to your URLconf.
And you can read the doc with
http://docs.djangoproject.com/en/1.3/howto/static-files/#serving-other-directories

On Mon, Mar 28, 2011 at 7:48 PM, galgal  wrote:

> I forgot to tell I'm using Django 1.3. In that case - how to make it work
> with separate dirs? Or it can't be done on dev server?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: AW: MEDIA_URL not treated like static

2011-03-28 Thread galgal
I forgot to tell I'm using Django 1.3. In that case - how to make it work 
with separate dirs? Or it can't be done on dev server?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



AW: MEDIA_URL not treated like static

2011-03-28 Thread Szabo, Patrick (LNG-VIE)
I have a static folder in my Prject and my MEDIA_URL looks like this: 
http://127.0.0.1:8000/static/

 

Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im 
Auftrag von galgal
Gesendet: Montag, 28. März 2011 13:38
An: django-users@googlegroups.com
Betreff: MEDIA_URL not treated like static

 

I have that dirs structure:

site_media/

|
---> static/

|

---> uploads/

 

static dir is set as STATIC_URL = '/site_media/static/'

uploads dir is set as MEDIA_URL = '/site_media/uploads/'

 

In that case on dev server (localhost:8000) media_url is not accessible via 
browser as static file, and whe I try to access it I get 404 error. How can i 
set it up to be seen as static?

In uploads dir are all files uploaded by users. static dir includes all my 
js/css/images

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
 XSLT Developer 
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick.sz...@lexisnexis.at
Tel.: +43 (1) 534 52 - 1573 
Fax: +43 (1) 534 52 - 146 





-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.