aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <askh@opera.com>2009-04-21 11:45:05 +0200
committerAsk Solem <askh@opera.com>2009-04-21 11:45:05 +0200
commited4f4a59a0cff99411a5a48dae90faf327e6da92 (patch)
tree65ff9ec55b8945ffaa4ba420725fb7ebda770bbb
parent2f86492b02aaf5d1ccc8abc02d5cc711819ed8ef (diff)
parent846251f44cee277f5f35e7374cf2755e0e57a4ca (diff)
downloadchishop-ed4f4a59a0cff99411a5a48dae90faf327e6da92.tar.bz2
chishop-ed4f4a59a0cff99411a5a48dae90faf327e6da92.tar.xz
chishop-ed4f4a59a0cff99411a5a48dae90faf327e6da92.zip
Merge branch 'runeh/master'
-rw-r--r--chishop/settings.py8
-rw-r--r--djangopypi/views.py6
2 files changed, 4 insertions, 10 deletions
diff --git a/chishop/settings.py b/chishop/settings.py
index 9d769f2..2bc2f20 100644
--- a/chishop/settings.py
+++ b/chishop/settings.py
@@ -1,10 +1,6 @@
1# Django settings for djangopypi project. 1# Django settings for djangopypi project.
2import os 2import os
3 3
4DEBUG=True
5TEMPLATE_DEBUG=True
6LOCAL_DEVELOPMENT=True
7
8ADMINS = ( 4ADMINS = (
9 # ('Your Name', 'your_email@domain.com'), 5 # ('Your Name', 'your_email@domain.com'),
10) 6)
@@ -18,8 +14,8 @@ DJANGOPYPI_ALLOW_VERSION_OVERWRITE = False
18 14
19MANAGERS = ADMINS 15MANAGERS = ADMINS
20 16
21DATABASE_ENGINE = 'sqlite3' 17DATABASE_ENGINE = ''
22DATABASE_NAME = 'devdatabase.db' 18DATABASE_NAME = ''
23DATABASE_USER = '' 19DATABASE_USER = ''
24DATABASE_PASSWORD = '' 20DATABASE_PASSWORD = ''
25DATABASE_HOST = '' 21DATABASE_HOST = ''
diff --git a/djangopypi/views.py b/djangopypi/views.py
index 29494a7..5ed27d4 100644
--- a/djangopypi/views.py
+++ b/djangopypi/views.py
@@ -46,7 +46,7 @@ from djangopypi.http import HttpResponseUnauthorized
46def parse_weird_post_data(raw_post_data): 46def parse_weird_post_data(raw_post_data):
47 """ For some reason Django can't parse the HTTP POST data 47 """ For some reason Django can't parse the HTTP POST data
48 sent by ``distutils`` register/upload commands. 48 sent by ``distutils`` register/upload commands.
49 49
50 This parser should be able to so, and returns a 50 This parser should be able to so, and returns a
51 :class:`django.utils.datastructures.MultiValueDict` 51 :class:`django.utils.datastructures.MultiValueDict`
52 as you would expect from a regular ``request.POST`` object. 52 as you would expect from a regular ``request.POST`` object.
@@ -57,9 +57,7 @@ def parse_weird_post_data(raw_post_data):
57 items = raw_post_data.split(sep) 57 items = raw_post_data.split(sep)
58 post_data = {} 58 post_data = {}
59 files = {} 59 files = {}
60 for part in items: 60 for part in [e for e in items if not e.isspace()]:
61 if not part.strip():
62 continue
63 item = part.splitlines() 61 item = part.splitlines()
64 if len(item) < 2: continue 62 if len(item) < 2: continue
65 header = item[1].replace("Content-Disposition: form-data; ", "") 63 header = item[1].replace("Content-Disposition: form-data; ", "")