Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content
Stack Overflow
  1. About
  2. For Teams
Loading…
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Timeline forFavorite Django Tips & Features?

Current License: CC BY-SA 2.5

9 events
when toggle formatwhatbylicensecomment
May 23, 2017 at 12:10historyedited URL Rewriter Bot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Oct 9, 2010 at 6:34commentadded SingleNegationElimination If you use jinja2, just addreverse like thisenvironment.filters['url'] = django.core.urlresolvers.reverse and you can use it in your templates like so:{{ 'view-name'|url(arg1, arg2)|e }} (the "e" is needed to escape some characters for inclusion in HTML)
Oct 9, 2010 at 6:29commentadded SingleNegationElimination you can use this in templates, too, as in{% url path.to.view.name arg1 arg2 %}docs.djangoproject.com/en/dev/ref/templates/builtins/…
Jul 19, 2010 at 3:55commentadded TM. @skyl It's hardly "the only way to fly". I was at a Django dev sprint and Adrian Holovaty (one of the creators of Django) said he doesn't even use theurl tag... His stance is that urls shouldn't be changing anyway (if you want to be friendly to your users).
Nov 1, 2009 at 9:04commentadded Skylar Saveland This shouldn't be a hidden feature, this is best practice and the only way to fly.
Oct 13, 2009 at 17:28historyeditedPeter MortensenCC BY-SA 2.5
Internal: transformed two URLs to another form. Minor edit: grammar/spelling/case/punctation/etc.
Sep 4, 2009 at 8:34commentadded ricree I agree 100% on this one. I started out using hard coded urls, and it bit me on a project when I changed the url format around a bit to accommodate some changes. I took the time to go back and dig through everything and replace hard coded urls. My only big complaint is that url tag errors kill the whole page while hard coded only messes up the individual link.
Feb 18, 2009 at 22:00historyeditedhasenCC BY-SA 2.5
added 354 characters in body
Feb 17, 2009 at 19:34history answeredhasenCC BY-SA 2.5

[8]ページ先頭

©2009-2025 Movatter.jp