def _handle_profile(request, prefix):
attendee = people.Attendee.get_instance(request.user)<EOL>try:<EOL><INDENT>profile = attendee.attendeeprofilebase<EOL>profile = people.AttendeeProfileBase.objects.get_subclass(<EOL>pk=profile.id,<EOL>)<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>profile = None<EOL><DEDENT>try:<EOL><INDENT>speaker_profile = request.user.speaker_profile<EOL>speaker_name = speaker_profile.name<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>speaker_name = None<EOL><DEDENT>name_field = ProfileForm.Meta.model.name_field()<EOL>initial = {}<EOL>if profile is None and name_field is not None:<EOL><INDENT>initial[name_field] = speaker_name<EOL><DEDENT>form = ProfileForm(<EOL>request.POST or None,<EOL>initial=initial,<EOL>instance=profile,<EOL>prefix=prefix<EOL>)<EOL>handled = True if request.POST else False<EOL>if request.POST and form.is_valid():<EOL><INDENT>form.instance.attendee = attendee<EOL>form.save()<EOL><DEDENT>return form, handled<EOL>
Returns a profile form instance, and a boolean which is true if the
    form was handled.