char0n / django-brevisurl

Django app for shortening urls
Other
9 stars 10 forks source link

Shortened urls creation #17

Closed char0n closed 12 years ago

char0n commented 12 years ago

There should be possibility to create shortened urls in this fashion like this:

Problem

BREVISURL_BACKEND_LOCAL_DOMAIN = 'http://codescale.net/d'

I would expect shortened url to be: http://codescale.net/d but instead it's http://codescale.net/d/.

Solution

Introduce setting BREVISURL_LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH. This settings will be responsible for stripping slash from the begging of url_path containing the token.

BREVISURL_BACKEND_LOCAL_DOMAIN = 'http://codescale.net/d' BREVISURL_LOCAL_BACKEND_STRIP_TOKEN_URL_SLASH = True

shortened url is http://codescale.net/d