django - "urls" function sometime included in urls.py -


Why can you see in some urls.py files url (..) In and more you (..) .

For example

  urlpatterns = patterns ('', url (' 
  urlpatterns = pattern (' ', (' Article Include in '', ('article.urls')))    

Pattern () url () Alternate uses are going forward, however, pattern will be disliked and you will always be disliked by Url to see:

The second thing is that the pattern provides the addition of prefix parameters automatically u Wrapping plain topless in url () in rlpatterns . I think it would be good to remove it and use url () .

So you should always come in the habit of using url .

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -