From cb68f4a15d31d42f657f7065af60d7556e0eaf59 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Mon, 17 Sep 2012 19:08:41 +0200 Subject: Use Python's standard logging system --- hyperkitty/api.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'hyperkitty/api.py') diff --git a/hyperkitty/api.py b/hyperkitty/api.py index f28a1af..6c80f0d 100644 --- a/hyperkitty/api.py +++ b/hyperkitty/api.py @@ -1,14 +1,31 @@ #-*- coding: utf-8 -*- +# Copyright (C) 1998-2012 by the Free Software Foundation, Inc. +# +# This file is part of HyperKitty. +# +# HyperKitty is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, either version 3 of the License, or (at your option) +# any later version. +# +# HyperKitty is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along with +# HyperKitty. If not, see . +# + +import json +import re from djangorestframework.views import View from django.conf.urls.defaults import url from django.conf import settings from django.http import HttpResponseNotModified, HttpResponse -import json -import re from hyperkitty.lib import get_store -from hyperkitty.utils import log class EmailResource(View): @@ -58,7 +75,7 @@ class SearchResource(View): {'Content': re.compile(regex, re.IGNORECASE)} ]} else: - query_string = {field.capitalize(): + query_string = {field.capitalize(): re.compile(regex, re.IGNORECASE)} #print query_string, field, keyword -- cgit