Задать вопрос

Тел: +7 965 3737 888

480

Просмотров

0

Ответов

@url decorator improvements

<p>A slight modification (and, I think, improvement) of the URL decorator found in <a href="http://foothold.ru/knowledge/detail/url-decorator-getting-rid-of-urlpatterns.html">snippet 395</a>.</p>
<p>What's different between this snippet and 395?</p>
<ol><li>We use django.conf.urls.defaults.url() when adding patterns</li>
<li>We support arbitrary arguments to the url() method (like name="foo")</li>
<li>We <em>do not</em> support multiple url patterns (this didn't seem useful to me, but if it is I can add it back.)</li>
</ol>

Вопрос полезен? Да0/Нет0
file_4753.py(1.3Кб)
None