| import cgi, cgitb, os, sys |
| sys.path.append('lib/py') |
| sys.path.append('erpnext') |
| webnotes.form = cgi.FieldStorage(keep_blank_values=True) |
| for key in webnotes.form.keys(): |
| webnotes.form_dict[key] = webnotes.form.getvalue(key) |
| webnotes.http_request = webnotes.auth.HTTPRequest() |
| except webnotes.AuthenticationError, e: |
| except webnotes.UnknownDomainError, e: |
| print "Location: " + (webnotes.defs.redirect_404) |
| if 'cmd' in webnotes.form_dict: |
| webnotes.handler.handle() |
| import webnotes.cms.index |
| print "Content-Type: text/html" |
| webnotes.handler.print_cookies() |
| print webnotes.cms.index.get() |