Здравствуйте, я новичок в программировании, может ли кто-нибудь помочь мне с моей проблемой, по какой-то причине этот массаж продолжает всплывать [закрыто]

Reverse for 'vjestiPlus' with arguments '('',)' not found.   
1 pattern(s) tried: \['vjesti\\-Dodavanje/(?P\<slug\>\[-a-zA-Z0-9\_\]+)\\Z'\]

This is my views.py

class VjestiDodavanje(View):
    def get(self, request, slug):
        vjest = Post.objects.get(slug=slug)
        context = {
            "vjest" : vjest,
            "vjestiForm" : VjestiForm()
                    }
    return render (request, "members/vjestiDodavanje.html", context)

    def post(self, request, slug):
        vjestiForm = VjestiForm(request.POST)
        vjest = Post.objects.get(slug=slug)
        if vjestiForm.is_valid():
            vjest = vjestiForm.save(commit=False)
            vjest.post = vjest
            vjest.save()
            return HttpResponseRedirect(reverse("vjestiPlus", args=[slug]))
        context = {
            "vjest" : vjest,
            "vjestiForm" : VjestiForm()
                    }
    return render (request, "members/vjestiDodavanje.html", context)

html

  {% extends "base.html" %} {% load static %}

{% block title %} Vjesti {% endblock title %}

{% block css_filles %}

{% endblock css_filles %}

{% block content %}



          <a href="{% url "><img src="{% static ' alt="Logo"></a>
        
        

        </div>
        <div>

        </div>
        <div class="desno">
          <p class="naslovTekst">  <a href="{% url "prijava" %}">PRIJAVI SE</a></p>
        </div>
        <div class="desno">
            <p class="naslovTekst"><a href="{%url "kontakti"%}">KONTAKTIRAJ NAS</a></p>
        </div>
        <div>
            <p class="naslovTekst"> <a href="{%url "vjesti"%}">VIJESTI</a></p>
        </div>
    </div>


</header>

<section id="all-posts">
<h2>My Collected Posts</h2>
<ul>
    {% for post in Vjesti  %}
         {% include "members/includes/vjestiPost.html" %}
    {% endfor %}
</ul>

</section>

<p><a href="{% url "vjestiPlus" vjest.slug %}"> Dodavnje Vjesti </a></p>
{% endblock content %}

model.py

class Post(models.Model):
    title = models.CharField(max_length=150)
    description = models.CharField(max_length=200)
    image = models.ImageField(upload_to="posts", null=True)
    date = models.DateField(auto_now=True)
    slug = models.SlugField(unique=True, db_index=True)
    content = models.TextField(validators=[MinLengthValidator(10)])
    author = models.ForeignKey(Author, null=True, on_delete=models.SET_NULL)
    tags = models.ManyToManyField(Tag)


    def __str__(self):
        return self.title
Вернуться на верх