2👍
✅
Just store your links in settings.py
.
MAIN_DOMAIN_LINK = 'https://domain.com/'
Then, you can simply access them by importing django.conf.settings
in your views:
from django.conf import settings
def network_url(request):
return redirect(settings.MAIN_DOMAIN_LINK)
Hope this helps. Docs link.
Source:stackexchange.com