I kinda came across an article about creating Proxy Models, that is
what I tried and it really seemed to do what I needed, pretty cool.
Here is what I coded ...(sorry for the formatting, if it looks goofy)
Edit “models.py” file: (create the new Proxy Model)
class RequestTicketCompleted(RequestT
So with the items that are still waiting to be complete i wanted to
show how many days the ticket has been open by doing something
like ...
return date.today() - self.issued_date
and then those that are complete ...
return self.competion_date - self.issued_date
Can i create 2 managers f
Ok, this is helping, believe it or not your are helping, I'm probably
confusing myself mostly.
So the model method explanation was very helpful and you are correct
that works great, as long as all dates have a completion_date. If a
new ticket is entered it will fail due to a "NoneType field with
On Monday, 17 October 2011 20:28:47 UTC+1, eyscooby wrote:
>
> 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 ne
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
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 yes
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
On Monday, 10 October 2011 19:14:51 UTC+1, eyscooby wrote:
>
>
>
> On Oct 5, 3:11 am, Daniel Roseman wrote:
> > On Wednesday, 5 October 2011 01:27:54 UTC+1, eyscooby wrote:
> >
> > > new to django/python developement, can't get this one figured out.
> >
> > > I have a model that has a couple
On Oct 5, 3:11 am, Daniel Roseman wrote:
> On Wednesday, 5 October 2011 01:27:54 UTC+1, eyscooby wrote:
>
> > new to django/python developement, can't get this one figured out.
>
> > I have a model that has a couple DateFields (issued_date &
> > completion_date), and I'm trying to return a value
On Wednesday, 5 October 2011 01:27:54 UTC+1, eyscooby wrote:
>
> new to django/python developement, can't get this one figured out.
>
> I have a model that has a couple DateFields (issued_date &
> completion_date), and I'm trying to return a value with the difference
> of the two on each entry
new to django/python developement, can't get this one figured out.
I have a model that has a couple DateFields (issued_date &
completion_date), and I'm trying to return a value with the difference
of the two on each entry that is complete, and then if it isn't
completed yet, show the amount of day
11 matches
Mail list logo