Django

22 views
Skip to first unread message

Tanni Seriki

unread,
Jul 7, 2020, 3:10:41 PM7/7/20
to Django users
Please family.please help me out,
Am trying to create a posts details Page, in model.py I declare a get absolute URL with a reverse of my post details urls. But if I run it it shows me an error, no reverse, post is not a registered namespace.
IMG_20200706_121453.jpg
IMG_20200702_182540.jpg
IMG_20200702_182757.jpg
IMG_20200702_182709.jpg
IMG_20200706_120959.jpg

Mottaz Hegaze

unread,
Jul 7, 2020, 3:38:24 PM7/7/20
to Django users
try this

in your project urls not your app urls register the namespace like this

path('' , include('blog.urls' , namespace="post") 



On Tue, Jul 7, 2020 at 5:11 PM Tanni Seriki <tannis...@gmail.com> wrote:
Please family.please help me out,
Am trying to create a posts details Page, in model.py I declare a get absolute URL with a reverse of my post details urls. But if I run it it shows me an error, no reverse, post is not a registered namespace.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6bc7554b-bee8-40ee-8662-e156ff6ae768o%40googlegroups.com.

Tanni Seriki

unread,
Jul 7, 2020, 3:42:37 PM7/7/20
to django...@googlegroups.com
Thanks sir I tried that also,
But it brinks another error
No reverse for index, index not a valid function

Mottaz Hegaze

unread,
Jul 7, 2020, 3:58:27 PM7/7/20
to Django users
try to use function name IndexList with reverse  , not the url name
i don't see all your code

Tanni Seriki

unread,
Jul 7, 2020, 4:02:23 PM7/7/20
to django...@googlegroups.com
Ok... Sir please
Can I have your WhatsApp number,
So that you could put me through better 

Tanni Seriki

unread,
Jul 7, 2020, 4:07:48 PM7/7/20
to django...@googlegroups.com
That's my index function and the post details  function
IMG_20200707_170153.jpg
IMG_20200707_170237.jpg

Exactly musty

unread,
Jul 7, 2020, 4:33:14 PM7/7/20
to Django users
You wont get your question answered if you snap your code with your phone,is either you copy and paste the code or screen shot your laptop,ain't seeing shit if you want your question you should edit it
Reply all
Reply to author
Forward
0 new messages