Re: [web2py] Import CSV issue - can't import new CSV

2018-02-08 Thread tomasz bandura
It looks You try to split date with '-' but you'll should use '/'. The result of splitting your date is whole date string, which is not a proper int value. 09.02.2018 03:37 "Peter Yoon" napisał(a): > Hello, > > I imported a csv to my table but there were issues in the csv.

[web2py] Re: Intersection of rows

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 9:27:44 PM UTC-5, Anthony wrote: > > On Thursday, February 8, 2018 at 9:23:59 PM UTC-5, Anthony wrote: >> >> Looks like the book is wrong -- according to the code, rows1 & rows2 >> simply combines the records from each Rows object -- it does not find the >>

[web2py] $.web2py.componet not work

2018-02-08 Thread Luis Sucuc
I have this code in my view {{=T('Convert to order')}} In the google chrome console In firefox

[web2py] Re: Intersection of rows

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 9:23:59 PM UTC-5, Anthony wrote: > > Looks like the book is wrong -- according to the code, rows1 & rows2 > simply combines the records from each Rows object -- it does not find the > intersection. > Actually, the book was originally correct, and at some point

[web2py] Re: Intersection of rows

2018-02-08 Thread Anthony
Looks like the book is wrong -- according to the code, rows1 & rows2 simply combines the records from each Rows object -- it does not find the intersection. Anyway, given your code, it looks like we would not expect any results in the intersection of the two Rows objects, as the conditions of

[web2py] Re: Web2py and multiple controller

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 4:00:48 AM UTC-5, Alessio Varalta wrote: > > I have a new project and I have to choose if web2py is the right framework. > My doubt is about the structure of a web2py application. > You canno't have subfolder right? > So you can put the major of the code in the

Re: [web2py] Re: How to use auth mailer with commercial service?

2018-02-08 Thread Anthony
Good catch. I corrected my original response. Anthony On Thursday, February 8, 2018 at 3:21:08 PM UTC-5, Jordan Ladora wrote: > > This worked great for me. Just wanted to add a couple notes in case anyone > else is interested- > > I made ses_mailer a class with a call to send for compatibility

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 2:49:52 PM UTC-5, Jordan Ladora wrote: > > Trying to get this to work but not getting anywhere- > > *from gluon import languages # EDITED from '* > > *from gluon import *'abc = languages.lazyT("abc")* > The lazyT class takes a "T" argument, which should be in

Re: [web2py] Re: web2py custom form 'TypeError'

2018-02-08 Thread Anthony
> > Before you do that, can we see exactly what is the request.vars['id'] > object? Based on the exception you are getting, it seems it is a list, in > which case, there is a problem with your code, not with SQLFORM. > Note, in particular, if you have an "id" variable in the URL query string

[web2py] Re: web2py custom form 'TypeError'

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 1:11:22 PM UTC-5, Leonel Câmara wrote: > > This is a bug, please submit an issue in github. The problem is that your > request.vars.id is not and instance of (int, long, str, unicodeT) > > The bug is in this line: >

Re: [web2py] Re: web2py custom form 'TypeError'

2018-02-08 Thread Anthony
On Thursday, February 8, 2018 at 4:26:59 PM UTC-5, F.C. wrote: > > Thank you so much for your help! > > I will go and raise it > Before you do that, can we see exactly what is the request.vars['id'] object? Based on the exception you are getting, it seems it is a list, in which case, there is a

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Leonel Câmara
Using str or to_native should work that's what I did here with the same objective (except in this case I was making a mailer class for sparkpost): https://github.com/leonelcamara/web2py_sparkpost/blob/master/modules/plugin_sparkpost.py The problem is how that message is being created. For some

[web2py] Re: Add conditional sub-menu

