Somehow I have itworking without any custom managers or querysets.
The last issue was fixed by importing simplejson instead of json.
Thanks for all the help
On Oct 23, 5:05 pm, "dr.phil" wrote:
> I narrowed down the error. Strang thing is this works in a shell but
> not in my
me.datetime(2011,
10, 19, 17, 18, 2))]"}
json.dumps(queryset, cls = DjangoJSONEcoder)
? This last statement fails in the app but not in a shell ?
On Oct 23, 10:03 am, Casey Greene wrote:
> What is the error that that function gives you? It may be possible to
> just fix that function.
>
jsonify a datetime object.
Probably the easiest solution is to avoid this generic utility
function and build my own?
On Oct 22, 11:15 pm, Pedro Vasconcelos wrote:
> If you post the relevant part of your code inhttp://dpaste.com/will be
> more easy to help you!
>
> On Saturday, Oct
m/en/1.3/topics/db/models/#model-methods
>
> If you only want to do this calculations to show it in templates you may
> consider creating a specific template custom tag/filters.
>
> Regards,
>
>
>
>
>
>
>
>
>
> On Sat, Oct 22, 2011 at 1:31 AM, dr.phil wrot
Is this possible? I have a model that includes a datetime field. When
creating a queryset of this model, I want to include a calculated
field of the time difference (in hours:minutes compared to
datetime.now).
Currently, when creating a queryset the datetime is included. I can
iterate through the
5 matches
Mail list logo