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.

Comments

Popular posts from this blog

Return Code 127