Implement wiki and parks plugin architecture: add initial app configurations, models, and update dependencies

This commit is contained in:
pacnpal
2025-02-22 20:55:00 -05:00
parent 02e4b82beb
commit 2faf0368cf
30 changed files with 2973 additions and 316 deletions

View File

@@ -0,0 +1,34 @@
from django.db import models
from django.utils.translation import gettext_lazy as _
class ParkMetadata(models.Model):
article = models.OneToOneField(
'wiki.Article', # Using string reference to avoid import issues
on_delete=models.CASCADE,
related_name='park_metadata'
)
operator = models.CharField(
max_length=255,
verbose_name=_('Operator'),
blank=True
)
opened_date = models.DateField(
verbose_name=_('Opening Date'),
null=True,
blank=True
)
location = models.CharField(
max_length=255,
verbose_name=_('Location'),
blank=True
)
class Meta:
verbose_name = _('Park Metadata')
verbose_name_plural = _('Park Metadata')
def __str__(self):
return f"Park info for {self.article.current_revision.title}"