~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-20 12:25:18 UTC
  • Revision ID: holgerrapp@gmx.net-20090220122518-feaq34ta973snnct
Imported wikiapp into our repository, because we did some local changes (users must be logged in to edit wiki pages)

Show diffs side-by-side

added added

removed removed

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