모델과 같이 메타 클래스와 함께 할 수장고 모델 메타 클래스의 표준 docstring은 무엇입니까? 장고의
class Address(models.Model):
"""Address model."""
class Meta:
"""Meta McMetaface."""
verbose_name = "Address"
verbose_name_plural = "Addresses"
address_line = models.CharField(max_length=256)
postcode = models.CharField(max_length=10)
def __str__(self):
"""Return address without post code."""
return self.address_line
내 메타 클래스는 기껏 기발한이다. 파이썬이나 장고는 메타 클래스에 대한 표준 텍스트가 있습니까?
문서화를위한 문서화입니다. 표준 텍스트는 이러한 목적을 순수하게 제공합니다. 바보 같은 이름이나 위의'class' 또는'def' 라인을 반복하는 내용에 대해서도 유효합니다. 쓰는 데 도움이되는 것이 없다면, 비워 두십시오. –
@KlausD. 어떻게 그것이 pep에서 학급의 metaness를 기술해야하는지에 관해 아무것도 아닌가? – Pureferret