Skip to content

Deploying heroku – Push failed

I need some help to solve this. I don’t have much experience with Heroku, this is my first time doing it but I need to deploy some app really quickly. I’ve tried to disable collectstatic with heroku config:set DEBUG_COLLECTSTATIC=1 -a name_of_app But it haven’t made any change. Can anyone he…

Python string format

I have defined the string variable I need to use this variable in another string like I tried adding the rf option like this But it’s printing only until c:/program, white spaces are neglected. Is there any way to use entire path in Bashcmd and can’t remove spaces in directory path because many system share s…

Combinatory with n picked elements and limited repetitions in Python

actually I’m looking for combinatory with a limited number of repetitions, I know in python in itertools we already have for no repetitions and with ANY repetition, but I can’t found anything for this. Lets remember, a Combinatory we pick n elements, with a max repetitions, and in the elements, we…

Check file extension in Django FileField

I need to run a different code depending on the extension of the file. This is a simplified version of the model: This is the part of the view that I have the problem: I don’t know how I should write this last condition above. With this version above, I get the error: The ‘python’ engine can…