Re: Extending result count at bottom of admin pages

2009-12-06 Thread Kaze
You can override "changelist_view" function in admin.py for that
model.
Tryn googling "def changelist_view(self, request, extra_context=None,
**kwargs):".


On Dec 6, 7:26 pm, Count László de Almásy  wrote:
> I'm new to django but working hard to come up to speed. I need to make
> a small change to the admin interface, and am hoping i could get a
> pointer on how to do this. At the bottom of an admin page, the number
> of results is displayed in a summary, along with pagination buttons.
> For example,
>
> "1 [2] 76 payments"
>
> Along with showing the number of payments at the bottom, I'd like to
> display the dollar total for them next to it. One of my columns is
> payment amount, so it should (i hope) be fairly easy to SUM the
> results of that column to get this, so it might look like this
> instead:
>
> "1 [2] 76 payments (for $1,500)"
>
> The relevant template seems to be admin/pagination.html with
> "cl.result_count" displaying the number of objects. How would i insert
> my own tag into this template to show the SUM of my payment amount
> column for said objects?

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Serving an external web site which requires authentication

2008-03-24 Thread Kaze

Hi,

I'm developing a django site and I need your suggestions about the
topic.
Actually, I'm not sure where to start but basically, I want to make
something like;

(I have an account on a site which requires log-in)
- My server will be logged-in to that site with my account.
- And when a user connects to my site, I'll forward him/her to that
site, using my account even if he/she doesn't have an account on that
site...

Probably, I need to develop a proxy or middleware to do this, but I'm
not sure...

I really appreciate your ideas.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---