You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
i have problem with passing data from view to single-project.html
`this is the code on single-project.html
<
{% extends 'main.html' %}
{% block content %}
hello
\\\\ i have add this to know if page loading good and it is loaded
{{project.title}}
{{project.description}}
{% endblock %}>
the View code
def project(request,pk):
projectObj = None
for i in projectslist:
if i['id'] == pk:
projectObj = i
return render(request,'projects/single-project.html', {'projectObj':projectObj})
i'd lik to know what is wrong
The text was updated successfully, but these errors were encountered:
Hi @bermaoi. From the code that you have provided I can see that the issue is with the naming of the key for projectObj in context. You have used the key as 'projectObj' and in 'single-project.html' you are referencing it as 'project'.
Just change the key to 'project' or reference the projectObj using 'projectObj'.
Hi
i have problem with passing data from view to single-project.html
`this is the code on single-project.html
<
{% extends 'main.html' %}
{% block content %}
hello
\\\\ i have add this to know if page loading good and it is loaded{{project.title}}
{{project.description}}
{% endblock %}>the View code
def project(request,pk):
projectObj = None
for i in projectslist:
if i['id'] == pk:
projectObj = i
return render(request,'projects/single-project.html', {'projectObj':projectObj})
i'd lik to know what is wrong
The text was updated successfully, but these errors were encountered: