Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove unrelevant files

Maciej Korycinskid42ab19ef264
diff --git a/saleor/core/middleware.py b/saleor/core/middleware.py
index 59c5c0a150..845560537e 100644
--- a/saleor/core/middleware.py
+++ b/saleor/core/middleware.py
@@ -167,14 +167,12 @@ class ReadOnlyMiddleware:
domain = Site.objects.get_current().domain
url = f"http://{domain}"
ctx = {
- "image_path": "read_only/dashboard/images/pirate-%s.svg" % image,
+ "image_path": "read_only/images/pirate-%s.svg" % image,
"image_class": "img%s" % image,
"back_url": request.headers.get("referer", url),
}
- return TemplateResponse(
- request, "read_only/dashboard/read_only_splash.html", ctx
- )
+ return TemplateResponse(request, "read_only/read_only_splash.html", ctx)
def _is_url_blocked(self, url):
for pattern in self.BLOCKED_URL_PATTERNS:
diff --git a/templates/read_only/base.html b/templates/read_only/base.html
deleted file mode 100644
index e8bcba3fb1..0000000000
--- a/templates/read_only/base.html
+++ /dev/null
@@ -1,22 +0,0 @@
-{% extends 'base_original.html' %}
-
-{% block meta %}
-{{ block.super }}
-<script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
-
- ga('create', 'UA-10159761-19', 'auto');
- ga('send', 'pageview');
-</script>
-<script>
- (function(h,o,t,j,a,r){ h.hj=h.hj||function(){(
- h.hj.q=h.hj.q||[]).push(arguments)};
- h._hjSettings={hjid:719357,hjsv:6}; a=o.getElementsByTagName('head')[0];
- r=o.createElement('script');r.async=1;
- r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv; a.appendChild(r);
- })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
-</script>
-{% endblock meta %}
diff --git a/templates/read_only/dashboard/base.html b/templates/read_only/dashboard/base.html
deleted file mode 100644
index 813cbef727..0000000000
--- a/templates/read_only/dashboard/base.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{% extends 'dashboard/base_original.html' %}
-
-{% block meta %}
-{{ block.super }}
-<script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
-
- ga('create', 'UA-10159761-19', 'auto');
- ga('send', 'pageview');
-</script>
-{% endblock meta %}
-
-{% block content %}
-<div class="row">
- <div class="card-panel readonly-msg">Dashboard runs in read only mode.</div>
-</div>
-{{ block.super }}
-{% endblock %}
diff --git a/templates/read_only/dashboard/images/pirate-1.svg b/templates/read_only/images/pirate-1.svg
similarity index 100%
rename from templates/read_only/dashboard/images/pirate-1.svg
rename to templates/read_only/images/pirate-1.svg
diff --git a/templates/read_only/dashboard/images/pirate-2.svg b/templates/read_only/images/pirate-2.svg
similarity index 100%
rename from templates/read_only/dashboard/images/pirate-2.svg
rename to templates/read_only/images/pirate-2.svg
diff --git a/templates/read_only/dashboard/images/pirate-3.svg b/templates/read_only/images/pirate-3.svg
similarity index 100%
rename from templates/read_only/dashboard/images/pirate-3.svg
rename to templates/read_only/images/pirate-3.svg
diff --git a/templates/read_only/dashboard/images/pirate-4.svg b/templates/read_only/images/pirate-4.svg
similarity index 100%
rename from templates/read_only/dashboard/images/pirate-4.svg
rename to templates/read_only/images/pirate-4.svg
diff --git a/templates/read_only/dashboard/images/pirate-5.svg b/templates/read_only/images/pirate-5.svg
similarity index 100%
rename from templates/read_only/dashboard/images/pirate-5.svg
rename to templates/read_only/images/pirate-5.svg
diff --git a/templates/read_only/dashboard/read_only_splash.html b/templates/read_only/read_only_splash.html
similarity index 96%
rename from templates/read_only/dashboard/read_only_splash.html
rename to templates/read_only/read_only_splash.html
index 8f5af0061f..5f0e93260e 100644
--- a/templates/read_only/dashboard/read_only_splash.html
+++ b/templates/read_only/read_only_splash.html
@@ -45,7 +45,7 @@
<body class="{% block body_class %}body-home{% endblock %}">
<div class="read-only">
<div class="read-only-description">
- <h2>{% blocktrans %}Be aware admin pirate! <br> Saleor runs in <span>read only mode!</span>{% endblocktrans %}</h2>
+ <h2>{% blocktrans %}Be aware pirate! <br> Saleor runs in <span>read only mode!</span>{% endblocktrans %}</h2>
<a href="{{ back_url }}" class="btn">{% trans 'Close' %}</a>
</div>
<div class="{{ image_class }}">{% include image_path %}</div>