admin.py....
from django.http.request import HttpRequest
....
class ProductAdmin(TranslatableAdmin):
....
list_display = ("title", "category", "_stat", "_actions")
.......
def _actions(self, obj):
print(HttpRequest.META['HTTP_HOST'])
return """
<a href="{}" class="btn btn-primary"><i class="fa fa-pencil"></i></a>
<a href="#" name="delete_item" id="20" data-toggle="modal" data-target="#deleteModel" class="btn btn-danger"><i class="fa fa-trash"></i></a>
""".format()
ошибка: AttributeError: type object 'HttpRequest' has no attribute 'META'
как получить полный текуйщий url в admin.py ?