Search code examples
pythondjangocelerydjango-registration

What is type is Site.objects.get_current() in django ; it returns <SIte: example.com>. I need to serialize it


I am trying to send an email with celery. I need to pass the send_email function the django site object, as obtained by Site.objects.get_current() (I am modifying django-registration-redux.)

I am unable to serialize the object or know what type it is to work with it.


Solution

  • Probably the Django Site model The values are only site.domain and site.name This model is used for when you're hosting multiple sites on one django platform. Use this to determine which site is accessed.