0

I have a django app which i run from my virtual environment on my localhost and in that virtual environment i made some changes to django admin panel's html source code but when i deploy it to heroku. it installs another django with pip and doesn't run from the virtual environment i made changes to resulting into the loss of the changes i made.

1 Answers1

0

You should extend the templates and not hard-code overwrite them. Checkout this SO answer to see some ways to do that.

noes1s
  • 178
  • 1
  • 8
  • what i have changed is the side nav bar that shows the apps and it's models to show extra information. i tried what you suggested but it doesn't seem to make a change on the side nav bar. – Tsige Gebregziagher Jul 01 '21 at 09:33
  • Heroku is ephemeral so it builds its dyno's each time you access the system, modifying django's core files on your local machine and pushing changes to heroku isn't going to work, since Heroku builds fresh from django source. You are going to have to override the template in code that you can store in a git repository and push those changes to Heroku. Without more info on exactly what you tried or changed, I won't be much help. – noes1s Jul 01 '21 at 09:39