2👍
✅
Since you subclassed Site
you should be able to just do SiteMethods.objects.get_current()
, which will net you an instance of SiteMethods
. Since Django’s implementation of MTI (Multiple Table Inheritance) uses a OneToOneField
to the parent class, you should also be able to use select_related
for site
. So, try the following:
SiteMethods.objects.select_related('site').get_current()
Source:stackexchange.com