Looks like that works! Thanks very much
>
> i.e.
>
> my_model_instance = myClass.objects.get(pk=12)
> my_model_instance.getValue()
>
> -joe
>
> On 10/4/07, Goon <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > probably a dumb question, what's the syntax for calling a method in
> > models.py from views
Get an instance of the model and call getValue() on it.
i.e.
my_model_instance = myClass.objects.get(pk=12)
my_model_instance.getValue()
-joe
On 10/4/07, Goon <[EMAIL PROTECTED]> wrote:
>
> probably a dumb question, what's the syntax for calling a method in
> models.py from views.py?
>
> so li
probably a dumb question, what's the syntax for calling a method in
models.py from views.py?
so like:
#models.py
class myClass (models.Model):
value = 24
def getValue(self):
return value
#views.py
def myFunction():
myData = ###what do I put here to call "getValue()" instead of
3 matches
Mail list logo