diff options
author | Ask Solem <askh@opera.com> | 2009-04-21 11:45:05 +0200 |
---|---|---|
committer | Ask Solem <askh@opera.com> | 2009-04-21 11:45:05 +0200 |
commit | ed4f4a59a0cff99411a5a48dae90faf327e6da92 (patch) | |
tree | 65ff9ec55b8945ffaa4ba420725fb7ebda770bbb | |
parent | 2f86492b02aaf5d1ccc8abc02d5cc711819ed8ef (diff) | |
parent | 846251f44cee277f5f35e7374cf2755e0e57a4ca (diff) | |
download | chishop-ed4f4a59a0cff99411a5a48dae90faf327e6da92.tar.bz2 chishop-ed4f4a59a0cff99411a5a48dae90faf327e6da92.tar.xz chishop-ed4f4a59a0cff99411a5a48dae90faf327e6da92.zip |
Merge branch 'runeh/master'
-rw-r--r-- | chishop/settings.py | 8 | ||||
-rw-r--r-- | djangopypi/views.py | 6 |
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. |
2 | import os | 2 | import os |
3 | 3 | ||
4 | DEBUG=True | ||
5 | TEMPLATE_DEBUG=True | ||
6 | LOCAL_DEVELOPMENT=True | ||
7 | |||
8 | ADMINS = ( | 4 | ADMINS = ( |
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 | ||
19 | MANAGERS = ADMINS | 15 | MANAGERS = ADMINS |
20 | 16 | ||
21 | DATABASE_ENGINE = 'sqlite3' | 17 | DATABASE_ENGINE = '' |
22 | DATABASE_NAME = 'devdatabase.db' | 18 | DATABASE_NAME = '' |
23 | DATABASE_USER = '' | 19 | DATABASE_USER = '' |
24 | DATABASE_PASSWORD = '' | 20 | DATABASE_PASSWORD = '' |
25 | DATABASE_HOST = '' | 21 | DATABASE_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 | |||
46 | def parse_weird_post_data(raw_post_data): | 46 | def 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; ", "") |