Ticket #13125: ticket_13125_patch2.diff

File ticket_13125_patch2.diff, 466 bytes (added by wim@…, 13 years ago)

Ticket 13125 patch using getattr

  • decorators.py

     
    3939    to the log-in page if necessary.
    4040    """
    4141    actual_decorator = user_passes_test(
    42         lambda u: u.is_authenticated(),
     42        lambda u: u.is_authenticated() and getattr(u, 'is_active', True),
    4343        login_url=login_url,
    4444        redirect_field_name=redirect_field_name
    4545    )
Back to Top