0
After generating the static files from my web app using:
python manage.py collectstatic
I am in doubt if I should send or not the content generated in the directory static/
to my repository. It’s good practice to use these files in Git?
0
After generating the static files from my web app using:
python manage.py collectstatic
I am in doubt if I should send or not the content generated in the directory static/
to my repository. It’s good practice to use these files in Git?
3
More important than the answer, I would say that are 2 questions that should be asked: por que?
and para que?
you would do that.
If you want to "save" the generated static code, create a CI/CD process to create versions alongside your commits/releases and publish somewhere else "separate" from your repository. And put separate with quotes because it is possible to organize it next to your repository on github, gitlab and the like. This way you can separate what is code in your GIT repository from what is generated, to be used later, and still have a link and trace between both.
Browser other questions tagged django git
You are not signed in. Login or sign up in order to post.
Despite of that question be about Javascript, is related and can clarify you a little
– Rafael Tavares
Technically nay, since you would probably have to redo the build with each modification, most similar programs never send the Static versions, of course it will do no harm either, but send compressed/minified files with hash-based names, that there may be more than one, because usually the old ones are not removed instantly with each version, so it would only hinder the understanding of the history of what you did in your GIT stream.
– Guilherme Nascimento
Can you verify the answer? Don’t forget to accept it if you are satisfied with it.
– tvdias