<s> from django . conf import settings <EOL> from django . db . models . signals import post_save <EOL> from django . dispatch import receiver <EOL> from rest_framework . authtoken . models import Token <EOL> @ receiver ( post_save , sender = settings . AUTH_USER_MODEL ) <EOL> def create_auth_token ( sender , instance = None , created = False , ** kwargs ) : <EOL> if created : <EOL> Token . objects . create ( user = instance ) </s>
