Skip to content

Commit 99d93c6

Browse files
committed
add beta
1 parent b843fba commit 99d93c6

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

apps/projects/urls.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
path("", views.index, name="index"),
99
path("run", views.run, name="run"),
1010
path("run/", views.run),
11+
path("beta", views.beta, name="beta"),
12+
path("beta/", views.beta),
1113
path("categories/", views.category_list, name="categories"),
1214
path("categories/<str:arg>", views.collection, { "collection" : "category" }),
1315
path("tag/<str:tag>", views.list_by_tag, name="list_by_tag"),

apps/projects/views.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,3 +939,8 @@ def flag(request, id):
939939
@xframe_options_exempt
940940
def run(request):
941941
return render(request, "run.html")
942+
943+
944+
@xframe_options_exempt
945+
def beta(request):
946+
return render(request, "beta.html")

templates/beta.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{% extends "base.html" %}
2+
3+
{% block content %}
4+
5+
<iframe id="iframe" class="w-full h-full" src="" border="0" height="100%" style="height:100%; width:100%"></iframe>
6+
7+
<script>
8+
url = new URL(window.location.href);
9+
u = "";
10+
searchParams = new URLSearchParams(url.search);
11+
if (window.location.hash) {
12+
u = window.location.hash; // + "&d =" + Date.now();
13+
}
14+
params = '?' + searchParams + "&d=" + Date.now();
15+
document.getElementById('iframe').src = "/static/beta/index.html" + params + u;
16+
</script>
17+
18+
{% endblock %}

0 commit comments

Comments
 (0)