Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Why are URLS all "~"something? #207

Open
ssteinerx opened this issue Aug 9, 2017 · 1 comment
Open

Why are URLS all "~"something? #207

ssteinerx opened this issue Aug 9, 2017 · 1 comment

Comments

@ssteinerx
Copy link
Collaborator

Description

In urls.py all of the regular expressions for the links contain a ~ (tilde) character e.g.:

    regex="^MySuperFancyAppData/~create/$",

What is the purpose of putting the ~ there?

I thought it might be some obscure variant of regex for e.g. case insensitivity or something, but couldn't come up with anything on which it worked.

It just requires the literal ~ to be in the URL.

It seems unlikely that this is a much-repeated typo -- is there a rationale I'm just missing?

@pydanny
Copy link
Owner

pydanny commented Aug 9, 2017

It's a personal pattern to identify actions within a system that use slugs. The rationale is you don't have to worry about someone creating a data element with the name of 'create'.

That said, there are other ways of handling this kind of thing. Or you can ignore it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants