[web2py] list:string type issues
Hi Guys, I am using a list:string to store a list of lists. Each seperate list has 4 values, qty (int), name (string), description (text) and price(double). Stores nicely and looks fine in the db table eg. [1, 'OS 7030', 'OS 7030', 755.0], [3, 'SMT 24 Btn', 'SMT IP Phone', 360.0], [1, 'SMT IP', 'SMT IP Phone Licence', 70.0], [1, '2830 SIP Router', '2830', 499.0], [1, 'ADSL Central Filter ', 'ADSL Central Filter ', 61.5] However if I try to iterate and get some totals it is getting confused. For example the same list above becomes... [[1, 'OS 7030', 'OS 7030', 755.0], [3, 'SMT 24 Btn', 'SMT IP Phone', 360.0], [1, 'SMT IP', 'SMT IP Phone Licence', 70.0], [1, '2830 SIP Router', '2830', 499.0], [1, 'ADSL Central Filter ', 'ADSL Central Filter ', 61.5]] Iterating list[0] returns [ [ [ [ [ list[1] returns 1 3 1 1 1 list[2] , , , , , list[3] returns a list of the spaces, list[4] the apostrophes ' ' ' ' ' list[5] O S S 2 A etc etc... What do I have to change so that it is being interpreted correctly? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: list:string type issues
Ahh Anthony what would we do without you... tyvm... (again) a few quick changes to code and works a charm... Cheers Greg On Monday, 6 October 2014 00:48:09 UTC+10, Anthony wrote: Can you show your code? If you want to store a Python structure, you're probably better off using a json field type, which will automatically serialize back and forth between Python and JSON (the list:string type is meant for storing a list of strings, not a list of Python lists). Anthony On Sunday, October 5, 2014 5:45:44 AM UTC-4, Greg Vaughan wrote: Hi Guys, I am using a list:string to store a list of lists. Each seperate list has 4 values, qty (int), name (string), description (text) and price(double). Stores nicely and looks fine in the db table eg. [1, 'OS 7030', 'OS 7030', 755.0], [3, 'SMT 24 Btn', 'SMT IP Phone', 360.0], [1, 'SMT IP', 'SMT IP Phone Licence', 70.0], [1, '2830 SIP Router', '2830', 499.0], [1, 'ADSL Central Filter ', 'ADSL Central Filter ', 61.5] However if I try to iterate and get some totals it is getting confused. For example the same list above becomes... [[1, 'OS 7030', 'OS 7030', 755.0], [3, 'SMT 24 Btn', 'SMT IP Phone', 360.0], [1, 'SMT IP', 'SMT IP Phone Licence', 70.0], [1, '2830 SIP Router', '2830', 499.0], [1, 'ADSL Central Filter ', 'ADSL Central Filter ', 61.5]] Iterating list[0] returns [ [ [ [ [ list[1] returns 1 3 1 1 1 list[2] , , , , , list[3] returns a list of the spaces, list[4] the apostrophes ' ' ' ' ' list[5] O S S 2 A etc etc... What do I have to change so that it is being interpreted correctly? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] insert and update SQLFORM.factory
I am trying to do a combined update and insert using SQLFORM.factory with some redirects for good measure. Everything works fine except the update which fails to alter the record in question. @auth.requires_login() def remote_check(): j_id=request.args[0] for row in db(db.job_requests.id==j_id).select(db.job_requests. business_name, db.job_requests.cta, db.job_requests.spoke_to, db. job_requests.job_result, db.job_requests.job_note): bus = row.business_name contact = row.spoke_to cta = row.cta jn = row.job_note jr = row.job_result for row in db(db.clients.id==row.business_name).select(db.clients.id , db.clients.phone): c_id=str(row.id) phone=row.phone address = get_client_address(c_id) db.job_requests.id.readable=False db.job_requests.business_name.default=c_id db.job_requests.business_name.writable=False db.job_requests.sr_number.writable=False db.job_requests.sr_number.readable=False db.job_requests.cta.default=cta db.job_requests.cta.writable=False db.job_requests.send_via.writable=False db.job_requests.send_via.readable=False db.job_requests.email_to.writable=False db.job_requests.email_to.readable=False db.job_requests.fax_to.writable=False db.job_requests.fax_to.readable=False db.job_requests.snd_other.writable=False db.job_requests.snd_other.readable=False db.job_requests.spoke_to.default=contact db.job_requests.spoke_to.writable=False db.job_requests.job_result.default=jr db.job_requests.job_note.default=jn db.job_requests.job_note.writable=False db.tech_notes.business_name.default=c_id db.tech_notes.business_name.writable=False form=SQLFORM.factory(db.job_requests,db.tech_notes,table_name= 'remote_check') if form.process().accepted: session.flash = 'Job Updated' db.tech_notes.insert(**db.tech_notes._filter_fields(form.vars)) redirect(URL('ops', 'tech_main_page')) if form.vars.job_result=='Completed': db.job_requests.update(**db.job_requests._filter_fields(form. vars)) redirect(URL('ops', 'tech_main_page')) else: redirect(URL('ops', 'maintenance_customer_service_request')) elif form.errors: response.flash = 'Form has errors' return dict(form=form,phone=phone,address=address,left_sidebar_enabled= True,right_sidebar_enabled=True) Any hints please? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: insert and update SQLFORM.factory
Thanks Anthony, Altered the code to fix those two issues and that took me back to the original problem that I had which is syntax not supported relevant section is now... ... form=SQLFORM.factory(db.job_requests,db.tech_notes,table_name='remote_check' ) if form.process().accepted: session.flash = 'Job Updated' db.tech_notes.insert(**db.tech_notes._filter_fields(form.vars)) db.job_requests.update(**db.job_requests._filter_fields(form.vars)) if form.vars.job_result=='Completed': redirect(URL('ops', 'tech_main_page')) else: redirect(URL('ops', 'maintenance_customer_service_request'))... and the error... File c:/Users/gsv/Desktop/web2py/applications/eco/controllers/ops.py http://127.0.0.1:8000/admin/default/edit/eco/controllers/ops.py, line 129, in remote_check db.job_requests.update(**db.job_requests._filter_fields(form.vars)) File c:\Users\gsv\Desktop\web2py\gluon\dal.py, line 8790, in update raise RuntimeError(Syntax Not Supported) RuntimeError: Syntax Not Supported Which is not a surprise... I tried to adapt posts from here and the examples in the book but I don't get SQLFORM well enough to see where I am screwing it up... Can you point me in the right direction please? Cheers Greg On Tuesday, 9 September 2014 23:30:46 UTC+10, Anthony wrote: You've got a redirect right before the update code, so it will never get to execute that code. Also, your two tables include a field with the same name (business_name), so putting them both in SQLFORM.factory won't work properly. Anthony On Tuesday, September 9, 2014 9:10:50 AM UTC-4, Greg Vaughan wrote: I am trying to do a combined update and insert using SQLFORM.factory with some redirects for good measure. Everything works fine except the update which fails to alter the record in question. @auth.requires_login() def remote_check(): j_id=request.args[0] for row in db(db.job_requests.id==j_id).select(db.job_requests. business_name, db.job_requests.cta, db.job_requests.spoke_to, db. job_requests.job_result, db.job_requests.job_note): bus = row.business_name contact = row.spoke_to cta = row.cta jn = row.job_note jr = row.job_result for row in db(db.clients.id==row.business_name).select(db.clients .id, db.clients.phone): c_id=str(row.id) phone=row.phone address = get_client_address(c_id) db.job_requests.id.readable=False db.job_requests.business_name.default=c_id db.job_requests.business_name.writable=False db.job_requests.sr_number.writable=False db.job_requests.sr_number.readable=False db.job_requests.cta.default=cta db.job_requests.cta.writable=False db.job_requests.send_via.writable=False db.job_requests.send_via.readable=False db.job_requests.email_to.writable=False db.job_requests.email_to.readable=False db.job_requests.fax_to.writable=False db.job_requests.fax_to.readable=False db.job_requests.snd_other.writable=False db.job_requests.snd_other.readable=False db.job_requests.spoke_to.default=contact db.job_requests.spoke_to.writable=False db.job_requests.job_result.default=jr db.job_requests.job_note.default=jn db.job_requests.job_note.writable=False db.tech_notes.business_name.default=c_id db.tech_notes.business_name.writable=False form=SQLFORM.factory(db.job_requests,db.tech_notes,table_name= 'remote_check') if form.process().accepted: session.flash = 'Job Updated' db.tech_notes.insert(**db.tech_notes._filter_fields(form.vars)) redirect(URL('ops', 'tech_main_page')) if form.vars.job_result=='Completed': db.job_requests.update(**db.job_requests._filter_fields(form. vars)) redirect(URL('ops', 'tech_main_page')) else: redirect(URL('ops', 'maintenance_customer_service_request')) elif form.errors: response.flash = 'Form has errors' return dict(form=form,phone=phone,address=address, left_sidebar_enabled=True,right_sidebar_enabled=True) Any hints please? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: insert and update SQLFORM.factory
Sigh I just realised that I am not specifying a record to update in that code... of course that won't work... On Tuesday, 9 September 2014 23:30:46 UTC+10, Anthony wrote: You've got a redirect right before the update code, so it will never get to execute that code. Also, your two tables include a field with the same name (business_name), so putting them both in SQLFORM.factory won't work properly. Anthony On Tuesday, September 9, 2014 9:10:50 AM UTC-4, Greg Vaughan wrote: I am trying to do a combined update and insert using SQLFORM.factory with some redirects for good measure. Everything works fine except the update which fails to alter the record in question. @auth.requires_login() def remote_check(): j_id=request.args[0] for row in db(db.job_requests.id==j_id).select(db.job_requests. business_name, db.job_requests.cta, db.job_requests.spoke_to, db. job_requests.job_result, db.job_requests.job_note): bus = row.business_name contact = row.spoke_to cta = row.cta jn = row.job_note jr = row.job_result for row in db(db.clients.id==row.business_name).select(db.clients .id, db.clients.phone): c_id=str(row.id) phone=row.phone address = get_client_address(c_id) db.job_requests.id.readable=False db.job_requests.business_name.default=c_id db.job_requests.business_name.writable=False db.job_requests.sr_number.writable=False db.job_requests.sr_number.readable=False db.job_requests.cta.default=cta db.job_requests.cta.writable=False db.job_requests.send_via.writable=False db.job_requests.send_via.readable=False db.job_requests.email_to.writable=False db.job_requests.email_to.readable=False db.job_requests.fax_to.writable=False db.job_requests.fax_to.readable=False db.job_requests.snd_other.writable=False db.job_requests.snd_other.readable=False db.job_requests.spoke_to.default=contact db.job_requests.spoke_to.writable=False db.job_requests.job_result.default=jr db.job_requests.job_note.default=jn db.job_requests.job_note.writable=False db.tech_notes.business_name.default=c_id db.tech_notes.business_name.writable=False form=SQLFORM.factory(db.job_requests,db.tech_notes,table_name= 'remote_check') if form.process().accepted: session.flash = 'Job Updated' db.tech_notes.insert(**db.tech_notes._filter_fields(form.vars)) redirect(URL('ops', 'tech_main_page')) if form.vars.job_result=='Completed': db.job_requests.update(**db.job_requests._filter_fields(form. vars)) redirect(URL('ops', 'tech_main_page')) else: redirect(URL('ops', 'maintenance_customer_service_request')) elif form.errors: response.flash = 'Form has errors' return dict(form=form,phone=phone,address=address, left_sidebar_enabled=True,right_sidebar_enabled=True) Any hints please? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted
Somehow the sales table in my site has been corrupted... it is now a 0kb file (was about 600KB). Every other table is fine however. How can I reconstruct the data in this table? I have a backed up csv which is a little out of date but would do. Thanks Greg -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted
Yeah... everything was fine one moment then it all just stopped... when I looked at the file it was 0kb. I have no idea what happened... cannot access database admin... site still runs except for the functions that access that table... On Saturday, 6 September 2014 02:22:31 UTC+10, Greg Vaughan wrote: Somehow the sales table in my site has been corrupted... it is now a 0kb file (was about 600KB). Every other table is fine however. How can I reconstruct the data in this table? I have a backed up csv which is a little out of date but would do. Thanks Greg -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted
I wasn't working on the site at the time... I was notified by some of the employees... yes it looks like the table has been dropped... I cannot for the life of me work out how that could have happened though. On Saturday, 6 September 2014 02:41:30 UTC+10, Leonel Câmara wrote: Err wait a minute the table has actually been dropped? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted
Tried fake_migrate... production site on pythonanywhere so disk space wasn't the issue... scratching my head with this... On Saturday, 6 September 2014 02:55:23 UTC+10, Marin Pranjić wrote: It can happen if you run out of disk space. You should check it. Btw, maybe just .table got corrupted... Make sure to backup everything, and then do a fake migrate. Marin On Fri, Sep 5, 2014 at 6:51 PM, Greg Vaughan greg.s@gmail.com javascript: wrote: I wasn't working on the site at the time... I was notified by some of the employees... yes it looks like the table has been dropped... I cannot for the life of me work out how that could have happened though. On Saturday, 6 September 2014 02:41:30 UTC+10, Leonel Câmara wrote: Err wait a minute the table has actually been dropped? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted
Version Enter code here... web2py™ Version 2.8.2-stable+timestamp.2013.11.28.13.54.07 Python Python 2.7.5+: /usr/local/bin/uwsgi (prefix: /usr) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last): File /home/gsv/enertek/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gsv/enertek/web2py/applications/welcome/models/marketing.py https://www.enerteksecure.com/admin/default/edit/welcome/models/marketing.py, line 198, in module auth.signature File /home/gsv/enertek/web2py/gluon/dal.py, line 8139, in define_table table = self.lazy_define_table(tablename,*fields,**args) File /home/gsv/enertek/web2py/gluon/dal.py, line 8176, in lazy_define_table polymodel=polymodel) File /home/gsv/enertek/web2py/gluon/dal.py, line 1079, in create_table raise RuntimeError('File %s appears corrupted' % table._dbt) RuntimeError: File /home/gsv/enertek/web2py/applications/welcome/databases/c8b669d15150d7109e5f7ab36744a5b7_sales_leads.table appears corrupted On Saturday, 6 September 2014 03:05:27 UTC+10, Greg Vaughan wrote: Tried fake_migrate... production site on pythonanywhere so disk space wasn't the issue... scratching my head with this... On Saturday, 6 September 2014 02:55:23 UTC+10, Marin Pranjić wrote: It can happen if you run out of disk space. You should check it. Btw, maybe just .table got corrupted... Make sure to backup everything, and then do a fake migrate. Marin On Fri, Sep 5, 2014 at 6:51 PM, Greg Vaughan greg.s@gmail.com wrote: I wasn't working on the site at the time... I was notified by some of the employees... yes it looks like the table has been dropped... I cannot for the life of me work out how that could have happened though. On Saturday, 6 September 2014 02:41:30 UTC+10, Leonel Câmara wrote: Err wait a minute the table has actually been dropped? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: type 'exceptions.RuntimeError' File.../databases/c8b....sales.table appears corrupted
Fixed Thankfully... 1) Renamed the table in the model 2) Uploaded the backup csv file to the renamed table... was about a week out of date 3) Manually deleted the corrupt file from the database 4) Created a new table with the old table name without fields and set migrate and fake_migrate to true 5) Deleted this model and renamed the model holding the backup files back to its original name... and (quite miraculously) everything appeared as it was immediately before the crash... Thanks for the help everyone... On Saturday, 6 September 2014 03:15:27 UTC+10, Greg Vaughan wrote: Version Enter code here... web2py™ Version 2.8.2-stable+timestamp.2013.11.28.13.54.07 Python Python 2.7.5+: /usr/local/bin/uwsgi (prefix: /usr) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last): File /home/gsv/enertek/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gsv/enertek/web2py/applications/welcome/models/marketing.py https://www.enerteksecure.com/admin/default/edit/welcome/models/marketing.py, line 198, in module auth.signature File /home/gsv/enertek/web2py/gluon/dal.py, line 8139, in define_table table = self.lazy_define_table(tablename,*fields,**args) File /home/gsv/enertek/web2py/gluon/dal.py, line 8176, in lazy_define_table polymodel=polymodel) File /home/gsv/enertek/web2py/gluon/dal.py, line 1079, in create_table raise RuntimeError('File %s appears corrupted' % table._dbt) RuntimeError: File /home/gsv/enertek/web2py/applications/welcome/databases/c8b669d15150d7109e5f7ab36744a5b7_sales_leads.table appears corrupted On Saturday, 6 September 2014 03:05:27 UTC+10, Greg Vaughan wrote: Tried fake_migrate... production site on pythonanywhere so disk space wasn't the issue... scratching my head with this... On Saturday, 6 September 2014 02:55:23 UTC+10, Marin Pranjić wrote: It can happen if you run out of disk space. You should check it. Btw, maybe just .table got corrupted... Make sure to backup everything, and then do a fake migrate. Marin On Fri, Sep 5, 2014 at 6:51 PM, Greg Vaughan greg.s@gmail.com wrote: I wasn't working on the site at the time... I was notified by some of the employees... yes it looks like the table has been dropped... I cannot for the life of me work out how that could have happened though. On Saturday, 6 September 2014 02:41:30 UTC+10, Leonel Câmara wrote: Err wait a minute the table has actually been dropped? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Web2py Mobile Interface
Hi Everyone, I decided that it would be advantageous if i were able to code on the go to fix any issues that I see occurring in my hosted webapps. So I installed web2py on my android tablet. The process was relatively painless and the standard welcome app works perfectly... however when I attempted to install my packed app there was no way that I could see to do this. I did see a git pull option however when atempting to use that it promply told me that I needed the gitpython module... (which I think is currently considered experimental?) before I go down that track is there any way to install a packed app, that I have missed? Thanks Greg -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Web2py Mobile Interface
Hi Massimo I get the requires gitpython module so I cannot complete a pull request. I was hoping to be able to install the app as I would on the PC but that option is not available... should it be? Thanks Greg On Friday, 22 August 2014 00:07:36 UTC+10, Massimo Di Pierro wrote: What error do you get when you try install an app? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] appadmin is disabled because insecure channel using default ipv6 local ::1 on windows with w2p 2.95
Heading says it all... no problems using localhost IPv4... Is this expected behaviour? Seems rather strange if so... -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Set which browser web2py opens in
Is there any way to set the default browser for web2py to open in. It's normal behaviour is to use the computer default... can this be changed? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Display table as dictionary
tyvm Massimo exactly what I was looking for... it works perfectly and now the rest of my code works :) On Monday, 5 May 2014 14:46:19 UTC+10, Massimo Di Pierro wrote: fields = db(db.address.business==4L).select().first().as_dict() On Sunday, 4 May 2014 16:59:34 UTC-5, Greg Vaughan wrote: The following code fields = db(db.address.business==4L).select().as_dict() returns a dictionary of dictionaries {1L: {'street_name': 'Another', 'postcode': '4888', 'id': 1L, 'unit': False, 'building_name': '', 'city': 'Deadsville', 'lot_section': None, 'sub_building': '', 'street_suffix': None, 'unit_type': None, 'cross_type': None, 'level_floor': False, 'is_corner': False, 'unit_number': '', 'lot': False, 'business': 4L, 'add_state': 'Qld', 'floor_number': '', 'street_type': 'STREET', 'cross_name': '', 'building' : False, 'street_number': 111L, 'cross_suffix': None, 'country': None, 'floor_type': None}} How do I return just the inner dictionary? {'street_name': 'Another', 'postcode': '4888', 'id': 1L, 'unit': False, 'building_name': '', 'city': 'Deadsville', 'lot_section': None, 'sub_building': '', 'street_suffix': None, 'unit_type': None, 'cross_type': None, 'level_floor': False, 'is_corner': False, 'unit_number': '', 'lot': False, 'business': 4L, 'add_state': 'Qld', 'floor_number': '', 'street_type': 'STREET', 'cross_name': '', 'building' : False, 'street_number': 111L, 'cross_suffix': None, 'country': None, 'floor_type': None} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Display table as dictionary
The following code fields = db(db.address.business==4L).select().as_dict() returns a dictionary of dictionaries {1L: {'street_name': 'Another', 'postcode': '4888', 'id': 1L, 'unit': False, 'building_name': '', 'city': 'Deadsville', 'lot_section': None, 'sub_building': '', 'street_suffix': None, 'unit_type': None, 'cross_type': None, 'level_floor': False, 'is_corner': False, 'unit_number': '', 'lot': False, 'business': 4L, 'add_state': 'Qld', 'floor_number': '', 'street_type' : 'STREET', 'cross_name': '', 'building': False, 'street_number': 111L, 'cross_suffix': None, 'country': None, 'floor_type': None}} How do I return just the inner dictionary? {'street_name': 'Another', 'postcode': '4888', 'id': 1L, 'unit': False, 'building_name': '', 'city': 'Deadsville', 'lot_section': None, 'sub_building': '', 'street_suffix': None, 'unit_type': None, 'cross_type': None, 'level_floor': False, 'is_corner': False, 'unit_number': '', 'lot': False, 'business': 4L, 'add_state': 'Qld', 'floor_number': '', 'street_type' : 'STREET', 'cross_name': '', 'building': False, 'street_number': 111L, 'cross_suffix': None, 'country': None, 'floor_type': None} -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py conference, next week!
Make the next one in Sydney (Australia) Massimo :) Just joking... all the best for it and looking forward to seeing the videos... On Saturday, 26 April 2014 13:08:01 UTC+10, Massimo Di Pierro wrote: Please register only if you plan to attend in person. We will record the talks and post them. On Friday, 25 April 2014 16:29:28 UTC-5, David Rager wrote: Is there an online option (if you don't tick the will attend in person)? On Thursday, April 24, 2014 9:20:56 AM UTC-6, Massimo Di Pierro wrote: There is one more to the first web2py conference http://www.experts4solutions.com/web2py_conference We got a bigger room and we can take 10-15 more people. register now! Massimo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] pass current page id to load function in sidebar
Hi everyone... I am using a LOAD function for a notes field in the sidebar of my app. I am able to load the notes for a specific business by hardcoding the id of the business in the controller like so... @auth.requires_login() def note(): current==1 notes=db(db.notes.business==current).select() return dict(notes=notes) What I would like to do is have the value of current set to the id var of the current page eg... welcome/default/leads?id=17 THIS No request.vars are available to the LOAD function however... How do I achieve this? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: SQLFORM.factory and jQueryUI effects
Ahhh I see... thanks once again On Tuesday, 22 April 2014 19:17:08 UTC+10, Niphlod wrote: SQLFORM.factory creates a form based on what fields you pass to it. If you pass tables, fields are extracted from the table definitions. However, it's still managed as if it was a single table containing all the fields from all the tables you pass, so there's only one table_name available. Of course, all field names MUST be different (i.e. unique within the form). On Tuesday, April 22, 2014 5:35:18 AM UTC+2, Greg Vaughan wrote: Hey Niphlod, Thanks for that answer... you are spot on in seeing the problem... my #appointments_blah id's did get changed to #no_table_blah hence the jQuery was targeting id's that no longer existed... To fix it I simply changed the hard coded script at this point to target #no_table_unit, #no_table_unit, #no_table_unit, #no_table_unit etc... which is very ugly :( I can use input names to hide the data fields as you suggested above which is preferred but how would I hide the labels? They do not have a name property... I could not work out how to use the form = SQLFORM.factory(Field() ., table_name='appointments') suggestion in this instance... I get it if I am using a normal instance of SQLFORM.factory... but in this case where i am referencing and updating two tables i cannot seem to get the syntax right... The relevant part form = SQLFORM.factory(db.appointments, db.notes) are you saying I wrap this section with the above and include all the fields? Eg... form = SQLFORM.factory(db.appointments, db.notes), Field('unit'), Field('unit_type'), Field('unit_number'), ..., table_name='appointments' ) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: pass current page id to load function in sidebar
Hi Niphlod... {{=response.vars}} shows nothing... nor does {{response.toolbar()}}... db stats shows notes.business = 1 when I hardcode it as above... I took a screenshot here http://screencast.com/t/mmRPGOHUAjt I assume that the filter will have to be sorted in the controller as the LOAD function would be serialised before the page is loaded? I could be completeley wrong of course. On Friday, 25 April 2014 01:00:04 UTC+10, Niphlod wrote: why are you saying that vars are unavailable for LOAD ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: pass current page id to load function in sidebar
Sorry I should have given you all the data... The db table is a simple one # HISTORY db.define_table('notes', Field('business', 'reference calls', writable=False ), Field('note', 'text', label='Add Note' ), auth.signature, format='%(business)s' ) The controller is as above... note.load is simply {{=response.toolbar()}} h4Notes:/h4 {{for note in notes:}} div class=note On {{=note.created_on}} {{=note.created_by.first_name}} says blockquote class=note_body{{=note.note}}/blockquote /div {{pass}} load is only called in a couple of views at the moment until I get this sorted out... for example in leads.html (the one in the screenshot) {{extend 'layout.html'}} {{=form}} {{pass}} {{block right_sidebar}} {{=LOAD('default','note.load',ajax=True)}} {{end}} On Friday, 25 April 2014 02:03:22 UTC+10, Niphlod wrote: how are you using LOAD to load the component ? On Thursday, April 24, 2014 5:23:21 PM UTC+2, Greg Vaughan wrote: Hi Niphlod... {{=response.vars}} shows nothing... nor does {{response.toolbar()}}... db stats shows notes.business = 1 when I hardcode it as above... I took a screenshot here http://screencast.com/t/mmRPGOHUAjt I assume that the filter will have to be sorted in the controller as the LOAD function would be serialised before the page is loaded? I could be completeley wrong of course. On Friday, 25 April 2014 01:00:04 UTC+10, Niphlod wrote: why are you saying that vars are unavailable for LOAD ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: pass current page id to load function in sidebar
Cheers Anthony Worked a treat... Thanks everyone for the help... On Friday, 25 April 2014 03:12:00 UTC+10, Anthony wrote: {{extend 'layout.html'}} {{=form}} {{pass}} {{block right_sidebar}} {{=LOAD('default','note.load',ajax=True)}} {{end}} Just do: {{=LOAD('default', 'note.load', vars=dict(id=request.vars.id), ajax=True )}} And in the note() function: def note(): notes = db(db.notes.business == request.vars.id).select() Also, avoid using current as a variable name, as there is a web2py global object called current. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: alternate date and time picker
Hi Annet... Thank you so much for the detailed reply... I have made it a point to check out the styling you have done... However the issue that I have is not just with the look but also with the way that the default one functions... particularly on tablets... it is clunky. So I have hacked together an implementation of Pickadate.jshttp://amsul.ca/pickadate.js/index.htm which is the sort of thing my clients expect in a modern browser application. Cheers Greg On Sunday, 20 April 2014 16:36:25 UTC+10, Annet wrote: Hi Greg, I use a customized version of jQuery UI (I only needed the datepicker and autocomplete)... ... Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] SQLFORM.widgets.radio.widget and jQuery Validation
Hi everyone, When I am using the SQLFORM.widgets.radio.widget my jquery selection code does not work. If I comment out the widget it works fine. Does anyone know if there is a workaround or is it just not possible to combine the two together. In the Model... db.define_table('leads', Field('contact_result', requires=IS_IN_SET(['Appointment', 'Gatekeeper', 'National/Head Office', 'Not Interested', 'Send Information', 'Call Back Later']), default='Appointment', widget=SQLFORM.widgets.radio.widget ), and in the View... (controller is essentially SQLFORM) {{extend 'layout.html'}} {{=form}} script jQuery(document).ready(function() { if(jQuery('#leads_contact_result option:selected').text()=='Send Information') { jQuery('#leads_info_email__row').show(); } else { jQuery('#leads_info_email__row').hide(); } jQuery('#leads_contact_result').change(function() { if(jQuery('#leads_contact_result option:selected').text()=='Send Information') { jQuery('#leads_info_email__row').show(); } else { jQuery('#leads_info_email__row').hide(); } }); if(jQuery('#leads_contact_result option:selected').text()=='Call Back Later') { jQuery('#leads_recontact__row').show(); } else { jQuery('#leads_recontact__row').hide(); } jQuery('#leads_contact_result').change(function() { if(jQuery('#leads_contact_result option:selected').text()=='Call Back Later') { jQuery('#leads_recontact__row').show(); } else { jQuery('#leads_recontact__row').hide(); } }); }) /script -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] SQLFORM.factory and jQueryUI effects
Hi everyone, I am using a bunch of jQuery hide effects based on the example code in the book... (Chapter 11... Conditional fields in forms) which work great with my SQLFORM. However when I change the controller to use SQLFORM.factory so that I can post to two tables (based on Chapter 7... One form for multiple tables) the effects stop working. Can someone suggest a workaround or a code change so that they will work together? The Controller... @auth.requires_login() def appointments(): call_id = request.get_vars.id db.appointments.business.default=call_id db.notes.business.default=call_id form = SQLFORM.factory(db.appointments, db.notes) if form.process().accepted: id = db.appointments.insert(**db.appointments._filter_fields(form.vars)) form.vars.appointments=id id = db.notes.insert(**db.notes._filter_fields(form.vars)) session.flash = 'Success' redirect(URL('calls')) elif form.errors: response.flash = 'Form has errors' else: response.flash = 'Enter Data' return dict(form=form) and the View... {{extend 'layout.html'}} {{=form}} script jQuery(document).ready(function(){ if(jQuery('#appointments_unit').prop('checked')) jQuery('#appointments_unit_type__row').show(), jQuery('#appointments_unit_number__row').show(); else jQuery('#appointments_unit_type__row').hide(), jQuery('#appointments_unit_number__row').hide(); jQuery('#appointments_unit').change(function(){ if(jQuery('#appointments_unit').prop('checked')) jQuery('#appointments_unit_type__row').show(), jQuery('#appointments_unit_number__row').show(); else jQuery('#appointments_unit_type__row').hide(), jQuery('#appointments_unit_number__row').hide(); }); if(jQuery('#appointments_level_floor').prop('checked')) jQuery('#appointments_level_type__row').show(), jQuery('#appointments_level_number__row').show(); else jQuery('#appointments_level_type__row').hide(), jQuery('#appointments_level_number__row').hide(); jQuery('#appointments_level_floor').change(function(){ if(jQuery('#appointments_level_floor').prop('checked')) jQuery('#appointments_level_type__row').show(), jQuery('#appointments_level_number__row').show(); else jQuery('#appointments_level_type__row').hide(), jQuery('#appointments_level_number__row').hide(); }); if(jQuery('#appointments_building').prop('checked')) jQuery('#appointments_building_number__row').show(), jQuery('#appointments_building_name__row').show(); else jQuery('#appointments_building_number__row').hide(), jQuery('#appointments_building_name__row').hide(); jQuery('#appointments_building').change(function(){ if(jQuery('#appointments_building').prop('checked')) jQuery('#appointments_building_number__row').show(), jQuery('#appointments_building_name__row').show(); else jQuery('#appointments_building_number__row').hide(), jQuery('#appointments_building_name__row').hide(); }); if(jQuery('#appointments_lot').prop('checked')) jQuery('#appointments_lot_section__row').show(); else jQuery('#appointments_lot_section__row').hide(); jQuery('#appointments_lot').change(function(){ if(jQuery('#appointments_lot').prop('checked')) jQuery('#appointments_lot_section__row').show(); else jQuery('#appointments_lot_section__row').hide(); }); if(jQuery('#appointments_cross_street').prop('checked')) jQuery('#appointments_street_number__row').hide(), jQuery('#appointments_cross_name__row').show(), jQuery('#appointments_cross_type__row').show(), jQuery('#appointments_cross_suffix__row').show(); else jQuery('#appointments_street_number__row').show(), jQuery('#appointments_cross_name__row').hide(), jQuery('#appointments_cross_type__row').hide(), jQuery('#appointments_cross_suffix__row').hide(); jQuery('#appointments_cross_street').change(function(){ if(jQuery('#appointments_cross_street').prop('checked')) jQuery('#appointments_street_number__row').hide(), jQuery('#appointments_cross_name__row').show(), jQuery('#appointments_cross_type__row').show(), jQuery('#appointments_cross_suffix__row').show(); else jQuery('#appointments_street_number__row').show(), jQuery('#appointments_cross_name__row').hide(), jQuery('#appointments_cross_type__row').hide(), jQuery('#appointments_cross_suffix__row').hide(); });
[web2py] Re: SQLFORM.factory and jQueryUI effects
Hey Niphlod, Thanks for that answer... you are spot on in seeing the problem... my #appointments_blah id's did get changed to #no_table_blah hence the jQuery was targeting id's that no longer existed... To fix it I simply changed the hard coded script at this point to target #no_table_unit, #no_table_unit, #no_table_unit, #no_table_unit etc... which is very ugly :( I can use input names to hide the data fields as you suggested above which is preferred but how would I hide the labels? They do not have a name property... I could not work out how to use the form = SQLFORM.factory(Field() ., table_name='appointments') suggestion in this instance... I get it if I am using a normal instance of SQLFORM.factory... but in this case where i am referencing and updating two tables i cannot seem to get the syntax right... The relevent part form = SQLFORM.factory(db.appointments, db.notes) are you sating I wrap this section with the above? Eg... form = SQLFORM.factory( Field('field name'), ('field name'), ., table_name='appointments') -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] alternate date and time picker
Is there any way that I can use a different date and time picker. The default one is horrible but it seems to be baked in to web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Paypal Recurring Payments? Any experience? Any alternatives?
Not Austria at the moment no... They are however in Beta in... - Belgium - Finland - France - Germany - Luxembourg - Netherlands - Spain which is easy to get an invite to... as far as the rest of Europe goes though the fractionated banking economy makes it a far more difficult proposition to get to the smaller economies. On Wednesday, 2 April 2014 15:28:35 UTC+10, mweissen wrote: Stripe looks good, but could not be used in Austria/Europe. Sorry! :-( Martin 2014-04-02 5:38 GMT+02:00 Greg Vaughan greg.s@gmail.com javascript: : Stripe charges me (in Australia) 2.7% + 30cents for each transaction processed, Visa, Mastercard or American Express. No other fees that are typically charged by other alternatives (Authorize.net) monthly fee, annual fee, chargeback fee etc... it is very much the simplest and most direct... payments are batch transferred to you account on a 7 day rolling cycle. Again this is as good as any other alternative. If you have a fixed amount to charge it can be implemented within 5 minutes using their js code for checkout. For a manual form you can use their custom implementation or Massimo's code above with his library... If you want a custom payment system you will have to write the code to pass that to the stripe server when you are charging for the service... Oh also... verifying your business takes about 2 minutes... and you definitely wont beat that. Stripe has nothing to do with PayPal you host it on your site... (must be https... get a certificate from start.com for free) so there is NO PayPal tax... On Wednesday, 2 April 2014 09:41:32 UTC+10, Matheus Cardoso wrote: So, if someone uses Stripe, he will pay only the fee from Stripe and this will cover the PayPal's tax? On Monday, March 31, 2014 6:57:14 AM UTC-3, Mika Sjöman wrote: Hi I wonder if anyone here has implemented recurring payments with Paypal here with Web2py? Any experience with this and how to implement it? We currently charge people for lessons with our teachers, but we would like to go over to a payment model where we automatically charge the customers every month. Is there a better way of doing this than Paypal? Market is mostly US and China based. Cheers -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: web2py logo - need immediate help
You're welcome... if you need any design stuff feel free to ask anytime... Front end design is the easy bit :) On Wednesday, 2 April 2014 23:52:55 UTC+10, Massimo Di Pierro wrote: Thank you Greg. This is really nice! I will pass it along to the organizing committee. On Wednesday, 2 April 2014 06:46:16 UTC-5, Greg Vaughan wrote: Hi Massimo Only just saw this... so bit quick and dirty... but just in case no one else gets something in for you can use as a fallback... I don't know what the base font is so roughed one up... png and svg attached Cheers On Wednesday, 2 April 2014 00:31:50 UTC+10, Massimo Di Pierro wrote: Any good designer on the list? I need a web2py logo similar to this one http://web2py.com/init/static/images/web2py_logo.png but done in vectorial format, white on black. No shadows. It should also say below Conference, 2014. It will be printed on mugs. Some creativity allowed but not too much. I need it in 24hrs or I will have to make it my self and I know it will look ugly. Massimo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Paypal Recurring Payments? Any experience? Any alternatives?
Stripe charges me (in Australia) 2.7% + 30cents for each transaction processed, Visa, Mastercard or American Express. No other fees that are typically charged by other alternatives (Authorize.net) monthly fee, annual fee, chargeback fee etc... it is very much the simplest and most direct... payments are batch transferred to you account on a 7 day rolling cycle. Again this is as good as any other alternative. If you have a fixed amount to charge it can be implemented within 5 minutes using their js code for checkout. For a manual form you can use their custom implementation or Massimo's code above with his library... If you want a custom payment system you will have to write the code to pass that to the stripe server when you are charging for the service... Oh also... verifying your business takes about 2 minutes... and you definitely wont beat that. Stripe has nothing to do with PayPal you host it on your site... (must be https... get a certificate from start.com for free) so there is NO PayPal tax... On Wednesday, 2 April 2014 09:41:32 UTC+10, Matheus Cardoso wrote: So, if someone uses Stripe, he will pay only the fee from Stripe and this will cover the PayPal's tax? On Monday, March 31, 2014 6:57:14 AM UTC-3, Mika Sjöman wrote: Hi I wonder if anyone here has implemented recurring payments with Paypal here with Web2py? Any experience with this and how to implement it? We currently charge people for lessons with our teachers, but we would like to go over to a payment model where we automatically charge the customers every month. Is there a better way of doing this than Paypal? Market is mostly US and China based. Cheers -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Paypal Recurring Payments? Any experience? Any alternatives?
Check out Stripe... https://stripe (dot) com/ Massimo has a library created here and there is some support in the docs... On Monday, 31 March 2014 19:57:14 UTC+10, Mika Sjöman wrote: Hi I wonder if anyone here has implemented recurring payments with Paypal here with Web2py? Any experience with this and how to implement it? We currently charge people for lessons with our teachers, but we would like to go over to a payment model where we automatically charge the customers every month. Is there a better way of doing this than Paypal? Market is mostly US and China based. Cheers -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Integrating Stripe with the gluon/contrib/stripe.py usage and template examples
So i am trying to implement a stripe payment page and using the examples in the current gluon/contrib/stripe.py I cut and pasted the Template into a page with the default controller to see how it went but it failed first up with a global name not defined error on pk=PUBLISHABLE_KEY_GOES_HERE. I then passed the test keys as strings to the controller and ended up with the following: def verify(): response.flash = T(Enter Your Credit Card Transaction) from gluon.contrib.stripe import StripeForm form = StripeForm( pk=pk_test_K44o7S1yuutpxBBLFOYZTsxl, sk=sk_test_MQAXb12hLq3PiJBgVmozMJbS, amount=150, # $1.5 (amount is in cents) description=Nothing).process() if form.accepted: payment_id = form.response['id'] redirect(URL('thank_you')) elif form.errors: redirect(URL('pay_error')) return dict(form=form) This handled the error above but the code then failed with a different error type 'exceptions.NameError'(name 'pk' is not defined) Tracing this down... the traceback shows that the error is occuring when web2py is attempting to construct the html page... Traceback (most recent call last): File /home/gsv/enertek/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gsv/enertek/web2py/applications/welcome/views/default/verify.html, line 84, in module this is after the last line of code {{if security_notice or disclosure_notice:}} NameError: name 'pk' is not defined and is happening here... 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. response.write('\ndiv class=span3 left-sidebar\n', escape=False) response.write('\nh3Left Sidebar/h3\np/p\n ', escape=False) response.write('\n/div\n', escape=False) pass response.write('\n\ndiv class=', escape=False) response.write(middle_columns) response.write('\n', escape=False) response.write('\n', escape=False) response.write('\nscript type=text/javascript src=https://js.stripe.com/v2/;/script\nscript\njQuery(function(){\n// This identifies your website in the createToken call below\n Stripe.setPublishableKey(\'', escape=False) response.write(pk) response.write('\');\n\nvar stripeResponseHandler = function(status, response) {\n var jQueryform = jQuery(\'#payment-form\');\n\n if (response.error) {\n// Show the errors on the form\n jQuery(\'.payment-errors\').text(response.error.message).show();\n jQueryform.find(\'button\').prop(\'disabled\', false);\n } else {\n // token contains id, last4, and card type\nvar token = response.id;\n // Insert the token into the form so it gets submitted to the server\n var tokenInput = jQuery(\'input type=hidden name=stripeToken /\');\n jQueryform.append(tokenInput.val(token));\n// and re-submit\n jQueryform.get(0).submit();\n }\n};\n\njQuery(function(jQuery) {\n jQuery(\'#payment-form\').submit(function(e) {\n\nvar jQueryform = jQuery(this);\n\n// Disable the submit button to prevent repeated clicks\njQueryform.find(\'button\').prop(\'disabled\', true);\n\nStripe.createToken(jQueryform, stripeResponseHandler);\n\n // Prevent the form from submitting with the default action\nreturn false;\n });\n});\n});\n/script\n\nh3Payment Amount: ', escape=False) response.write(currency_symbol) response.write(' ', escape=False) response.write(%.2f % (0.01*amount)) response.write('/h3\nform action= method=POST id=payment-form class=form-horizontal\n\n div class=form-row control-group\nlabel class=control-labelCard Number/label\ndiv class=controls\n input type=text size=20 data-stripe=number\n\t placeholder=4242424242424242/\n/div\n /div\n\n div class=form-row control-group\nlabel class=control-labelCVC/label\n div class=controls\n input type=text size=4 style=width:80px data-stripe=cvc\n\t placeholder=XXX/\n a href=http://en.wikipedia.org/wiki/Card_Verification_Code; target=_blankWhat is this?/a\n/div\n /div\n\n div class=form-row control-group\n label class=control-labelExpiration/label\t\ndiv class=controls\n input type=text size=2 style=width:40px data-stripe=exp-month\n\t placeholder=MM/\n /\n input type=text size=4 style=width:80px data-stripe=exp-year\n\t placeholder=/\n/div\n /div\n\n\n div class=control-group\n div class=controls\n button type=submit class=btn btn-primarySubmit Payment/button\n div class=payment-errors error hidden/div\n/div\n /div\n input type=hidden name=signature value=', escape=False) response.write(signature) response.write(' /\n/form\n\n', escape=False) if security_notice or disclosure_notice: response.write('\ndiv
[web2py] Stripe example from book out of date
Just to inform that the example here does not work with Stripe V3 (current) The script reports that the payments are accepted (provided you supply valid currency and date arguments) however they are not received at the stripe end. (they do not show in the stripe console log file.) Was hoping to use a version of this and will have a look at the Library and measure it against the current python bindings on Github but for the moment it should probably be removed from the book. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Question on linking fields
Hi Jim That was exactly what I needed thanks so much. Works perfectly. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Question on linking fields
Hi everyone... Linked tables like... db.define_table('calls', Field('business', 'string'), ... and db.define_table('leads', Field('business', 'reference calls'), ... with controller containing def calls(): form = SQLFORM(db.calls) if form.process().accepted: redirect(URL('leads')) and form {{extend 'layout.html'}} {{=form}} create a drop down linking list for the Business field... How can I make this default to the record that has just been created in 'calls' instead? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Masking User Input
Hi everyone, Building a series of telemarketing and sales forms for a friends company to use. Looking to utilise an input mask such as the one mentioned in this post. https://groups.google.com/forum/#!searchin/web2py/form$20input$20mask$20jquery/web2py/zRt9whk6y68/3jqiiRII9QYJ and wanted to check if there were any potential issues. Particularly in relation to Niphlod's comment in that post. Is there any important reason that the jquery plugin mentioned could not be used? I am not looking for it to validate data (I use a regex to do that) but it is far preferable to guide the user to input correct data in the first place and a format mask is an aesthetically pleasing way to do this. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Important New Year News: Edison Award
Congratulations... and a big thank you also... I have just found web2py and absolutely amazed at how brilliant it is On Saturday, 4 January 2014 14:08:38 UTC+10, Massimo Di Pierro wrote: Web2py/me have been nominated for the Edison Award. Please wish web2py (and me) good luck. :-) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.