@@ -0,0 +1,1277 @@
+# Copyright 2011 Mike Wakerly %3Copensource@hoho.com%3E%0A#%0A# This file is part of the Pykeg package of the Kegbot project.%0A# For more information on Pykeg or Kegbot, see http://kegbot.org/%0A#%0A# Pykeg is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU General Public License as published by%0A# the Free Software Foundation, either version 2 of the License, or%0A# (at your option) any later version.%0A#%0A# Pykeg is distributed in the hope that it will be useful,%0A# but WITHOUT ANY WARRANTY; without even the implied warranty of%0A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A# GNU General Public License for more details.%0A#%0A# You should have received a copy of the GNU General Public License%0A# along with Pykeg.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A%0Afrom django.contrib.auth.signals import user_logged_in%0Afrom django.contrib.auth.signals import user_logged_out%0Afrom django.contrib import messages%0A%0Adef on_logged_in(sender, user, request, **kwargs):%0A  messages.add_message(request, messages.INFO, 'You are now logged in!')%0Auser_logged_in.connect(on_logged_in)%0A%0Adef on_logged_out(sender, user, request, **kwargs):%0A  messages.add_message(request, messages.INFO, 'You have been logged out.')%0Auser_logged_out.connect(on_logged_out)%0A

add logged-in/logged-out signals.