-1. I would question the wisdom of introducing a second URL system on
the basis of simplicity and clarity alone. The assertion that regular
expressions are "ugly" and "difficult" is, I suppose, subjective. I
prefer to think of them as "powerful". In any case, I think we should
ask whether the
Hi LeafStorm,
On Oct 18, 6:52 am, Jannis Leidel wrote:
> Hi LeafStorm,
>
> > Okay, I guess I can live with that. Maybe, if I can write a patch
> > implementing this in a completely backwards-compatible way, I'll
> > propose it again for a later version (earlier in the release cycle).
>
> In the
2009/10/18 Maxim Penzin
>
> Another crazy idea for shorter object fetch is
> "/%(model_name.id)d/" or may be another syntax like "/%%(model_name)/"
> to get rid of
> get_object_or_404( id=int(id) )
> at the first line of every view method.
>
I quite like this idea, not sure about that syntax
> My proposal is to add a URL resolution system on top of the current
> one [for backwards compatibility] that works in a similar way to
> Werkzeug's URL resolver. You express URL patterns in a syntax like '/
> /' (where the first 'slug' is a converter and the second
> 'slug' is the name to be pas
Hi LeafStorm,
> Okay, I guess I can live with that. Maybe, if I can write a patch
> implementing this in a completely backwards-compatible way, I'll
> propose it again for a later version (earlier in the release cycle).
In the meantime you might want to have a look at Surlex, Cody
Soyland's 3r
This seems to me to be a perfect candidate for implementation outside of
core. Write a facility that takes your simpler url patterns, and
creates standard Django urlpatterns from them. Publish it. If it
catches on, then we can discuss what future version of Django might
include it as core.
Okay, I guess I can live with that. Maybe, if I can write a patch
implementing this in a completely backwards-compatible way, I'll
propose it again for a later version (earlier in the release cycle).
Though I disagree with your characterization of it as "what looks like
regular expressions with n
On Sat, Oct 17, 2009 at 10:29 AM, Leaf wrote:
> Sorry to propose this right up against the voting deadline for 1.2
> features, but it's one of the things that has always bugged me about
> Django and I would really like to see this in 1.2.
-1.
Replacing regular expressions with... well, what loo
Currently, Django uses URLs based on regular expressions. I think that
is a suboptimal way to go about things because:
- Regular expressions are ugly and can be difficult to write.
- Regular expressions don't provide an easy way to match certain types
of fields, like slugs or month names.
- Regul