Questions tagged [django-request]

96 questions
-1
votes
1 answer

Someone help me in this error TypeError at /contact 'method' object is not subscriptable

Views.py # Create your views here. def home(request): return render(request, 'home.html') def about(request): return render(request, 'about.html') def project(request): return render(request, 'project.html') def contact(request): …
-1
votes
1 answer

All the datas are populated into a single row

I am a beginner in scraping. I have scraped some data. Here are two problems: All of the data are populated into a single row and every time when I refresh the page, each time the data is saved into the database. import requests from…
-1
votes
1 answer

Problem with a request call Post in django

I'm making a POST call for adding an event in the on_message() function at which step is a url to call the addEvent function (to add the event) and then a payload with values defined by me (inside the mqtt_iot file). The compiler does not enter into…
-1
votes
1 answer

AttributeError: 'bytes' object has no attribute

I have a class in which I am checking user permissions, and depending on them, I return a list of results from models. Here is what I have: from AnnualLeave.models import Leaves, RejectedLeaves, Employee class GetLeaves: def…
Naeem Khan
  • 950
  • 4
  • 13
  • 34
-1
votes
1 answer

Django error : global name 'request' is not defined

I'm getting a little problem with my Django view. I have a function Identity_FewUpdates and I get this error : global name 'request' is not defined. It's pretty strange because I have an other function which looks like very similar and I don't get…
Essex
  • 6,042
  • 11
  • 67
  • 139
-2
votes
2 answers

Django: MultiValueDictKeyError

I created this sign up form which is working perfectly fine. On the same template I created a login form. The sign up form has 3 parameters email, username and password while the login form has only username and password inputs. When I try to sign…
notVansh
  • 207
  • 4
  • 15
1 2 3 4 5 6
7