realm_playgrounds: Replace url_prefix with url_template.

Dropping support for url_prefix for RealmPlayground, the server now uses
url_template instead only for playground creation, retrieval and audit
logging upon removal.

This does the necessary handling so that url_template is expanded with
the extracted code.

Fixes #25723.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2023-05-26 23:04:50 -04:00
committed by Tim Abbott
parent c4bc0ad589
commit 000761ac0c
25 changed files with 142 additions and 92 deletions

View File

@@ -539,7 +539,7 @@ html_rules: List["Rule"] = [
},
"exclude": {
"templates/analytics/support.html",
# We have URL prefix and Pygments language name as placeholders
# We have URL template and Pygments language name as placeholders
# in the below template which we don't want to be translatable.
"web/templates/settings/playground_settings_admin.hbs",
},
@@ -553,6 +553,8 @@ html_rules: List["Rule"] = [
"description": "Likely missing quoting in HTML attribute",
"good_lines": ['<a href="{{variable}}">'],
"bad_lines": ["<a href={{variable}}>"],
# Exclude the use of URL templates from this check.
"exclude_pattern": "={code}",
},
{
"pattern": " '}}",