~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to wiki/utils.py

  • Committer: franku
  • Date: 2016-12-13 18:28:51 UTC
  • mto: This revision was merged to the branch mainline in revision 443.
  • Revision ID: somal@arcor.de-20161213182851-bo5ebf8pdvw5beua
run the script

Show diffs side-by-side

added added

removed removed

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