python - django视图文件中是否可以得到配置文件中的静态文件地址?
ringa_lee
ringa_lee 2017-04-17 17:30:53
0
1
577

1.settings.py 中设置了STATIC_URL,那么在views文件中,可不可以拿到这个值?如果可以,怎么拿?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
迷茫
from django.conf import settings

def foo(request):
    print settings.STATIC_URL
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template