Good morning, I have a small problem to reference my variable in django html. I'm a beginner on the web part, I'm trying to create a website for a project, then during the construction of the html, I tried to make a reference for my view.py, but it does not find the text saved in the "texts" variable.
Additional information
1) I'm working with Sublime Text 3. (If it makes any difference)
2) I have already added the plugins: Django, anaconda (configured), Css3, html5 and ement.
Could you help me to understand this problem?
Follow html code:
</div>
<div class="container">
<div class="jumbotron page-header">
<h1>{{ title|capfirst }}</h1>
<p>
{% for item in texts %}
{{item}},
{% endfor %}
</p>
View.py from django:
# coding=utf-8
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
texts = ['Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua']
context = {
'title':'django e-commerce',
'texts':texts
}
return render(request, 'index.html', context)