2
You really should be using a ModelForm for this, which will make everything much easier.
That said, you can fix your code by getting the actual User object for the developer:
developer = User.objects.get(username=request.POST['developer'])
but if you used a ModelForm, you wouldn’t need to do this. Plus you’ll have the advantage that your users’ entries will actually be validated, rather than crashing when data is missing which is what will happen now.
Source:stackexchange.com