Wednesday, May 30, 2018

Re: URL Concatenation Issue

For this you have provide an app inside your urls and refer to it as home:about where home is the app name and about is the page to be rendered. Also provide namespace in the urls so that the url is linked to the app name.
Kind Regards,
Aditya

On Thu, May 31, 2018, 7:54 AM Spence Patrick <spence.d.patrick@gmail.com> wrote:
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.

--
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/CAEPfumjqtuz9bTfh%2Bfk%3D8iFYOKUQwSGpQqwwuyqX%2BQ%3DABgL3%3Dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment