I think really I'm better off redesigning my model structure for
this.  Even trying to do it in pure SQL or with the extra attribute
it's ungodly messy.  What I really need is a Ticket model and a
TicketHistory model.  Keep the most rescent ticket information in
Ticket and versions of tickets in TicketHistory as they change.

Sorry to have floated this here.

On Feb 8, 5:22 pm, Streamweaver <streamwea...@gmail.com> wrote:
> I have a model called 'Ticket' with several fields 'number',
> 'milestone', 'status', 'resolution', 'estimate', 'last_updated'
>
> These are just multiple entries for the same support ticket that I'm
> pulling from another system.  I keep multiple entries of a ticket so I
> can trac changes in estimation and so forth over time.
>
> functionally though what I'll want to do most often is bring by the
> more recent ticket (by last_updated) of each unique 'number'
>
> In SQL I'd normally do this by a sort and a group by but I can't seem
> to figure out how to do it in Django effectively.
>
> Has anyone done anything like this previously?

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

Reply via email to