jazzband / django-hosts

Dynamic and static host resolving for Django. Maps hostnames to URLconfs.
http://django-hosts.rtfd.org
Other
982 stars 106 forks source link

No scheme URI should be possible #49

Open jelko opened 8 years ago

jelko commented 8 years ago

Right now it is not possible to have URIs without a scheme for relative links. Unfortunately normalize_scheme makes sure that there is always a // in place.

The documentation itself gives the example of <a href="//admin/dashboard/">Admin dashboard</a>. If admin is not a hostname/domain, this would not lead anywhere. I would suggest that admin/dashboard/ would be the better URI to build here.

I would suggest to change normalize_scheme to accept an empty string as well.