cleanup imports and syntax warnings

This commit is contained in:
j 2011-01-01 17:14:42 +05:30
commit 2d5f924891
46 changed files with 452 additions and 517 deletions

View file

@ -2,26 +2,12 @@
# vi:si:et:sw=4:sts=4:ts=4
from __future__ import division, with_statement
from datetime import datetime
import os.path
import math
import random
import re
import subprocess
import unicodedata
from glob import glob
from django.db import models
from django.db.models import Q
from django.contrib.auth.models import User
from django.core.files.base import ContentFile
from django.utils import simplejson as json
from django.conf import settings
from ox.django import fields
import ox
from ox import stripTags
from ox.normalize import canonicalTitle, canonicalName
def get_name_sort(name):
@ -29,6 +15,7 @@ def get_name_sort(name):
name_sort = unicodedata.normalize('NFKD', person.name_sort)
return name_sort
class Person(models.Model):
name = models.CharField(max_length=200)
name_sort = models.CharField(max_length=200)
@ -67,4 +54,3 @@ class Person(models.Model):
def json(self):
return self.name

View file

@ -7,7 +7,9 @@ Replace these with more appropriate tests for your application.
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
@ -20,4 +22,3 @@ Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}