M webutils/baseacct/models.py +2 -1
@@ 71,8 71,9 @@ class BaseUserProfile(models.Model):
verbose_name=_('User Account'),
help_text=_('User Profiles must be "tied" to a user account.'),
related_name='%(app_label)s_%(class)s_set',
+ on_delete=models.CASCADE,
)
-
+
# Activation Key
activation_key = models.CharField(
max_length=125,
M webutils/djtools/middleware.py +2 -1
@@ 1,7 1,8 @@
from django.conf import settings
+from django.utils.deprecation import MiddlewareMixin
-class AddIPAddress(object):
+class AddIPAddress(MiddlewareMixin):
def process_request(self, request):
request.ip_address = self.get_real_ip(request.META)
return None