Q:

django app_details() got an unexpected keyword argument 'slug' error

hello I want to create a simple Django blog and I want to take mivies details from some simple movies list but I take this error :
app_details() got an unexpected keyword argument 'slug'

I have follow docs and I think my code is correct but anytime I take this error.
models.py
class app_movies(models.Model):
    title=models.CharField(max_length=255)
    slug_title = models.SlugField()

urls.py
url(r'^movies-details/(?P<slug>[^\.]+)/$', views.movies_details, name='movies_details'),

views.py
def movies_list(request):
    return render(request, 'movies_list.html',{'movies':app_movies.objects.filter(createddate__lte=timezone.now()).order_by('-createddate')})

def movies_details(request,slug_title):
    movies=app_movies.objects.all()
    app_movies=get_object_or_404(movies, slug=slug_title)
    return render(request, 'movies_details.html',{'movies':movies,'app_movies':app_movies})

html tag :
<a  href="/movies-details/{{movies.slug_title}}">View Project <span ></span></a>

A:

Assuming your error is actually about movies_details, you have called the argument to that function slug_title but the URL pattern has just slug. Those need to be the same.

