Mercurial > public > sg101
diff irc/views.py @ 656:79e785f0bdad
For issue #38, change IRC bot to use Redis instead of MySQL.
Also deleting the bot from this repo as it now has its own repo.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 11 May 2013 15:22:45 -0500 |
parents | ee87ea74d46b |
children | 19d34242473e |
line wrap: on
line diff
--- a/irc/views.py Sat May 11 12:56:41 2013 -0500 +++ b/irc/views.py Sat May 11 15:22:45 2013 -0500 @@ -1,12 +1,10 @@ -"""views for the IRC application""" +"""Views for the IRC application""" -from django.shortcuts import render_to_response -from django.template import RequestContext +from django.shortcuts import render -from irc.models import IrcChannel +from irc.channel import get_users + def view(request): - nicks = IrcChannel.objects.all() - return render_to_response('irc/view.html', - {'nicks': nicks}, - context_instance = RequestContext(request)) + nicks = get_users() + return render(request, 'irc/view.html', {'nicks': nicks})