> > The difficulty you're having here is that you're trying to write Java > code in Python. :-) > > Unless there's something stateful about the UserService, there's no > reason for it to be in a class at all - create_user, create_friendship > etc can just be methods sitting in a module. > > A little late to the party I am, about 10 years :P. Hope I get a comment back So I too have just entered this realm of python. This is exactly how I would describe my current status.
> If you _really_ need your OO fix, consider this - in Python, modules >> are objects anyway, so putting the create_user method in the User.py >> module is kinda like creating a singleton User object with a >> create_user method. >> > I didn't really understand this statement (again Java baggage). So we used to have an option there to declare these Singleton-Services in Java as Transaction, this helped us in keeping the logic implementation thread safe. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/97108bc4-94ce-4fc3-b578-28872e78ba33%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.