Esempio n. 1
0
def detailedRequestsView(request):
    if request.method == 'POST':  #form has been submitted
        form = RequestsForm(request.POST)
        if form.is_valid():
            requestorName = request.POST.get('requestorName', '')
            contactName = request.POST.get('contactName', '')
            contactEmail = request.POST.get('contactEmail', '')
            publishDate = request.POST.get('publishDate', '')
            details = request.POST.get('details', '')
            isExistingArticle = request.POST.get('isExistingArticle', '')
            providedURL = request.POST.get('providedURL', '')
            slug = request.POST.get('slug', '')
            r = Requests(requestorName=requestorName,
                         contactName=contactName,
                         contactEmail=contactEmail,
                         details=details,
                         publishDate=publishDate,
                         isExistingArticle=isExistingArticle,
                         providedURL=providedURL,
                         slug=slug,
                         isAssigned='no')
            r.save()
            messages.success(request, 'Request submitted!')
    else:
        form = RequestsForm()

    return render(request, 'requests/detailedRequest.html', {'form': form})
Esempio n. 2
0
def ideaRequestView(request):
	if request.method == 'POST': #form has been submitted
		form = RequestsForm(request.POST)
		if form.is_valid():
			contactName = request.POST.get('contactName', '')
			contactEmail = request.POST.get('contactEmail', '')
			details = request.POST.get('details', '')
			r = Requests(contactName = contactName, contactEmail = contactEmail, details = details)
			r.save()
			messages.success(request, 'Request submitted!')
	else:
		form = RequestsForm()

	return render(request, 'requests/ideaRequest.html', { 'form' :form })
Esempio n. 3
0
def ideaRequestView(request):
    if request.method == 'POST':  #form has been submitted
        form = RequestsForm(request.POST)
        if form.is_valid():
            contactName = request.POST.get('contactName', '')
            contactEmail = request.POST.get('contactEmail', '')
            details = request.POST.get('details', '')
            r = Requests(contactName=contactName,
                         contactEmail=contactEmail,
                         details=details)
            r.save()
            messages.success(request, 'Request submitted!')
    else:
        form = RequestsForm()

    return render(request, 'requests/ideaRequest.html', {'form': form})
Esempio n. 4
0
def detailedRequestsView(request):
	if request.method == 'POST': #form has been submitted
		form = RequestsForm(request.POST)
		if form.is_valid():
			requestorName = request.POST.get('requestorName','')
			contactName = request.POST.get('contactName', '')
			contactEmail = request.POST.get('contactEmail', '')
			publishDate = request.POST.get('publishDate', '')
			details = request.POST.get('details', '')
			isExistingArticle = request.POST.get('isExistingArticle', '')
			providedURL = request.POST.get('providedURL','')
			slug = request.POST.get('slug', '')
			r = Requests(requestorName = requestorName, contactName = contactName, contactEmail = contactEmail, details = details, 
			publishDate = publishDate, isExistingArticle = isExistingArticle, providedURL = providedURL, slug = slug, isAssigned = 'no')
			r.save()
			messages.success(request, 'Request submitted!')
	else:
		form = RequestsForm()

	return render(request, 'requests/detailedRequest.html', { 'form' :form })