0.7.39
add subscribes for static pages
This commit is contained in:
@@ -59,6 +59,7 @@ def MainPage(request):
|
|||||||
|
|
||||||
def StaticPageView(request, url):
|
def StaticPageView(request, url):
|
||||||
from RoutesApp.forms import RouteForm
|
from RoutesApp.forms import RouteForm
|
||||||
|
from SubscribesApp.models import Subscribe
|
||||||
|
|
||||||
Dict = {}
|
Dict = {}
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ def StaticPageView(request, url):
|
|||||||
elif url == 'for_movers':
|
elif url == 'for_movers':
|
||||||
Dict.update({
|
Dict.update({
|
||||||
'route_form': RouteForm(),
|
'route_form': RouteForm(),
|
||||||
'owner_type': 'customer'
|
'owner_type': 'customer',
|
||||||
})
|
})
|
||||||
elif url == 'for_customers':
|
elif url == 'for_customers':
|
||||||
Dict.update({
|
Dict.update({
|
||||||
@@ -79,6 +80,12 @@ def StaticPageView(request, url):
|
|||||||
elif url in ['main']:
|
elif url in ['main']:
|
||||||
raise Http404
|
raise Http404
|
||||||
|
|
||||||
|
if url in ['for_movers', 'for_customers']:
|
||||||
|
subscribes = Subscribe.objects.filter(enable=True)
|
||||||
|
Dict.update({
|
||||||
|
'subscribes': subscribes,
|
||||||
|
})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
page = StaticPage.objects.get(url=url)
|
page = StaticPage.objects.get(url=url)
|
||||||
except StaticPage.DoesNotExist:
|
except StaticPage.DoesNotExist:
|
||||||
|
|||||||
Reference in New Issue
Block a user