(template)
| 40 | |
| 41 | |
| 42 | def parse_version(template): |
| 43 | template_path_parts = template.split("#", 3) |
| 44 | if len(template_path_parts) == 1: |
| 45 | return "", False |
| 46 | |
| 47 | if len(template_path_parts) == 3: |
| 48 | _, version, _ = template_path_parts |
| 49 | return int(version), True |
| 50 | |
| 51 | if len(template_path_parts) == 4: |
| 52 | _, _, version, _ = template_path_parts |
| 53 | return int(version), True |
| 54 | |
| 55 | raise TemplateNotFound(template) |
| 56 | |
| 57 | |
| 58 | def parse_template(template): |