Should I use Django Admin in production for a pharmacy website?

I am building my first production-ready pharmacy website using Django.

The backend will be used to manage products, inventory, orders, and users.

I am considering using Django’s built-in Admin interface for internal management

instead of building a custom dashboard from scratch.

My questions are:

- Is Django Admin suitable for production use in this case?

- Is it flexible enough to customize (permissions, UI, workflows)?

- Is this a common and recommended practice for real-world projects?

The system may later be extended to support a mobile or desktop application.

The choice is highly dependent on your needs...just keep in mind that Django is not lightweight compared to other options such as Flask or FastAPI.

  1. Yes, Django is admin panel is created out of the box to speed up the process when you need an admin page to manage entries, giving you a direct interface with the database. It would help with management of products, inventory, orders, and users. Keep in mind that it does not offer Metadata and although is customizable it does have limitations.

  2. Yes, Django's authentication system is very flexible. Just like its forms and templates that helps with building UIs.

  3. Why it wouldn't be? It just offers you built-in functionalities that are common to web applications that developers may well write themselves.

Now, when adding a Desktop and Mobile services a different kind of application is expected, mainly a RESTful one. For this, 3rd-party packages are needed, such as DjangoRestFramework and drf-simplejwt (among many auth options) to extend functionalities that are not offered out of the box.

Which take us back to the UI, that in this kind of service is normally decoupled from the backend. Usually build with Frontend frameworks such as React, Angular etc.

For what is described, I do not think you need the overhead of SPA functionality (react, angular, etc...). Overall this is a simple CRUD app and that fits very nicely and easily into Django templates, URLs, and authenticaction. Using Angular, or anything similar with DRF, will just make things more complex and likely wouldn't assist much realistically in the UI as there wouldn't be anything requiring robust client-side rendering.

We built a system which didn't need much management, or so we thought initially, and concentrated entirely on the frontend. The management backend consisted entirely of modifying database entries, and some one-off assorted admin UIs where necessary. Needless to say, it was a mess.

We rewrote the entire thing from scratch—for various reasons, but the admin interface being a big one—using Django, because you essentially get the admin for free. And yes, that's working out very well for us. With very little time investment, we get a functional admin for any new model we're adding, and with some moderate time investment, we get a pretty decent admin for anything we need to do.

Having said that, if you want to stray too far from the default admin, that is perfectly possible, but may require quite some extensive "hacking" of the admin, and deep investigation of its code. It can get tricky at times, depending on how nicely you want to integrate custom stuff with the default admin. Having said that, once you get comfortable with it, there's no limit to what you can do with it.

I wouldn't ship the admin to end users, but for internal management, it's perfectly fine, and again, you may get it more or less "for free" if you don't have very specific requirements.

Вернуться на верх