I have two major query related to slugurl and pageurl:
What is the exact difference between slugurl
and pageurl
?
Why slugurl
returning None ?
I have two major query related to slugurl and pageurl:
What is the exact difference between slugurl
and pageurl
?
Why slugurl
returning None ?
Copyright © 2021 Jogjafile Inc.
After debugging the source code found this in side the slugurl simple tag.
1: What is the exact difference between
slugurl
andpageurl
?Both
slugurl
andpageurl
are the tagsslugurl
take slug string as the input where aspageurl
take page object at the input.NOTE:
slugurl
internally call thepageurl
, if the page found with the mention string slug.2: Why slugurl returning None.?
If you passing any string( let say 'hello') in the slugurl, then the string must be the slug of any
Page
If the mention string is not assign as the slug of any page, the method will return None
In case you are facing the None issue with
slugurl
then follow these two simple steps:1:Firstly check that any of your page have the mention slug or not.
2:In case of not, please create a page and assign the same slug string in the slug of the newly create page.