Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- def results(request):
- module_dir = os.path.dirname(__file__)
- file_path = os.path.join(module_dir, 'data.txt') #full path to text.
- data_file = open(file_path , 'r')
- data = data_file.read()
- context = {'rooms': data}
- return render(request, 'javascript/results.html',context)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement