Johan,
I used some of the admin functionality in my views and to be honest I wish I
hadn't... It's pretty difficult to extend and I'm kinda stuck now! I'm not
sure what the newforms admin brings to the table (or even if it's merged
into trunk yet) so maybe you'd want to look at that?
Ben

On 01/08/07, johan de taeye <[EMAIL PROTECTED]> wrote:
>
>
>
> Folks,
>
> Any thoughts on how I can implement the following elegantly in Django?
>
> A first table contains let's say "product" records, which have a bunch
> of attributes on which the admin pages provide filtering and sorting.
> A second table contains "sales" records, which have a field referring
> to the "product".
> Now I want to create a page "product sales per month" which shows a
> table with the sales of a product, bucketized per month.
>
> My first-pass implementation is a raw SQL query in a custom view and
> template. It works fine but it doesn't have the same sorting and
> filtering capabilities as the "product" list in the admin ui.
> Is there a way to achieve the same in better django-style, and re-
> using the admin capabilities in my custom view and template?
>
> All feedback highly appreciated!
>
> Johan
>
>
> >
>


-- 
Regards,
Ben Ford
[EMAIL PROTECTED]
+628111880346

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to