Mistři v programování na #hovnokod

Python #431

from django.conf.urls.defaults import *
from django.contrib.auth.views import logout_then_login
from django.shortcuts import redirect

from forms import LogoutForm


urlpatterns = patterns('',
    (r'^logout/$', lambda r: (
        r.method == 'POST' and
        LogoutForm(r.POST).is_valid() and
        logout_then_login(r) or
        redirect('index')
    ), {}, 'logout'),
)

HovnoKod,