Pull object names from model definitions in CRUD views

This commit is contained in:
2022-11-04 07:20:42 +00:00
parent 0c52cbd0f8
commit d34ac39d68
10 changed files with 29 additions and 159 deletions

View File

@@ -70,16 +70,14 @@ class PositionAction(LoginRequiredMixin, View):
info = account.client.get_position_info(symbol)
print("ACCT INFO", info)
items = get_positions(request.user, account_id)
if type == "page":
type = "modal"
context = {
"title": f"Hooks ({type})",
"unique": unique,
"window_content": self.window_content,
"items": items,
"type": type,
"items": info,
}
context["items"] = info
return render(request, template_name, context)