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写
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
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,*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
*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
4 matches
Mail list logo