From 33728bc0b1e849da1ce248d7ee8afcfb7738d416 Mon Sep 17 00:00:00 2001 From: Tom Graham Date: Fri, 24 Oct 2014 18:05:44 +1100 Subject: [PATCH] Revert "Make sure custom user logic works with Django 1.4" This reverts commit 1aed6c9a967a91d724b3efdfdcd4e84b3070fc62. --- helpdesk/__init__.py | 1 - helpdesk/monkey_patch.py | 15 --------------- 2 files changed, 16 deletions(-) delete mode 100644 helpdesk/monkey_patch.py diff --git a/helpdesk/__init__.py b/helpdesk/__init__.py index ca49be81..e69de29b 100644 --- a/helpdesk/__init__.py +++ b/helpdesk/__init__.py @@ -1 +0,0 @@ -import monkey_patch # Patch User model for older versions of Django diff --git a/helpdesk/monkey_patch.py b/helpdesk/monkey_patch.py deleted file mode 100644 index 5f729911..00000000 --- a/helpdesk/monkey_patch.py +++ /dev/null @@ -1,15 +0,0 @@ -""" -django-helpdesk - A Django powered ticket tracker for small enterprise. - -(c) Copyright 2008 Jutda. All Rights Reserved. See LICENSE for details. - -monkey_patch.py - Monkey Patch the User model for older versions of -Django that don't support USERNAME_FIELD and get_username -""" - -from django.contrib.auth import get_user_model -User = get_user_model() -if not hasattr(User, "USERNAME_FIELD"): - User.add_to_class("USERNAME_FIELD", "username") -if not hasattr(User, "get_username"): - User.add_to_class("get_username", lambda self: getattr(self, self.USERNAME_FIELD))