title: Reverse for '<WSGIRequest: POST '/signup/'> error on Signup page
body: <p>I am trying to create a user account and all is well when I use the signup view and form to sign up on the signup HTML page below is some info but I get this error</p>
  
  <blockquote>
    <p>NoReverseMatch at /signup/ Reverse for '' not found. '' is not a
    valid view function or pattern name. Request Method:  POST Request
    URL:  <a href="http://127.0.0.1:8000/signup/" rel="nofollow noreferrer">http://127.0.0.1:8000/signup/</a> Django Version:   2.1.7 Exception
    Type: NoReverseMatch Exception Value:  Reverse for '' not found. '' is not a
    valid view function or pattern name. Exception
    Location: C:\WINDOWS\system32\dev\pastebinclonedirectory\lib\site-packages\django\urls\resolvers.py
    in _reverse_with_prefix, line 622 Python
    Executable:   C:\WINDOWS\system32\dev\pastebinclonedirectory\Scripts\python.exe
    Python Version:   3.6.8 Python Path:<br>
    ['C:\WINDOWS\system32\dev\pastebinclonedirectory\pastebin', 
    'C:\WINDOWS\system32\dev\pastebinclonedirectory\Scripts\python36.zip',
    'C:\WINDOWS\system32\dev\pastebinclonedirectory\DLLs', 
    'C:\WINDOWS\system32\dev\pastebinclonedirectory\lib', 
    'C:\WINDOWS\system32\dev\pastebinclonedirectory\Scripts', 
    'c:\users\aadeo\appdata\local\programs\python\python36\Lib', 
    'c:\users\aadeo\appdata\local\programs\python\python36\DLLs', 
    'C:\WINDOWS\system32\dev\pastebinclonedirectory', 
    'C:\WINDOWS\system32\dev\pastebinclonedirectory\lib\site-packages']
    Server time:  Wed, 13 Mar 2019 06:46:57 +0000</p>
  </blockquote>
  
  <p><strong>view.py</strong></p>
  
  <pre><code>def signup(request):
      if request.method == 'POST':
          form = UserRegisterForm(request.POST)
          if form.is_valid():
              form.save()
              username = form.cleaned_data.get('username')
              raw_password = form.cleaned_data.get('password1')
              user = authenticate(username=username, password=raw_password)
              login(request, user)
              return redirect(request,'app/index.html')
      else:
          form = UserRegisterForm()
      return render(request, 'app/signup.html', {'form': form})
  </code></pre>
  
  <p><strong>forms.py</strong></p>
  
  <pre><code>from django import forms
  from .models import Post
  from django.contrib.auth.forms import UserCreationForm
  from django.contrib.auth.models import User
  
  class Userpostform(forms.ModelForm):
      class Meta:
          model = Post
          fields = ('title','content','private',)
  
  
  
  
  class Visitorpostform(forms.ModelForm):
      class Meta:
          model = Post
          fields = ('title','content')
  </code></pre>
  
  <p><strong>urls.py</strong> in the apps folder</p>
  
  <pre><code>path('',views.home,name='home'),
  path('accounts/', include('django.contrib.auth.urls'),name='login'),
  path('signup/',views.signup,name='signup'),
  path('accounts/profile/',views.profile,name='profile'),
  path('logout',views.logout_view,name='logout'),
  path('userpostnew', views.userpostnew, name='userpostnew'),
  path('visitorpostnew', views.visitorpostnew, name='visitorpostnew'),
  </code></pre>