fork download
  1. @login_required
  2. def create_vacancy(request):
  3. if request.method == 'POST':
  4. vacancy_form = VacancyForm(data=request.POST)
  5. if vacancy_form.is_valid():
  6. user = request.user
  7. vacancy = vacancy_form.save()
  8. vacancy.save()
  9. return HttpResponseRedirect('/accounts/profile/vacancy/all/')
  10. else:
  11. user = request.user
  12. vacancy_form = VacancyForm()
  13. return render(request, 'create_vacancy.html', {'vacancy_form': vacancy_form})
Runtime error #stdin #stdout #stderr 0.02s 8688KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
NameError: name 'login_required' is not defined