mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-30 13:27:02 -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 @@
|
||||
import json
|
||||
|
||||
import requests
|
||||
from django.core.files.base import ContentFile
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from apps.parks.models import Park, ParkPhoto
|
||||
from apps.rides.models import Ride, RidePhoto
|
||||
import json
|
||||
from django.core.files.base import ContentFile
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
@@ -13,7 +15,7 @@ class Command(BaseCommand):
|
||||
self.stdout.write("Downloading photos from seed data...")
|
||||
|
||||
# Read seed data
|
||||
with open("parks/management/commands/seed_data.json", "r") as f:
|
||||
with open("parks/management/commands/seed_data.json") as f:
|
||||
seed_data = json.load(f)
|
||||
|
||||
# Process parks and their photos
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import os
|
||||
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.db import transaction
|
||||
|
||||
from apps.parks.models import ParkPhoto
|
||||
from apps.rides.models import RidePhoto
|
||||
from django.db import transaction
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import os
|
||||
import shutil
|
||||
|
||||
from django.conf import settings
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from apps.parks.models import ParkPhoto
|
||||
from apps.rides.models import RidePhoto
|
||||
from django.conf import settings
|
||||
import shutil
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
@@ -182,7 +184,7 @@ class Command(BaseCommand):
|
||||
for content_type in ["park", "ride"]:
|
||||
base_dir = os.path.join(settings.MEDIA_ROOT, content_type)
|
||||
if os.path.exists(base_dir):
|
||||
for root, dirs, files in os.walk(base_dir):
|
||||
for root, _dirs, files in os.walk(base_dir):
|
||||
for file in files:
|
||||
file_path = os.path.join(root, file)
|
||||
if file_path not in processed_files:
|
||||
|
||||
Reference in New Issue
Block a user