mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 08:11:08 -05:00
2.7 KiB
2.7 KiB
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
- URL Pattern Integration
# 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'),
]))
- Template Updates Needed
- Modify park_actions.html to check view context
- Add conditional rendering for wiki vs standard views
- Update URL resolution in templates
- 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
- Immediate Fixes
- Fix 'add_review' URL resolution
- Update park action templates
- Add view context checks
- Short-term Tasks
- Audit all affected templates
- Document URL structure
- Update permission checks
- 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
-
Templates
- park_actions.html
- park_detail.html
- review forms
-
Views
- Park detail views
- Review handling
- Wiki integration
-
URLs
- Park patterns
- Wiki patterns
- Review handling
Required Changes
-
Template Updates
{% if wiki_view %} <!-- Wiki specific actions --> {% else %} <!-- Standard park actions --> {% endif %} -
View Context
context['wiki_view'] = is_wiki_view(request) -
URL Configuration
# Support both patterns urlpatterns = [ path('parks/', include('parks.urls')), path('wiki/', include('wiki.urls')), ]