def index(request):
    if (request.method == 'POST'):
        form_user = NameForm(request.POST)
        if form_user.is_valid():
            name = form_user.cleaned_data['your_name']
            name = name.replace(' ', '_')
            return HttpResponseRedirect(('/tweets/' + name))
    else:
        form_user = NameForm()
    return render(request, 'index.html', {'form': form_user})
def index(request):
    if (request.method == 'POST'):
        form_user = NameForm(request.POST)
        if form_user.is_valid():
            name = form_user.cleaned_data['your_name']
            name = name.replace(' ', '_')
            return HttpResponseRedirect(('/tweets/' + name))
    else:
        form_user = NameForm()
    return render(request, 'index.html', {'form': form_user})