All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
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>
26 lines
1.0 KiB
Python
26 lines
1.0 KiB
Python
from django.db import models
|
|
|
|
|
|
class Mineral(models.Model):
|
|
name = models.CharField(max_length=200, unique=True)
|
|
formula = models.CharField(max_length=200, blank=True)
|
|
category = models.CharField(max_length=200, blank=True)
|
|
crystal_system = models.CharField(max_length=200, blank=True)
|
|
mohs_hardness = models.CharField(max_length=50, blank=True)
|
|
luster = models.CharField(max_length=200, blank=True)
|
|
streak = models.CharField(max_length=200, blank=True)
|
|
specific_gravity = models.CharField(max_length=100, blank=True)
|
|
color_description = models.CharField(max_length=300, blank=True)
|
|
color_hex = models.CharField(max_length=7, default='#6b7280')
|
|
description = models.TextField(blank=True)
|
|
history = models.TextField(blank=True)
|
|
image_urls = models.JSONField(default=list)
|
|
wikipedia_url = models.URLField(max_length=500, blank=True)
|
|
day_of_year = models.IntegerField(unique=True, null=True, blank=True)
|
|
|
|
class Meta:
|
|
ordering = ['day_of_year']
|
|
|
|
def __str__(self):
|
|
return self.name
|