How to Setup a Django Admin Page For MongoDB

Adam Berg
5 min readApr 26, 2021

The year is 2013 and you’re looking to start a new SaaS application. You’ve been following the latest trends and decide to go with The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js. It won’t be until a few years later that you regret most of these decisions, before finally settling into the acceptance phase. Jokes aside, MongoDB has carved itself a spot as one of the top NoSQL databases and will be around for the forseeable future.

If you are using MongoDB, you are likely also using Robo 3T or MongoDB Compass to manage your data. This post describes how to quickly setup an admin page using the Django framework and djongo connector that makes it a breeze to view and modify data in your database.

What is Django?

From Django’s homepage: “Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design”. Better yet, run through their 7 part tutorial to see what it does and how it works (This is the best web framework tutorial I have been through).

While Django is primarily intended to be used as the framework for your entire backend, that doesn’t mean that’s how you must use it. In my case, I yearned for the admin site functionality that is built in to Django, but didn’t want to run the rest of my app there.

What’s so Great About the Django Admin Page?

--

--

Adam Berg

Building https://kaizen.place. writing about C, C++, rust, game development, web development, engineering management. https://devtails.xyz/