Django's Contenttype
from django.contrib.contenttypes.models import ContentType
from mission.objects import Mission
-> cmission = ContentType.objects.get(model='mission',app_label='mission')
and
-> cmission = ContentType.objects.get_for_model(Mission)
You will get same object.
from mission.objects import Mission
-> cmission = ContentType.objects.get(model='mission',app_label='mission')
and
-> cmission = ContentType.objects.get_for_model(Mission)
You will get same object.
Comments
Post a Comment