Wednesday, September 26, 2012

View.py v models.py

Hi

I was doing some work on a view last night and realised that the code
could go into either views.py or as a method on the model.

Do people have internal guidelines about when they make something a
method on a model rather than a view function? Is there any functional
difference apart from the obvious "a model method can be called from
an object"?

Cheers
L.

--
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, "We
look at the present through a rear-view mirror. We march backwards
into the future."

http://www.warrenellis.com/?p=14314

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment