Re: How to serve a static file with django?

2015-12-24 Thread cquptzzq
This problem has troubled me also. In the DJANGO PROJECT website, they said " we want you to put static files on web server instead of using local directories " So,why not? Just drop it on the web server, and then use the http url to load images or css. 在 2015年12月23日星期三 UTC+8下午7:50:52,Dan Bikle写

Re: How to serve a static file with django?

2015-12-23 Thread Jani Tiainen
y_app/static/my_app/hello.html gives: Page not found (404) So, I'm curious. How to serve a static file with django? I sense that This URL is leaving out a step or maybe I read it wrong: https://docs.djangoproject.com/en/1.9/howto/static-files/ ?? I am running this django: >>> impor

Re: How to serve a static file with django?

2015-12-23 Thread Vijay Khemlani
I guess the URL would be something like this 127.0.0.1:8000/static/my_app/hello.html (without the first "my_app") assuming your STATIC_URL is '/static/' On Wed, Dec 23, 2015 at 1:57 AM, Dan Bikle wrote: > *Hi List,* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

How to serve a static file with django?

2015-12-23 Thread Dan Bikle
*Hi List,* *I am new to django.I read this:https://docs.djangoproject.com/en/1.9/howto/static-files/I did this:cd ~django-admin startproject mysiteI see this in ~/mysite/mysite/settings.pyINSTALLED_APPS = ['django.contrib.admin', 'dj