Mercurial > hg > bts-webui
changeset 138:25e9f39aadd4 draft
cleanup: remove useless includes and prefixes
author | diegoe-guest |
---|---|
date | Mon, 10 Aug 2009 23:41:05 +0000 |
parents | 7bdefc9b2f19 |
children | cac0125db888 |
files | bts_webui/amancay/admin.py bts_webui/amancay/bts_queries.py bts_webui/amancay/bugs.py bts_webui/amancay/models.py bts_webui/amancay/registration.py bts_webui/amancay/search.py bts_webui/amancay/tables.py bts_webui/amancay/toolbox.py bts_webui/amancay/views.py |
diffstat | 9 files changed, 27 insertions(+), 83 deletions(-) [+] |
line wrap: on
line diff
--- a/bts_webui/amancay/admin.py +++ b/bts_webui/amancay/admin.py @@ -1,7 +1,7 @@ # vim: set sw=4 ts=4 sts=4 noet: +from django.contrib import admin from amancay.models import Package, Bug -from django.contrib import admin admin.site.register(Package) admin.site.register(Bug)
--- a/bts_webui/amancay/bts_queries.py +++ b/bts_webui/amancay/bts_queries.py @@ -1,4 +1,5 @@ # vim: set sw=4 ts=4 sts=4 noet: +import SOAPpy class BtsQueries: """ @@ -33,8 +34,6 @@ pass # ************************ SOAP Queries ***************************** - -import SOAPpy # Uncomment those to enable debugging #server.config.dumpSOAPOut = 1 #server.config.dumpSOAPIn = 1
--- a/bts_webui/amancay/bugs.py +++ b/bts_webui/amancay/bugs.py @@ -1,24 +1,14 @@ # vim: set sw=4 ts=4 sts=4 noet: -# The bug page uses regular expresions to parse the log import re -# The bug page uses rfc822 to parse emails, dates, etc. import email +from smtplib import SMTPRecipientsRefused -# Needed to get_template, prepare context and output Response +from django.core.mail import send_mail +from django.shortcuts import render_to_response from django.template import RequestContext, Context, loader -# Shortcut for rendering a response -from django.shortcuts import render_to_response - -# Model clases -from bts_webui.amancay.models import Pending_Messages - -# Needed for SOAP -from bts_queries import SoapQueries - -# Needed for sending emails -from django.core.mail import send_mail -from smtplib import SMTPRecipientsRefused +from amancay.models import Pending_Messages +from amancay.bts_queries import SoapQueries def bug(request, bug_number): """
--- a/bts_webui/amancay/models.py +++ b/bts_webui/amancay/models.py @@ -1,7 +1,6 @@ # vim: set sw=4 ts=4 sts=4 noet: - +from django.contrib.auth.models import User from django.db import models -from django.contrib.auth.models import User class Package(models.Model): user = models.ForeignKey(User)
--- a/bts_webui/amancay/registration.py +++ b/bts_webui/amancay/registration.py @@ -1,7 +1,8 @@ +# vim: set sw=4 ts=4 sts=4 noet: from django import oldforms as forms +from django.contrib.auth.forms import UserCreationForm from django.http import HttpResponseRedirect from django.shortcuts import render_to_response -from django.contrib.auth.forms import UserCreationForm def register(request): """
--- a/bts_webui/amancay/search.py +++ b/bts_webui/amancay/search.py @@ -1,27 +1,15 @@ -import datetime -import math, time +# vim: set sw=4 ts=4 sts=4 noet: +import math +import time import threading -# Needed to get_template, prepare context and output Response -from django.template import Context, loader -from django.http import HttpResponse, HttpResponseRedirect - -# Shortcut for rendering a response -from django.shortcuts import get_object_or_404, render_to_response - -# Model clases -from django.contrib.auth.models import User -from bts_webui.amancay.models import Package +from django.contrib.sessions.models import Session from django.contrib.sites.models import Site - -# Needed for AJAX +from django.http import HttpResponse +from django.shortcuts import render_to_response from django.utils import simplejson -# Manage the sessions myself -from django.contrib.sessions.models import Session - -# Needed for SOAP -from bts_queries import SoapQueries +from amancay.bts_queries import SoapQueries queries = SoapQueries() # Bug views
--- a/bts_webui/amancay/tables.py +++ b/bts_webui/amancay/tables.py @@ -1,27 +1,12 @@ # vim: set sw=4 ts=4 sts=4 noet: -import datetime - -# Needed to get_template, prepare context and output Response +from django.http import HttpResponse +from django.shortcuts import render_to_response from django.template import RequestContext -from django.http import HttpResponse, HttpResponseRedirect - -# Shortcut for rendering a response -from django.shortcuts import render_to_response +from django.utils import simplejson -# Model clases -from django.contrib.auth.models import User -from bts_webui.amancay.models import Package - -# Needed for AJAX -from django.utils import simplejson - -# Needed for SOAP -from bts_queries import SoapQueries +from amancay.bts_queries import SoapQueries queries = SoapQueries() -# Toolboxes -from toolbox import get_toolbox - # Bug renderer. def render_bug_table(request, queries, title, bugs, amount, current_view): if bugs:
--- a/bts_webui/amancay/toolbox.py +++ b/bts_webui/amancay/toolbox.py @@ -1,19 +1,7 @@ # vim: set sw=4 ts=4 sts=4 noet: -import datetime - -# Needed to get_template, prepare context and output Response -from django.template import Context, loader -from django.http import HttpResponse, HttpResponseRedirect - -# Shortcut for rendering a response -from django.shortcuts import get_object_or_404, render_to_response - -# Model clases -from django.contrib.auth.models import User -from bts_webui.amancay.models import Package, Bug, SubmitterEmail, MaintainerEmail, UserEmail - -# Needed for AJAX -from django.utils import simplejson +from django.http import HttpResponse +from django.shortcuts import render_to_response +from django.utils import simplejson def render_toolbox(request): toolbox = get_toolbox(request)
--- a/bts_webui/amancay/views.py +++ b/bts_webui/amancay/views.py @@ -1,16 +1,10 @@ # vim: set sw=4 ts=4 sts=4 noet: -import datetime - -from django.http import HttpResponse, HttpResponseRedirect -from django.shortcuts import get_object_or_404, render_to_response +from django.http import HttpResponse +from django.shortcuts import render_to_response from django.template import RequestContext from django.utils import simplejson -from django.contrib.auth.models import User -from bts_webui.amancay.models import Package - -# Needed for SOAP -from bts_queries import SoapQueries +from amancay.bts_queries import SoapQueries def index(request): """