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,119 @@
# Wiki Integration Issues
## Current Issues
### 1. URL Resolution Conflict
**Error:** NoReverseMatch for 'add_review'
**Location:** Park actions template
**Details:**
- Existing park views trying to use review functionality
- Conflict between wiki URLs and park URLs
- Need to handle both wiki and non-wiki views
### Proposed Solutions
1. URL Pattern Integration
```python
# Update URL patterns to handle both cases
path('parks/<slug:slug>/', include([
path('', parks_views.park_detail, name='park_detail'),
path('wiki/', wiki_views.park_wiki, name='park_wiki'),
path('reviews/add/', parks_views.add_review, name='add_review'),
]))
```
2. Template Updates Needed
- Modify park_actions.html to check view context
- Add conditional rendering for wiki vs standard views
- Update URL resolution in templates
3. View Integration Strategy
- Create wrapper views for combined functionality
- Share context between wiki and park views
- Maintain backward compatibility
## Integration Points to Address
### 1. Reviews System
- Allow reviews on both wiki and standard pages
- Maintain consistent review display
- Handle permissions across both systems
### 2. Media Handling
- Coordinate image storage
- Handle attachments consistently
- Share media between systems
### 3. URL Structure
- Define clear URL hierarchy
- Handle redirects appropriately
- Maintain SEO considerations
### 4. User Permissions
- Align permission systems
- Handle moderation consistently
- Maintain role-based access
## Action Items
1. Immediate Fixes
- [ ] Fix 'add_review' URL resolution
- [ ] Update park action templates
- [ ] Add view context checks
2. Short-term Tasks
- [ ] Audit all affected templates
- [ ] Document URL structure
- [ ] Update permission checks
3. Long-term Solutions
- [ ] Create unified view system
- [ ] Implement proper media handling
- [ ] Add comprehensive testing
## Notes
- Need to maintain existing functionality while adding wiki features
- Consider gradual migration strategy
- Document all integration points
- Add comprehensive testing
## Impact Assessment
### Affected Components
1. Templates
- park_actions.html
- park_detail.html
- review forms
2. Views
- Park detail views
- Review handling
- Wiki integration
3. URLs
- Park patterns
- Wiki patterns
- Review handling
### Required Changes
1. Template Updates
```html
{% if wiki_view %}
<!-- Wiki specific actions -->
{% else %}
<!-- Standard park actions -->
{% endif %}
```
2. View Context
```python
context['wiki_view'] = is_wiki_view(request)
```
3. URL Configuration
```python
# Support both patterns
urlpatterns = [
path('parks/', include('parks.urls')),
path('wiki/', include('wiki.urls')),
]