Skip to content

Enhanced route syntax #5

Closed
Closed

Description

@lrlopez

Discussion on how augment route definition (regexp, optional params, constraints,...)

We should agree in the following, in no particular order:

  • Optional parameters
  • Type definition (restrict to string, to integers, paths, list). Especially important is the path, as it allows using parameters that contain slashes.
  • Min/max length
  • Regexp syntax

We could use the following pull-requests as a guide:

Activity

  1. gregwebs commented on Jan 29, 2013

    @gregwebs

    rather than type definitions, we can allow arbitrary parsers. Instead of 'foo/:int' we can have ['foo', parseInt]. This unloads a bunch of work from our shoulders, and a DSL that uses :int can always be added on top in the future.

  2. jeme commented on Jan 30, 2013

    @jeme
    Contributor

    @gregwebs I don't quite know how @xealot implemented Improved Angular routing in a backwards compatible way but as I understand werkzeug routing, that is actually what it provides.

    e.g. <path:bar> refers to a parser named path.

    http://werkzeug.pocoo.org/docs/routing/#custom-converters

    Someone noted that they didn't like the syntax, ofc. I wouldn't mind a more familiar syntax. But further than that I have no for or against the syntax as it would only be founded in what I was use to and not objectivity.

  3. timkindberg commented on Feb 14, 2013

    @timkindberg
    Contributor

    Closing because we are moving forward with @ksperling implementation, if you need to bring any issues from this discussion over to the new implementation please make a new issue. This thread seems to have some interesting ideas...

  4. pranaydutta89 commented on Jul 28, 2015

    @pranaydutta89

    👍

  5. christopherthielen commented on Jul 28, 2015

    @christopherthielen
    Contributor

    wat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions