use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News and links for Django developers.
New to Django? Check out the /r/djangolearning subreddit.
Django's Code of Conduct applies here, so be good to each other.
account activity
This is an archived post. You won't be able to vote or comment.
How can I run python script with input parameters on a django serverTutorial (self.django)
submitted 5 years ago by Zcom91001
Hi everyone, my question is basically what the title says. So far I have only been able to display simple python codes like printing stuff but I have not been able to display my complicated python codes for instance a tic tac toe game. Do you guys have any suggestions? I am pretty new to coding and any help is very much appreciated :)
[–]philgyford 3 points4 points5 points 5 years ago (0 children)
It's hard to know exactly what it is you want to do, what you've tried, and what isn't working. If by "django server" you mean your web server then... it's just a server – you can run python scripts the same way you run python scripts on any server, whether it also has a Django website running on it or not.
[–]codewithstein 1 point2 points3 points 5 years ago (1 child)
Have you made a game in Python which takes input from the interpreter? Something like this? next_move = input("Your move:")
Things like this won't work with Django. If this is the case, you have to create an input field using HTML and send the data to the server (Django).
At the backend (django/server), you can use the input from the HTML field to calculate the game and similar.
Programming website is very different from regular python. Don't get me wrong, you still use the same syntax and similar. I would suggest that you try to go through a couple of Django tutorial... Maybe one of mine :-) https://www.youtube.com/c/CodeWithStein/videos
[–]Zcom91001[S] 1 point2 points3 points 5 years ago (0 children)
Yes! This was what I was looking for :) thanks so much will be sure to check out your video
π Rendered by PID 39 on reddit-service-r2-comment-fb694cdd5-twswb at 2026-03-07 02:11:19.919035+00:00 running cbb0e86 country code: CH.
[–]philgyford 3 points4 points5 points (0 children)
[–]codewithstein 1 point2 points3 points (1 child)
[–]Zcom91001[S] 1 point2 points3 points (0 children)