added improved scripts/setup-web2py-nginx-uwsgi-ubuntu.sh, thanks Niphlod

This commit is contained in:
mdipierro
2012-12-20 09:22:24 -06:00
parent dcf0a7ccc9
commit 95b3ca839a
14 changed files with 60 additions and 53 deletions
+1
View File
@@ -0,0 +1 @@
+2 -2
View File
@@ -3487,7 +3487,7 @@ def _parse_date_rfc822(dt):
# If the year is 2 digits, assume everything in the 90's is the 1990's
if m['year'] < 100:
m['year'] += (1900, 2000)[m['year'] < 90]
stamp = datetime.datetime(*[m[i] for i in
stamp = datetime.datetime(*[m[i] for i in
('year', 'month', 'day', 'hour', 'minute', 'second')])
# Use the timezone information to calculate the difference between
@@ -3699,7 +3699,7 @@ def convert_to_utf8(http_headers, data):
u'application/xml-external-parsed-entity')
text_content_types = (u'text/xml', u'text/xml-external-parsed-entity')
if (http_content_type in application_content_types) or \
(http_content_type.startswith(u'application/') and
(http_content_type.startswith(u'application/') and
http_content_type.endswith(u'+xml')):
acceptable_content_type = 1
rfc3023_encoding = http_encoding or xml_encoding or u'utf-8'
+1 -1
View File
@@ -17,7 +17,7 @@ ADAPTERS['postgres'] = HerokuPostgresAdapter
def get_db(name = None, pool_size=10):
if not name:
names = [n for n in os.environ.keys()
names = [n for n in os.environ.keys()
if n[:18]+n[-4:]=='HEROKU_POSTGRESQL__URL']
if names:
name = names[0]
+5 -7
View File
@@ -70,7 +70,7 @@ class PaymenTech(object):
#################################################################
# Notes for web2py implementations #
#################################################################
#################################################################
# A recommended model for handling payments
@@ -87,7 +87,7 @@ class PaymenTech(object):
PAYMENTECH_TARGET = <str>
PAYMENTECH_HOST = <str>
PAYMENTECH_API_URL = <str>
# The following table would allow passing data with web2py and to
# update records with the webservice authorization output by using
# the DAL
@@ -102,10 +102,10 @@ class PaymenTech(object):
#
# # Send the authorization request to the webservice
# result = mypaymentech.charge(myrow.as_dict())
#
#
# # Update the db record with the webservice response
# myrow.update_record(**result)
db.define_table("paymentech",
Field("account"),
Field("exp", comment="Must be of the mmyyyy form"),
@@ -302,7 +302,7 @@ class PaymenTech(object):
tx_ref_num = order_id = None
conn = httplib.HTTPS(self.host)
conn.putrequest('POST', self.api_url)
if self.development:
content_type = "PTI56"
else:
@@ -340,5 +340,3 @@ class PaymenTech(object):
dom.getElementsByTagName('CustomerRefNum')[0].firstChild.data
return result