ChinaUnix.net
相关文章推荐:

webpy图片的大小


发现了web.py的不合适之处:
1,对静态文件的限制太死,只能放在./static/下。这个项目的图片很多而且位置固定,怎么办?

by leadsino - Web开发 - 2011-12-21 08:44:50 阅读(641) 回复(0)

相关讨论

web.redirect 和 web.seeother问题

by leadsino - Web开发 - 2011-12-21 08:44:50 阅读(1878) 回复(0)

响应 XML 文件

by leadsino - Web开发 - 2011-12-21 08:44:50 阅读(705) 回复(0)

Site Layout TemplateProblem

How do I use a site-wide base template that displays across every page? (In other frameworks, this is called template inheritance.)

Solution

by leadsino - Web开发 - 2011-12-21 08:44:50 阅读(791) 回复(0)

1. 通常用:

   app=web.application(urls, globals() )
   创建应用, 这里有很大的优化空间:
  实际上这是一个两层循环查找:
    1) 在 urls 的 url 列表中中查找匹配的pattern
    2) 在 globals 以匹配到的 name 查找对应的 class.

优化:
    1) 采取 sub-application 的策略:...

by leadsino - Web开发 - 2011-12-21 08:44:50 阅读(757) 回复(0)

请问下webpy怎么处理post发来的表单

by tanbaolin1218 - Python - 2011-02-22 15:09:25 阅读(4255) 回复(3)

Nginx+mod_wsgi+webpy

by leadsino - Web开发 - 2011-12-21 08:44:49 阅读(1169) 回复(0)

哪位搞过nginx + fcgi + webpy 我配完后无法解析css,配置如下 server { listen 88; root /usr/local/nginx/html/trace; location ~* \.(js|css|jpg|jpeg|gif|png|ico|html|txt)$ { if (-f $request_filename) { expires max; break; } } location /static/ { #root /usr/local/nginx/html/trace/static; if (-f $request_filename) { rewrite ^/static/(.*)$ /static/$1 br...

by rockyaow - Python - 2011-08-16 17:57:05 阅读(3184) 回复(0)

我的架构是nginx+webpy+fastcgi我下载要实现文件下载功能请问我该怎么家头

by tanbaolin1218 - Python - 2011-03-15 19:15:16 阅读(1859) 回复(0)

转:caoxx URL自动映射 web.auto_application() 类似于 web.application() ,但自动根据元类来构造 urls 下面的Demo中URL自动映射不知为何没有效果。 后来发现元类名小写才可以正常,不知自动构造URL是否对元类名书写有规范。 class hello(app.page):[code]# -*- coding:utf-8 -*- import web app = web.auto_application() class Hello(app.page): def GET(self): return '''

pythonwebpy

by 中关村村草 - Python - 2011-03-15 12:05:28 阅读(1753) 回复(0)

转:wangfsec 用memcache处理webpy的session 目前用的webpy0.34里没有对session提供memcache后端,自己参照其它的Store写了一个。 Python代码[code]1.import memcache as memcache 2.from web.session import Store 3. 4.class MemcacheStore(Store): 5. def __init__(self, config): 6. ''''' 7. config = { 8. 'servers': ['127.0.0.1:11211'], 9. 'timeout': 1440 ...

pythonwebpy

by 中关村村草 - Python - 2011-03-14 10:57:33 阅读(2290) 回复(0)