~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to wiki/utils.py

  • Committer: franku
  • Author(s): GunChleoc
  • Date: 2016-12-13 18:30:38 UTC
  • mfrom: (438.1.6 pyformat_util)
  • Revision ID: somal@arcor.de-20161213183038-5cgmvfh2fkgmoc1s
adding a script to run pyformat over the code base

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