Re: PosOnlineStore example:, views/default/invioce.html wrongly named. (Fix)

62 views
Skip to first unread message

Derek

unread,
Jan 7, 2013, 11:51:18 AM1/7/13
to web...@googlegroups.com
After trying out most of those demo applications, it seems to me that those errors are put in place just to test your web2py programming knowledge.

On Monday, January 7, 2013 9:11:45 AM UTC-7, web...@uit.co.uk wrote:
In the PosOnlineStore example appliance, views/default/invioce.html should be called views/default/invoice.h
All that's required to fix this is to rename the file to the correct name.

This doesn't make much difference to the appearance of the application: instead of an invoice that looks like:

Invoice

Thank you for your order, this is your invoice code

5b6d0f64-7a1b-451c-9a82-92ae5d054f0c








you get

Invoice

5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
ajax:
False
application:
POS
args:
5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
body:
<cStringIO.StringO object at 0x17a2f80>
cid:
None
client:
127.0.0.1
controller:
default
cookies:
session_id_admin:
127.0.0.1-d5d47669-94d7-4fa7-b157-04606a7e5079
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_crm:
127.0.0.1-63598a79-d68c-4321-9de3-fc9da7841ff9
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_junk:
127.0.0.1-1be82b0e-05c5-4852-a2fe-3d17923468da
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_pos:
127.0.0.1-92db8e4c-34be-43a6-a1b1-e78b633b49e9
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_unaltered:
127.0.0.1-2045f204-6a6e-4190-8ade-cec54495661d
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_unlatered:
127.0.0.1-beacb73d-d1e8-4a0d-898a-96bad8858725
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_web2pynotes:
127.0.0.1-51f1a85a-5f66-49ff-b559-673d3d90f3c9
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
session_id_welcome:
127.0.0.1-b0b3b9b9-852e-48d6-bd67-49f9b38faa6d
comment:
domain:
expires:
httponly:
max-age:
path:
secure:
version:
env:
app_folders:
applications_parent:
cmd_args:
cmd_options:
<Values at 0x179f518: {'verbose': False, 'ip': '127.0.0.1', 'with_scheduler': False, 'ips': [], 'shutdown_timeout': 5, 'taskbar': False, 'port': 8000, 'maxthreads': None, 'softcron': False, 'server_name': 'pluto', 'bpython': False, 'nogui': False, 'pid_filename': 'httpserver.pid', 'extcron': False, 'runcron': False, 'run_system_tests': False, 'test': None, 'folder': '/u/r/w/web2py.com/www.web2py.com/examples/static/junk/web2py', 'config': '', 'minthreads': None, 'winservice': '', 'shell': None, 'run': '', 'log_filename': 'httpserver.log', 'debuglevel': 30, 'args': [''], 'socket_timeout': 5, 'ssl_ca_certificate': None, 'scheduler': None, 'profiler_filename': None, 'ssl_private_key': '', 'scheduler_groups': None, 'password': '<ask>', 'request_queue_size': 5, 'ssl_certificate': '', 'cronjob': False, 'numthreads': None, 'quiet': False, 'interfaces': None, 'import_models': False, 'timeout': 10, 'plain': False, 'nobanner': False}>
db_sessions:
set([])
debugging:
False
gluon_parent:
http_accept:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
http_accept_charset:
ISO-8859-1,utf-8;q=0.7,*;q=0.7
http_accept_encoding:
gzip,deflate
http_accept_language:
en-gb,en;q=0.5
http_cache_control:
no-cache
http_connection:
keep-alive
http_cookie:
session_id_welcome=127.0.0.1-b0b3b9b9-852e-48d6-bd67-49f9b38faa6d; session_id_admin=127.0.0.1-d5d47669-94d7-4fa7-b157-04606a7e5079; session_id_web2pynotes=127.0.0.1-51f1a85a-5f66-49ff-b559-673d3d90f3c9; session_id_crm=127.0.0.1-63598a79-d68c-4321-9de3-fc9da7841ff9; session_id_unlatered=127.0.0.1-beacb73d-d1e8-4a0d-898a-96bad8858725; session_id_unaltered=127.0.0.1-2045f204-6a6e-4190-8ade-cec54495661d; session_id_junk=127.0.0.1-1be82b0e-05c5-4852-a2fe-3d17923468da; session_id_pos=127.0.0.1-92db8e4c-34be-43a6-a1b1-e78b633b49e9
http_host:
http_keep_alive:
115
http_pragma:
no-cache
http_referer:
http_user_agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13
is_jython:
False
is_pypy:
False
local_hosts:
::ffff:127.0.0.1
::1
pluto
127.0.1.1
127.0.0.1
path_info:
/POS/default/invoice/5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
query_string:
remote_addr:
127.0.0.1
remote_port:
38824
request_method:
GET
request_uri:
/POS/default/invoice/5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
script_name:
server_name:
pluto
server_port:
8000
server_protocol:
HTTP/1.1
server_software:
Rocket 1.2.6
web2py_path:
web2py_version:
2
3
2
datetime.datetime(2012, 12, 17, 15, 3, 30)
stable
wsgi_errors:
<open file '<stderr>', mode 'w' at 0x7fbdd680a1e0>
wsgi_file_wrapper:
<class wsgiref.util.FileWrapper at 0x17242f0>
wsgi_input:
<socket._fileobject object at 0x3b58650>
wsgi_multiprocess:
False
wsgi_multithread:
True
wsgi_run_once:
False
wsgi_url_scheme:
http
wsgi_version:
1
0
extension:
html
folder:
function:
invoice
get_vars:
global_settings:
app_folders:
applications_parent:
cmd_args:
cmd_options:
<Values at 0x179f518: {'verbose': False, 'ip': '127.0.0.1', 'with_scheduler': False, 'ips': [], 'shutdown_timeout': 5, 'taskbar': False, 'port': 8000, 'maxthreads': None, 'softcron': False, 'server_name': 'pluto', 'bpython': False, 'nogui': False, 'pid_filename': 'httpserver.pid', 'extcron': False, 'runcron': False, 'run_system_tests': False, 'test': None, 'folder': '/u/r/w/web2py.com/www.web2py.com/examples/static/junk/web2py', 'config': '', 'minthreads': None, 'winservice': '', 'shell': None, 'run': '', 'log_filename': 'httpserver.log', 'debuglevel': 30, 'args': [''], 'socket_timeout': 5, 'ssl_ca_certificate': None, 'scheduler': None, 'profiler_filename': None, 'ssl_private_key': '', 'scheduler_groups': None, 'password': '<ask>', 'request_queue_size': 5, 'ssl_certificate': '', 'cronjob': False, 'numthreads': None, 'quiet': False, 'interfaces': None, 'import_models': False, 'timeout': 10, 'plain': False, 'nobanner': False}>
db_sessions:
set([])
debugging:
False
gluon_parent:
is_jython:
False
is_pypy:
False
local_hosts:
::ffff:127.0.0.1
::1
pluto
127.0.1.1
127.0.0.1
web2py_version:
2
3
2
datetime.datetime(2012, 12, 17, 15, 3, 30)
stable
is_https:
False
is_local:
True
is_restful:
False
now:
datetime.datetime(2013, 1, 7, 16, 8, 40, 547132)
post_vars:
raw_args:
5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
raw_extension:
None
url:
/POS/default/invoice/5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
utcnow:
datetime.datetime(2013, 1, 7, 16, 8, 40, 547154)
uuid:
POS/127.0.0.1.2013-01-07.16-08-40.0f82d072-0cb3-46db-aa20-e71be09c4b6f
vars:
wsgi:
environ:
HTTP_ACCEPT:
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_CHARSET:
ISO-8859-1,utf-8;q=0.7,*;q=0.7
HTTP_ACCEPT_ENCODING:
gzip,deflate
HTTP_ACCEPT_LANGUAGE:
en-gb,en;q=0.5
HTTP_CACHE_CONTROL:
no-cache
HTTP_CONNECTION:
keep-alive
HTTP_COOKIE:
session_id_welcome=127.0.0.1-b0b3b9b9-852e-48d6-bd67-49f9b38faa6d; session_id_admin=127.0.0.1-d5d47669-94d7-4fa7-b157-04606a7e5079; session_id_web2pynotes=127.0.0.1-51f1a85a-5f66-49ff-b559-673d3d90f3c9; session_id_crm=127.0.0.1-63598a79-d68c-4321-9de3-fc9da7841ff9; session_id_unlatered=127.0.0.1-beacb73d-d1e8-4a0d-898a-96bad8858725; session_id_unaltered=127.0.0.1-2045f204-6a6e-4190-8ade-cec54495661d; session_id_junk=127.0.0.1-1be82b0e-05c5-4852-a2fe-3d17923468da; session_id_pos=127.0.0.1-92db8e4c-34be-43a6-a1b1-e78b633b49e9
HTTP_HOST:
HTTP_KEEP_ALIVE:
115
HTTP_PRAGMA:
no-cache
HTTP_REFERER:
HTTP_USER_AGENT:
Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.04 (lucid) Firefox/3.6.13
PATH_INFO:
/POS/default/invoice/5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
QUERY_STRING:
REMOTE_ADDR:
127.0.0.1
REMOTE_PORT:
38824
REQUEST_METHOD:
GET
REQUEST_URI:
/POS/default/invoice/5b6d0f64-7a1b-451c-9a82-92ae5d054f0c
SCRIPT_NAME:
SERVER_NAME:
pluto
SERVER_PORT:
8000
SERVER_PROTOCOL:
HTTP/1.1
SERVER_SOFTWARE:
Rocket 1.2.6
wsgi.errors:
<open file '<stderr>', mode 'w' at 0x7fbdd680a1e0>
wsgi.file_wrapper:
<class wsgiref.util.FileWrapper at 0x17242f0>
wsgi.input:
<cStringIO.StringO object at 0x17a2f80>
wsgi.multiprocess:
False
wsgi.multithread:
True
wsgi.run_once:
False
wsgi.url_scheme:
http
wsgi.version:
1
Back to top
auth:
expiration:
3600
hmac_key:
fe4d3a38-9855-41ac-972a-d90389a6c5f2
last_visit:
datetime.datetime(2013, 1, 7, 16, 3, 43, 625662)
remember:
False
user:
email:
first_name:
administrator
id:
2
last_name:
administrator
registration_id:
registration_key:
reset_password_key:
user_groups:
2:
manager
cart:
flash:
None
last_orderby:
None
last_query:
Back to top
body:
<cStringIO.StringO object at 0x38c1fb8>
cookies:
session_id_pos:
127.0.0.1-92db8e4c-34be-43a6-a1b1-e78b633b49e9
comment:
domain:
expires:
httponly:
max-age:
path:
/
secure:
version:
delimiters:
{{
}}
files:
/POS/static/js/jquery.js
/POS/static/css/calendar.css
/POS/static/js/calendar.js
/POS/static/js/web2py.js
/POS/static/css/skeleton.css
/POS/static/css/web2py.css
/POS/static/css/superfish.css
/POS/static/js/superfish.js
flash:
generic_patterns:
*
headers:
X-Powered-By:
web2py
menu:
Home
False
/POS/default/index
Cart
False
/POS/default/cart
Buy
False
/POS/default/buy
My Orders
False
/POS/default/myorders
meta:
models_to_run:
^\w+\.py$
^default/\w+\.py$
^default/invoice/\w+\.py$
postprocessing:
session_cookie_expires:
None
session_data_name:
session_data_pos
session_file:
session_filename:
session_id:
127.0.0.1-92db8e4c-34be-43a6-a1b1-e78b633b49e9
session_id_name:
session_id_pos
session_locked:
True
session_new:
False
session_storage_type:
file
status:
200
view:
default/invoice.html
Back to top
sqlite://storage.sqlite:
defined:
auth_cas
auth_event
auth_group
auth_membership
auth_permission
auth_user
product
sale
lazy:
[no lazy tables]
Back to top
SELECT  auth_group.id, auth_group.role, auth_group.description FROM auth_group WHERE (auth_group.role = 'manager');
0.34ms
SELECT  auth_membership.id, auth_membership.user_id, auth_membership.group_id FROM auth_membership WHERE ((auth_membership.user_id = 2) AND (auth_membership.group_id = 1));
0.05ms
Back to top






but it is confusing if you try to use the app as a base to build on.

Massimo Di Pierro

unread,
Jan 9, 2013, 11:30:29 AM1/9/13
to web...@googlegroups.com
fixed. thanks.


On Monday, 7 January 2013 10:11:45 UTC-6, web...@uit.co.uk wrote:
In the PosOnlineStore example appliance, views/default/invioce.html should be called views/default/invoice.h
All that's required to fix this is to rename the file to the correct name.

This doesn't make much difference to the appearance of the application: instead of an invoice that looks like:

Invoice

Thank you for your order, this is your invoice code

5b6d0f64-7a1b-451c-9a82-92ae5d054f0c


you get

Invoice

5b6d0f64-7a1b-451c-9a82-92ae5d054f0c














































































Reply all
Reply to author
Forward
0 new messages