feat(ad_control): new AdSurface + AdPlacement module for placement-based featured/top events
- New ad_control Django app: AdSurface + AdPlacement models with GLOBAL/LOCAL scope - Admin CRUD API at /api/v1/ad-control/ (JWT-protected): surfaces, placements, picker events - Placement lifecycle: DRAFT → ACTIVE|SCHEDULED → EXPIRED|DISABLED - LOCAL scope: Haversine ≤ 50km from event lat/lng (fixed radius, no config needed) - Consumer APIs: /api/events/featured-events/ and /api/events/top-events/ rewritten to use placement-based queries (same URL paths + response shape — no breaking changes) - Seed command: seed_surfaces --migrate converts existing is_featured/is_top_event booleans - mount: admin_api/urls.py → ad-control/, mobile_api/urls.py → replaced consumer views - settings.py: added ad_control to INSTALLED_APPS
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from django.urls import path
|
||||
from .views import *
|
||||
from mobile_api.views.reviews import ReviewSubmitView, MobileReviewListView, ReviewHelpfulView, ReviewFlagView
|
||||
from ad_control.views import ConsumerFeaturedEventsView, ConsumerTopEventsView
|
||||
|
||||
|
||||
# Customer URLS
|
||||
@@ -10,6 +11,8 @@ urlpatterns = [
|
||||
path('user/status/', StatusView.as_view(), name='user_status'),
|
||||
path('user/logout/', LogoutView.as_view(), name='user_logout'),
|
||||
path('user/update-profile/', UpdateProfileView.as_view(), name='update_profile'),
|
||||
path('user/bulk-public-info/', BulkUserPublicInfoView.as_view(), name='bulk_public_info'),
|
||||
path('user/google-login/', GoogleLoginView.as_view(), name='google_login'),
|
||||
]
|
||||
|
||||
# Event URLS
|
||||
@@ -22,8 +25,9 @@ urlpatterns += [
|
||||
path('events/events-by-category/', EventsByCategoryAPI.as_view(), name='api_events_by_category'),
|
||||
path('events/events-by-month-year/', EventsByMonthYearAPI.as_view(), name='events_by_month_year'),
|
||||
path('events/events-by-date/', EventsByDateAPI.as_view(), name='events_by_date'),
|
||||
path('events/featured-events/', FeaturedEventsAPI.as_view(), name='featured_events'),
|
||||
path('events/top-events/', TopEventsAPI.as_view(), name='top_events'),
|
||||
path('events/featured-events/', ConsumerFeaturedEventsView.as_view(), name='featured_events'),
|
||||
path('events/top-events/', ConsumerTopEventsView.as_view(), name='top_events'),
|
||||
path('events/contributor-profile/', ContributorProfileAPI.as_view(), name='contributor_profile'),
|
||||
]
|
||||
|
||||
# Review URLs
|
||||
|
||||
Reference in New Issue
Block a user