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



On Aug 10, 8:32 pm, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Aug 10, 7:10 pm, "Rob B (uk)" <robtot...@googlemail.com> wrote:
>
> > Thanks Daniel.
> > Im still quite new to python / django and not sure how to pass
> > OnlineUsers.get_online_user_ids() into the context. My view to list
> > all profiles looks like this:
> > def profile_list(request):
>
> >         return render_to_response('profile_list.html',
>
> >                               { 'profile_list': Profile.objects.all
> > () }, context_instance=RequestContext(request))
>
> You pass it exactly as you are passing the list of profile objects:
> { 'profile_list': Profile.objects.all(),
>   'online_users': OnlineUsers.get_online_user_ids() }
>
> You really need to read an introductory Python tutorial - you must at
> least know how to define variables like dictionaries, and how to call
> functions.
> --
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to