Re: custom method for view

2007-10-04 Thread Goon
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

Re: custom method for view

2007-10-04 Thread Joseph Heck
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

custom method for view

2007-10-04 Thread Goon
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