mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-24 14:11:14 -05:00
Add secret management guide, client-side performance monitoring, and search accessibility enhancements
- Introduced a comprehensive Secret Management Guide detailing best practices, secret classification, development setup, production management, rotation procedures, and emergency protocols. - Implemented a client-side performance monitoring script to track various metrics including page load performance, paint metrics, layout shifts, and memory usage. - Enhanced search accessibility with keyboard navigation support for search results, ensuring compliance with WCAG standards and improving user experience.
This commit is contained in:
@@ -15,35 +15,51 @@ class ParkReview(TrackedModel):
|
||||
A review of a park.
|
||||
"""
|
||||
park = models.ForeignKey(
|
||||
"parks.Park", on_delete=models.CASCADE, related_name="reviews"
|
||||
"parks.Park",
|
||||
on_delete=models.CASCADE,
|
||||
related_name="reviews",
|
||||
help_text="Park being reviewed",
|
||||
)
|
||||
user = models.ForeignKey(
|
||||
"accounts.User", on_delete=models.CASCADE, related_name="park_reviews"
|
||||
"accounts.User",
|
||||
on_delete=models.CASCADE,
|
||||
related_name="park_reviews",
|
||||
help_text="User who wrote the review",
|
||||
)
|
||||
rating = models.PositiveSmallIntegerField(
|
||||
validators=[MinValueValidator(1), MaxValueValidator(10)]
|
||||
validators=[MinValueValidator(1), MaxValueValidator(10)],
|
||||
help_text="Rating from 1-10",
|
||||
)
|
||||
title = models.CharField(max_length=200)
|
||||
content = models.TextField()
|
||||
visit_date = models.DateField()
|
||||
title = models.CharField(max_length=200, help_text="Review title")
|
||||
content = models.TextField(help_text="Review content")
|
||||
visit_date = models.DateField(help_text="Date the user visited the park")
|
||||
|
||||
# Metadata
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
# Moderation
|
||||
is_published = models.BooleanField(default=True)
|
||||
moderation_notes = models.TextField(blank=True)
|
||||
is_published = models.BooleanField(
|
||||
default=True, help_text="Whether this review is publicly visible"
|
||||
)
|
||||
moderation_notes = models.TextField(
|
||||
blank=True, help_text="Internal notes from moderators"
|
||||
)
|
||||
moderated_by = models.ForeignKey(
|
||||
"accounts.User",
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
blank=True,
|
||||
related_name="moderated_park_reviews",
|
||||
help_text="Moderator who reviewed this",
|
||||
)
|
||||
moderated_at = models.DateTimeField(
|
||||
null=True, blank=True, help_text="When this review was moderated"
|
||||
)
|
||||
moderated_at = models.DateTimeField(null=True, blank=True)
|
||||
|
||||
class Meta:
|
||||
class Meta(TrackedModel.Meta):
|
||||
verbose_name = "Park Review"
|
||||
verbose_name_plural = "Park Reviews"
|
||||
ordering = ["-created_at"]
|
||||
unique_together = ["park", "user"]
|
||||
constraints = [
|
||||
|
||||
Reference in New Issue
Block a user