Building on the accepted answer, if you're looking to do this with Class Based views, you can follow the instructions in the docs, overriding the form_valid() method on the class view:
# views.py
from django.views.generic.edit import CreateView
class CreateClient(CreateView):
def form_valid(self, form):
form.instance.created_by = self.request.user
return super(CreateClient, self).form_valid(form)