0 Replies - 132 Views - Last Post: 22 May 2012 - 02:18 PM

#1 Addiction2Code  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 67
  • Joined: 19-December 06

Proper Use of Model, View, Controller in Django

Posted 22 May 2012 - 02:18 PM

Hello,
For a while I've been wondering if it is okay to put functionality in the views, things that I would think are suppose to go in the models but can't because of recursive includes. For instance. PlayerInstance.pickupItem(ItemInstance) makes more sense than writing the code in the view to actually "pick up an item", but if I'm required to import a model that imports the current model I'm adding functionality to, it's recursive and breaks. How can I accomplish the desired result without views? What am I doing wrong? Where can I find more information on this?

Thank you!
~ Paul. ~

Is This A Good Question/Topic? 0
  • +

Page 1 of 1