Update advanced.rst

fixed import for ShowFieldType
This commit is contained in:
n1ncha
2017-01-18 11:32:26 -05:00
committed by GitHub
parent d11bb17809
commit fb10deaa8c
+2 -1
View File
@@ -203,7 +203,8 @@ Nicely Displaying Polymorphic Querysets
In order to get the output as seen in all examples here, you need to use the In order to get the output as seen in all examples here, you need to use the
:class:`~polymorphic.showfields.ShowFieldType` class mixin:: :class:`~polymorphic.showfields.ShowFieldType` class mixin::
from polymorphic.showfields import PolymorphicModel, ShowFieldType from polymorphic.models import PolymorphicModel
from polymorphic.showfields import ShowFieldType
class ModelA(ShowFieldType, PolymorphicModel): class ModelA(ShowFieldType, PolymorphicModel):
field1 = models.CharField(max_length=10) field1 = models.CharField(max_length=10)