django 1.6 url tag error -


"itemprop =" text ">

I have this problem with my APP1 application:

  'app1.views.add_content Tried to do the pattern (s) with the reverse 'logic' ('', ')' and the keyword argument '{}' did not get found: ['/ ad-content' (\\ d +) / $ ']   

@login_requireddef add_content (request, category_id): form = contentForm () category = get_object_or_404 (category, p = category_id) if Request.method == 'Post': Form = ContentForm (request.POST) if form.is_valid (): content = content () content content_code = form.cleaned_data [ 'Content_code'] content.product_versions = form.cleaned_data ['product_versions'] content.category = category content.creator = request.user content.save () returned HttpResponseRedirect (reverse ('category-extension', arg = (category.id

URL >

  url (r '^ / ad-content / (\ d +) / $', 'app1.views.add_content', name = 'add_content'),   < P> I have an error in this line in the template  
  & lt; An id = "add_content" class = "button" href = "{% url 'app1.views} add_content' pk%}" & gt; Add new company ntent & lt; / A & gt;   

What's the problem?

Oh, add the category as I add missread content,

your mistake Here is:

  {% url 'app1.views.add_content' pk%}   

should be:

  {% Url 'app1.views.add_content' category.pk%}    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -