redirect page

17 views
Skip to first unread message

Gear Crew

unread,
Oct 4, 2018, 4:47:27 PM10/4/18
to Django users


when you click on any link doesn't go to music/1/ 

it reloads that same content 




Screenshot from 2018-10-04 22-43-29.png


Screenshot from 2018-10-04 22-45-29.png

Pauljames Dimitriu

unread,
Oct 4, 2018, 5:01:16 PM10/4/18
to django...@googlegroups.com
The problem is on lines 9-11. You're looping over albums and you keep assigning album url to '/music/' + album.id. When the loop is done, url will be that of the last album in the list.

What are you trying to do?

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f512fee3-f61e-496b-9c1f-235dac8b7a7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Manjunath

unread,
Oct 5, 2018, 1:14:29 AM10/5/18
to Django users
The issue is with your urls.py file.
Since the first pattern you have given is empty, it will match all requests.  Interchange lines 4 & 5 and your issue will be resolved.
Reply all
Reply to author
Forward
0 new messages