2018-02-08 Thread 'jim kaubisch' via web2py-users
this is an old thread, but I needed to do add a conditional piece to a menu - but had trouble with all the options below. Then I realized that response.menu is a list, hence rather than if (auth.user_id != None) and ((auth.has_membership(role = 'admin'))): response.menu += [('Admin',

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Jordan Ladora
Hi, I'm actually not trying to use it directly- I'm trying to convert a lazyT object (which is passed as email message text to make a reset password link by gluon/tools.py line 3637 in latest release) to a string bc I have an outside library (boto3) that expects a parameter (text of an email

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Leonel Câmara
Why are you trying to use lazyT directly? If you want to do that you need to build the lazyT class with a translator object. Something like: abc = languages.lazyT("abc", languages.translator('path_to_language_files', 'en')) -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Convert languages.lazyT object to string

2018-02-08 Thread Leonel Câmara
quinta-feira, 8 de Fevereiro de 2018 às 19:49:52 UTC, Jordan Ladora escreveu: > > Trying to get this to work but not getting anywhere- > > *from gluon import languages # EDITED from '* > > > > > > *from gluon import *'abc = languages.lazyT("abc")str(abc)abc.read()*...etc. > keeps throwing- >

Re: [web2py] Re: web2py custom form 'TypeError'

2018-02-08 Thread Francois Barnard
Thank you so much for your help! I will go and raise it On Thu, Feb 8, 2018 at 12:11 PM, Leonel Câmara wrote: > This is a bug, please submit an issue in github. The problem is that your > request.vars.id is not and instance of (int, long, str, unicodeT) > > The bug is

[web2py] Re: code written by Massimo Di Pierro in the web2py video tutorial

2018-02-08 Thread Jim S
Which tutorials? Are you running into a particular problem? I'm thinking most of those tutorials are getting a little old but should still work. -Jim On Wednesday, February 7, 2018 at 1:52:28 PM UTC-6, Andrea Fae' wrote: > > Hello, it would be a great thing to have a document with the code

[web2py] SERVICE_PAUSED

2018-02-08 Thread Andrea Fae'
c:\data\nssm-2.24\win64>nssm.exe start web2py_scheduler_test web2py_scheduler_test: START: Operazione completata. c:\data\nssm-2.24\win64>nssm.exe status web2py_scheduler_test SERVICE_PAUSED c:\data\nssm-2.24\win64> Why? I'm following exactly the instructions given in the web2py guide... --

[web2py] Re: Yet Another Migration Problem

2018-02-08 Thread Leonel Câmara
You're probably using migrate_enabled=False in your config in production since you're copying the database file from the dev version. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Re: How to use auth mailer with commercial service?

2018-02-08 Thread Jordan Ladora
This worked great for me. Just wanted to add a couple notes in case anyone else is interested- I made ses_mailer a class with a call to send for compatibility with w2p's built-in mail capabilities. So, something like- class ses_mailer(object): def send(self, to='', ) And then in the

[web2py] Re: Help with cascading drop down list

2018-02-08 Thread Dave S
On Thursday, February 8, 2018 at 9:55:25 AM UTC-8, Matthew J Watts wrote: > > Hi community > > I'm having a few problems trying to understand how create a cascading drop > down list. I've followed this recipe - > > >

[web2py] Convert languages.lazyT object to string

2018-02-08 Thread Jordan Ladora
Trying to get this to work but not getting anywhere- *from gluon import *abc = languages.lazyT("abc")str(abc)abc.read()*...etc. keeps throwing- *AttributeError: 'NoneType' object has no attribute 'translate'* I have a library that expects a basestring object but w2p in that context

[web2py] Re: Yet Another Migration Problem

2018-02-08 Thread Dave S
On Thursday, February 8, 2018 at 6:48:12 AM UTC-8, Leonel Câmara wrote: > > This isn't a migration problem at all. You are creating the rows object > wrongly you need to change this line: > > rowed = Rows(db) > > to > > rowed = Rows(db, fields=rows.fields, colnames=rows.colnames); > > I can

[web2py] Re: web2py custom form 'TypeError'

2018-02-08 Thread Leonel Câmara
This is a bug, please submit an issue in github. The problem is that your request.vars.id is not and instance of (int, long, str, unicodeT) The bug is in this line: https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L1369 To workaround is to get the record yourself. form =

[web2py] Help with cascading drop down list

2018-02-08 Thread 'Matthew J Watts' via web2py-users
Hi community I'm having a few problems trying to understand how create a cascading drop down list. I've followed this tutorial - http://www.web2pyslices.com/slice/show/1526/cascading-drop-down-lists-with-ajax-2 i've managed to adapt it slightly, but i'm having trouble trying to add more

Re: [web2py] Re: Bug with auth.settings.table_user_name and auth.signature?

2018-02-08 Thread Marvi Benedet
Yes, It worked! thanks! 2018-02-07 17:14 GMT+01:00 Leonel Câmara : > This is sort of a bug, but one that is probably kept for backwards > compatibility reasons. > > You can make your example code work by doing this: > > auth = Auth(db,

[web2py] Re: Yet Another Migration Problem

2018-02-08 Thread Leonel Câmara
This isn't a migration problem at all. You are creating the rows object wrongly you need to change this line: rowed = Rows(db) to rowed = Rows(db, fields=rows.fields, colnames=rows.colnames); BTW this is some weird code for me, very hard to understand. I don't understand why you need rowed

[web2py] Re: Web2py and multiple controller

2018-02-08 Thread Leonel Câmara
I actually agree. Right now my "solution" is to put this in my controller file: def parent_controller(views_folder=None, pop_args_zero=True): if views_folder is None: views_folder = os.path.join(request.controller, request.function) def wrapper(action): def

[web2py] Web2py and multiple controller

2018-02-08 Thread Alessio Varalta
I have a new project and I have to choose if web2py is the right framework. My doubt is about the structure of a web2py application. You canno't have subfolder right? So you can put the major of the code in the module and this is ok, but a the controller level you have: Many and Many Controller

[web2py] cert-based logins

2018-02-08 Thread Dave S
I'm considering using cert-based logins for privileged users, and staying with basic login for less privileged users (the privilege itself is managed by using auth_groups). In the book, at the