Using Django to Create a Plant Grow Room App


In my early days of coding I went looking for a programming language that was easy to use and widely adopted. I stumbled upon Python one day and it quickly became my favourite language.

I recently had a need to write an app to help me manage a greenhouse grow room. I decided to try and use Django for this. I had played around with it before and knew it was a powerful tool for making web apps. The app I had in mind would be a simple information management tool. I wanted a way to store some info about plants in a database and have that information displayed back to me in useful ways (lists of plants, age, number of Sunflowers, etc). After a few months of part-time hacking on the project I had created gromari.

Gromari is deployed inside a docker container using docker-compose. It uses Nginx as it’s web server and Postgresql as a database. The main code for the app is written in Python and uses the Django framework. For styling I use Bootstrap 4. So why did I choose Django?

Why Django?

Simple and quick to use

Django is a rich framework. Most of the guess work is taken out of displaying dynamic web content. The syntax is easy to figure out and there is a robust ecosystem of extra modules. All of the essentials that you need to get up and running are included. This makes Django a very fast choice to get an app up and running.

Users, admin and middlewear

I like that Django has user and group management built-in. This removes one step in building a web application. Django includes a full admin panel where you can do things like: edit users/groups, add/edit/delete database values, see activity, etc. Many of the headaches caused by database management are done by Django’s database middlewear. You simple learn Django’s object syntax and all the database commands are handled by Django.

It’s Free!

Yes, that’s right. Django is Free and Open Source Software. Anyone is free to take it, use it and hopefully contribute back to it. As part of my endeavour to use as much FOSS as I can Django was an obvious choice.

The learning curve

Of course, one of the more obvious reasons I chose Django is that it’s written in Python. I wrote gromari using HTML, CSS, JavaScript and Python. I was already very familiar with Python and liked that I didn’t have to learn yet another language syntax to learn Django. This marriage of my favourite language with web app development made for a very easy learning curve. I still think, however, that someone who is not as familiar with Python would still have an easy time with Django. Django is widely used and there are many tutorials online to help a new coming to the language.

Who uses Django?

According to this article written by djangostars there are many well known brands using Django. Some prominent examples include: Instagram, Spotify, NASA and Pinterest. A search on GitHub reveals many more projects written in Django.

If you’re a python developer with an interest in helping build a great web framework I would suggest trying your hand at contributing to Django.