uhhh this doesn't return the online domains.
Wow :O
OK, at this point I can only suggest two things.
Use breakpoint() to inspect the variables inside the view;
Use this code for your reference: github.com/vergeev/17_sites_monito....
Tell me if something new comes up. :)
Here's what I did
def pingDomain(request, page, url): page_object = get_object_or_404(Table, page=page) url = page_object.page response = requests.head(url) try: return requests.head(url).ok except requests.exceptions.ConnectionError: return False context = { 'online': response.ok } return render(request, 'home.html', context)
Returns nothing :(
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
uhhh this doesn't return the online domains.
Wow :O
OK, at this point I can only suggest two things.
Use breakpoint() to inspect the variables inside the view;
Use this code for your reference: github.com/vergeev/17_sites_monito....
Tell me if something new comes up. :)
Here's what I did
Returns nothing :(