-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Let's say the fpm#urls is of type list dynamic-document:
-- record fpm.dynamic-document:
string url:
string template:
We would read it:
import ftd
d = ftd.parse("foo.com/FPM.ftd")
urls = d.get("fpm#urls")
assert urls == [
{"url": "/<username>/<page>/", "template": "foo.com/username"}
]Then we will need a method that will the a URL and urls defined above:
assert ftd.route("/jack/20/", urls) == dict(
template = "foo.com/username",
data = {
"username": "jack",
"page": 20
}
)