I am trying to use the external library of whois but i am getting the error [WinError 2] The system cannot find the file specified
I have included the package in my settings file. Here is the code for views:
class PreviousSearchView(View):
def post(self, request):
if request.method == 'POST':
searchdomain = request.POST['searchdomain']
domain = whois.query(searchdomain) ##### Error on this line
date = datetime.datetime.now()
print(domain)
search = Search(
searchdomain = searchdomain,
date = date,
user = User.objects.get(id = request.user.id)
)
search.save()
return redirect('/')