Number per page functionality in admin.

6 views
Skip to first unread message

ben

unread,
Dec 16, 2006, 4:05:25 AM12/16/06
to Django developers
Hi there,
I've added some functionality to Changelist (in
django.contrib.admin.views) and some related areas to add a select
field to the pagination on change_list pages that allows you to overide
the list_per_page value in Admin for your models. How should I go about
sharing the code for this addition?
First post from a newb here, so be gentle if this is the wrong place
for me to put this!
Cheers,
Ben

Jacob Kaplan-Moss

unread,
Dec 16, 2006, 12:24:24 PM12/16/06
to django-d...@googlegroups.com
On 12/16/06 3:05 AM, ben wrote:
> I've added some functionality to Changelist (in
> django.contrib.admin.views) and some related areas to add a select
> field to the pagination on change_list pages that allows you to overide
> the list_per_page value in Admin for your models. How should I go about
> sharing the code for this addition?

Awesome - I'd love to see it!

A good place to start is with our guide to contributing patches:
http://www.djangoproject.com/documentation/contributing/#submitting-patches.

The most important part is correctly generating a patch, but luckily
subversion makes this pretty easy. All you have to do is run "svn diff" and
save the output into a file (if you're on a *nix, "svn diff > mypatch.diff"
will do the trick nicely).

If you run this comment from the top of the Django source tree (i.e. the
directory that contains "AUTHORS", "LICENSE", and "README"), you'll get a
patch that covers everything you've changed in the tree.

Then you can either create a ticket with the patch, or if you'd like feedback
without/before opening a ticket, just post it here.

Hope that helps, and I look forward to checking out your code.

Jacob

ben

unread,
Dec 16, 2006, 4:58:38 PM12/16/06
to Django developers
Hi Jacob,

I've done that; it's in ticket 3152
(http://code.djangoproject.com/ticket/3152/). I've screwed up the diff
slightly (left a couple of print statements in and some other changes
to templates that weren't strictly necessary), but I hope you can get
the general idea!

Hope you like it :)
Ben

ben

unread,
Dec 29, 2006, 3:45:46 PM12/29/06
to Django developers
Hi there,
Did anyone try to apply this patch? I've just installed django on
another machine from svn and I think the patch worked fine on the
latest revision.
Cheers,
Ben

Reply all
Reply to author
Forward
0 new messages