| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/allstaterealty/tamerproperty/blog/ |
Upload File : |
from django.http import HttpResponse
from django.shortcuts import render
#from .forms import List
# Create your views here.
def index(request):
if request.method == 'POST':
form = List(request.POST or None)
if form.is_valid():
print('Valid')
#obj = List() #gets new object
#obj.business_name = form.cleaned_data['business_name']
#obj.business_email = form.cleaned_data['business_email']
#obj.business_phone = form.cleaned_data['business_phone']
#obj.business_website = form.cleaned_data['business_website']
#finally save the object in db
"""obj.WebSiteName=request.POST.getlist('WebSiteName')
print (request)
#checked = request.POST.get('checked', '')
#obj.completed = checked
instance = form.save(commit=False)
instance.author = request.user
instance.save()
messages.success(request, "Successfully Created")
obj.save()
return HttpResponseRedirect('/')"""
else:
model = List
form_class = Property_List_Form
return render(request, 'blog/index.html')