Skip to content

Instantly share code, notes, and snippets.

@mansha99
Created July 9, 2023 09:04
Show Gist options
  • Save mansha99/55ecf7aadb2ce2755d846807e9c7967b to your computer and use it in GitHub Desktop.
Save mansha99/55ecf7aadb2ce2755d846807e9c7967b to your computer and use it in GitHub Desktop.
project_app_receivers.py
from django.dispatch import receiver
from helloapp import signals
@receiver(signals.user_visit_signal)
def handle_user_visit(sender, date_time,ip,device, **kwargs):
message = "Visit to view {sender}, at {date_time} , IP is {ip} , Device is {device}".format(sender=sender,date_time=date_time,ip=ip,device=device)
print(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment