Good day. What is my mistake?

from django.conf.urls import patterns, include, url urlpatterns = [ url(r'^1/', 'Article.views.basic_one'), url(r'^2/', 'Article.views.template_two'), url(r'^3/', 'Article.views.template_three_simple'), url(r'^articles/all/$', 'Article.views.Articles'), url(r'^articles/get/(?<Article_id>)\d+/$', 'Article.views.basic_one'), ] 

enter image description here

Closed due to the fact that the essence of the question is not clear by the participants user194374, cheops , Dmitriy Simushev , Kromster , Denis 18 Jul '16 at 6:14 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • I don’t know how to do it in python, but usually (?<

2 answers 2

I don’t understand very deeply regular expressions, but if you wanted to use named groups, do you need to write ?P<name> And you don’t have P.

Accordingly, it should be like this:

 r'^articles/get/(?P<Aricle_id>)\d+/$' 

And never in the questions do not publish the code screenshot. Only text.

    The problem is in the last URL, you do not correctly pass the variable:

     url(r'^articles/get/(?P<article_id>\d+)/$', 'Article.views.Article')