How to pass a model instance from one function to the next in Django to prevent hitting the database repeatedly

后端 未结 0 1084
春和景丽
春和景丽 2020-11-28 02:47

In the below example you can see that get_object_or_404(Ama, uuid=self.kwargs.get(\'uuid\')) is called three times and hits the database three times. How do I call it only o

相关标签:
回答
  • 消灭零回复
提交回复
热议问题