kawaz.core.views.tests.models のソースコード
#
# The source code in this files were forked from django-observer
# Thus the LICENSE of the codes follow MIT license
#
from django.db import models
[ドキュメント]def alias(name):
"""Define alias name of the class"""
def decorator(cls):
globals()[name] = cls
return cls
return decorator
@alias('Article')
[ドキュメント]class SingleObjectPreviewViewMixinTestArticle(models.Model):
foo = models.CharField(max_length=50)
bar = models.TextField()
class Meta:
app_label = 'comments'