~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-21 18:24:02 UTC
  • Revision ID: sirver@kallisto.local-20090221182402-k3tuf5c4gjwslbjf
Main Page contains now the same informations as before

Show diffs side-by-side

added added

removed removed

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