On Aug 10, 10:45 pm, "Rob B (uk)" <robtot...@googlemail.com> wrote: > Im reading through loads of python / django tutorials atm, hopefully > some of it will stick! > > I added what you suggested and now I'm getting the error "type object > 'OnlineUsers' has no attribute 'get_online_user_ids'" > view -http://dpaste.com/77965/ > middleware (name OnlineUsers) -http://dpaste.com/77967/ > What am I doing wrong now? > > Thanks R
You've imported get_online_user_ids directly, so you don't in fact need to use OnlineUsers again to call it - in this case Python think you're talking about a class method of the OnlineUsers middleware class which you also import (really it's best to keep class names different from the modules they live in). So you just need to do: { 'profile_list': Profile.objects.all(), 'online_users': get_online_user_ids() } -- DR. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---