1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-27 08:35:22 +00:00
webvirtcloud/admin/models.py

14 lines
291 B
Python
Raw Normal View History

from django.contrib.auth.models import Permission as P
2020-09-25 12:57:17 +00:00
class Permission(P):
"""
Proxy model to Django Permissions model allows us to override __str__
"""
2020-09-25 12:57:17 +00:00
def __str__(self):
2022-11-02 05:54:35 +00:00
return f"{self.content_type.app_label}: {self.name}"
class Meta:
proxy = True