0
我正在使用python路徑包(http://routes.groovie.org/modules/mapper.html#routes.mapper.Mapper.connect)python中routes.mapper包的問題 - generate由於某種原因返回None?
而且我簡化了我的代碼到下面:
from routes import Mapper
m = Mapper()
m.connect('upnp/:udn/:sid/:action', controller='upnp', action='desc', sid=None)
a = m.generate(controller='upnp', action='desc', udn='uuid:1234', sid=None)
print '---'
print a
print '---'
現在,我認爲它應該打印出'/ upnp/uuid:1234/None/desc',但生成返回無。
任何想法出了什麼問題?
非常感謝