Skip to content

Tag: django-templates

Get html link id in django views.py

This is what my template index.html looks like And here is my urls.py file Finally, this is my link view inside of the views.py file Where page() is a function that takes one argument. I want the id of the <a></a> tag of index.html to be that argument. But I have no idea how to access get that id …

Django get user data in main template

I’m trying to check if user logged in in the main template using this: but it’s not working maybe because main template doesn’t have a view could any one help i don’t know if the question duplicated,but i didn’t find my answer. Answer you could use: