Last active
September 17, 2022 15:16
-
-
Save skolo-online/345ec029da73c307c976b62437001ee1 to your computer and use it in GitHub Desktop.
Landing page views
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render, redirect | |
from .models import * | |
from .aigenerator import * | |
from .functions import * | |
from django.contrib import messages | |
from django.conf import settings | |
import time | |
def home(request): | |
context = {} | |
if request.method == 'POST': | |
businessName = request.POST['businessName'] | |
businessDo = request.POST['businessDo'] | |
context['businessName'] = businessName | |
context['section1Title'] = returnSection1Title(businessDo) | |
context['section1Description'] = getDescription(businessName, businessDo, 265) | |
#Get The Service Titles | |
services = [] | |
serviceTitles = return3Services(businessDo) | |
for service in serviceTitles: | |
obj = {} | |
serviceDescription = returnServiceDescription(service) | |
obj['title'] = service | |
obj['description'] = serviceDescription | |
services.append(obj) | |
#Get The Feature Titles | |
features = [] | |
featureTitles = return3Features(businessDo) | |
for feature in featureTitles: | |
obj = {} | |
featureDescription = returnFeatureDescription(feature) | |
obj['title'] = feature | |
obj['description'] = featureDescription | |
features.append(obj) | |
context['service1Title'] = services[0]['title'] | |
context['service1Description'] = services[0]['description'] | |
context['service2Title'] = services[1]['title'] | |
context['service2Description'] = services[1]['description'] | |
context['service3Title'] = services[2]['title'] | |
context['service3Description'] = services[2]['description'] | |
context['section3Title'] = returnSection1Title(businessDo) | |
context['section3Description'] = getDescription(businessName, businessDo, 265) | |
context['features1Title'] = features[0]['title'] | |
context['features1Description'] = features[0]['description'] | |
context['features2Title'] = features[1]['title'] | |
context['features2Description'] = features[1]['description'] | |
context['features3Title'] = features[2]['title'] | |
context['features3Description'] = features[2]['description'] | |
return render(request, 'website/website1.html', context) | |
return render(request, 'website/index.html', context) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment