mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-30 08:27:00 -05:00
feat: Implement MFA authentication, add ride statistics model, and update various services, APIs, and tests across the application.
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from django.db import models
|
||||
import pghistory
|
||||
from django.conf import settings
|
||||
from django.contrib.contenttypes.fields import GenericForeignKey
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django.db import models
|
||||
|
||||
from apps.core.history import TrackedModel
|
||||
import pghistory
|
||||
|
||||
|
||||
@pghistory.track()
|
||||
class Review(TrackedModel):
|
||||
@@ -13,7 +15,7 @@ class Review(TrackedModel):
|
||||
related_name="reviews",
|
||||
help_text="User who wrote the review",
|
||||
)
|
||||
|
||||
|
||||
# Generic relation to target object (Park, Ride, etc.)
|
||||
content_type = models.ForeignKey(
|
||||
ContentType,
|
||||
@@ -30,14 +32,14 @@ class Review(TrackedModel):
|
||||
db_index=True,
|
||||
)
|
||||
text = models.TextField(blank=True, help_text="Review text (optional)")
|
||||
|
||||
|
||||
# Metadata
|
||||
is_public = models.BooleanField(
|
||||
default=True,
|
||||
default=True,
|
||||
help_text="Whether this review is visible to others"
|
||||
)
|
||||
helpful_votes = models.PositiveIntegerField(
|
||||
default=0,
|
||||
default=0,
|
||||
help_text="Number of users who found this helpful"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user