KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My Views.py files looks like below def homepage(request): template = 'homepage.html' list_display_template = 'list.html' list = model.objects.all() return render_to_response( template, {'list_display_template': list_display_template, 'list' : list,}, context_instance=RequestContext(request) ) And my homepage.html looks like below:- {% extends "base.html" %} {% block main_content %} {% include list_display_template %} {% endblock %} And my list_display_template (list.html) has following information <div class= "span10"> {% for item in list %} <p> {{ item }}</p> {% endfor %} </div> The above works fine in development, but in production the include tag is not working and when i inspect the element, it is not showing any items from list.html. could someone help with this. Edit :- My folder structure is as below project_name/ project_name/ settings.py static/ css/ images/ templates/ homepage.html list.html base.html Thanks
Tags (comma-separated)
Save Edits
Cancel