Skip to content

Tag: python

django charfield not showing in admin panel

i create a model in django and register it in admin.py when i go to admin panel it shows the model but when i want to create object it doesn’t show the charfields and i can just create the oject without any details this is my codes below view.py model.py stting.py admin.py this screenshot is from my adm…

How can i get the number of an image of a certain sprite in pygame

I randomly share pictures of houses on the screen. Then I drive a car across the screen.When the car hits a house, the image of that house should be replaced with a modified copy of that house. I distribute the images with the following function I check the collision car with house …. How do I then get …

running python script with argparser

Trying to run my script using argparser, where the program does not run, unless correct argument is in place, however it does not seem to work; Also when the –sync arg is given it ask for another, then when I add one more argument. SYNC, then it returns attribute error. Edit Trying to make the program r…

cv2 creates a unreadable .mp4v (and .avi) file

I’m trying to create a simple screen recorder with Python. This is the code It doesn’t give any error while it’s going, and it creates a .mp4v file correctly, however when I try to watch the video that was supposed to be recorded, it can’t be opened. I tried with VLC and other apps but…