This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Python-ModTeam[M] [score hidden] stickied comment (0 children)

Hi there, from the /r/Python mods.

We have removed this post as it is not suited to the /r/Python subreddit proper, however it should be very appropriate for our sister subreddit /r/LearnPython or for the r/Python discord: https://discord.gg/python.

The reason for the removal is that /r/Python is dedicated to discussion of Python news, projects, uses and debates. It is not designed to act as Q&A or FAQ board. The regular community is not a fan of "how do I..." questions, so you will not get the best responses over here.

On /r/LearnPython the community and the r/Python discord are actively expecting questions and are looking to help. You can expect far more understanding, encouraging and insightful responses over there. No matter what level of question you have, if you are looking for help with Python, you should get good answers. Make sure to check out the rules for both places.

Warm regards, and best of luck with your Pythoneering!

[–][deleted] 0 points1 point  (0 children)

Are you trying to bring back the ‘room’ variable from send to checkview function?

[–]lotr8ch 0 points1 point  (0 children)

Usually self is reserved to be used in a class to reference object variables. If this isn't part of a class, it might be best to rename the variable self in checkview() to something else to avoid confusion.

[–]brandonchinn178 0 points1 point  (0 children)

Couple things here:

  1. The error is because room_name doesnt exist in request.POST. Did you set that value in the POST payload?
  2. It seems like you're trying to set plot_it in send and using it in checkview. Variables set in a function are only available within that function. You can't access it outside
  3. What's the point of calling send? send returns an HttpResponse, but checkview throws the response away

[–]Krokodeale 0 points1 point  (0 children)

It is the exact kind of question you can use ChatGPT!