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,14 +1,17 @@
|
||||
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 apps.core.history import TrackedModel
|
||||
import pghistory
|
||||
from django.db import models
|
||||
|
||||
# Using string reference for CloudflareImage to avoid circular imports if possible,
|
||||
# or direct import if safe. django-cloudflare-images-toolkit usually provides a field or model.
|
||||
# Checking installed apps... it's "django_cloudflareimages_toolkit".
|
||||
from django_cloudflareimages_toolkit.models import CloudflareImage
|
||||
|
||||
from apps.core.history import TrackedModel
|
||||
|
||||
|
||||
@pghistory.track()
|
||||
class Photo(TrackedModel):
|
||||
user = models.ForeignKey(
|
||||
@@ -17,7 +20,7 @@ class Photo(TrackedModel):
|
||||
related_name="photos",
|
||||
help_text="User who uploaded this photo",
|
||||
)
|
||||
|
||||
|
||||
# The actual image
|
||||
image = models.ForeignKey(
|
||||
CloudflareImage,
|
||||
@@ -38,10 +41,10 @@ class Photo(TrackedModel):
|
||||
# Metadata
|
||||
caption = models.CharField(max_length=255, blank=True, help_text="Photo caption")
|
||||
is_public = models.BooleanField(
|
||||
default=True,
|
||||
default=True,
|
||||
help_text="Whether this photo is visible to others"
|
||||
)
|
||||
|
||||
|
||||
# We might want credit/source info if not taken by user
|
||||
source = models.CharField(max_length=100, blank=True, help_text="Source/Credit if applicable")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user