Wednesday, May 30, 2018

Re: URL Concatenation Issue

Is your link tag href="./about" or href="/about/"

On Wed, May 30, 2018, 19:14 <johnregis021@gmail.com> wrote:
Hello,

I'm debugging an issue that I'm having with my URL patterns. In my HTML I have an "about me" page that is linking to an about.html file in my templates/blog/ directory. When I load the homepage and click on the "about me" link than "domain.com/about/" loads, which matches the URL pattern in my blog/urls.py file, and the page renders perfectly fine.

However, while on the "about me" page I can't link to any other page because the URL pattern starts to concatenate instead of overwrite (if that makes any sense). For example, if I click on "about me" again than Django tries to load domain.com/about/about and I get an error.

I'm using a python 3.5.2 venv and I'm running Django 2.0.5. I'm new to programming by the way (to include Python, Django, HTML/CSS).

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/1213b3f9-c74b-4af9-b585-61f2423720f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/CAD6-5Ch7%3DSTQGPdPg3iU%3Dvy2H1GMqcFnycBqb5bquXGDDV6ZBA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment