Jolie: A drop-in replacement of Django Admin
jolie.devDjango admin is quite an awesome tool but very stack specific. If you don't use Django, I have open source [1] a tool that takes another approach which is to query the DB schema directly so people can fill up form and follow along the different foreign keys of the db. An example of this approach can be seen there: https://demo.filestash.app/login?type=mysql&host=88.99.185.5... which is using a sample DB [2]
[1] https://github.com/mickael-kerjean/filestash
[2] https://www.mysqltutorial.org/mysql-sample-database.aspx
This is a good project. Thank you.
While a better interface is welcome, relying too much on Django admin panel is a path best avoided.
Great for small stuff, but far too often one end up using it for too much. Extending it with more widgets, custom logic, fine grained access. Quick in the beginning, very hard to maintain in the end compared to a custom made view.
Django admin has 2 modes of operation:
In scope operation and extension: - Incredibly smooth and effortless
Slightly out of scope: - F U, buddy.
It’s amazing for so much stuff that it’s honestly a superpower for a tech or tech leveraged company, and great for prototyping internal process automation.
The trick is knowing when to throw in the towel and go purpose built. I’ve definitely missed that boat at least once in my career.
You can easily scale a company beyond 50 employees while still using the admin and an occasional extra dashboard.
It's definitely in my top 5 most valuable skills, and seems like an open secret in the industry.
I'm curious: what would your other top 4 most valuable skills be? I'm asking because I was genuinely unaware of django admin despite being a developer for several years and I wonder how many more "open secrets" I'm oblivious to
* Having extreme fluency in one data wrangling tool for text and tabular data. Could be bash + awk + grep/sed/cut and other shell tools, Python + numPy, Ruby, etc. The point being that given a table or a text file you should be able to extract whatever information you want quickly without thinking.
* Fluency in Postgres, specifically its aggregate functions, window functions, and CTAs. Again, given a company's dataset you should be able to write complex queries to answer business-critical questions in a few minutes to be able to drive decisions. As an aside, knowing that UNIX system usually has sqlite installed and is the fastest way to analyze local tabular data.
* Being a competent writer. Some people command clear thinking, gravitas, and vision when they write. It is easily the most important skill when remote working, and a definite shibboleth when you want to sound convincing to overeducated knowledge workers. Being able to explain complex topics to a lay audience had gotten me many jobs.
* Knowing how to use AdWords, Google Trends and mailing lists to quickly validate product ideas. This is one of the easiest ways to discard or validate ideas. It's so useful and quick and such a simple way to avoid months of wasteful work.
* Knowing the basics of Western philosophy and psychology. Everything humans do fits within a system of values a loosely consistent logics. 99% of people rarely think outside of those value systems, and if you understand the history of philosophy you'll see that we're quite predictable in our wants and desires. It helps you be more persuasive, choose the right work for your own preferences, put people to work where they'll feel useful and fulfilled, and will help you see the pitfalls of certain group dynamics for whatever institution you're working for.
It's not a binary choice. You can gradually replace the admin at various levels of abstraction. The only risk is the same risk all programmers face - creating unmaintainable code. You can do that with or without the admin.
Use the admin more where it's most useful. Use it less where it's not. You don't have to go cold turkey.
Agreed.
A Django-specific skillset I found very important is to know where that limit/line of the admin sits - you can push it very far, but there's absolutely a point where it becomes unmaintainable and more costly than building it yourself. The line itself can be a bit of a moving target depending on the project though.
The Django admin is simultaneously one of the greatest tools of the past two decades while also being a massive footgun if you're not careful.
I agree. With the current state of Django admin, it is better not to build complex stuff on top of it. A few tweaks and customization here and there are fine, but anything more will likely break on Django and/or third-party package updates.
I'd like to see Django gradually redesigning parts of the Admin to allow for more modular extensibility in future versions.
I only use Django because of the admin.
I only use Python because I use Django because of the admin.
For I think 80% of the projects I worked on the admin panel was fine.
And when it wasn't, we just provided api's through DRF for users with elevated privilege, and some kind of CLI interface for people to use it.
Hell, even the DRF web interface is fine for people who know how to do REST queries.
Then it is a very limited scope. The first thing I do on a new Django project is to ensure the admin portal is long gone. If you can't understand or work with your models from the Django shell, something is not right.
When you put your application in production and some non-tech want's to create or modify an entity, do you give them access to a production django shell?
No, and you don't do that with the admin portal either.
This guy. Has it all sorted out. We're just a bunch of headless chicken running around with an admin to manage our business. Meanwhile, he's all bare hands, manipulating the shell, showing the snowflakes how it's done, telling his non-technical co-founders to learn the models, bash, sql and a god-dam shell. Such an inspiration, much envy, so wow!
Talk for yourself.
Yep it's a fantastic crud gui for the database, which frankly covers a lot of use cases for a small business.
But it's not a substitute for being comfortable working with forms, templates, urls, requests and building custom views. Time spent learning the django-admin DSL would be better spent here, or learning the CBV DSL...
My approach was at first nothing but admin, but then i found places where i must make custom views.
I'm kind of at a spot where I want to replace all admin with custom but this comes up against an important rule. Dont fix what's not broken.
The demo screen is a dealbreaker. It's an admin tool. The new interface shows 8 models. The old one has space for at least twice as much. Imagine if Excel had that amount of padding. A 8x4 grid would fill the screen. A 1x2 grid on a phone.
To all designers reading this: We are not printing those screens to frame them. We're using admin tools to do real work and we want to see lots of information there to be fast. Maybe we created those models ourselves. We know what to look for. I'm sure that Django admin could be made to look better and some UX could be improved. It's in part theming and in part redesigning the control flow. Taking on the latter would be really interesting.
Edit: actually a problem with the home page of Django admin is that it doesn't show enough information. A full screen browser window displays a column of models and a lot of useless white space. A multi columnar layout would speedup navigation by displaying more models in one screen. And a search filter.
Any designer who does not understand and value the information density in the design of a tool like this fundamentally does not understand how the tool is used.
This sort of thing finally started making sense after I read this: https://asktog.com/atc/the-third-user/
the image preview is hidden on mobile, even though its the objectively most important information on the landing page. I can somewhat understand it, because its probably hard to put it on that page while still keeping the clean look. But it doesn't instill confidence in their design choices for an admin panel either, honestly.
I can see that some people would prefer this aesthetic, even though i'd agree that having an admin panel with low information density is kinda pointless
This is the biggest problem with modern UIs and "material" design. Too much whitespace, with actions being hidden behind multiple menus and taking lots of mouse travel and clicks to do anything.
More examples of why it’s incredibly important to always empathize with your user and their _needs_.
Those interested in skinning / customizing the Django Admin should also check out Grappelli which has been around for ages (and the design probably shows, since it's more in line with "Web 2.0" trends than the current flat-rounded-corners-bold-colors language)
We used Grapelli at a previous $WORK, and regretted it. It has compatibility issues, makes it harder to write custom widgets, and doesn't actually look that good IMO. Was also hard to switch off of.
Yup, been there too. Like others have mentioned, I've learned that spending time to build custom functionality with proper CBVs often ends up being a more sustainable approach in the long run
I've only been writing Django professionally for the past month and I've already bumped into some situations where [3rd party tool] was a terrible idea because it had compatibility issues or the project was no longer maintained. I'm already determined to just stick to core Django functionality and write everything else I need as minimally as possible myself.
This is the way.
There are a handful of libraries written by core Django developers that can be beneficial given their intimate knowledge of the framework and how those packages tend to fit neatly (often before being outright integrated into the core)
Credentials to view the preview:
username: preview password: preview
Thank you, what were they thinking, not mentioning those anywhere?
It's called Hacker News, after all
/s
Wagtail CMS https://wagtail.org/ is the answer to this, and doesn't technically 'replace' the existing Django dashboard, new admin interface is being sponsored by Google, https://www.youtube.com/watch?v=qD6reQ7T8fQ
It looks nice, but wasteful of screen real estate. I do wish the Django admin was brought into the current era, but not with so much padding.
You may not like it but the regular Django admin is what peak UI design looks like.
I'm not sure if you're being sarcastic, because Django admin does look dated. But I actually think Django admin is excellent. Many times I've used Django not because I wanted to make a webpage or use Django's Views... but because I have a project that revolves around curating a database, and I want to use Django admin as the UI for my sqlite database.
It does look date, but damn, it is so functional. It just does what it needs to, which is beautiful.
Just like Calibre for book management. Looks super old, but does everything so well.
I would take functional over pretty any time of the day.
That said, great work by OP.
I even prefer the older admin style, before the refresh, as it had higher density. It's amazing, though, it's UX is excellent. It does exactly what you want, with zero hassle.
Exactly, not everything needs to have rounded corners with 20px of padding. I also like the default design.
it does one job and does it well
In this case, It's also free and open source
The datepicker widgets are completely useless in dark mode. All the dates except for those of the previous ones are white font colors on a white background. Might want to check that out
Other than that, it's a really cool project and could be pretty useful for projects you want to churn out where the client is expecting heavy admin usage
Also hyperlinks are the same blue hue in light and dark mode, resulting in significantly lower contrast for the latter
You're right. That was stupid. We fixed it. How's this?
Love that you incorporated the feedback. I'm afraid it's still a miss, though. As far as I can tell, white is now used for both text and hyperlinks? Hyperlinks should generally be blue because that's what everyone has been trained to spot for the last ~30 years. It just needed to be a different shade of blue
And I'd make the text slightly less white than 255,255,255 because that can be too much contrast.
I might be dumb, but I can't seem to find the credentials for the preview panel... am I missing something?
the creds are preview and preview. so this in another post
This is pretty good. However, there was another one that's been around a bit longer that's also really nice. See here: https://github.com/farridav/django-jazzmin
Wagtail is a full CMS that is basically just a tarted up Django admin
Oh it’s much more than that. Wagtail’s killer feature is the StreamField [0]
[0] https://docs.wagtail.org/en/v2.8.1/topics/streamfield.html
Sure we use that extensively and it's great but I also haven't seen a CMS that didn't have an equivalent feature in years.
Django Admin is popular and easy to setup, if you need an admin to do the basic CRUD operations, authenticating users, managing forms and content it will do the job. If you need something more complex and scalable, even Django says it's not the best fit. Better try a third-party that is well-integrated with Django like Forest Admin.
Using Bootstrap is a great idea because trying to work with the CSS that comes with the default admin when you're adding custom views is sucky.
But I don't think most people will use this instead of the default because the admin is only used by the internal development team anyway.
Django makes it so easy to add CRUD to models that using the admin doesn't make much sense in most cases.
There was also Django Jet - https://github.com/geex-arts/django-jet - that was promising. While open source, it's effectively abandonware as the folks behind it moved into some weird paid admin/analytics dashboard builder. The original is under AGPLv3.
Minor point: misspelling of "extensible" as "extentible".
Fixed. Cheers :)
The draggable image comparison's slider works on Chrome, but tries to drag the text as a selection on Firefox. Another effect of the Chrome monoculture.
This is not anything. “Soon: Fully extentible”?
Woops. We changed it to extensible. Thanks.
Thanks.
This looks great! I thought the admin design was great
I like it. Nicer design on top of the same functionality is really what I want from Django admin. In contract to some CMSes that change to much and in the process lose features.
A missed opportunity.
Djolie.
He talks about you in his sleep
And there's nothing I can do to keep
From crying when he calls your name
Jolene
Very nice!! Well done