From 234b4bdbfbb0f88c22f3efe15ea70401ba24a62f Mon Sep 17 00:00:00 2001
From: Brandon Rodriguez <brodriguez8774@gmail.com>
Date: Wed, 1 Mar 2023 16:44:29 -0500
Subject: [PATCH] Create a debug index page for easier outside debug importing

---
 .../templates/django_dump_die/test_index.html | 49 +++++++++++++++++++
 django_dump_die/test_urls.py                  |  4 ++
 django_dump_die/views/test_views.py           |  5 ++
 3 files changed, 58 insertions(+)
 create mode 100644 django_dump_die/templates/django_dump_die/test_index.html

diff --git a/django_dump_die/templates/django_dump_die/test_index.html b/django_dump_die/templates/django_dump_die/test_index.html
new file mode 100644
index 0000000..cb44b18
--- /dev/null
+++ b/django_dump_die/templates/django_dump_die/test_index.html
@@ -0,0 +1,49 @@
+
+<!DOCTYPE html>
+
+
+<html lang="en">
+  <meta charset="utf-8">
+  <head>
+    <title>Django DumpDie TESTING Examples</title>
+  </head>
+
+  <body>
+    <h1>Django DumpDie TESTING Index Page</h1>
+
+    <p>The following pages provide example output when using the Django DumpDie package.</p>
+    <p>Exclusively used for easy access to visual examine test views while debugging tests.</p>
+
+    <br>
+
+    <h2>"Complex" Objects:</h2>
+    <ul>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__set' %}">complex__set</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__frozen_set' %}">complex__frozen_set</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__tuple' %}">complex__tuple</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__list' %}">complex__list</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__dict' %}">complex__dict</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__querydict' %}">complex__querydict</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__memory_view' %}">complex__memory_view</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__enum' %}">complex__enum</a></p></li>
+    </ul>
+
+    <h2>Multi-Level "Complex" Objects:</h2>
+    <ul>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__multi_level__set' %}">complex__multi_level__set</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__multi_level__tuple' %}">complex__multi_level__tuple</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__multi_level__list' %}">complex__multi_level__list</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__multi_level__dict' %}">complex__multi_level__dict</a></p></li>
+    </ul>
+
+    <h2>Multi-Level "Complex" Objects:</h2>
+    <ul>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__sub_item__list' %}">complex__sub_item__list</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__sub_item__tuple' %}">complex__sub_item__tuple</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__sub_item__tuple_func' %}">complex__sub_item__tuple_func</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__sub_item__dict' %}">complex__sub_item__dict</a></p></li>
+      <li><p><a href="{% url 'django_dump_die_tests:complex__sub_item__enum' %}">complex__sub_item__enum</a></p></li>
+    </ul>
+
+  </body>
+</html>
diff --git a/django_dump_die/test_urls.py b/django_dump_die/test_urls.py
index f45683d..92c0f1d 100644
--- a/django_dump_die/test_urls.py
+++ b/django_dump_die/test_urls.py
@@ -8,6 +8,8 @@ from django.urls import path
 
 # Internal Imports.
 from .views.test_views import (
+    index,
+
     complex_type_example__set,
     complex_type_example__frozen_set,
     complex_type_example__tuple,
@@ -56,4 +58,6 @@ urlpatterns = [
     ),
     path('complex/sub_item/dict/', complex_type_example__dict_subitem, name='complex__sub_item__dict'),
     path('complex/sub_item/enum/', complex_type_example__enum_subitem, name='complex__sub_item__enum'),
+
+    path('', index, name='index'),
 ]
diff --git a/django_dump_die/views/test_views.py b/django_dump_die/views/test_views.py
index f5c91fb..5271e6d 100644
--- a/django_dump_die/views/test_views.py
+++ b/django_dump_die/views/test_views.py
@@ -12,6 +12,11 @@ The solution was to divide objects out, displaying only one object per view, whi
 from django.shortcuts import render
 
 
+def index(request):
+    """Exclusively used for easy access to visual examine test views while debugging tests."""
+    return render(request, 'django_dump_die/test_index.html', {})
+
+
 def complex_type_example__set(request):
     """Example view, rendering only "complex type" Set object output."""
 
-- 
GitLab