mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-21 14:31:07 -05:00
Implement wiki and parks plugin architecture: add initial app configurations, models, and update dependencies
This commit is contained in:
1
wiki/plugins/parks/__init__.py
Normal file
1
wiki/plugins/parks/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
default_app_config = "wiki.plugins.parks.apps.ParksPluginConfig"
|
||||
13
wiki/plugins/parks/apps.py
Normal file
13
wiki/plugins/parks/apps.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
class ParksPluginConfig(AppConfig):
|
||||
name = "wiki.plugins.parks"
|
||||
label = "wiki_parks"
|
||||
verbose_name = "Wiki Parks Plugin"
|
||||
|
||||
def ready(self):
|
||||
"""
|
||||
Register plugin with wiki system when the app is ready.
|
||||
Plugin registration is deferred until wiki core is available.
|
||||
"""
|
||||
pass
|
||||
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}"
|
||||
14
wiki/plugins/parks/wiki_plugin.py
Normal file
14
wiki/plugins/parks/wiki_plugin.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
class ParksPlugin:
|
||||
"""
|
||||
Plugin for handling parks in the wiki system.
|
||||
Core registration will be added later.
|
||||
"""
|
||||
slug = 'parks'
|
||||
|
||||
sidebar = {
|
||||
'headline': _('Park Information'),
|
||||
'icon_class': 'fa-info-circle',
|
||||
'template': 'wiki/plugins/parks/sidebar.html',
|
||||
}
|
||||
Reference in New Issue
Block a user