~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wiki/utils.py

  • Committer: Holger Rapp
  • Date: 2009-02-19 15:31:42 UTC
  • Revision ID: sirver@h566336-20090219153142-dc8xuabldnw5t395
Initial commit of new widelands homepage

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
"""Some util functions."""
3
 
from django.conf import settings
4
 
from django.contrib.contenttypes.models import ContentType
5
 
 
6
 
 
7
 
def get_ct(obj):
8
 
    """Return the ContentType of the object's model."""
9
 
    return ContentType.objects.get(app_label=obj._meta.app_label,
10
 
                                   model=obj._meta.module_name)