cleanup unused imports and unused variables
This commit is contained in:
parent
06f6a79b7b
commit
b1d83b0f93
42 changed files with 30 additions and 155 deletions
|
|
@ -1,11 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
from datetime import datetime
|
||||
|
||||
from django.db.models import Q, Manager
|
||||
|
||||
import models
|
||||
|
||||
|
||||
def parseCondition(condition, user):
|
||||
'''
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ from __future__ import division, with_statement
|
|||
import os
|
||||
import re
|
||||
import subprocess
|
||||
from datetime import datetime
|
||||
from glob import glob
|
||||
|
||||
from django.db import models
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
"""
|
||||
This file demonstrates two different styles of tests (one doctest and one
|
||||
unittest). These will both pass when you run "manage.py test".
|
||||
|
||||
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.
|
||||
"""
|
||||
self.failUnlessEqual(1 + 1, 2)
|
||||
|
||||
__test__ = {"doctest": """
|
||||
Another way to test that 1 + 1 is equal to 2.
|
||||
|
||||
>>> 1 + 1 == 2
|
||||
True
|
||||
"""}
|
||||
|
||||
|
|
@ -4,14 +4,13 @@ from __future__ import division
|
|||
import os
|
||||
import re
|
||||
|
||||
import ox
|
||||
from ox.utils import json
|
||||
from ox.django.api import actions
|
||||
from ox.django.decorators import login_required_json
|
||||
from ox.django.http import HttpFileResponse
|
||||
from ox.django.shortcuts import render_to_json_response, get_object_or_404_json, json_response
|
||||
from django import forms
|
||||
from django.db.models import Count, Q, Sum, Max
|
||||
from django.db.models import Sum, Max
|
||||
from django.conf import settings
|
||||
|
||||
from item import utils
|
||||
|
|
@ -397,6 +396,7 @@ def pdf(request, id):
|
|||
if text.type == 'pdf' and text.file and not text.uploading:
|
||||
return HttpFileResponse(text.file.path, content_type='application/pdf')
|
||||
response = json_response(status=404, text='file not found')
|
||||
return render_to_json_response(response)
|
||||
|
||||
@login_required_json
|
||||
def upload(request):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue