pydanny/cookiecutter-djangopackage

Why are URLS all "~"something?

Opened this issue · 1 comments

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?

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.