1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-24 04:15:56 +00:00

Add an example for urlpath template func for Django engine

relative to #1656
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-10-12 13:08:42 +03:00
parent 546c7bf465
commit dfe27567ae
4 changed files with 124 additions and 3 deletions

View File

@@ -0,0 +1,55 @@
<html>
<head>
<title>urlpath function - django</title>
<style>
a {
color: #0f7afc;
border-bottom-color: rgba(15, 122, 252, 0.2);
text-decoration: none
}
a:hover {
color: #cf0000;
border-bottom-color: rgba(208, 64, 0, 0.2);
text-decoration: none
}
a:visited {
color: #800080;
border-bottom-color: rgba(128, 0, 128, 0.2);
text-decoration: none
}
</style>
</head>
<body>
<a href="{{urlpath('my-page1')}}">/mypath</a>
<br />
<br />
<a href="{{urlpath('my-page2','theParam1','theParam2')}}">/mypath2/{paramfirst}/{paramsecond}</a>
<br />
<br />
<a href="{{urlpath('my-page3','theParam1','theParam2AfterStatic')}}">/mypath3/{paramfirst}/statichere/{paramsecond}</a>
<br />
<br />
<a href="{{urlpath('my-page4','theParam1','theparam2AfterStatic','otherParam','matchAnything')}}">
/mypath4/{paramfirst}/statichere/{paramsecond}/{otherparam}/{something:path}</a>
<br />
<br />
<a href="{{urlpath('my-page5','theParam1','theParam2Afterstatichere','otherParam','matchAnythingAfterStatic')}}">
/mypath5/{paramfirst}/statichere/{paramsecond}/{otherparam}/anything/{anything:path}</a>
<br />
<br />
<a href="{{urlpath('my-page6', ParamsAsArray)}}">
/mypath6/{paramfirst}/{paramsecond}/statichere/{paramThirdAfterStatic}
</a>
</body>
</html>