1 Jun 2017
Build and learn with Charcha (Django Forum)- a discussion forum built using Django
Sripathi Krishnan
#Django | 4 min read
Build and learn with Charcha (Django Forum)- a discussion forum built using Django
Sripathi Krishnan

Welcome to the first part of our Django blog series! If you have been looking for a way to learn-while-you-build a Django forum app, you are at the right place. This series will get you acquainted to all that’s important for you to make your very own Django app that’s also efficient. You will also learn the many how-tos of capitalizing on some Django concepts to enhance your application. The series will require you to have basic knowledge of the Django framework.
So gear up, to not only build a Django Forum app but also to build it right!

What are we building?

This series will take you through the process of building a Discussion forum, we call Charcha. The forum allows you to bring up queries/discussions on any topic and flag or vote for comments (all that should also be viable anonymously if the user wishes). Towards the end of the series, you will be able to flaunt what you build, by learning how to deploy the application via Heroku as well as Docker.

You can find the full code for the Charcha forum here.
Read on and get an overview of how you can get this app up and running!

Preview of the Django-forum Charcha
How the forum will look once we’re done with the series

What’s in store for me to learn?

In the course of the blog series, you will learn about the following concepts:

  • Django data modeling – After you set up your skeleton project, we will take you through the various ways you can design efficient Django models. Let go of the naive model structure and learn about Generic relations, denormalization, and Model managers for an improved model design!


  • Django Forms – Once you’re done with the data models, you want to allow the users to post topics for discussions and add comments. We help you exploit Django forms to customize the way you want the forum to get data, and that securely. You will also learn about ModelForms and how they ease up your work by saving the result into models.


  • Setting up Web push notifications – Next, to ensure that the users don’t miss out on the discussion threads, we introduce you to Firebase Cloud Messaging. So you can send Web push notifications and keep the users engaged without investing a penny.


  • Building a Progressive Web Application – Here we give you the icing on the cake, by spelling out how to make the forum connectivity independent. Take a deep dive into service workers and go on to flaunt error-free behavior offline!


  • Unit testing your Django app – Now that we have our Django app running, we need to make sure it’s robust and bug-free. This post will brief you on how to put your code to test by writing unit test cases with maximum coverage.


  • Improving Performance of your Django forum – After building and testing the app, it’s time for us to be responsible tech enthusiasts and work on performance improvement. This post explains minification of files and usage of Whitenoise for Frontend caching. For backend optimization, learn how to play with Django-debug-toolbar for optimizing query calls per page.


  • Scalability Testing using Jmeter – Next, we help you get your hands dirty on Jmeter. Simulate heavy load on the app and assess the throughput. This also helps you find the culprit component slowing down the app.


  • Deployment of the app to Heroku– Let’s take you through a tour of Heroku platform to deploy the finished Django app. Read how Heroku makes deployment easy as pie. And Voila! You have the app publically available.


  • Deployment via Docker Compose – If you want a more flexible deployment, Docker compose is your go-to platform. In this post, we create a production-ready docker image for Charcha and then use docker compose to manage the image. Read to get detailed steps to guide you through deployment via Docker and capitalize on the awesome features it provides.


  • Caching for your Django app – For all the inquisitive minds, here we put forward a more detailed view of Caching in the Django forum (or any Django app, for that matter). How to use Memcached or Django-Redis for better caching? How do you use Varnish for static file caching? Go through the blog and get your questions answered.


Read the detailed blog posts in the series and your Django game by building this well performant discussion forum with a robust code base. In case you have any doubts or feedback for us, you can add it in the Charcha forum.
Happy coding!

Read similar blogs

Need Tech Advice?
Contact our cloud experts

Need Tech Advice?
Contact our cloud experts

Contact Us

PHP Code Snippets Powered By :