TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Django Admin Wishlist

57 点作者 GeneralMaximus将近 13 年前

8 条评论

goblin89将近 13 年前
I've come to treat Django admin as just that: a raw data browser for admin staff. If there's a need for access control or custom display requirements—or anything else Django admin doesn't offer by default—it's a sign that admin site is probably going to be used too often, and simple UIs built for specific use cases deserve consideration. Otherwise too much time might be spent on endless customizations.<p>(I do agree though that thumbnail display might be critical for admin, depending on project specifics.)
评论 #4404329 未加载
评论 #4403923 未加载
评论 #4403951 未加载
评论 #4403910 未加载
izak30将近 13 年前
Lists like these are all well and fine, but there's almost certainly something you can do about them in Django. You can make third party apps that do what you want, it's the best way to prove that it's possible, and to make forward motion, and to scratch your own itch, and to see if people like it. I don't find much value at all in airing grievances about minor annoyances in OSS.<p>#1. The default ModelAdmin can not, This is totally true. You could overwrite every applicable method until it does for a specific set of models, though I'd gather that this is more trouble than it's worth.<p>#2. You can restrict permissions to staff members that are not superusers. You do this via the permissions system, either the built-in one or the custom one. It's true that in the default admin.site, staff members can access the index page, but the index page may be empty for them.<p>#3. With the proper permissions, modules or models are hidden from that user. django-admin-tools gets you the rest of the way to that goal.<p>#4. There are workarounds as you note, they almost all would require some concession on more third-party libraries in the core, or the possibility of linking a 15MB image to a page.<p>#5. Solution Noted :)<p>#6. You could probably subclass ModelAdmin to fix this one. I'd like to see it done, though personally I don't see it as a big deal.<p>#7. I don't like GFKs, I don't have any strong opinion on their widgets or what could be better, You could make a very detailed widget presumably though<p>#8. This isn't entirely true, you can use inlines. You could probably hack the normal widgets too to give you an edit button with ?popup=True (not positive about that)
coleifer将近 13 年前
Very nice list! I would add to that a few things I've run across in my own experience:<p>* customizing the templates is a real pain often requiring a lot of copy-pasta to change just a small thing, particularly the index -- more granular control would be nice (through the use of includes and snippets perhaps): <a href="https://github.com/django/django/blob/master/django/contrib/admin/templates/admin/index.html#L12" rel="nofollow">https://github.com/django/django/blob/master/django/contrib/...</a><p>* support for custom "admin panels" or the like to display on a dashboard, user-defined widgets that perform actions that go beyond a CRUD style form -- I authored the flask-peewee project that comes with an admin and have used panels for things like provisioning API keys, showing login/signup stats, etc.<p>* built-in support for exporting records in various formats (also exists in flask-peewee)<p>* more powerful filtering interface, e.g. <a href="http://i.imgur.com/FTMEe.jpg" rel="nofollow">http://i.imgur.com/FTMEe.jpg</a><p>* built-in support for typeahead on foreign keys, e.g. <a href="http://i.imgur.com/TQwAX.png" rel="nofollow">http://i.imgur.com/TQwAX.png</a>
magnusgraviti将近 13 年前
Django admin filters aren't as flexible as we sometimes want them to be.<p>I opened a ticket and would be glad also to fix it (as Rob Pike says something like don't just say about bug, fix it!). But I'd like to have someone from django developers to give me some feedback if it makes sense at all etc.<p>I agree with the author how much django admin could be better as developers we can fix it, aren't we? ;)
评论 #4403930 未加载
nicpottier将近 13 年前
We do a good bit of consulting, building custom websites, and though the Admin is fine for our use, despite considerable effort (granted a while ago) I was never able to get the Admin interface where I wanted for our clients.<p>So we built an Admin like thing called Smartmin based on class based views: <a href="http://github.com/nyaruka/smartmin" rel="nofollow">http://github.com/nyaruka/smartmin</a><p>It is very similar to the Admin package but a bit more useful I think. If you find yourself hating some of the still existing boilerplate in Django, this might be your ticket.<p>Fairly up to date docs here: <a href="http://smartmin.readthedocs.org/en/latest/index.html" rel="nofollow">http://smartmin.readthedocs.org/en/latest/index.html</a>
rlander将近 13 年前
Here's my 1-item Admin Whishlist:<p>- Separate it from Django and put it on Github, so that it is not subject to the framework's release cycle.<p>Most of the requests here would be done by the end of the year.
d0m将近 13 年前
From my experience with Django (Over 50 websites), using Django Admin with non-technical clients is asking for trouble. Don't get me wrong, it's <i>awesome</i> for prototyping or building the website.. but tweaking it is way too complicated.<p>You need to alter the style of everything, add new fields, remove fields, use all kind of ugly hacks for simple tweaks.. and at the end, you realise that it would have been so much faster and easier to get that page done from scratch, like you'd do for all the normal pages of the website.
mattdeboard将近 13 年前
IMO asking for much from the Django admin misses the point of the Django admin. As someone who was in the trenches for over a year stretching and pushing the admin's capabilities, there comes a time when it's just time to prioritize making your own site that does what you need it to.