Write that method in your views, and return
render(request,'templateName.html', optional) and go to your templates
and call your desired or important attribute with the instance of the
class using Django template tag
{{class_instanceInMethodInsideView.modelsAtrributeName}} as many attribute
as
Hi,
I tried to write a classmothods/ instance method in a Model in order to run
most common query from the model but got errors like below :
""AttributeError: Manager isn't accessible via ... instances""
example code:
class Profile(model.Model):
name = model.Charfield(...)
address =
2 matches
Mail list logo