You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
947 B
33 lines
947 B
from django.shortcuts import render
|
|
from django.shortcuts import HttpResponse
|
|
from .models import Ad
|
|
from .forms import ResumeForm
|
|
|
|
|
|
# Create your views here.
|
|
def contact(request):
|
|
return render(request, 'contact.html', {
|
|
'active_menu': 'employ',
|
|
'sub_menu': 'contact',
|
|
})
|
|
|
|
|
|
def recruit(request):
|
|
AdList = Ad.objects.all().order_by('-publishDate')
|
|
if request.method == 'POST':
|
|
resumeForm = ResumeForm(data=request.POST, files=request.FILES)
|
|
if resumeForm.is_valid():
|
|
resumeForm.save()
|
|
return render(request, 'success.html', {
|
|
'active_menu': 'contactus',
|
|
'sub_menu': 'recruit',
|
|
})
|
|
else:
|
|
resumeForm = ResumeForm()
|
|
return render(
|
|
request, 'recruit.html', {
|
|
'active_menu': 'contactus',
|
|
'sub_menu': 'recruit',
|
|
'AdList': AdList,
|
|
'resumeForm': resumeForm,
|
|
}) |