fix testing.

Note: it was also a good way to test HUP on master. worked like a charm.
This commit is contained in:
benoitc 2012-02-21 12:34:50 +01:00
parent 2d2260dd19
commit f67993eb87
2 changed files with 13 additions and 11 deletions

View File

@ -28,7 +28,10 @@ def home(request):
subject = form.cleaned_data['subject'] subject = form.cleaned_data['subject']
message = form.cleaned_data['message'] message = form.cleaned_data['message']
f = request.FILES['f'] f = request.FILES['f']
size = int(os.fstat(f.fileno())[6]) if not hasattr(f, "fileno"):
size = len(f.read())
else:
size = int(os.fstat(f.fileno())[6])
else: else:
form = MsgForm() form = MsgForm()

View File

@ -70,5 +70,4 @@ class Command(BaseCommand):
options['default_proc_name'] = settings.SETTINGS_MODULE options['default_proc_name'] = settings.SETTINGS_MODULE
admin_media_path = options.pop('admin_media_path', '') admin_media_path = options.pop('admin_media_path', '')
quit_command = (sys.platform == 'win32') and 'CTRL-BREAK' or 'CONTROL-C'
DjangoApplicationCommand(options, admin_media_path).run() DjangoApplicationCommand(options, admin_media_path).run()