Rewriting admin internals

227 views
Skip to first unread message

Asif Saifuddin

unread,
May 25, 2016, 4:45:42 AM5/25/16
to Django developers (Contributions to Django itself)
Hi,
the admin app of django is consists of many old day codes. How about rewriting it with present day approaches? adopting ideas from django-admin2 where possible? and how about using jinja2 templates as default for admin? 

thanks,

asif

Marc Tamlyn

unread,
May 25, 2016, 5:13:58 AM5/25/16
to django-d...@googlegroups.com
Sure, give me 12 months of two full time experienced Django developers and we can rewrite the admin.

Honestly, I think everyone knows the admin would benefit from a significant rewrite. However, as the efforts of admin2 proved, it's a huge job to undertake. The admin has a huge number of features and customisation points, many of which have been developed in an ad-hoc sense. There are hundreds of thousands of deployments of it in the wild, and hundreds of packages which use and abuse it. I don't want to say it can't be done, because I'd like it to be done. However it would require a gargantuan effort to achieve.

A first step would be to work on a DEP. Probably a long one.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/b0c8ff85-fe32-4c91-95ad-f192246b2049%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Pic

unread,
May 25, 2016, 5:19:36 AM5/25/16
to django-d...@googlegroups.com
Shouldn't the forms refactor happen first ?

Asif Saifuddin

unread,
May 25, 2016, 9:04:48 AM5/25/16
to Django developers (Contributions to Django itself)
Hi is_null,

form refactor is an important part but that shouldn't stop us from starting the process.

thanks

Tim Graham

unread,
May 25, 2016, 9:32:51 AM5/25/16
to Django developers (Contributions to Django itself)
What's the "forms refactor"?

Marc Tamlyn

unread,
May 25, 2016, 10:11:37 AM5/25/16
to django-d...@googlegroups.com
There are certainly elements of forms refactoring you would want to pull from the admin - read only fields and fieldsets being the two most obvious.

At a guess, James is alluding to https://github.com/mjtamlyn/django-adapters, my currently stalled project to think about reworking the form/serialization apis.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.

Jacob Kaplan-Moss

unread,
May 25, 2016, 2:39:58 PM5/25/16
to django-developers
Hi Asif -

You're probably noticing some pushback already, so I want to give you some background as to why that's the case. 

The admin may look simple on the surface, but it's shockingly complex and represents a ton of work. The original version was the work of a whole team (Simon, Adrian, Wilson, Dan, me) working very closely with a group of users (the editors and journalists for lawrence.com, kusports.com, and ljworld.com) for over a year. It was nearly a perfect environment for product development, one that's hard to replicate (and probably impossible in an all-volunteer community). Then, that focused effort was followed by a decade of incremental improvement by hundreds of people across the Django community.

The tools available *have* gotten better, but the level of effort to build a new admin from scratch is truly monumental. 

If you want to see it happen: START. Build a team. Write code. Find users so you can iterate effectively. Figure out how that team is going to be able to devote the year or more of effort it'll take. Raise money. Recognize how hard a problem it is, and be prepared to tackle it.

But please don't ask others to do that work for you. That's why you're getting pushback -- because you're implying that "Someone Else" should do this work for you, probably for free. 

If you want to see this happen, it's going to take some real leadership, and almost certainly a lot of time and/or money. Maybe you're that leader; if you are I wish you the best of luck.

Jacob

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.

Asif Saifuddin

unread,
May 25, 2016, 3:26:34 PM5/25/16
to Django developers (Contributions to Django itself)
Hi jacob,

happy to see your insightful reply. I think I'm going to start the process with a draft dep soon and I'm planning to devote my engagement in the development too.

Will keep you suggestions in mind :)

thanks,

Asif

Jacob Kaplan-Moss

unread,
May 25, 2016, 4:16:53 PM5/25/16
to django-developers
Hi Asif -

I don't think a DEP is the right approach. The problem isn't a controversial feature or a hard-to-design-API; it's that this is going to take a lot of time or money, and probably both. Writing a DEP won't answer the question of "how the heck are you going to find a half-dozen people who can spend a year on this?"

Or, let me ask this question in a different way. I did some analysis on what it might cost to hire a team to build a new admin. I've worked as a consultant, on similar tasks, so I have some experience costing our projects like this. At market rates, I came up with over $1 million -- which passes a sniff test given the effort involved. So to put a real point on it: how are you going to raise that money, or find the equivalent level of dedication from volunteers?

