IMO this should be done in view if it's just for display purposes in
rendered page.
Although, the best method is doing it in a template tag.

Regards,
Sencer HAMARAT



On Tue, Jan 21, 2020 at 3:30 PM Mario Bisiani <mariobisi...@gmail.com>
wrote:

> Good morning,
>
> first post here!
>
> I have a quesion for you. I need to have a calculated field from two
> attribute of different class in model.py. Which is the best practice to
> perform calcs : in model.py by function or in the view.py?
>
> In the case of model.py how can i access the atribut of the different
> class?
>
> Thank you to you all,
>
> M
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3b7d11f3-c6b6-4892-a5d0-591e9dc2055e%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/3b7d11f3-c6b6-4892-a5d0-591e9dc2055e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACp8TZg%3DvQ8cCcj1RtHbqs6FP%2B80uwtM8909wtntWSACGN848g%40mail.gmail.com.

Reply via email to