Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » static media using development server? [RSS Feed]

#1 Nov. 26, 2005 23:23:20

Igor G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

static media using development server?


Hello everybody.

Is it possible to serve static media using internal development
webserver and options like that:

MEDIA_ROOT = '/home/igor/kultprosvet.ru/media'
MEDIA_URL = 'http://localhost:8080/site_media/'

Any ideas?


--
Igor Goryachev E-Mail/Jabber:

Offline

#2 Nov. 27, 2005 00:34:50

h.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

static media using development server?


Hi,

>Is it possible to serve static media using internal development
>webserver and options like that:

Look into django.views.static for the "serve" view function. That one
allows you to serve files with the dev server.

bye, Georg

Offline

#3 Nov. 27, 2005 01:11:04

Igor G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

static media using development server?


On Sat, Nov 26, 2005 at 04:34:46PM -0800, hugo wrote:
> >Is it possible to serve static media using internal development
> >webserver and options like that:
> Look into django.views.static for the "serve" view function. That one
> allows you to serve files with the dev server.

The following string added into urls file helped:

(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', \
{'document_root': '/home/igor/kultprosvet.ru/media/'}),

Thank you very much!


--
Igor Goryachev E-Mail/Jabber:

Offline

#4 Nov. 27, 2005 14:46:22

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

static media using development server?


On 11/26/05, Igor Goryachev <> wrote:
> Is it possible to serve static media using internal development
> webserver and options like that:

I see you've already figured it out, but I've added a document that
explains this in detail, because it's a commonly-asked question. Here
it is:http://www.djangoproject.com/documentation/static_files/Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

  • Root
  • » Django
  • » static media using development server? [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of January
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support