If you want to see this happen, you need to answer these fundamental question. And the way to answer it is *by doing it* -- write code, raise money, build a team. Writing a DEP is going to be a waste of your time.

I'm sorry if this sounds harsh, but I really want to make sure you understand exactly what you're proposing here. If you want to be successful, you need to demonstrate your ability to make progress where so many others have tried and failed.

Jacob

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.

Asif Saifuddin

unread,
May 26, 2016, 1:16:12 AM5/26/16
to Django developers (Contributions to Django itself)
Hi Jacob,

Your explanations are rather right to understand the main hindrance to the success of this change. I personally tried some alternative django admins and even have some analysis with django admin internals too. I initially thought If I could start the work immediately then it could be done before 1.11 but from your previous experience now It's clear that it will take much longer time and dedication from multiple peoples.

I personally is willing to start the initial work's and will continue to communicate and push the works regularly myself. But for the money I don't have any initial source to manage It. I would dedicate my personal time to it and also manage volunteers from my country's python django community who got the ability to contribute to django.

For the technical perspective can you guide/ show me any previous work/discussion/technical specs etc? I personally found django-admin2 internals quite modern and liked most of their approach. Though django have its own limitations of bc so I would like to hear from core members about the works right directions. I personally know about thing though.

Another thing I want to know as I'm based on south asia, so if some time later the south asian developers participate then in future if serious funding is needed then it might be lesser expensive then other parts of the world as far I know. [don't get me wrong about the topic,]

Thanks 

Asif

Tom Christie

unread,
May 26, 2016, 5:28:09 AM5/26/16
to Django developers (Contributions to Django itself)
> But for the money I don't have any initial source to manage It.

Jacob is using the figure more to give an idea of the amount of effort he believes it would involve, rather than suggesting that we should make a serious attempt to raise that amount of money.

> can you guide/ show me any previous work/discussion/technical specs etc?

I'd search for DjangoCon and Django Under the Hood videos if you want to find some technical discussions on the subject.

Searching through outstanding django tickets related to the admin and attempting to fully understand them would also be a good way of learning about what pain points exist with the admin.

> I would like to hear from core members about the works right directions

I'd suggest that a side-project of redesigning the Django Admin from scratch isn't a realistic goal.

Asif Saifuddin

unread,
May 26, 2016, 9:02:50 AM5/26/16
to Django developers (Contributions to Django itself)
Hi Tom,

> I'd suggest that a side-project of redesigning the Django Admin from scratch isn't a realistic goal.

I also think that working on existing outstanding ticket first and trying to solve issues incrementally would be a good approach?

Thanks

Tom Christie

unread,
May 26, 2016, 9:54:33 AM5/26/16
to Django developers (Contributions to Django itself)
> I also think that working on existing outstanding ticket first and trying to solve issues incrementally would be a good approach?

Absolutely, yes. There's plenty of good work that can be done there.

James Pic

unread,
May 26, 2016, 10:22:31 AM5/26/16
to django-d...@googlegroups.com
There are a lot of interresting things to do, perhaps we could extract
code from the admin into the core ?

An example of this is the django-addanother app, which replicates the
pattern used by the admin add another widget in an app for usage
outside the admin. Would moving that kind of things from the admin
into django be the kind of issue you would like to solve incrementally
?

Thanks

Tim Graham

unread,
May 26, 2016, 10:37:19 AM5/26/16
to Django developers (Contributions to Django itself)
I'm skeptical of moving anything JavaScript related from admin into core as this makes a stronger endorsement of and coupling to jQuery.

James Pic

unread,
May 26, 2016, 2:01:50 PM5/26/16
to django-d...@googlegroups.com
On Thu, May 26, 2016 at 4:37 PM, Tim Graham <timog...@gmail.com> wrote:
> I'm skeptical of moving anything JavaScript related from admin into core as
> this makes a stronger endorsement of and coupling to jQuery.

Makes sense, would there be any intermediary solution at least ?

Tim Graham

unread,
May 26, 2016, 3:01:12 PM5/26/16
to Django developers (Contributions to Django itself)
I'm not sure what you mean. Are solutions like the third-party package you pointed to insufficient?
Reply all
Reply to author
Forward
0 new messages