English 中文(简体)
• 如何使URL的路由网络上的StaticMiddleware执行。 y
原标题:How to make URL routing execute after StaticMiddleware in web.py

I have a URL route in my web.py application that I want to run to catch all URLs that hit the server, but only after any static assets are served.

For example, if theres is js/test.js in my static directory, the path http://a.com/js/tests.js should return the file contents. But I also have my url routing set up so that there is a regex that catches everything like this:

urls = ( /.* ,  CatchAllHandler )

因此,如果未发现固定资产,就应当使用 即<>。 http://a.com/js/test.js 应退还静止文件test.js,但请求将<代码>http://a.com/js/nope.js 页: 1 Catch AllHandler。

我仔细研究一下我自己的统计信息,但只有在网络运行秩序发生变化时才会有所帮助。 目前,中风电线在经过路面处理后即行。 我首先需要中间电线,让ur路清理没有固定资产的要求。

我的想法是,利用并非想象的()功能作为我的追随者,但这可能不是最好的。

问题回答

我没有上网吧,但我的理解是。 农研组的中间信息在网络上出现之前就会出现。 我认为,如果你的中东首脑会议结构适当配置,那就只会奏效。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签