title: Django - Having two views in same url
body: <p>I am making a website in django and in my homepage I want to show the list of my recent blog post and a few blocks below I want to make a simple contact form. The blog and the contact form separately are working fine. But I want to include them in the same page(obviously in the same url). </p>
  
  <p>The views.py is:</p>
  
  <pre><code>from .forms import NameForm
  
  def get_name(request):
      if request.method == 'POST':
          form = NameForm(request.POST)
          if form.is_valid():
              return HttpResponseRedirect('/thanks/')
      else:
          form = NameForm()
      return render(request, 'personal/index.html', {'form': form})
  </code></pre>
  
  <p>If you want to look at the forms.py then :</p>
  
  <pre><code>from django import forms
  
  class NameForm(forms.Form):
      your_name = forms.CharField(label='Your name', max_length=100)
  </code></pre>
  
  <p>The urlpattern in urls.py of my homepage is:</p>
  
  <pre><code>urlpatterns = [
      url(r'^$', ListView.as_view(
                                  queryset=Post.objects.all().order_by("-date")[:2],
                                  template_name="personal/index.html")),
      url(r'^$', views.get_name, name='contact'),
  ]
  </code></pre>
  
  <p>With this urlpatter the list of blog post shows up perfectly but the contact form doesn't show up. But with the below urlpattern contact form shows up but blog posts doesn't show up.</p>
  
  <pre><code>urlpatterns = [
      url(r'^$', views.get_name, name='contact'),
      url(r'^$', ListView.as_view(
                                  queryset=Post.objects.all().order_by("-date")[:2],
                                  template_name="personal/index.html")),
  ]
  </code></pre>
  
  <p>I want to make both of these contents show up in the same page. Please help me. If you need any more information then do tell.</p>