Closed RapidCompiler closed 4 years ago
Description
Code
from django.shortcuts import render from random_word import RandomWords def hangman(request): return render(request,'hangman/plain_page_2.html') def hangman_org(request): r = RandomWords() guess = request.POST.get('guess') w_len = request.POST.get('w_len') lst = [] word = r.get_random_word(hasDictionaryDef="true",minLength=w_len,maxLength=w_len) count=0 word = word.lower() length = len(word) for i in range(1,length+1): lst.append(i) context = { 'guess' : guess, 'lst' : lst, 'hmword' : word } return render(request,'hangman/plain_page.html',context)
Expected behavior A Random Word must be generated without encountering the above mentioned error.
Environment (please complete the following information):
I even tried generating a random word outside the Django application. The same error was encountered.
Description
Code
Expected behavior A Random Word must be generated without encountering the above mentioned error.
Environment (please complete the following information):