title: Django NoReverseMatch when i try add href to the navbar
body: <p>Hey i learning django from Youtube channel <a href="https://www.youtube.com/watch?v=6PX_eVxg5jM" rel="nofollow noreferrer">https://www.youtube.com/watch?v=6PX_eVxg5jM</a>
  But i have a problem. When I add another link in the navigation in base.html I get this error.</p>
  
  <pre><code>NoReverseMatch at /
  Reverse for 'post-new' with no arguments not found. 1 pattern(s) tried: ['post/new/(?P&lt;pk&gt;[0-9]+)/$']
  Request Method: GET
  Request URL:    http://127.0.0.1:8000/
  Django Version: 2.2.7
  Exception Type: NoReverseMatch
  Exception Value:    
  Reverse for 'post-new' with no arguments not found. 1 pattern(s) tried: ['post/new/(?P&lt;pk&gt;[0-9]+)/$']
  Exception Location: C:\Users\kacpe\dev\blog\lib\site-packages\django\urls\resolvers.py in _reverse_with_prefix, line 673
  Python Executable:  C:\Users\kacpe\dev\blog\Scripts\python.exe
  Python Version: 3.7.5
  Python Path:    
  ['C:\\Users\\kacpe\\dev\\blog\\blog',
   'C:\\Users\\kacpe\\dev\\blog\\Scripts\\python37.zip',
   'C:\\Users\\kacpe\\dev\\blog\\DLLs',
   'C:\\Users\\kacpe\\dev\\blog\\lib',
   'C:\\Users\\kacpe\\dev\\blog\\Scripts',
   'c:\\python37\\Lib',
   'c:\\python37\\DLLs',
   'C:\\Users\\kacpe\\dev\\blog',
   'C:\\Users\\kacpe\\dev\\blog\\lib\\site-packages']
  Server time:    Pon, 18 Lis 2019 00:37:52 +0100
  </code></pre>
  
  <p>This is what the rest of my files look like.</p>
  
  <p><strong>base.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  {% load static %}
  &lt;html lang="pl"&gt;
  &lt;head&gt;
      &lt;!-- Required meta tags --&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;
  
      &lt;!-- Bootstrap CSS --&gt;
      &lt;link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"&gt;
  
      &lt;link rel="stylesheet" type="text/css" href="{% static 'myblog/main.css' %}"&gt;
  
      {% if title %}
          &lt;title&gt;Django Blog - {{ title }}&lt;/title&gt;
      {% else %}
          &lt;title&gt;Django Blog&lt;/title&gt;
      {% endif %}
  &lt;/head&gt;
  &lt;body&gt;
      &lt;header class="site-header"&gt;
        &lt;nav class="navbar navbar-expand-md navbar-dark bg-steel fixed-top"&gt;
          &lt;div class="container"&gt;
            &lt;a class="navbar-brand mr-4" href="{% url 'myblog-home' %}"&gt;Django Blog&lt;/a&gt;
            &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggle" aria-controls="navbarToggle" aria-expanded="false" aria-label="Toggle navigation"&gt;
            &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
            &lt;/button&gt;
            &lt;div class="collapse navbar-collapse" id="navbarToggle"&gt;
              &lt;div class="navbar-nav mr-auto"&gt;
                &lt;a class="nav-item nav-link" href="{% url 'myblog-home' %}"&gt;Home&lt;/a&gt;
                &lt;a class="nav-item nav-link" href="{% url 'myblog-about' %}"&gt;About&lt;/a&gt;
              &lt;/div&gt;
              &lt;!-- Navbar Right Side --&gt;
              &lt;div class="navbar-nav"&gt;
                  {% if user.is_authenticated %}
                      &lt;a class="nav-item nav-link" href="{% url 'profile' %}"&gt;Profile&lt;/a&gt;
                      &lt;a class="nav-item nav-link" href="{% url 'logout' %}"&gt;Logout&lt;/a&gt;
                      &lt;a class="nav-item nav-link" href="{% url 'post-new' %}"&gt;New Post&lt;/a&gt;
                  {% else %}
                      &lt;a class="nav-item nav-link" href="{% url 'login' %}"&gt;Login&lt;/a&gt;
                      &lt;a class="nav-item nav-link" href="{% url 'register' %}"&gt;Register&lt;/a&gt;
                  {% endif %}
              &lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/nav&gt;
      &lt;/header&gt;
      &lt;main role="main" class="container"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-md-8"&gt;
              {% if messages %}
                  {% for message in messages %}
                      &lt;div class="alert alert-{{ message.tags }}"&gt;
                      {{ message }}
                          &lt;/div&gt;
                  {% endfor %}
              {% endif %}
            {% block content %}{% endblock %}
          &lt;/div&gt;
          &lt;div class="col-md-4"&gt;
            &lt;div class="content-section"&gt;
              &lt;h3&gt;Our Sidebar&lt;/h3&gt;
              &lt;p class='text-muted'&gt;You can put any information here you'd like.
                &lt;ul class="list-group"&gt;
                  &lt;li class="list-group-item list-group-item-light"&gt;Latest Posts&lt;/li&gt;
                  &lt;li class="list-group-item list-group-item-light"&gt;Announcements&lt;/li&gt;
                  &lt;li class="list-group-item list-group-item-light"&gt;Calendars&lt;/li&gt;
                  &lt;li class="list-group-item list-group-item-light"&gt;etc&lt;/li&gt;
                &lt;/ul&gt;
              &lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/main&gt;
  
  
      &lt;!-- Optional JavaScript --&gt;
      &lt;!-- jQuery first, then Popper.js, then Bootstrap JS --&gt;
      &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"&gt;&lt;/script&gt;
      &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>urls.py</strong></p>
  
  <pre><code>from django.urls import path
  
  from . import views
  from .views import PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView
  
  urlpatterns = [
      path('', PostListView.as_view(), name='myblog-home'),
      path('about/', views.about, name='myblog-about'),
      path('post/&lt;int:pk&gt;/', PostDetailView.as_view(), name='post-detail'),
      path('post/new/&lt;int:pk&gt;/', PostCreateView.as_view(), name='post-new'),
      path('post/&lt;int:pk&gt;/update/', PostUpdateView.as_view(), name='post-update'),
      path('post/&lt;int:pk&gt;/delete/', PostDeleteView.as_view(), name='post-delete'),
  
  ]
  </code></pre>
  
  <p><strong>views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  from django.views.generic import ListView, DetailView, CreateView, UpdateView, DeleteView,
  from django.contrib.auth.mixins import LoginRequiredMixin, UserPassesTestMixin
  from .models import Post
  
  
  # def home_page(request):
  #     context = {
  #         'posts': Post.objects.all()
  #     }
  #     return render(request, 'myblog/home_page.html', context)
  
  class PostListView(ListView):
      model = Post
      template_name = 'myblog/home_page.html'
      context_object_name = 'posts'
      ordering = ['-date_posted']
  
  class PostDetailView(DetailView):
      model = Post
  
  class PostCreateView(LoginRequiredMixin, CreateView):
      model = Post
      fields = ['title', 'content']
  
      def form_valid(self, form):
          form.instance.author = self.request.user
          return super().form_valid(form)
  
  class PostUpdateView(LoginRequiredMixin, UserPassesTestMixin, UpdateView):
      model = Post
      fields = ['title', 'content']
  
      def form_valid(self, form):
          form.instance.author = self.request.user
          return super().form_valid(form)
  
      def test_func(self):
          post = self.get_object()
          if self.request.user == post.author:
              return True
          return False
  
  class PostDeleteView(LoginRequiredMixin, UserPassesTestMixin, DeleteView):
      model = Post
      success_url = '/'
  
      def test_func(self):
          post = self.get_object()
          if self.request.user == post.author:
              return True
          return False
  
  
  def about(request):
      return render(request, 'myblog/about.html', {'title': 'About'})
  </code></pre>
  
  <p>When I try <code>{% url 'post-new' 1 %}</code> no error occurs, but when i try <code>{% url 'post-new' posts.id %}</code> It appears:</p>
  
  <pre><code>NoReverseMatch at /post/new/1/
  Reverse for 'post-new' with arguments '('',)' not found. 1 pattern(s) tried: ['post/new/(?P&lt;pk&gt;[0-9]+)/$']
  </code></pre>
  
  <p>In the video above, everything works properly, but I have this problem. I was looking for solutions but nothing helped. Thanks for help.</p>