mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 09:31:09 -05:00
52 lines
1.8 KiB
Python
52 lines
1.8 KiB
Python
# DEPRECATED: These views are deprecated and no longer used.
|
|
#
|
|
# Location search functionality has been moved to the parks app:
|
|
# - parks.views.location_search
|
|
# - parks.views.reverse_geocode
|
|
#
|
|
# Domain-specific location models are now used instead of the generic Location model:
|
|
# - ParkLocation in parks.models.location
|
|
# - RideLocation in rides.models.location
|
|
# - CompanyHeadquarters in parks.models.companies
|
|
#
|
|
# This file is kept for reference during migration cleanup only.
|
|
|
|
import json
|
|
import requests
|
|
from django.views.generic import View
|
|
from django.http import JsonResponse
|
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
|
from django.core.cache import cache
|
|
from django.conf import settings
|
|
from django.views.decorators.http import require_http_methods
|
|
from django.utils.decorators import method_decorator
|
|
from django.views.decorators.csrf import csrf_protect
|
|
from django.db.models import Q
|
|
|
|
from location.forms import LocationForm
|
|
from .models import Location
|
|
|
|
# NOTE: All classes and functions below are DEPRECATED
|
|
# Use the equivalent functionality in the parks app instead
|
|
|
|
class LocationSearchView(View):
|
|
"""DEPRECATED: Use parks.views.location_search instead"""
|
|
pass
|
|
|
|
class LocationCreateView(LoginRequiredMixin, View):
|
|
"""DEPRECATED: Use domain-specific location models instead"""
|
|
pass
|
|
|
|
class LocationUpdateView(LoginRequiredMixin, View):
|
|
"""DEPRECATED: Use domain-specific location models instead"""
|
|
pass
|
|
|
|
class LocationDeleteView(LoginRequiredMixin, View):
|
|
"""DEPRECATED: Use domain-specific location models instead"""
|
|
pass
|
|
|
|
@require_http_methods(["GET"])
|
|
def reverse_geocode(request):
|
|
"""DEPRECATED: Use parks.views.reverse_geocode instead"""
|
|
return JsonResponse({'error': 'This endpoint is deprecated. Use /parks/search/reverse-geocode/ instead'}, status=410)
|