Django Deployed Heroku - Live - Hubtree Live - Success!

If you've followed me up to this point you'll know that I've been building a new platform called Hubtree and that it runs the Django Framework + PostgreSQL and I've been trying to deploy it to Heroku.

The last article I wrote that I had finally managed to achieve the build process on Heroku! Yippee!.... Not for long as then I realised I had database issues trying to connect over to my addon PostGreSQL database.

The last few days I had taken a break and in my world at least I find you need to have a healthy balance and so I started doing a bit of gardening. I returned this morning from 6am to start having an hack at it to see if I could resolve the issues and get it working.

Turns out.. I forgot to migrate the database over to my online one!

Python3 makemigrations
Python3 migrate

I had forgotten to migrate from my local PostSQL database to my online version... Simple mistake to make for anyone!

Once I had done this, my application then worked locally, but then I still had issues trying to get it to display online due to SSL settings (which I still need to review on).

After also playing around with Heroku's CLI online and re-configuring a few settings, I kept pushing, until I hit my last push at version 17....!

My application deployed, successfully onto Heroku and now is live to access. At last I have something to show online for it haha! Don't get me wrong, it's far from being built and complete but now I can keep pushing and building the application faster!


Hubtree on Heroku

Finally success in small steps, it is possible to get there in the end! As I mentioned in my last article I was thinking about launching my own Youtube Channel. After this week and thinking about it I decided to create my Channel yesterday in which i'll be covering Full Stack Web Development + Gardening (for novices and lone wolfs). YT.png

You can also follow me on Facebook

Once I've simplied Django I will be realising some videos on Youtube + Facebook shortly to make full stack alot easier to get into (hopefully)

That's all in the mean time hopefully will be updating the blog and YouTube channel on a weekly basis :)

Any questions, just pm or comment :)

Mark's photo

Great, glad it worked out :-)

I'm not quite sure from your post if you're running this on the server

python3 makemigrations

But you should run that during development, then commit the resulting migrations with git. That way the database structure becomes part of your code history, and on the server you only do

python3 migrate

to have the same database schema (and reference data) as you had in development.

Also don't forget

python3 collectstatic

if you use static files in Django - I always forget that when updating to new code. And set the file permissions :-)

Eray Erdin's photo

Congratulations Bridget.

Seth Livingston's photo

Technical Lead for CultureMap, InnovationMap, SportsMap, & AutomotiveMap. Python, Django, Elm, & JavaScript.

I've been running Django on Heroku for a long time. You'll get used to the things you need to do to deploy and run, and you'll be free to focus on more important things. Congrats and good luck with your business!