Mercurial > p > roundup > code
comparison doc/customizing.txt @ 6977:ff2c8b430738
flake8 - remove re.compile from method arg + test + doc
changed 2 methods defined like:
def method(..., dre=re.compile(r'...')):
moved re.compile to module variables and passed the var name
def method(..., dre=var_name):
while doing this I found out that a url of .../issue0001 will behave
like .../issue1. Who knew. Documented in customizing.
Tested same in test_liveserver. Added msg1 as well so I could verify
msg0001 worked.
Also added some range tests as well.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 14 Sep 2022 17:48:51 -0400 |
| parents | 234fefd7568a |
| children | ca90f7270cd4 570abc4c6548 |
comparison
equal
deleted
inserted
replaced
| 6976:3917ae82fb24 | 6977:ff2c8b430738 |
|---|---|
| 2230 This is usually used to show listings of class items. The URL for | 2230 This is usually used to show listings of class items. The URL for |
| 2231 for specific object of issue class with id 1 will look like: | 2231 for specific object of issue class with id 1 will look like: |
| 2232 | 2232 |
| 2233 8. ``/issue1`` | 2233 8. ``/issue1`` |
| 2234 | 2234 |
| 2235 .. _strip_zeros: | |
| 2236 | |
| 2237 Note that a leading string of 0's will be stripped from the id part of | |
| 2238 the object designator in the URL. E.G. ``/issue001`` is the same as | |
| 2239 ``/issue1``. Similarly for ``/file01`` etc. However you should | |
| 2240 generate URL's without the extra zeros. | |
| 2235 | 2241 |
| 2236 Determining web context | 2242 Determining web context |
| 2237 ----------------------- | 2243 ----------------------- |
| 2238 | 2244 |
| 2239 To determine the "context" of a request (what request is for), we look at | 2245 To determine the "context" of a request (what request is for), we look at |
| 2260 by raising SendStaticFile exception. | 2266 by raising SendStaticFile exception. |
| 2261 c. if there is something in the path (as in example 1, "issue"), it | 2267 c. if there is something in the path (as in example 1, "issue"), it |
| 2262 identifies the tracker class to display. | 2268 identifies the tracker class to display. |
| 2263 d. if the path is an item designator (as in examples 2 and 4, "issue1" | 2269 d. if the path is an item designator (as in examples 2 and 4, "issue1" |
| 2264 and "file1"), then we're to display a specific item. | 2270 and "file1"), then we're to display a specific item. |
| 2271 :ref:`Note. <strip_zeros>` | |
| 2265 e. if the path starts with an item designator and is longer than one | 2272 e. if the path starts with an item designator and is longer than one |
| 2266 entry (as in example 5, "file1/kitten.png"), then we're assumed to be | 2273 entry (as in example 5, "file1/kitten.png"), then we're assumed to be |
| 2267 handling an item of a ``FileClass``, and the extra path information | 2274 handling an item of a ``FileClass``, and the extra path information |
| 2268 gives the filename that the client is going to label the download | 2275 gives the filename that the client is going to label the download |
| 2269 with (i.e. "file1/kitten.png" is nicer to download than "file1"). | 2276 with (i.e. "file1/kitten.png" is nicer to download than "file1"). |
