timonweb / django-url-or-relative-url-field

A Django model field that supports both absolute and relative URLs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

/pages/ getting saved as /ages

tylerecouture opened this issue · comments

Hi! I'm trying out your field, thanks for it! However, when I try to link to a relative url /pages/ it saves as /ages/. any idea why the p is being stripped?

Not a maintainer, but this looks like a bug. If you look here it calls lstrip('http:///') which strips all 'h's, 't's, 'p's, and '/'s from the left side of 'value'. I think fixing this issue would be as easy as replacing that value.lstrip('http:///') with value[8:]

Hi Guys, fixed. Sorry for this taking that long to close, just didn't have enough time.