On 5/11/06, Ned Batchelder <[EMAIL PROTECTED]> wrote:
>
> Is there some way to put the model and the logic in two separate places
> but somehow end up with an object class with real methods? Am I making
> any sense?
I think what you may want to do there (and this may be a shot in the
dark) is to use a class for your view instead of a function. There's
nothing that says a view *needs* to be a function, it's just the most
common way to do things. Something like this might work for you. In
views.py:
class MyController:
def __call__(request, param1 param2):
self.someLogic()
return render_to_response() # <-missing args of course
def someLogic(self):
# do some business logicy stuff here
myview = MyController()
Then you can put the path to myview in your urls.py
HTH
Joseph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---