from django.db import models


class CustomUserManager(models.Manager):
    def create_user(self, username, email):
        return self.model._default_manager.create(username=username)


class CustomUser(models.Model):
    username = models.CharField(max_length=128)
    last_login = models.DateTimeField(blank=True, null=True)

    objects = CustomUserManager()

    def is_authenticated(self):
        return True


from social_auth.signals import pre_update
from social_auth.backends.facebook import FacebookBackend


def facebook_extra_values(sender, user, response, details, **kwargs):
    return False

pre_update.connect(facebook_extra_values, sender=FacebookBackend)

from django.db import models


class CustomUserManager(models.Manager):
    def create_user(self, username, email):
        return self.model._default_manager.create(username=username)


class CustomUser(models.Model):
    username = models.CharField(max_length=128)
    last_login = models.DateTimeField(blank=True, null=True)

    objects = CustomUserManager()

    def is_authenticated(self):
        return True

Clean signal handler from example app
Clean signal handler from example app

  from django.db import models
  
  
  class CustomUserManager(models.Manager):
      def create_user(self, username, email):
          return self.model._default_manager.create(username=username)
  
  
  class CustomUser(models.Model):
      username = models.CharField(max_length=128)
      last_login = models.DateTimeField(blank=True, null=True)
  
      objects = CustomUserManager()
  
      def is_authenticated(self):
          return True
  
- 
- from social_auth.signals import pre_update
- from social_auth.backends.facebook import FacebookBackend
- 
- 
- def facebook_extra_values(sender, user, response, details, **kwargs):
-     return False
- 
- pre_update.connect(facebook_extra_values, sender=FacebookBackend)
- 
Clean signal handler from example app
## Code Before:
from django.db import models


class CustomUserManager(models.Manager):
    def create_user(self, username, email):
        return self.model._default_manager.create(username=username)


class CustomUser(models.Model):
    username = models.CharField(max_length=128)
    last_login = models.DateTimeField(blank=True, null=True)

    objects = CustomUserManager()

    def is_authenticated(self):
        return True


from social_auth.signals import pre_update
from social_auth.backends.facebook import FacebookBackend


def facebook_extra_values(sender, user, response, details, **kwargs):
    return False

pre_update.connect(facebook_extra_values, sender=FacebookBackend)

## Instruction:
Clean signal handler from example app
## Code After:
from django.db import models


class CustomUserManager(models.Manager):
    def create_user(self, username, email):
        return self.model._default_manager.create(username=username)


class CustomUser(models.Model):
    username = models.CharField(max_length=128)
    last_login = models.DateTimeField(blank=True, null=True)

    objects = CustomUserManager()

    def is_authenticated(self):
        return True
