django-seo-js
django-seo-js copied to clipboard
SEO_JS_IGNORE_URLS is misleading
Hi,
I ran into an issue trying to use the setting SEO_JS_IGNORE_URLS
.
for each of them it checks if if url in request.path
, shouldn't it be if url == request.path
?
If for example you want to exclude exactly the page 'foo', you would define SEO_JS_IGNORE_URLS=['/foo']
, but it would match any page containing 'foo' in the url.
Also a regex based option would be useful.
Hey Denis,
I'm a bit partial to the "in" implementation, since it allows for more flexibility in matching. But I can also see it being confusing and at the least, not documented/named properly.
A regex match would also be useful, though I'd want it as an option, instead of the default (given the "oh, now you have two problems" nature of regex in most situations.)
I'd say let's hash out a better structure here that allows for more powerful matching, yet keeps simplicity for straightforward setups and backwards compatibility if we can.
Thanks for bringing this forward, and helping make django-seo-js better!