Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. def pages(request, id):
  2.  
  3.  
  4. obj = rtves_programas.objects.get(id=id)
  5.  
  6. context = {'title': obj.title,
  7. 'show_date': obj.show_date,
  8. 'script' : obj.script,
  9. 'script_eng': obj.script_eng,
  10. 'description': obj.description,
  11. 'description_eng': obj.description_eng,
  12. 'show_id':obj.show_id,
  13. 'url': obj.url,
  14. }
  15.  
  16.  
  17. return render(request, 'rtves/pages.html', context)
  18.  
  19. {% if script %}
  20. {% for sentence in script %}
  21. {{ sentence }}
  22. {% endfor %}
  23.  
  24. {% else %}
  25. <p>Nothing here</p>
  26.  
  27. {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement