中文版:在Windows平台下的IIS中发布Django应用
英文版:Django On Windows With IIS And SQLServer
Share and Enjoy:
|
||||||
|
中文版:在Windows平台下的IIS中发布Django应用 Share and Enjoy: (r'^css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/var/www/django-demo/css'}), 模板中使用下述方式即可: <link href="/css/demo.css" type="text/css" rel="stylesheet"> 注:可采用os.path.dirname(globals()["__file__"])来获得当前文件所在路径,比如 (r'^css/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.dirname(globals()["__file__"])+'/css'}), 可以使用os.path.abspath()函数返回此路径的绝对路径。 Share and Enjoy: Let’s dive into Django’s template system so you can see how it works—but we’re not yet going to integrate it with the views that we created in the previous chapter. Our goal here is to show you how the system works independent of the rest of Django. (Usually you’ll use the template system within a [...] 昨天的MySQL安装是序曲,实质是安装LAMP的一个环节。在Ubuntu的世界里apt-get可以解决大部分的事。当然源码方式更优,但是现在还不到深入研究的时间。 Share and Enjoy: |
||||||
|
Copyright © 2010 鱼常游而忘飞 - All Rights Reserved.
>>>辽ICP备05003652号<<<
|
||||||