Ok, sorry I thought I was starting to understand it a little better,
but now I think I took a step backwards, so if it is ok with you let's
step back and take it a step at a time.

So, my first step is wondering if I really need a manager or not??
I was thinking from your first response to me that you might be
suggesting that I did.  Let's start there.
If I understand it correctly the Manager is a way of retrieving
specific information.

thanks



On Oct 12, 11:30 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Tuesday, 11 October 2011 15:17:18 UTC+1, eyscooby wrote:
>
> > slowly getting there thanks to your help.
> > I am actually trying to accomplish this in the Admin interface, so I
> > am not sure how to use the template tag {{ ticket.days_old }} in that
> > situation.
>
> > the other part I left off yesterday under my model I then had..
> > (trying to get code formatting correct but keeps going to the left
> > margin on me when i post)
>
> > def days_old(self):
> >     return self.objects.datecalc()
> > days_old.short_discription = 'Days Old'
>
> > more or less is that a correct way I would pull in a custom manager,
> > lets say if this one didn't have the iteration to it which seems be to
> > be my problem part now.
>
> > thanks
>
> No, because that's not what managers are for. Managers are interacting with
> the database, and getting and returning one or more new model instances. If
> you already have an object, and you want to calculate the date on it, you
> want a model method that simply returns a value, not call the manager.
> --
> DR.- Hide quoted text -
>
> - Show quoted text -

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