1👍
You can get subdomain name from HTTP_REFERER
from urllib.parse import urlparse
urlparse(request.META.get('HTTP_REFERER')).hostname.split('.')[0]
Source:stackexchange.com
1👍
You can get subdomain name from HTTP_REFERER
from urllib.parse import urlparse
urlparse(request.META.get('HTTP_REFERER')).hostname.split('.')[0]