Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a UUID convertor #903

Merged
merged 2 commits into from Apr 21, 2020
Merged

Add a UUID convertor #903

merged 2 commits into from Apr 21, 2020

Conversation

JayH5
Copy link
Member

@JayH5 JayH5 commented Apr 18, 2020

This is a very common type of path parameter. Django implements this and I've copied their regex for it: https://github.com/django/django/blob/3.0.5/django/urls/converters.py#L25-L32

This should maybe be merged after #902.

@erewok
Copy link
Contributor

erewok commented Apr 18, 2020

I support this idea. We have one of these in our projects: it's a pretty common requirement for us.

Copy link
Member

@tomchristie tomchristie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All very neatly done, thanks so much!

Needs a docs update too, at https://github.com/encode/starlette/blob/master/docs/routing.md#path-parameters but otherwise good to go. 😃

@JayH5
Copy link
Member Author

JayH5 commented Apr 21, 2020

Thanks @tomchristie. I believe I did update the docs where you are pointing to?

Also, I have now checked, and Werkzeug does implement a UUID converter since version 0.10.

@tomchristie tomchristie merged commit 9440fd7 into encode:master Apr 21, 2020
@tomchristie
Copy link
Member

Oh, of course you did. That’s so much, lovely little PR!

@tomchristie tomchristie mentioned this pull request Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants