[Answer]-Get url and add instance to a model with prefilled foreign key :django admin

1👍

If {{request}} is empty you have to add django.core.context_processors.request in the TEMPLATE_CONTEXT_PROCESSORS of your settings.py

See: https://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request

Leave a comment