KeyBlock
  • Home
  • Embedded
  • Python
  • Django
  • About
  • Torrent

label_from_instance

A collection of 1 post
Django - label_from_instance
Django

Django - label_from_instance

label_from_instance 예제 남겨두기 if not kwargs["request"].user.is_superuser: self.fields["group"].queryset = get_user_productgroup(kwargs["request"].user.profile.company.id).order_by("company", "name") self.fields["group"].label_from_instance = lambda obj: "%s (%s)" % (obj.name, obj.company.name) 실제 저장된 필드 값을 이용하여 라벨을
Dec 6, 2022
Page 1 of 1
KeyBlock © 2023
  • Home
Powered by Ghost