diff --git a/GeneralApp/views.py b/GeneralApp/views.py index ebb044b..1c6cb16 100644 --- a/GeneralApp/views.py +++ b/GeneralApp/views.py @@ -59,6 +59,7 @@ def MainPage(request): def StaticPageView(request, url): from RoutesApp.forms import RouteForm + from SubscribesApp.models import Subscribe Dict = {} @@ -67,7 +68,7 @@ def StaticPageView(request, url): elif url == 'for_movers': Dict.update({ 'route_form': RouteForm(), - 'owner_type': 'customer' + 'owner_type': 'customer', }) elif url == 'for_customers': Dict.update({ @@ -79,6 +80,12 @@ def StaticPageView(request, url): elif url in ['main']: raise Http404 + if url in ['for_movers', 'for_customers']: + subscribes = Subscribe.objects.filter(enable=True) + Dict.update({ + 'subscribes': subscribes, + }) + try: page = StaticPage.objects.get(url=url) except StaticPage.DoesNotExist: