Changes between Initial Version and Version 1 of Ticket #25582, comment 12


Ignore:
Timestamp:
Sep 25, 2018, 12:11:41 AM (6 years ago)
Author:
Charalampos Tsimpouris

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25582, comment 12

    initial v1  
    1 It feels more like this is missing from core rather than an enhancement. A URL can be with a query string or without a query string, the same goes also for fragment and in any case all URLs are assumed to be valid. Having this in mind, it makes sense that `url` tag should handle all the above cases by default. That way, it would provide a robust and unified solution for URL creation, maybe with auto escape features. Now, by trying to write another tag and/or searching for a solution around the internet feels like ''django can't handle creating valid URLs''?
     1It feels more like this is missing from core rather than an enhancement. A URL can be with a query string or without a query string, the same goes also for fragment and in any case all URLs are assumed to be valid. Having this in mind, it makes sense that `url` tag should handle all the above cases by default. That way, it would provide a robust and unified solution for URL creation, maybe with auto escape features. Now, by trying to write another tag and/or searching for a solution around the internet feels like ''django can't handle creating valid URLs''? Based on the idea of Thomas Güttler, I was thinking parameters like `get__{name}=` would evaluate for the query string, `fragmet=` to the fragment URL, and `get__dict=` would accept a whole dict at once. That way, it is backwards compatible while also wrapping a whole new world.
Back to Top