Add management command to seed comprehensive sample data for ThrillWiki application

- Implemented cleanup of existing sample data to avoid conflicts.
- Created functions to generate companies, parks, rides, park areas, and reviews.
- Ensured proper relationships between models during data creation.
- Added logging for better tracking of data seeding process.
- Included checks for required database tables before seeding.
This commit is contained in:
pacnpal
2025-08-20 10:16:21 -04:00
parent 641fc1a253
commit 78248aa892
11 changed files with 1489 additions and 64 deletions

View File

@@ -63,8 +63,7 @@
<div class="text-center">
<dt class="text-sm font-semibold text-gray-900 dark:text-white">Operator</dt>
<dd class="mt-1">
<a href="{% url 'operators:operator_detail' park.operator.slug %}"
class="text-sm font-bold text-sky-900 dark:text-sky-400 hover:text-sky-800 dark:hover:text-sky-300">
<span class="text-sm font-bold text-sky-900 dark:text-sky-400">
{{ park.operator.name }}
</a>
</dd>

View File

@@ -41,10 +41,8 @@
{% endif %}
</div>
{% if park.operator %}
<div class="mt-4 text-sm text-blue-600 hover:text-blue-700 dark:text-blue-400 dark:hover:text-blue-300">
<a href="{% url 'operators:operator_detail' park.operator.slug %}">
{{ park.operator.name }}
</a>
<div class="mt-4 text-sm text-blue-600 dark:text-blue-400">
{{ park.operator.name }}
</div>
{% endif %}
</div>

View File

@@ -119,8 +119,7 @@
{% for operator in operators %}
<div class="p-4 rounded-lg bg-gray-50 dark:bg-gray-700">
<h3 class="mb-2 text-lg font-semibold">
<a href="{% url 'operators:operator_detail' operator.slug %}"
class="text-blue-600 hover:underline dark:text-blue-400">
<span class="text-blue-600 dark:text-blue-400">
{{ operator.name }}
</a>
</h3>