mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-21 04:11:11 -05:00
Implement wiki and parks plugin architecture: add initial app configurations, models, and update dependencies
This commit is contained in:
34
wiki/plugins/parks/models.py
Normal file
34
wiki/plugins/parks/models.py
Normal 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}"
|
||||
Reference in New Issue
Block a user