Files
Boris 0be99e8e9a
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add daily-stone page showing a different mineral each day
New dailystone app with 207 minerals scraped from Wikipedia.
Each day displays a different mineral with photos, formula,
properties, description, and history. Page theme color matches
the mineral's typical appearance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 18:30:10 +03:00

23 lines
621 B
Python

"""
Export mineral data as a JSON fixture for loading on the production server.
Usage:
python manage.py export_minerals > dailystone/fixtures/minerals.json
python manage.py loaddata dailystone/fixtures/minerals.json
"""
import json
import sys
from django.core.management.base import BaseCommand
from django.core import serializers
from dailystone.models import Mineral
class Command(BaseCommand):
help = 'Export mineral data as a Django fixture (JSON)'
def handle(self, *args, **options):
data = serializers.serialize('json', Mineral.objects.all(), indent=2)
self.stdout.write(data)