[web2py] Insert fontawesome icon into form submission button

2021-12-11 Thread Jon Subscripted
Hi all,
I'm trying to insert a fontawesome icon into a form submission button.



The form is being created in the controller using FORM.

  form=FORM(INPUT(_name='bookmark',_id="bookmark",_type='hidden'),
  INPUT(_type='submit',_class='btn btn',_value=T('Bookmark')))

I've tried a couple of things so far (listed bellow), but none of them
worked:


   1. form=FORM(INPUT(_name='bookmark',_id="bookmark",_type='hidden'),
  INPUT(_type='submit',_class='btn btn',_value=''+T('Bookmark')))
   2. form=FORM(INPUT(_name='bookmark',_id="bookmark",_type='hidden'),
 INPUT(_type='submit',_class='btn btn',_value=XML('')+T('Bookmark')))

Any suggestions on how could I do this?
Thanks, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32s7SLEbu-uKTBxQe5eL1tdCPYQt5jRvVi2KtcYZ6D_XQ%40mail.gmail.com.


[web2py] Logger creating recursion error

2021-09-26 Thread Jon Subscripted
Hi everyone,
I suddenly started experiencing an application crash, with no code change
whatsoever.

I started to get a ` maximum recursion
depth exceeded in cmp` error.

```Traceback (most recent call last):
  File "/home/jonsubscriptions/web2py/gluon/restricted.py", line 219, in
restricted
exec(ccode, environment)
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/controllers/default.py",
line 3077, in 
  File "/home/jonsubscriptions/web2py/gluon/globals.py", line 421, in

self._caller = lambda f: f()
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/controllers/default.py",
line 21, in index
datalayer = get_datalayer('general','index')
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/models/datalayer.py",
line 44, in get_datalayer
datalayer_dict = get_datalayer_dict(pagetype,pagecategory)
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/models/datalayer.py",
line 15, in get_datalayer_dict
'lang':get_lang(),
  File
"/home/jonsubscriptions/web2py/applications/xakematedev2_back/controllers/default.py",
line 477, in get_lang
logger.debug("Exception %s"%e)
  File "/usr/lib/python2.7/logging/__init__.py", line 1140, in debug
self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python2.7/logging/__init__.py", line 1271, in _log```

As I saw tha logging module was involved I commented out all logger calls
and got back up and running.

Any idea on what might be causing the error?

Any idea how can I fix this to get my logging back? Any suggestions?
Thanks, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33J2v35rJDzc_HFuJmS2Jgg0qO2kGZwGjEnGS7kuZ%2BBuA%40mail.gmail.com.


Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Sorry Clemens,
I hadn't checked your link correctly, it states it clearly with pseudo code
how the flags work.
Thanks, Jon.

if DAL.migrate_enabled and table.migrate:
   if DAL.fake_migrate_all or table.fake_migrate:
   perform fake migration
   else:
   perform migration


<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Dec 8, 2020 at 9:48 AM Jon Subscripted 
wrote:

> Hi Clemens,
> Just some quick questions.
>
> 1) What happens with auth tables and python -S  -M -P?  it does
> not seem to create the .table files
> 2) Regarding migration and fake migration. I tried to summarize my
> understanding in the table below (use a fixed width font to see it
> properly). How does web2py behave on the cases marked with '?' in the table
> below?
> 3) I also assume from what I read in the book that define_table migration
> flags override those from db.py DAL constructor call. Is this correct?
>
> Thanks, Jon.
> FAKE_MIGRATE
>  TRUE  FALSE
> +---+-+
> |   | changes |
>   TRUE  | ? | in DB & |
> |   | .table files|
> MIGRATE +-+
>   FALSE |NO changes | |
> |in DB, just| ?   |
> |in .table  | |
> +---+-+
>
> On Tue, Dec 8, 2020 at 9:22 AM Clemens 
> wrote:
>
>> Hello Jon,
>>
>> yes, this should do it. It's also fine to import an export of an existing
>> DB. But you can just start your application, this should create the .table
>> files at the first, I think.
>>
>> Regards
>> Clemens
>>
>> P.S.: Concerning migrate and fake_migrate options have a look there:
>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#table_migrations
>> I usually just use migrate=True, if I'm working on the models on my
>> development system. On production I use migrate=False and lazy_tables=True.
>>
>> On Tuesday, December 8, 2020 at 8:38:50 AM UTC+1 Jonsubs wrote:
>>
>>> Thanks Clemens and Jim S.
>>>
>>> So I guess that I should use the "python web2py.py -M -S "
>>> command option to create the new table files, right?
>>>
>>> On Mon, Dec 7, 2020 at 8:54 PM Clemens 
>>> wrote:
>>>
>>>> Please try *not* to use the .table files. You can just rename database
>>>> folder to database.orig and create a new database folder in your
>>>> application directory. This is necessary since on the "new machine" there
>>>> are new databases created, I guess. Have a try. If it's solve the problem
>>>> you can easily recover the old database directory with the original .table
>>>> files.
>>>>
>>>> Regards
>>>> Clemens
>>>>
>>>> On Monday, December 7, 2020 at 2:04:15 PM UTC+1 Jonsubs wrote:
>>>>
>>>>> Hi all,
>>>>> I want to change the main repo copy from which I work but when I do it
>>>>> I'm not longer capable of modifying the database. BTW the old and new repo
>>>>> are not in the same machine.
>>>>>
>>>>> *My "sql.log" and every ".table" file are uploaded to the repo.
>>>>> *The old repo has migrations enabled (both in db.py and table
>>>>> definitions).
>>>>> *The new repo has migrations disabled and fake migrations enabled
>>>>> (both in db.py and table definitions).
>>>>>
>>>>> I want to be able to change the DB from the new repo (in the new
>>>>> machine). How can I change my database changing repo? Which are the steps
>>>>> to follow?
>>>>> Thanks, Jon.
>>>>>
>>>> --
>>>> 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 we

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Thanks Jim.

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Dec 8, 2020 at 4:50 PM Jim S  wrote:

> I believe it will then perform the migration, but instead of running the
> migrations on the database, it will just update the files in /databases.
>
> -Jim
>
> On Tuesday, December 8, 2020 at 2:07:12 AM UTC-6 Jonsubs wrote:
>
>> Hi Jim,
>> Just one question, what happens when you set migrate=True and
>> fake_migrate=True at the same time?
>> Thanks, Jon.
>>
>> On Mon, Dec 7, 2020 at 8:47 PM Jim S  wrote:
>>
>>> Can you try setting migrate=True, fake_migrate=True and
>>> fake_migrate_all=True in the new repo?
>>>
>>> either that, or copy the databases directory over from old repo to the
>>> new repo.
>>>
>>> -Jim
>>>
>>> On Monday, December 7, 2020 at 9:10:06 AM UTC-6 Jonsubs wrote:
>>>
>>>> Oh, I forgot to comment (and I believe it may be relevant) that I'm
>>>> using a MySQL database.
>>>>
>>>> And when I try to add a new column to a previously defined table
>>>> (defined and created originally in another repo) I do get the error below:
>>>>
>>>> InternalError: (1054, u"Unknown column 'tag.in_between' in 'field list'")
>>>>
>>>> I'd really appreciate some guidance on this, as I'm going literally
>>>> nuts with all the migration, frake migration, sql.log and tables 
>>>> business...
>>>> Thanks, Jon.
>>>>
>>>> On Mon, Dec 7, 2020 at 2:03 PM Jon Subscripted 
>>>> wrote:
>>>>
>>>>> Hi all,
>>>>> I want to change the main repo copy from which I work but when I do it
>>>>> I'm not longer capable of modifying the database. BTW the old and new repo
>>>>> are not in the same machine.
>>>>>
>>>>> *My "sql.log" and every ".table" file are uploaded to the repo.
>>>>> *The old repo has migrations enabled (both in db.py and table
>>>>> definitions).
>>>>> *The new repo has migrations disabled and fake migrations enabled
>>>>> (both in db.py and table definitions).
>>>>>
>>>>> I want to be able to change the DB from the new repo (in the new
>>>>> machine). How can I change my database changing repo? Which are the steps
>>>>> to follow?
>>>>> Thanks, Jon.
>>>>>
>>>> --
>>>
>> 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.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/26ef26f8-164f-4827-a8ae-22944aeedd12n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/web2py/26ef26f8-164f-4827-a8ae-22944aeedd12n%40googlegroups.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/07cde59e-207c-4567-bc85-a09efc6f618bn%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/07cde59e-207c-4567-bc85-a09efc6f618bn%40googlegroups.com?utm_medium=email_source=footer>
> .
>

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33nYU6VtwCD18ExLBUqZvxVDHA5sHtoB%3DTtjZ%3DYBQ8X9g%40mail.gmail.com.


Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Hi Clemens,
Just some quick questions.

1) What happens with auth tables and python -S  -M -P?  it does
not seem to create the .table files
2) Regarding migration and fake migration. I tried to summarize my
understanding in the table below (use a fixed width font to see it
properly). How does web2py behave on the cases marked with '?' in the table
below?
3) I also assume from what I read in the book that define_table migration
flags override those from db.py DAL constructor call. Is this correct?

Thanks, Jon.
FAKE_MIGRATE
 TRUE  FALSE
+---+-+
|   | changes |
  TRUE  | ? | in DB & |
|   | .table files|
MIGRATE +-+
  FALSE |NO changes | |
|in DB, just| ?   |
|in .table  | |
+---+-+

On Tue, Dec 8, 2020 at 9:22 AM Clemens 
wrote:

> Hello Jon,
>
> yes, this should do it. It's also fine to import an export of an existing
> DB. But you can just start your application, this should create the .table
> files at the first, I think.
>
> Regards
> Clemens
>
> P.S.: Concerning migrate and fake_migrate options have a look there:
> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#table_migrations
> I usually just use migrate=True, if I'm working on the models on my
> development system. On production I use migrate=False and lazy_tables=True.
>
> On Tuesday, December 8, 2020 at 8:38:50 AM UTC+1 Jonsubs wrote:
>
>> Thanks Clemens and Jim S.
>>
>> So I guess that I should use the "python web2py.py -M -S "
>> command option to create the new table files, right?
>>
>> On Mon, Dec 7, 2020 at 8:54 PM Clemens 
>> wrote:
>>
>>> Please try *not* to use the .table files. You can just rename database
>>> folder to database.orig and create a new database folder in your
>>> application directory. This is necessary since on the "new machine" there
>>> are new databases created, I guess. Have a try. If it's solve the problem
>>> you can easily recover the old database directory with the original .table
>>> files.
>>>
>>> Regards
>>> Clemens
>>>
>>> On Monday, December 7, 2020 at 2:04:15 PM UTC+1 Jonsubs wrote:
>>>
 Hi all,
 I want to change the main repo copy from which I work but when I do it
 I'm not longer capable of modifying the database. BTW the old and new repo
 are not in the same machine.

 *My "sql.log" and every ".table" file are uploaded to the repo.
 *The old repo has migrations enabled (both in db.py and table
 definitions).
 *The new repo has migrations disabled and fake migrations enabled (both
 in db.py and table definitions).

 I want to be able to change the DB from the new repo (in the new
 machine). How can I change my database changing repo? Which are the steps
 to follow?
 Thanks, Jon.

>>> --
>>> 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.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/43dc5ec9-2a60-4460-8911-ba00f8d699c5n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/cafa5ecb-a8a5-4492-afbc-9316d5d29addn%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 

Re: [web2py] Re: Changing main repo and database model modifications

2020-12-08 Thread Jon Subscripted
Hi Jim,
Just one question, what happens when you set migrate=True and
fake_migrate=True at the same time?
Thanks, Jon.

On Mon, Dec 7, 2020 at 8:47 PM Jim S  wrote:

> Can you try setting migrate=True, fake_migrate=True and
> fake_migrate_all=True in the new repo?
>
> either that, or copy the databases directory over from old repo to the new
> repo.
>
> -Jim
>
> On Monday, December 7, 2020 at 9:10:06 AM UTC-6 Jonsubs wrote:
>
>> Oh, I forgot to comment (and I believe it may be relevant) that I'm using
>> a MySQL database.
>>
>> And when I try to add a new column to a previously defined table (defined
>> and created originally in another repo) I do get the error below:
>>
>> InternalError: (1054, u"Unknown column 'tag.in_between' in 'field list'")
>>
>> I'd really appreciate some guidance on this, as I'm going literally nuts
>> with all the migration, frake migration, sql.log and tables business...
>> Thanks, Jon.
>>
>> On Mon, Dec 7, 2020 at 2:03 PM Jon Subscripted 
>> wrote:
>>
>>> Hi all,
>>> I want to change the main repo copy from which I work but when I do it
>>> I'm not longer capable of modifying the database. BTW the old and new repo
>>> are not in the same machine.
>>>
>>> *My "sql.log" and every ".table" file are uploaded to the repo.
>>> *The old repo has migrations enabled (both in db.py and table
>>> definitions).
>>> *The new repo has migrations disabled and fake migrations enabled (both
>>> in db.py and table definitions).
>>>
>>> I want to be able to change the DB from the new repo (in the new
>>> machine). How can I change my database changing repo? Which are the steps
>>> to follow?
>>> Thanks, Jon.
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/26ef26f8-164f-4827-a8ae-22944aeedd12n%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/26ef26f8-164f-4827-a8ae-22944aeedd12n%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31S%2Bnf4L_EDcn_6yKZy_13YtCntuH85aUzaF2QVFDWMmw%40mail.gmail.com.


Re: [web2py] Re: Changing main repo and database model modifications

2020-12-07 Thread Jon Subscripted
Thanks Clemens and Jim S.

So I guess that I should use the "python web2py.py -M -S " command
option to create the new table files, right?

On Mon, Dec 7, 2020 at 8:54 PM Clemens 
wrote:

> Please try *not* to use the .table files. You can just rename database
> folder to database.orig and create a new database folder in your
> application directory. This is necessary since on the "new machine" there
> are new databases created, I guess. Have a try. If it's solve the problem
> you can easily recover the old database directory with the original .table
> files.
>
> Regards
> Clemens
>
> On Monday, December 7, 2020 at 2:04:15 PM UTC+1 Jonsubs wrote:
>
>> Hi all,
>> I want to change the main repo copy from which I work but when I do it
>> I'm not longer capable of modifying the database. BTW the old and new repo
>> are not in the same machine.
>>
>> *My "sql.log" and every ".table" file are uploaded to the repo.
>> *The old repo has migrations enabled (both in db.py and table
>> definitions).
>> *The new repo has migrations disabled and fake migrations enabled (both
>> in db.py and table definitions).
>>
>> I want to be able to change the DB from the new repo (in the new
>> machine). How can I change my database changing repo? Which are the steps
>> to follow?
>> Thanks, Jon.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/43dc5ec9-2a60-4460-8911-ba00f8d699c5n%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33PH4GF5M5ubkF3CLpUJqJu1%2BPv%2BwCcXiaaMZLTyrZ74w%40mail.gmail.com.


[web2py] Re: Changing main repo and database model modifications

2020-12-07 Thread Jon Subscripted
Oh, I forgot to comment (and I believe it may be relevant) that I'm using a
MySQL database.

And when I try to add a new column to a previously defined table (defined
and created originally in another repo) I do get the error below:

InternalError: (1054, u"Unknown column 'tag.in_between' in 'field list'")

I'd really appreciate some guidance on this, as I'm going literally nuts
with all the migration, frake migration, sql.log and tables business...
Thanks, Jon.

On Mon, Dec 7, 2020 at 2:03 PM Jon Subscripted 
wrote:

> Hi all,
> I want to change the main repo copy from which I work but when I do it I'm
> not longer capable of modifying the database. BTW the old and new repo are
> not in the same machine.
>
> *My "sql.log" and every ".table" file are uploaded to the repo.
> *The old repo has migrations enabled (both in db.py and table definitions).
> *The new repo has migrations disabled and fake migrations enabled (both in
> db.py and table definitions).
>
> I want to be able to change the DB from the new repo (in the new machine).
> How can I change my database changing repo? Which are the steps to follow?
> Thanks, Jon.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33P2bDpX5Ch1DYXtkPEUdLXg2JTk%3DiVnijJGuFgqxUBfg%40mail.gmail.com.


[web2py] Changing main repo and database model modifications

2020-12-07 Thread Jon Subscripted
Hi all,
I want to change the main repo copy from which I work but when I do it I'm
not longer capable of modifying the database. BTW the old and new repo are
not in the same machine.

*My "sql.log" and every ".table" file are uploaded to the repo.
*The old repo has migrations enabled (both in db.py and table definitions).
*The new repo has migrations disabled and fake migrations enabled (both in
db.py and table definitions).

I want to be able to change the DB from the new repo (in the new machine).
How can I change my database changing repo? Which are the steps to follow?
Thanks, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32AhGP7SrcHdV1TCBwGTM6_JMJLFbVx5rB_gUy%3D2m_FMQ%40mail.gmail.com.


Re: [web2py] Re: Dashboard library for Web2py performance/recommendation python vs. js

2020-11-19 Thread Jon Subscripted
Thanks Alex!

El El mié, 18 nov 2020 a las 14:38, Alex Beskopilny 
escribió:

> dasjboards for web2py https://github.com/ali96343/facew2p
> dashboards  for py4web https://github.com/ali96343/facep4w
> charts Highcharts.js
> On Tuesday, November 17, 2020 at 11:47:04 AM UTC+3 Jonsubs wrote:
>
>> Hi everyone,
>> I need to implement a dashboard and some charts in my webapp. And
>> honestly I'm a little bit lost and overwhelmed.
>>
>> From a Web2py perspective which is the best approach?
>> a) a python based solution (e.g. plotly)
>> b) a JS based solution
>>
>> My app is hosted in Pythonanywhere.
>>
>> Is there any recommended dashboard and chart library for web2py?
>> Thanks, Jon.
>>
>>
>> 
>>  Libre
>> de virus. www.avast.com
>> 
>> <#m_-8178090592855306788_m_-2958339010838646051_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/b33a4e69-68f9-4607-aa3f-99f1f661fb34n%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32YxX6QvYag4XkY9MS4wx-KpbtihkRZ1CF6r7dnW%2BvA3Q%40mail.gmail.com.


Re: [web2py] Dashboard library for Web2py performance/recommendation python vs. js

2020-11-17 Thread Jon Subscripted
Thanks for your advice Christian :-)

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Nov 17, 2020 at 3:28 PM Christian Varas 
wrote:

> I would recommend to use a client side chart (JavaScript) because is less
> load to the server. The one that I use often is ChartJS is easy to
> configure and really nice looking.
> For a dashboard I use this 2 templates:
> Paper dashboard and AdminLTE.
>
> Cheers.
> Chris.
>
> El El mar, 17 de nov. de 2020 a la(s) 05:47, Jon Subscripted <
> jonsubscripti...@gmail.com> escribió:
>
>> Hi everyone,
>> I need to implement a dashboard and some charts in my webapp. And
>> honestly I'm a little bit lost and overwhelmed.
>>
>> From a Web2py perspective which is the best approach?
>> a) a python based solution (e.g. plotly)
>> b) a JS based solution
>>
>> My app is hosted in Pythonanywhere.
>>
>> Is there any recommended dashboard and chart library for web2py?
>> Thanks, Jon.
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Libre
>> de virus. www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>
>> <#m_-4300588763121386083_m_2342288305175885681_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/CAK8tz30J5HwWqY8au9YzxTNd%3Dz9E3N%3D1xkdiM9ei1-XBDRsMJQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/web2py/CAK8tz30J5HwWqY8au9YzxTNd%3Dz9E3N%3D1xkdiM9ei1-XBDRsMJQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/CA%2Bs%2BuJtKHC4smZzfA0u0mMdq95Xvw48sWD60%2BfYwpY03MzdyDw%40mail.gmail.com
> <https://groups.google.com/d/msgid/web2py/CA%2Bs%2BuJtKHC4smZzfA0u0mMdq95Xvw48sWD60%2BfYwpY03MzdyDw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30iUe%2BksX_Ov3oHcwVQ8RYrqfew3KctHtNehvCWTYi0LA%40mail.gmail.com.


[web2py] Dashboard library for Web2py performance/recommendation python vs. js

2020-11-17 Thread Jon Subscripted
Hi everyone,
I need to implement a dashboard and some charts in my webapp. And honestly
I'm a little bit lost and overwhelmed.

>From a Web2py perspective which is the best approach?
a) a python based solution (e.g. plotly)
b) a JS based solution

My app is hosted in Pythonanywhere.

Is there any recommended dashboard and chart library for web2py?
Thanks, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30J5HwWqY8au9YzxTNd%3Dz9E3N%3D1xkdiM9ei1-XBDRsMJQ%40mail.gmail.com.


[web2py] FLASH_MSG=ImportError

2020-11-08 Thread Jon Subscripted
Hi everyone,
I have a view that fails to load and redirects me directly to index.html.

In the browser navigation bar I get:

http://127.0.0.1:8000/?FLASH_MSG=ImportError

I didn't find much information on this type of "ImportError".
What does it mean?
Thanks, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32UPSEiecydypmGxhDCevxXMFYm8YZ%2BhiCSEbxEp3gwHw%40mail.gmail.com.


Re: [web2py] Re: How to debug "lost password"

2020-08-24 Thread Jon Subscripted
Hi Jim,
Actually I thought I did not need to "send" the mail myself. I thought the
framework took care of it.

But I think I'll try to send the email in some part of the application to
test if everything is ok. Thanks for the suggestion Jim. I'll try it and
get back to you.
Thanks, Jon.

On Sat, Aug 22, 2020 at 4:51 PM Jim S  wrote:

> Everything there is looking just right.  The only thing you haven't shared
> is the mail send line in your web2py app.
>
> I haven't used appconfig.ini so can't answer that question.  Have you
> tried both ways or tried coding the values directly into your python script?
>
> -Jim
>
> On Saturday, August 22, 2020 at 3:59:09 AM UTC-5, Jonsubs wrote:
>>
>> Hi Jim,
>> My configuration for appconfig.ini is the following:
>>
>> ; smtp address and credentials
>> [smtp]
>> server = mail.xakemate.eus:25
>> sender = ad...@xakemate.eus
>> login  = ad...@xakemate.eus:***
>> tls= false
>> ssl= false
>>
>> When I try the following script (from my laptop) it does work.
>>
>> import smtplib
>> import email.utils
>> from email.mime.text import MIMEText
>>
>> def send(receiver):
>> # Create the message
>> msg = MIMEText('This is the body of the message.')
>> msg['To'] = email.utils.formataddr(('Recipient', receiver))
>> msg['From'] = email.utils.formataddr(('Author', 'ad...@xakemate.eus
>> '))
>> msg['Subject'] = 'Simple test message'
>>
>>
>> server = smtplib.SMTP('mail.xakemate.eus',25)
>> server.ehlo() # Can be omitted
>> server.login('ad...@xakemate.eus', '')
>> server.set_debuglevel(True) # show communication with the server
>> try:
>> server.sendmail('ad...@xakemate.eus',
>> [receiver],
>> msg.as_string())
>> finally:
>> server.quit()
>>
>>
>>
>> if __name__=="__main__":
>> send('ad...@xakemate.eus')
>>
>> Byt the way, should values in "appconfig.ini" be quoted? Meaning, should
>> I use 'mail.xakemate.eus:25' or mail.xakemate.eus:25 (with no quotes)?
>> Thanks, Jon.
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Libre
>> de virus. www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>> <#m_-2349229599040815489_CAK8tz32YoN=TKo_X+aYz7yKoyo9fHCWry8A3dWaG21dx54TK-A@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> On Fri, Aug 21, 2020 at 2:53 PM Jim S  wrote:
>>
>>> Hey Jon, I should have been more specific.  What I was looking for was
>>> the actual server and port you're accessing for the mail server.  Looks
>>> like it is stored in your config.  Is that mail server accessible from you
>>> workstation?  Can you telnet to it using the settings in the config file?
>>>
>>> -Jim
>>>
>>> On Friday, August 21, 2020 at 4:51:55 AM UTC-5, Jonsubs wrote:
>>>>
>>>> Hi everyone,
>>>> Whe I run my web2py app locally (in my desktop in 127.0.0.1:8000) I
>>>> get the following message:
>>>>
>>>> '08/21/2020 11:48:56 AM' - web2py - WARNING - Mail.send failure:please
>>>> run connect() first
>>>>
>>>> What does it mean?
>>>> Thanks, Jon.
>>>>
>>>> On Fri, Aug 21, 2020 at 11:45 AM Jon Subscripted 
>>>> wrote:
>>>>
>>>>> Hi Jim,
>>>>> It looks like this (see below):
>>>>>
>>>>> #
>>>>> -
>>>>> # configure email
>>>>> #
>>>>> -
>>>>> mail = auth.settings.mailer
>>>>> mail.settings.server = configuration.get('smtp.server') #'logging' if
>>>>> request.is_local else configuration.get('smtp.server')
>>>>> mail.settings.sender = configuration.get('smtp.sender')
>>>>> mail.settings.login = configuration.get('smtp.login')
>>>>> mail.settings.tls = configuration.get('smtp.tls') or False
>>>>> mail.settings.ssl = configuration.get('smtp.ssl') or False
>>>>>
>>>>> Thanks, Jon.
>>>>>
>>>>> On Fri, Aug 21, 2020 at 1:56 AM Jim S  wrote:
>>>>>
>>>>>> What does yo

Re: [web2py] Re: How to debug "lost password"

2020-08-22 Thread Jon Subscripted
Hi Jim,
My configuration for appconfig.ini is the following:

; smtp address and credentials
[smtp]
server = mail.xakemate.eus:25
sender = ad...@xakemate.eus
login  = ad...@xakemate.eus:***
tls= false
ssl= false

When I try the following script (from my laptop) it does work.

import smtplib
import email.utils
from email.mime.text import MIMEText

def send(receiver):
# Create the message
msg = MIMEText('This is the body of the message.')
msg['To'] = email.utils.formataddr(('Recipient', receiver))
msg['From'] = email.utils.formataddr(('Author', 'ad...@xakemate.eus'))
msg['Subject'] = 'Simple test message'


server = smtplib.SMTP('mail.xakemate.eus',25)
server.ehlo() # Can be omitted
server.login('ad...@xakemate.eus', '')
server.set_debuglevel(True) # show communication with the server
try:
server.sendmail('ad...@xakemate.eus',
[receiver],
msg.as_string())
finally:
server.quit()



if __name__=="__main__":
send('ad...@xakemate.eus')

Byt the way, should values in "appconfig.ini" be quoted? Meaning, should I
use 'mail.xakemate.eus:25' or mail.xakemate.eus:25 (with no quotes)?
Thanks, Jon.

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, Aug 21, 2020 at 2:53 PM Jim S  wrote:

> Hey Jon, I should have been more specific.  What I was looking for was the
> actual server and port you're accessing for the mail server.  Looks like it
> is stored in your config.  Is that mail server accessible from you
> workstation?  Can you telnet to it using the settings in the config file?
>
> -Jim
>
> On Friday, August 21, 2020 at 4:51:55 AM UTC-5, Jonsubs wrote:
>>
>> Hi everyone,
>> Whe I run my web2py app locally (in my desktop in 127.0.0.1:8000) I get
>> the following message:
>>
>> '08/21/2020 11:48:56 AM' - web2py - WARNING - Mail.send failure:please
>> run connect() first
>>
>> What does it mean?
>> Thanks, Jon.
>>
>> On Fri, Aug 21, 2020 at 11:45 AM Jon Subscripted 
>> wrote:
>>
>>> Hi Jim,
>>> It looks like this (see below):
>>>
>>> #
>>> -
>>> # configure email
>>> #
>>> -
>>> mail = auth.settings.mailer
>>> mail.settings.server = configuration.get('smtp.server') #'logging' if
>>> request.is_local else configuration.get('smtp.server')
>>> mail.settings.sender = configuration.get('smtp.sender')
>>> mail.settings.login = configuration.get('smtp.login')
>>> mail.settings.tls = configuration.get('smtp.tls') or False
>>> mail.settings.ssl = configuration.get('smtp.ssl') or False
>>>
>>> Thanks, Jon.
>>>
>>> On Fri, Aug 21, 2020 at 1:56 AM Jim S  wrote:
>>>
>>>> What does your mail setup in db.py look like?
>>>>
>>>> -Jim
>>>>
>>>>
>>>> On Thursday, August 20, 2020 at 9:47:11 AM UTC-5, Jonsubs wrote:
>>>>>
>>>>> Any suggestions on how to debug "password lost" email not being sent.
>>>>> Thanks, Jon.
>>>>>
>>>>> On Wed, Aug 19, 2020 at 7:49 PM Jon Subscripted 
>>>>> wrote:
>>>>>
>>>>>> Hi everyone,
>>>>>> I'm having some trouble sending "lost password" emails to my users.
>>>>>> Whenever I test it I get an "Unable to send email" message.
>>>>>>
>>>>>> But I do not really know the reason. I tried with a standalone python
>>>>>> script with the same configuration and it works.
>>>>>>
>>>>>> I'd like to know how to debug this problem or where to look at.
>>>>>>
>>>>>> In which log are email related errors written?
>>>>>> Regards, Jon.
>>>>>>
>>>>>> --
>>>> 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.
>>

Re: [web2py] Re: How to debug "lost password"

2020-08-21 Thread Jon Subscripted
Hi everyone,
Whe I run my web2py app locally (in my desktop in 127.0.0.1:8000) I get the
following message:

'08/21/2020 11:48:56 AM' - web2py - WARNING - Mail.send failure:please run
connect() first

What does it mean?
Thanks, Jon.

On Fri, Aug 21, 2020 at 11:45 AM Jon Subscripted 
wrote:

> Hi Jim,
> It looks like this (see below):
>
> # -
> # configure email
> # -
> mail = auth.settings.mailer
> mail.settings.server = configuration.get('smtp.server') #'logging' if
> request.is_local else configuration.get('smtp.server')
> mail.settings.sender = configuration.get('smtp.sender')
> mail.settings.login = configuration.get('smtp.login')
> mail.settings.tls = configuration.get('smtp.tls') or False
> mail.settings.ssl = configuration.get('smtp.ssl') or False
>
> Thanks, Jon.
>
> On Fri, Aug 21, 2020 at 1:56 AM Jim S  wrote:
>
>> What does your mail setup in db.py look like?
>>
>> -Jim
>>
>>
>> On Thursday, August 20, 2020 at 9:47:11 AM UTC-5, Jonsubs wrote:
>>>
>>> Any suggestions on how to debug "password lost" email not being sent.
>>> Thanks, Jon.
>>>
>>> On Wed, Aug 19, 2020 at 7:49 PM Jon Subscripted 
>>> wrote:
>>>
>>>> Hi everyone,
>>>> I'm having some trouble sending "lost password" emails to my users.
>>>> Whenever I test it I get an "Unable to send email" message.
>>>>
>>>> But I do not really know the reason. I tried with a standalone python
>>>> script with the same configuration and it works.
>>>>
>>>> I'd like to know how to debug this problem or where to look at.
>>>>
>>>> In which log are email related errors written?
>>>> Regards, Jon.
>>>>
>>>> --
>> 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.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/web2py/a61e3de4-f288-4968-9001-d21741f881f2o%40googlegroups.com
>> <https://groups.google.com/d/msgid/web2py/a61e3de4-f288-4968-9001-d21741f881f2o%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33D07eqgkDbQjfTbPnxCLWmYFvakP2gVGevx79-_vWPmQ%40mail.gmail.com.


Re: [web2py] Re: How to debug "lost password"

2020-08-21 Thread Jon Subscripted
Hi Jim,
It looks like this (see below):

# -
# configure email
# -
mail = auth.settings.mailer
mail.settings.server = configuration.get('smtp.server') #'logging' if
request.is_local else configuration.get('smtp.server')
mail.settings.sender = configuration.get('smtp.sender')
mail.settings.login = configuration.get('smtp.login')
mail.settings.tls = configuration.get('smtp.tls') or False
mail.settings.ssl = configuration.get('smtp.ssl') or False

Thanks, Jon.

On Fri, Aug 21, 2020 at 1:56 AM Jim S  wrote:

> What does your mail setup in db.py look like?
>
> -Jim
>
>
> On Thursday, August 20, 2020 at 9:47:11 AM UTC-5, Jonsubs wrote:
>>
>> Any suggestions on how to debug "password lost" email not being sent.
>> Thanks, Jon.
>>
>> On Wed, Aug 19, 2020 at 7:49 PM Jon Subscripted 
>> wrote:
>>
>>> Hi everyone,
>>> I'm having some trouble sending "lost password" emails to my users.
>>> Whenever I test it I get an "Unable to send email" message.
>>>
>>> But I do not really know the reason. I tried with a standalone python
>>> script with the same configuration and it works.
>>>
>>> I'd like to know how to debug this problem or where to look at.
>>>
>>> In which log are email related errors written?
>>> Regards, Jon.
>>>
>>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/a61e3de4-f288-4968-9001-d21741f881f2o%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/a61e3de4-f288-4968-9001-d21741f881f2o%40googlegroups.com?utm_medium=email_source=footer>
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz314DOQmcCxDimzWZT3XiReasMsq2es%3Dy%2BwtHyjfbvzrYQ%40mail.gmail.com.


[web2py] Re: How to debug "lost password"

2020-08-20 Thread Jon Subscripted
Any suggestions on how to debug "password lost" email not being sent.
Thanks, Jon.

On Wed, Aug 19, 2020 at 7:49 PM Jon Subscripted 
wrote:

> Hi everyone,
> I'm having some trouble sending "lost password" emails to my users.
> Whenever I test it I get an "Unable to send email" message.
>
> But I do not really know the reason. I tried with a standalone python
> script with the same configuration and it works.
>
> I'd like to know how to debug this problem or where to look at.
>
> In which log are email related errors written?
> Regards, Jon.
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33yJBs1ZX7BDH-h9sduDODSyK93yOfcC5SiKoE6J%2BmGWw%40mail.gmail.com.


[web2py] How to debug "lost password"

2020-08-19 Thread Jon Subscripted
Hi everyone,
I'm having some trouble sending "lost password" emails to my users.
Whenever I test it I get an "Unable to send email" message.

But I do not really know the reason. I tried with a standalone python
script with the same configuration and it works.

I'd like to know how to debug this problem or where to look at.

In which log are email related errors written?
Regards, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30UFKkg4h%2BLLiM3CuiFhekcfO%3D0teUt2V_8JQ_nA8bt1w%40mail.gmail.com.


Re: [web2py] Re: How to debug appadmin CSV uploading

2020-06-13 Thread Jon Subscripted
Thanks Dave!

El El sáb, 16 may 2020 a las 23:18, Dave S  escribió:

>
>
> On Friday, May 8, 2020 at 12:41:16 PM UTC-7, Jonsubs wrote:
>>
>> Thanks!
>>
>> El El sáb, 2 may 2020 a las 3:10, Andrew Rogers 
>> escribió:
>>
>>> Can't help you Jon sorry. I tried to upload a while back but got a
>>> different issue (see
>>> https://groups.google.com/forum/#!topic/web2py/03-7xKAioD8)  So maybe
>>> that feature has fallen into disuse?
>>>
>>>
>>>
>
> For what it's worth, I have done plenty of CSV uploads from the admin
> pages (DB Mgt) but that has been mostly from 2.14.6 on my home system.
>
> On a production system, when I switched from SQLite to Postgres, the CSV
> import was hundreds of thousands of rows, and I used the psql console.
>
> /dps
>
> On Friday, 1 May 2020 16:57:38 UTC+10, Jonsubs wrote:

 Hi everyone,
 I'm trying to upload a CSV file to my MySQL database using appadmin.

 I do get a "data uploaded" flash message as if I succeeded, but data is
 not there.

 Could anyone suggest me how to debug this operation?
 Thanks, Jon.


 
  Libre
 de virus. www.avast.com
 
 <#m_-3876244012739838975_CAK8tz31GshpuRQfy8V7=4rKh7tGSE4eOqL2X9-GE+M3EkFdbCw@mail.gmail.com_m_3033399681327063300_CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

>>> --
>>> 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 web...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/web2py/f7f07401-d033-4a7e-9273-79e3698050b2%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/3812a283-94b3-458e-89fc-181a452d3028%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33_Y%2BcrhN%3D%3DtLDsry4E3z2BSfSe_koN3pMTZFzAiSAx7Q%40mail.gmail.com.


Re: [web2py] Re: How to debug appadmin CSV uploading

2020-05-08 Thread Jon Subscripted
Thanks!

El El sáb, 2 may 2020 a las 3:10, Andrew Rogers 
escribió:

> Can't help you Jon sorry. I tried to upload a while back but got a
> different issue (see
> https://groups.google.com/forum/#!topic/web2py/03-7xKAioD8)  So maybe
> that feature has fallen into disuse?
>
>
> On Friday, 1 May 2020 16:57:38 UTC+10, Jonsubs wrote:
>>
>> Hi everyone,
>> I'm trying to upload a CSV file to my MySQL database using appadmin.
>>
>> I do get a "data uploaded" flash message as if I succeeded, but data is
>> not there.
>>
>> Could anyone suggest me how to debug this operation?
>> Thanks, Jon.
>>
>>
>> 
>>  Libre
>> de virus. www.avast.com
>> 
>> <#m_3033399681327063300_CAK8tz31FLL14iggF+geUS_piGUFSmjKQV7ie34f=7OeQBFRh3Q@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/f7f07401-d033-4a7e-9273-79e3698050b2%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31GshpuRQfy8V7%3D4rKh7tGSE4eOqL2X9-GE%2BM3EkFdbCw%40mail.gmail.com.


[web2py] How to debug appadmin CSV uploading

2020-05-01 Thread Jon Subscripted
Hi everyone,
I'm trying to upload a CSV file to my MySQL database using appadmin.

I do get a "data uploaded" flash message as if I succeeded, but data is not
there.

Could anyone suggest me how to debug this operation?
Thanks, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31FLL14iggF%2BgeUS_piGUFSmjKQV7ie34f%3D7OeQBFRh3Q%40mail.gmail.com.


[web2py] Re: 2 apps 1 DB, switching migration control from one app to the other

2020-04-29 Thread Jon Subscripted
Hi all,
I copied the ".table" files from old_app to new_app and I could perform the
switch correctly.

Is it a good practice to keep this files in the code repo also?
Thanks, Jon.

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Wed, Apr 29, 2020 at 1:02 PM Jon Subscripted 
wrote:

> Hi everyone,
> I have 2 apps that were using the same DB (lets call them old_app and
> new_app).
>
> As the old_app created the DB, old_app had the migrations enabled and
> new_app had the migrations disabled.
>
> Both apps diverged and I would like to do it the other way round. new_app
> migrations enabled and old_app migrations disabled.
>
> I tried but I do get InternalError: (1050, u"Table 'XXX' already exists").
>
> Which steps should I use to switch migration from old_app to new_app
> control and prevent this error?
>
> Thanks, Jon.
>
>
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>  Libre
> de virus. www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
> <#m_7478608142645465753_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30VPJcWsiB_9v%2BD2n0NLkiDvv-BOkBRjHOA%2BjfnFQXTPQ%40mail.gmail.com.


[web2py] 2 apps 1 DB, switching migration control from one app to the other

2020-04-29 Thread Jon Subscripted
Hi everyone,
I have 2 apps that were using the same DB (lets call them old_app and
new_app).

As the old_app created the DB, old_app had the migrations enabled and
new_app had the migrations disabled.

Both apps diverged and I would like to do it the other way round. new_app
migrations enabled and old_app migrations disabled.

I tried but I do get InternalError: (1050, u"Table 'XXX' already exists").

Which steps should I use to switch migration from old_app to new_app
control and prevent this error?

Thanks, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33vWOntTHKnpC4yU10eh%2B7zjRkHKS5qFNAPkkJXhV8aWQ%40mail.gmail.com.


[web2py] Re: Creating cookie if not present and modify it if present

2020-04-19 Thread Jon Subscripted
Hi everyone,
I figured out what I was doing wrong. From what I can see you need to
"fully create" the response cookie whenever you want to overwrite the
values you read from request cookie.

So I modified my code as follows and it worked:

if not request.cookies.has_key('elocookie'):
mu = MU
phi = PHI
sigma = SIGMA
else:
value = request.cookies['elocookie'].value
logger.debug('read ELO cookie %s'%str(value))
mu,phi,sigma = [float(v) for v in
value.replace('(','').replace(')','').split(',')]


logger.debug("retrieved elo %s %s %s"%(mu,phi,sigma))

... #calculate mu,phi,sigma

response.cookies['elocookie'] = (mu,phi,sigma)
response.cookies['elocookie']['expires'] = 72 * 3600
response.cookies['elocookie']['path'] = '/'
logger.debug("new cookie elo %s %s %s"%(mu,phi,sigma))

Thanks, Jon.

On Sat, Apr 18, 2020 at 8:33 PM Jon Subscripted 
wrote:

> Hi everyone,
> I'm facing some problems handling cookies. I need to store and update a
> value for non-auth users.
> I need to do it throughout the session (this could be done with session
> cookies) but also between different sessions. That's why I decided to use
> cookies.
>
> I tried to follow web2py books' instructions (
> http://www.web2py.com/books/default/chapter/29/04/the-core#Cookies ), but
> it does not work as expected.
>
> My problem is that I just succeed to set the cookie value properly the
> first time. My guess is that I do not fully understand the request/response
>
> 
> if not request.cookies.has_key('elocookie'):
> logger.debug("create ELO cookie")
> response.cookies['elocookie'] = (MU,PHI,SIGMA)
> response.cookies['elocookie']['expires'] = 72 * 3600
> response.cookies['elocookie']['path'] = '/'
> else:
> value = request.cookies['elocookie'].value
> logger.debug('read ELO cookie %s'%str(value))
> mu,phi,sigma = [float(v) for v in
> value.replace('(','').replace(')','').split(',')]
>
>
> logger.debug("retrieved elo %s %s %s"%(mu,phi,sigma))
> ... #calculate mu,phi,sigma
>
> response.cookies['elocookie'] = (mu,phi,sigma)
>
> logger.debug("new cookie elo %s %s %s"%(mu,phi,sigma))
> 
>
> Could anyone tell me what I missed or misunderstood?
> Thanks, Jon.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz310vyG2NL7SSTbx3Hgbzcbd%3DW6%2BTdO0rQAYBf%2BZzxJDnA%40mail.gmail.com.


[web2py] Creating cookie if not present and modify it if present

2020-04-18 Thread Jon Subscripted
Hi everyone,
I'm facing some problems handling cookies. I need to store and update a
value for non-auth users.
I need to do it throughout the session (this could be done with session
cookies) but also between different sessions. That's why I decided to use
cookies.

I tried to follow web2py books' instructions (
http://www.web2py.com/books/default/chapter/29/04/the-core#Cookies ), but
it does not work as expected.

My problem is that I just succeed to set the cookie value properly the
first time. My guess is that I do not fully understand the request/response


if not request.cookies.has_key('elocookie'):
logger.debug("create ELO cookie")
response.cookies['elocookie'] = (MU,PHI,SIGMA)
response.cookies['elocookie']['expires'] = 72 * 3600
response.cookies['elocookie']['path'] = '/'
else:
value = request.cookies['elocookie'].value
logger.debug('read ELO cookie %s'%str(value))
mu,phi,sigma = [float(v) for v in
value.replace('(','').replace(')','').split(',')]


logger.debug("retrieved elo %s %s %s"%(mu,phi,sigma))
... #calculate mu,phi,sigma

response.cookies['elocookie'] = (mu,phi,sigma)

logger.debug("new cookie elo %s %s %s"%(mu,phi,sigma))


Could anyone tell me what I missed or misunderstood?
Thanks, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32MinQjzboTAe8k8LHnL9aMurh1LjMe3_YdyBgeo-WhUg%40mail.gmail.com.


Re: [web2py] Re: SQLFORM labels and input boxes overlapping

2020-04-17 Thread Jon Subscripted
Thanks Dave, I'll check it out!


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Apr 16, 2020 at 11:21 PM Dave S  wrote:

>
>
> On Thursday, April 16, 2020 at 8:11:41 AM UTC-7, Jonsubs wrote:
>>
>> Hi everyone,
>> In some of my views using SQLFORM, specially when the label text is not
>> short, the input box overlaps and covers part of the label text.
>>
>> How can I avoid this?
>>
>> As this is automatically generated HTML, I do not have clear where should
>> I look.
>> Regards, Jon.
>>
>
> Look in the book for the _style keyword for some helpers.  You can use it
> to set widths.  I do something like with SQLTABLE to adjust column widths.
>
> /dps
>
>
>>
>> 
>>  Libre
>> de virus. www.avast.com
>> 
>> <#m_593659859518582277_CAK8tz32yQknqnSwpAC+j=N_V45RZA+GqmaYD5kRPc0MrnEHmpA@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/dc5f7f99-554a-4251-9a1c-e42e0a3efab6%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30wffFAi1GD%3D40YB0wTbZ%3DXwRh-KAdxYSu3qwY4s-18CQ%40mail.gmail.com.


[web2py] SQLFORM labels and input boxes overlapping

2020-04-16 Thread Jon Subscripted
Hi everyone,
In some of my views using SQLFORM, specially when the label text is not
short, the input box overlaps and covers part of the label text.

How can I avoid this?

As this is automatically generated HTML, I do not have clear where should I
look.
Regards, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32yQknqnSwpAC%2Bj%3DN_V45RZA%2BGqmaYD5kRPc0MrnEHmpA%40mail.gmail.com.


[web2py] Re: Include control specific data in layout.html header

2020-04-01 Thread Jon Subscripted
Hi everyone,
I've just realized what I was doing wrong.

What happened is that I was not returning locals(), but a custom dict,
which was not updated.

Right implementation:

def index():
datalayer = get_datalayer('general','index')
return locals()

Wrong implementation:

def index():
datalayer = get_datalayer('general','index')
return dict(message=T('Welcome to my app!'))


Thanks! Jon.


On Wed, Apr 1, 2020 at 5:59 PM Jon Subscripted 
wrote:

> Hi everyone,
> I'm trying to include view specific data in each view header (it is
> actually a GTM datalayer).
>
> I thought the best way to do it was to define a global variable in db.py
> and to print a variable  {{=datalayer}}, the each controller will overwrite
> it with specific data.
>
> It seems to be working for most of my views, except:
> -index.html
> -all user.html views (login/register/profile/change_password/etc.)
>
> Any suggestions on how to make it work on index.html and user.html?
> What am I doing wrong?
> Thanks in advance, Jon.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30a%3Dp47eMR_CXt1q0XN5Exfp_vTb5VV0mO2mu3d0ZVRsQ%40mail.gmail.com.


[web2py] Re: Embed youtube video in markmin (à la web2py book)

2020-04-01 Thread Jon Subscripted
Hi,
any suggestions on how to implement this?
Thanks, Jon.

On Tue, Mar 31, 2020 at 2:00 PM Jon Subscripted 
wrote:

> Hi everyone,
> I have a part of my website shaped as web2py book. In order to handle long
> texts in different languages.
>
> As you might know content is in *.markmin files that are reprocessed into
> HTML to be served by a generic controller.
>
> I'm trying to embed a youtube video in the *.markmin file. I tried the
> following approaches, but none of them worked:
>
> 1) Enter HTML directly:
> https://www.youtube.com/embed/pbIm1R_FBps; frameborder="0"
> allow="accelerometer; autoplay; encrypted-media; gyroscope;
> picture-in-picture" allowfullscreen>
>
>  2) Use the IFRAME helper:
> {{=IFRAME(_src="https://www.youtube.com/embed/pbIm1R_FBps;)}}
>
>  3) Use the link  wrapped in HTML5 tags directly:
> https://www.youtube.com/embed/pbIm1R_FBps
>
>  4) Use the format from (
> http://fpl.cs.depaul.edu/jriely/360/extras/ractive-web2py/web2py/gluon/contrib/markmin/markmin.html
>  ):
> [[message https://www.youtube.com/embed/pbIm1R_FBps video]]
>
> Option 4, does show a video frame, but then the video does not play o_O
>
> How should I include the link inside the markmin files to make it work?
>
> I know I do not fully understand the mechanics, so most probably there's
> some conceptual error in my implementation.
> Thanks, Jon.
>
> PS. Another way to pose the question would be; what is the IFRAME format
> to be used in *.markmin files inside the web2py book app to embed youtube
> videos?
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31qjb0Lh3j1eB2mdTV%2BzqAAifrFpN-K35X5cOqA8sKXoA%40mail.gmail.com.


[web2py] Include control specific data in layout.html header

2020-04-01 Thread Jon Subscripted
Hi everyone,
I'm trying to include view specific data in each view header (it is
actually a GTM datalayer).

I thought the best way to do it was to define a global variable in db.py
and to print a variable  {{=datalayer}}, the each controller will overwrite
it with specific data.

It seems to be working for most of my views, except:
-index.html
-all user.html views (login/register/profile/change_password/etc.)

Any suggestions on how to make it work on index.html and user.html?
What am I doing wrong?
Thanks in advance, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33N3JGKwKBtWON3ybUjjFKAZu9qhKK5M7WeC6BVbq5m4Q%40mail.gmail.com.


[web2py] Embed youtube video in markmin (à la web2py book)

2020-03-31 Thread Jon Subscripted
Hi everyone,
I have a part of my website shaped as web2py book. In order to handle long
texts in different languages.

As you might know content is in *.markmin files that are reprocessed into
HTML to be served by a generic controller.

I'm trying to embed a youtube video in the *.markmin file. I tried the
following approaches, but none of them worked:

1) Enter HTML directly:
https://www.youtube.com/embed/pbIm1R_FBps; frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope;
picture-in-picture" allowfullscreen>

 2) Use the IFRAME helper:
{{=IFRAME(_src="https://www.youtube.com/embed/pbIm1R_FBps;)}}

 3) Use the link  wrapped in HTML5 tags directly:
https://www.youtube.com/embed/pbIm1R_FBps

 4) Use the format from (
http://fpl.cs.depaul.edu/jriely/360/extras/ractive-web2py/web2py/gluon/contrib/markmin/markmin.html
 ):
[[message https://www.youtube.com/embed/pbIm1R_FBps video]]

Option 4, does show a video frame, but then the video does not play o_O

How should I include the link inside the markmin files to make it work?

I know I do not fully understand the mechanics, so most probably there's
some conceptual error in my implementation.
Thanks, Jon.

PS. Another way to pose the question would be; what is the IFRAME format to
be used in *.markmin files inside the web2py book app to embed youtube
videos?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32-1vihqaipOYSvzvvvp288JWMisRGF-8grW_f2bzVEfw%40mail.gmail.com.


[web2py] Re: rotatingfilehandler logging not working in windows

2020-02-08 Thread Jon Subscripted
Hi everyone,
I've just found out that the application is actually logging correctly but
not using "web2py/logs" folder.
Thanks, Jon.

On Sat, Feb 8, 2020 at 11:53 AM Jon Subscripted 
wrote:

> Hi everyone,
> I've still haven't figured out what I do wrong.
>
> Should I specifically use "-l LOGFILENAME" option for the command, as in
> the example below?
>
> C:\Users\jonsubscriptions\web2py_src\web2py>python.exe web2py.py -l
> web2py.log
>
> I've tried but see no change in behaviour.
> Thanks, Jon.
>
> On Wed, Feb 5, 2020 at 6:35 PM Jon Subscripted 
> wrote:
>
>> Important detail. There's a typo in my previous email (but NOT in the
>> logging configuration file name). The logging configuration file name is
>> correctly named "logging.conf".
>> Thanks, Jon.
>>
>> On Wed, Feb 5, 2020 at 6:26 PM Jon Subscripted <
>> jonsubscripti...@gmail.com> wrote:
>>
>>> Hi everyone,
>>> I'm trying to send myapps log to the rotatingfilehandler but something
>>> fails. It does log in the console but not in the file. web2py/logs folder
>>> is empty.
>>>
>>> For simplicity I'm using the "welcome" application.
>>>
>>> 1) I'm running web2py (version
>>> 2.18.5-stable+timestamp.2019.04.08.04.22.03) from source code on Windows.
>>> (Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30))
>>>
>>> 2) I copied "logging.example.conf" to web2py directory renaming it as
>>> "logging.conf".
>>>
>>> 3) In "looging.conf" I have this configuration:
>>>
>>> # welcome app handler
>>> [logger_welcome]
>>> level=DEBUG
>>> qualname=web2py.app.welcome
>>> handlers=consoleHandler,rotatingFileHandler
>>> propagate=0
>>>
>>> ...
>>>
>>> # Rotating file handler
>>> #   mkdir logs in the web2py base directory if not already present
>>> #   args: (filename[, mode[, maxBytes[, backupCount[, encoding[,
>>> delay])
>>> #
>>> [handler_rotatingFileHandler]
>>> class=handlers.RotatingFileHandler
>>> level=DEBUG
>>> formatter=simpleFormatter
>>> args=("web2py.log", "a", 100, 5)
>>>
>>> ...
>>>
>>> [formatter_simpleFormatter]
>>> format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
>>> datefmt='%m/%d/%Y %I:%M:%S %p'
>>>
>>> 4) Since there is already a "web2py/logs" folder I did not create a new
>>> one.
>>>
>>> 5) In default.py I added the following code:
>>>
>>> import logging
>>> logger = logging.getLogger("web2py.app.welcome")
>>> logger.setLevel(logging.DEBUG)
>>>
>>> details = 'details'
>>>
>>> #  example index page 
>>> def index():
>>> logger.debug("Just checking that %s", details)
>>> logger.info("You ought to know that %s", details)
>>> logger.warn("Mind that %s", details)
>>> logger.error("Oops, something bad happened %s", details)
>>> response.flash = T("Hello World")
>>> return dict(message=T('Welcome to web2py!'))
>>>
>>> 6) This is what I get:
>>> "C:\Users\jonsubscriptions\Downloads\web2py_src
>>> (1)\web2py>C:\Python27\python.exe web2py.py
>>> web2py Web Framework
>>> Created by Massimo Di Pierro, Copyright 2007-2020
>>> Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
>>> Database drivers available: sqlite3, imaplib, pyodbc, pymysql
>>> please visit:
>>> ('\t', 'http://127.0.0.1:8000/')
>>> starting browser...
>>> '02/05/2020 05:45:33 PM' - web2py.app.welcome - WARNING - Mind that
>>> details
>>> '02/05/2020 05:45:33 PM' - web2py.app.welcome - ERROR - Oops, something
>>> bad happened details"
>>>
>>> I get messages in the console but rotatingfilehandler does not work
>>> properly.
>>> What am I missing or doing wrong?
>>> What do I need to do to log into file "web2py.log"?
>>> Thanks, Jon.
>>>
>>> PS. My plan is to implement the logging in Pythonanywhere but as it is
>>> not working even locally I started from the very scratch...
>>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30y7QZEccDCjAa2vNHd7keqE4H8uRRoohkoUvKw54xPKQ%40mail.gmail.com.


[web2py] Re: rotatingfilehandler logging not working in windows

2020-02-08 Thread Jon Subscripted
Hi everyone,
I've still haven't figured out what I do wrong.

Should I specifically use "-l LOGFILENAME" option for the command, as in
the example below?

C:\Users\jonsubscriptions\web2py_src\web2py>python.exe web2py.py -l
web2py.log

I've tried but see no change in behaviour.
Thanks, Jon.

On Wed, Feb 5, 2020 at 6:35 PM Jon Subscripted 
wrote:

> Important detail. There's a typo in my previous email (but NOT in the
> logging configuration file name). The logging configuration file name is
> correctly named "logging.conf".
> Thanks, Jon.
>
> On Wed, Feb 5, 2020 at 6:26 PM Jon Subscripted 
> wrote:
>
>> Hi everyone,
>> I'm trying to send myapps log to the rotatingfilehandler but something
>> fails. It does log in the console but not in the file. web2py/logs folder
>> is empty.
>>
>> For simplicity I'm using the "welcome" application.
>>
>> 1) I'm running web2py (version
>> 2.18.5-stable+timestamp.2019.04.08.04.22.03) from source code on Windows.
>> (Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30))
>>
>> 2) I copied "logging.example.conf" to web2py directory renaming it as
>> "logging.conf".
>>
>> 3) In "looging.conf" I have this configuration:
>>
>> # welcome app handler
>> [logger_welcome]
>> level=DEBUG
>> qualname=web2py.app.welcome
>> handlers=consoleHandler,rotatingFileHandler
>> propagate=0
>>
>> ...
>>
>> # Rotating file handler
>> #   mkdir logs in the web2py base directory if not already present
>> #   args: (filename[, mode[, maxBytes[, backupCount[, encoding[,
>> delay])
>> #
>> [handler_rotatingFileHandler]
>> class=handlers.RotatingFileHandler
>> level=DEBUG
>> formatter=simpleFormatter
>> args=("web2py.log", "a", 100, 5)
>>
>> ...
>>
>> [formatter_simpleFormatter]
>> format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
>> datefmt='%m/%d/%Y %I:%M:%S %p'
>>
>> 4) Since there is already a "web2py/logs" folder I did not create a new
>> one.
>>
>> 5) In default.py I added the following code:
>>
>> import logging
>> logger = logging.getLogger("web2py.app.welcome")
>> logger.setLevel(logging.DEBUG)
>>
>> details = 'details'
>>
>> #  example index page 
>> def index():
>> logger.debug("Just checking that %s", details)
>> logger.info("You ought to know that %s", details)
>> logger.warn("Mind that %s", details)
>> logger.error("Oops, something bad happened %s", details)
>> response.flash = T("Hello World")
>> return dict(message=T('Welcome to web2py!'))
>>
>> 6) This is what I get:
>> "C:\Users\jonsubscriptions\Downloads\web2py_src
>> (1)\web2py>C:\Python27\python.exe web2py.py
>> web2py Web Framework
>> Created by Massimo Di Pierro, Copyright 2007-2020
>> Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
>> Database drivers available: sqlite3, imaplib, pyodbc, pymysql
>> please visit:
>> ('\t', 'http://127.0.0.1:8000/')
>> starting browser...
>> '02/05/2020 05:45:33 PM' - web2py.app.welcome - WARNING - Mind that
>> details
>> '02/05/2020 05:45:33 PM' - web2py.app.welcome - ERROR - Oops, something
>> bad happened details"
>>
>> I get messages in the console but rotatingfilehandler does not work
>> properly.
>> What am I missing or doing wrong?
>> What do I need to do to log into file "web2py.log"?
>> Thanks, Jon.
>>
>> PS. My plan is to implement the logging in Pythonanywhere but as it is
>> not working even locally I started from the very scratch...
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33TD%2BcEQ6Fe1f2zmcwKo7tzWSUaqCedfmCWUTp5CfuM6g%40mail.gmail.com.


[web2py] Re: rotatingfilehandler logging not working in windows

2020-02-05 Thread Jon Subscripted
Important detail. There's a typo in my previous email (but NOT in the
logging configuration file name). The logging configuration file name is
correctly named "logging.conf".
Thanks, Jon.

On Wed, Feb 5, 2020 at 6:26 PM Jon Subscripted 
wrote:

> Hi everyone,
> I'm trying to send myapps log to the rotatingfilehandler but something
> fails. It does log in the console but not in the file. web2py/logs folder
> is empty.
>
> For simplicity I'm using the "welcome" application.
>
> 1) I'm running web2py (version
> 2.18.5-stable+timestamp.2019.04.08.04.22.03) from source code on Windows.
> (Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30))
>
> 2) I copied "logging.example.conf" to web2py directory renaming it as
> "logging.conf".
>
> 3) In "looging.conf" I have this configuration:
>
> # welcome app handler
> [logger_welcome]
> level=DEBUG
> qualname=web2py.app.welcome
> handlers=consoleHandler,rotatingFileHandler
> propagate=0
>
> ...
>
> # Rotating file handler
> #   mkdir logs in the web2py base directory if not already present
> #   args: (filename[, mode[, maxBytes[, backupCount[, encoding[,
> delay])
> #
> [handler_rotatingFileHandler]
> class=handlers.RotatingFileHandler
> level=DEBUG
> formatter=simpleFormatter
> args=("web2py.log", "a", 100, 5)
>
> ...
>
> [formatter_simpleFormatter]
> format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
> datefmt='%m/%d/%Y %I:%M:%S %p'
>
> 4) Since there is already a "web2py/logs" folder I did not create a new
> one.
>
> 5) In default.py I added the following code:
>
> import logging
> logger = logging.getLogger("web2py.app.welcome")
> logger.setLevel(logging.DEBUG)
>
> details = 'details'
>
> #  example index page 
> def index():
> logger.debug("Just checking that %s", details)
> logger.info("You ought to know that %s", details)
> logger.warn("Mind that %s", details)
> logger.error("Oops, something bad happened %s", details)
> response.flash = T("Hello World")
> return dict(message=T('Welcome to web2py!'))
>
> 6) This is what I get:
> "C:\Users\jonsubscriptions\Downloads\web2py_src
> (1)\web2py>C:\Python27\python.exe web2py.py
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2020
> Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
> Database drivers available: sqlite3, imaplib, pyodbc, pymysql
> please visit:
> ('\t', 'http://127.0.0.1:8000/')
> starting browser...
> '02/05/2020 05:45:33 PM' - web2py.app.welcome - WARNING - Mind that details
> '02/05/2020 05:45:33 PM' - web2py.app.welcome - ERROR - Oops, something
> bad happened details"
>
> I get messages in the console but rotatingfilehandler does not work
> properly.
> What am I missing or doing wrong?
> What do I need to do to log into file "web2py.log"?
> Thanks, Jon.
>
> PS. My plan is to implement the logging in Pythonanywhere but as it is not
> working even locally I started from the very scratch...
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30ObqaH%3D0HND7KobEACvUXvYVjWgbG6SZ9xBZXx_VN-Jg%40mail.gmail.com.


[web2py] rotatingfilehandler logging not working in windows

2020-02-05 Thread Jon Subscripted
Hi everyone,
I'm trying to send myapps log to the rotatingfilehandler but something
fails. It does log in the console but not in the file. web2py/logs folder
is empty.

For simplicity I'm using the "welcome" application.

1) I'm running web2py (version 2.18.5-stable+timestamp.2019.04.08.04.22.03)
from source code on Windows. (Python 2.7.14 (v2.7.14:84471935ed, Sep 16
2017, 20:19:30))

2) I copied "logging.example.conf" to web2py directory renaming it as
"logging.conf".

3) In "looging.conf" I have this configuration:

# welcome app handler
[logger_welcome]
level=DEBUG
qualname=web2py.app.welcome
handlers=consoleHandler,rotatingFileHandler
propagate=0

...

# Rotating file handler
#   mkdir logs in the web2py base directory if not already present
#   args: (filename[, mode[, maxBytes[, backupCount[, encoding[, delay])
#
[handler_rotatingFileHandler]
class=handlers.RotatingFileHandler
level=DEBUG
formatter=simpleFormatter
args=("web2py.log", "a", 100, 5)

...

[formatter_simpleFormatter]
format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
datefmt='%m/%d/%Y %I:%M:%S %p'

4) Since there is already a "web2py/logs" folder I did not create a new one.

5) In default.py I added the following code:

import logging
logger = logging.getLogger("web2py.app.welcome")
logger.setLevel(logging.DEBUG)

details = 'details'

#  example index page 
def index():
logger.debug("Just checking that %s", details)
logger.info("You ought to know that %s", details)
logger.warn("Mind that %s", details)
logger.error("Oops, something bad happened %s", details)
response.flash = T("Hello World")
return dict(message=T('Welcome to web2py!'))

6) This is what I get:
"C:\Users\jonsubscriptions\Downloads\web2py_src
(1)\web2py>C:\Python27\python.exe web2py.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2020
Version 2.18.5-stable+timestamp.2019.04.08.04.22.03
Database drivers available: sqlite3, imaplib, pyodbc, pymysql
please visit:
('\t', 'http://127.0.0.1:8000/')
starting browser...
'02/05/2020 05:45:33 PM' - web2py.app.welcome - WARNING - Mind that details
'02/05/2020 05:45:33 PM' - web2py.app.welcome - ERROR - Oops, something bad
happened details"

I get messages in the console but rotatingfilehandler does not work
properly.
What am I missing or doing wrong?
What do I need to do to log into file "web2py.log"?
Thanks, Jon.

PS. My plan is to implement the logging in Pythonanywhere but as it is not
working even locally I started from the very scratch...

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31GtdqFYARrNYv71W7Tha6Fs%3Dw0V58Xq2JmVay067vq8Q%40mail.gmail.com.


Re: [web2py] Re: Cookie policy plugin

2020-02-05 Thread Jon Subscripted
Thanks!

On Wed, Jan 15, 2020 at 7:15 AM Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> I like this one:
>
> window.addEventListener("load",
> function(){window.cookieconsent.initialise({"palette": {"popup":
> {"background": "#000"},"button": {"background": "#f1d600"}}})});
>
>
>
> On Sunday, 12 January 2020 02:54:21 UTC-8, Jonsubs wrote:
>>
>> Hi everyone,
>> Is there some easy way or specific plugin to implement EU cookie policy
>> in Web2py?
>> Thanks, Jon.
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/fb7cbec0-773b-491d-8f70-3b012dec6b6d%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz320sKyeSs9h5Q6uoHUw%3Dt1R%2Bc3G%3DqKap2nwWgdhNUsG7g%40mail.gmail.com.


[web2py] Cookie policy plugin

2020-01-12 Thread Jon Subscripted
Hi everyone,
Is there some easy way or specific plugin to implement EU cookie policy in
Web2py?
Thanks, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz30U8NAqojcq7KCZ1zdGYh_f7aWjXwBTKYXgAKxBZ-q-OA%40mail.gmail.com.


Re: [web2py] Re: How to link images (under static/images) from static folder static html

2019-07-30 Thread Jon Subscripted
Thanks Dave,
I'll test using the logo (which actually works) as you suggested.
Regards, Jon.

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Jul 29, 2019 at 10:27 PM Dave S  wrote:

>
>
> On Monday, July 29, 2019 at 1:43:55 AM UTC-7, Jonsubs wrote:
>>
>> Hi everyone,
>> Any suggestions, please?
>> It does work for me in locally (127.0.0.0), but not in PythonAnywhere.
>> Thanks, Jon.
>>
>> On Mon, Jul 22, 2019 at 4:02 PM Jon Subscripted 
>> wrote:
>>
>>> Hi everyone,
>>> I'm experiencing some problems trying to display static images in my
>>> static html files. Actually I get a 404 error, when I "inspect" what's
>>> going wrong.
>>>
>>> Some of the HTML files in my project are fully static (stored along with
>>> 403.html, 404.html, 500.html & 503.html) and display images stored in
>>> static/images folder. So I tried to link them the traditional way. (I
>>> assumed the URL builder cannot be used as the HTMLs are not processed by
>>> web2py before being served.)
>>>
>>> But it is not working. How should I link those images?
>>>
>>> I've tried different approaches but neither of them seems to work.
>>>
>>> a) relative path  (relative inside
>>> the app)
>>> b) relative path
>>>
>>>  (relative inside the
>>> web2py site)
>>>
>>> c) absolute path https://www.myweb.com.eus/myapp/static/images/forks_es.png; />
>>>
>>> BTW, it may be important to note that I'm using the "routes.py" using
>>> the "parameter-based system" using:
>>>
>>> BASE  = dict(default_application='myapp')
>>>
>>> Thanks, Jon.
>>>
>>
>
> On my server, the following works for both links:
>
> 
> 
> 
> 
> 
> 
>
>
>  My global routes.py sets (using the "simple router" example)
>
> routers = dict(
> # base router
> BASE=dict(default_application='appOne',
>  root_static = ['favicon.ico, 'robots.txt'])
>
>
> and I used "app2/static/test-ess.html" to load the page.
>
> I also copied the html to appOne (already had the same logo in static
> images), and "static/test-ess.html" worked there; both copies of the logo
> were displayed.
>
> If you have a lot of static files, or some of them are large, you may want
> to see if you can serve them with your front-end.  I have a vague idea that
> PythonAnywhere uses Nginx, but I don't know if they give you any control of
> it.
>
> /dps
>
>
>
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/8f4c309d-afb7-4ba7-83a5-85a98bbe72e0%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/8f4c309d-afb7-4ba7-83a5-85a98bbe72e0%40googlegroups.com?utm_medium=email_source=footer>
> .
>

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz32WM3MAmtcHEZATdodDyoKE2xtLQ-4XdAv1QURBPyyE8A%40mail.gmail.com.


[web2py] Re: How to link images (under static/images) from static folder static html

2019-07-29 Thread Jon Subscripted
Hi everyone,
Any suggestions, please?
It does work for me in locally (127.0.0.0), but not in PythonAnywhere.
Thanks, Jon.

On Mon, Jul 22, 2019 at 4:02 PM Jon Subscripted 
wrote:

> Hi everyone,
> I'm experiencing some problems trying to display static images in my
> static html files. Actually I get a 404 error, when I "inspect" what's
> going wrong.
>
> Some of the HTML files in my project are fully static (stored along with
> 403.html, 404.html, 500.html & 503.html) and display images stored in
> static/images folder. So I tried to link them the traditional way. (I
> assumed the URL builder cannot be used as the HTMLs are not processed by
> web2py before being served.)
>
> But it is not working. How should I link those images?
>
> I've tried different approaches but neither of them seems to work.
>
> a) relative path  (relative inside the
> app)
> b) relative path
>
>  (relative inside the
> web2py site)
>
> c) absolute path https://www.myweb.com.eus/myapp/static/images/forks_es.png; />
>
> BTW, it may be important to note that I'm using the "routes.py" using the
> "parameter-based system" using:
>
> BASE  = dict(default_application='myapp')
>
> Thanks, Jon.
>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz33oP3_ici-y4VbN3JihSOMqcNvnghk11Domnex8YLwFng%40mail.gmail.com.


[web2py] How to link images (under static/images) from static folder static html

2019-07-22 Thread Jon Subscripted
Hi everyone,
I'm experiencing some problems trying to display static images in my static
html files. Actually I get a 404 error, when I "inspect" what's going wrong.

Some of the HTML files in my project are fully static (stored along with
403.html, 404.html, 500.html & 503.html) and display images stored in
static/images folder. So I tried to link them the traditional way. (I
assumed the URL builder cannot be used as the HTMLs are not processed by
web2py before being served.)

But it is not working. How should I link those images?

I've tried different approaches but neither of them seems to work.

a) relative path  (relative inside the
app)
b) relative path

 (relative inside the web2py
site)

c) absolute path https://www.myweb.com.eus/myapp/static/images/forks_es.png; />

BTW, it may be important to note that I'm using the "routes.py" using the
"parameter-based system" using:

BASE  = dict(default_application='myapp')

Thanks, Jon.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CAK8tz31F0mZd_m255WeODx_RLhZ_PXk60zGhDWGoVMzvjPvs_A%40mail.gmail.com.


[web2py] Uncaught TypeError at web2py-bootstrap4.js

2019-05-05 Thread Jon Subscripted
Hi everyone,
I'm getting the following error in the browser console

"Uncaught TypeError: Cannot set property 'ajax_fields' of undefined
at web2py-bootstrap4.js:2
at web2py-bootstrap4.js:82"
I have no clue what does this mean nor how to fix it. Any suggestion on
what should I look at?
Thanks & Best regards, Jon.

PS. By the way my app style is completely messed up even though I did not
edit the layout.html file at all. Can this be related with the above issue?


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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: Problem updating list stored in session

2019-02-27 Thread Jon Subscripted
Hi everyone,
I keep on looking for the problem in order to avoid disgusting surprises in
the near future.

Is there any size limitation in session storage object?
Thanks in advance.
Regards, Jon.

On Wed, Feb 27, 2019 at 12:57 PM Jon Subscripted 
wrote:

> Thanks Leonel,
> Yes, as you comment the assignation was correct.
>
> I managed to fix it but I do not know why yet. It must be something else,
> somewhere else in the controller code (that's my guess).
>
> I went for the following quick and dirty test and it started to work:
>
> 1) duplicate the variables stored in the session, see below:
>
> if session.training_id is None:
> session.training_id = 0
> session.user_training_probs = []
> session.configuration_training = 0 #REMOVE: for debuggin only
> session.configuration_list = []#REMOVE: for debuggin only
>
> session.training_id = training_id
> session.user_training_probs = list(set([r.problem  for r in rows]))#remove
> duplicates
> session.configuration_training = training_id#REMOVE: for debuggin only
> session.configuration_list = list(set([r.problem  for r in
> rows]))#REMOVE: for debuggin only
>
> 2) check that the new ones were correctly updated
> 3) replace the session variables used in views and controllers ( from
> training_id and user_training_probs to configuration_training and
> configuration_list)
>
> I'll keep on seeking for the problem.
> Regards, Jon.
>
>
> On Wed, Feb 27, 2019 at 10:10 AM Leonel Câmara 
> wrote:
>
>> I don't see anything wrong with your code, you're even creating new lists
>> each time you change the value so they're surely being updated. If the view
>> is showing correctly, maybe the problem is with your debug code which is
>> printing session values before they're 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.
>>
>

-- 
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: Problem updating list stored in session

2019-02-27 Thread Jon Subscripted
Thanks Leonel,
Yes, as you comment the assignation was correct.

I managed to fix it but I do not know why yet. It must be something else,
somewhere else in the controller code (that's my guess).

I went for the following quick and dirty test and it started to work:

1) duplicate the variables stored in the session, see below:

if session.training_id is None:
session.training_id = 0
session.user_training_probs = []
session.configuration_training = 0 #REMOVE: for debuggin only
session.configuration_list = []#REMOVE: for debuggin only

session.training_id = training_id
session.user_training_probs = list(set([r.problem  for r in rows]))#remove
duplicates
session.configuration_training = training_id#REMOVE: for debuggin only
session.configuration_list = list(set([r.problem  for r in
rows]))#REMOVE: for debuggin only

2) check that the new ones were correctly updated
3) replace the session variables used in views and controllers ( from
training_id and user_training_probs to configuration_training and
configuration_list)

I'll keep on seeking for the problem.
Regards, Jon.


On Wed, Feb 27, 2019 at 10:10 AM Leonel Câmara 
wrote:

> I don't see anything wrong with your code, you're even creating new lists
> each time you change the value so they're surely being updated. If the view
> is showing correctly, maybe the problem is with your debug code which is
> printing session values before they're 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.
>

-- 
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] Problem updating list stored in session

2019-02-26 Thread Jon Subscripted
Hi everyone,
I'm having some trouble updating session data.

I have a controller/view that allows to perform a query that returns a
bunch of db ids. As I will be using these ids and I used a complex query to
retrieve them I store them in the session,  with the statement below.
Thus another controller will be able to randomly pick one of these ids in
order to use it.

def list_problems_by_training():
training_id = request.args(0,cast=int,default=1)
...
rows = db(query).select(db.probdata.problem,limitby=(start,stop))

if session.training_id is None:
session.training_id = 0
session.user_training_probs = []
session.configuration_counter = 0 #REMOVE: for debugging purposes
only

session.training_id = training_id
session.user_training_probs = list(set([r.problem  for r in
rows]))#remove duplicates
session.configuration_counter += 1 #REMOVE: for debugging purposes only
return locals()

It works fine the 1st time. But once the values are set in the session
object, when I go the the same controller/view to update the list, I'm no
longer able to change it.
It's weird because the view shows the new query results correctly, but the
session data never gets updated. But neither 'training_id' nor
'user_training_probs' are updated correctly. The curious thing is that I
set a counter variable for debugging purposes 'configuration_counter' and
it's updated correctly.

Is the problem related with data types? I deliberately avoided using user
classes (as stated in the manual
http://web2py.com/books/default/chapter/29/04/the-core#Don-t-store-user-defined-classes-in-session
) and used a regular list instead (which is a built-in datatype).

Am I doing something wrong? Is it ok to store query results in the session
or should I cache the result instead?
Thanks in advance.
Regards, Jon.

-- 
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: Long text internationalization

2019-02-13 Thread Jon Subscripted
Thanks Dave,
For now I do not expect to go for pages long texts.
But still I'll take a look at how web2py-book is implemented.
Regards, Jon.

On Wed, Feb 13, 2019 at 12:39 AM Dave S  wrote:

>
>
> On Tuesday, February 12, 2019 at 3:57:36 AM UTC-8, Jonsubs wrote:
>>
>> Hi everyone,
>> Which is the common practice when facing long text internationalization?
>>
>> For instance, What should be done when you want to render a web page,
>> sharing a common layout, that has several paragraphs that must be
>> completelly translated?
>>
>> Based on the manual (
>> http://www.web2py.com/books/default/chapter/29/04/the-core#Internationalization-and-Pluralization-with-T
>> ) only string constants should be used with T. My guess is that large texts
>> should be treated differently.
>>
>> Thanks & Regards, Jon.
>>
>
>
> It looks like you're set for paragraphs of [previously] translated text.
> For really large pieces (pages long), you can take a look at how the web2py
> book does it:
> https://github.com/web2py/web2py-book>
> (just another web2py app, but the book content is in the sources
> sub-directory)
>
> Does Google Translate have an API?  If it does, that would probably be
> like using jQuery divs.
>
> FWIW, there's an interesting article (one of 3, it seems) about using a
> VPN to block app's from accessing Google resources;
>  https://gizmodo.com/i-cut-google-out-of-my-life-it-screwed-up-everything-1839565500
> >
> [It would certainly be hard to use this group for support if you blocked
> access to Google servers.]
> [[ Google controls 8,699,648 IP addresses, per the article]]
>
> /dps
>
> --
> 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.
>

-- 
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: Long text internationalization

2019-02-12 Thread Jon Subscripted
Thanks Leonel!!
I'll use your plugin then.
Regards, Jon.

On Tue, Feb 12, 2019 at 1:37 PM Leonel Câmara 
wrote:

> Large texts are actually fine as long as they're kind of static.
>
> For dynamic long texts I store them in a JSON field where I have a dict
> with a key for each language I want to support, I actually made a plugin
> which gives you a nice widget for this field json field which you can put
> in your modules folder and import it. I'll annex it.
>
> Example usage:
>
> from plugin_json_translation import TranslateWidget
>
> def represent_lang(v, row):
> if v is None:
> return v
> if T.accepted_language[:2] in v:
> return v[LANG]
> else:
> return v['en']
>
> db.define_table('my_test',
> Field('body', 'json', widget=TranslateWidget().widget, requires=
> IS_EMPTY_OR(IS_JSON()), represent=represent_lang),
> )
>
>
> Then you just need to call render when you get my_test rows and you will
> get a translated version.
>
>
> --
> 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.
>

-- 
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] Accessing MySQL data without define tables

2019-02-12 Thread Jon Subscripted
Thanks Ben,
I'll try what you suggest.
Regards, Jon.

On Tue, Feb 12, 2019 at 2:17 PM Ben Duncan  wrote:

> Here is the TOP of what I use.
> You will  need the migrate commands in your connections tring
>
>
> --
>
>
> import os, sys, string, copy, time
> import getopt
> from types import *
>
> from pydal import DAL, Field
>
> db = DAL("postgres://postgres:postgres@localhost:7103/ac03303_live",
> pool_size=10, migrate_enabled=False, fake_migrate_all=True )
> print db._uri
> print db._dbname
>
>
> db.define_table('company',
> Field('company_number', type='integer'),
> Field('company_name', type='string', length=255),
> Field('address_1', type='string', length=255),
> Field('address_2', type='string', length=255),
> Field('city', type='string', length=255),
> Field('state', type='string', length=20),
> Field('zip', type='string', length=10),
> .
>
>
> *Ben Duncan*
> DBA / Chief Software Architect
> Mississippi State Supreme Court
> Electronic Filing Division
>
>
> On Tue, Feb 12, 2019 at 4:26 AM Jon Subscripted <
> jonsubscripti...@gmail.com> wrote:
>
>> Hi,
>> BTW I was checking "sql.log" file just in case I had unintentionally
>> messed up redefining the fen field twice and saw that every execution of
>> the script in my previous email led to a CREATE TABLE (see below). There's
>> more than one (one per each test I performed with the script).
>>
>> Is this normal? Should the table definition in the script outside
>> web2py-app lead to a CREATE TABLE?
>>
>> I also realized that the original CREATE TABLE statement created by
>> web2py (at the very top of the "sql.log" file, right after auth tables are
>> created) does have a different length VARCHAR( `fen` VARCHAR(512),).
>>
>> Can this kind of length difference lead to MySQL to create a duplicated
>> field?
>>
>> Thanks in advance.
>> Regards, Jon.
>>
>> timestamp: 2019-02-11T16:33:57.499000
>> CREATE TABLE problem(
>> id INT AUTO_INCREMENT NOT NULL,
>> question_hint VARCHAR(255),
>> fen VARCHAR(255),
>> solutionSAN LONGTEXT,
>> solutionUCI LONGTEXT,
>>     solordered CHAR(1),
>> pcomment VARCHAR(255),
>> previousFEN VARCHAR(255),
>> previousSAN VARCHAR(255),
>> previousUCI VARCHAR(255),
>> game_control VARCHAR(255),
>> ply_control INT,
>> PRIMARY KEY(id)
>> ) ENGINE=InnoDB CHARACTER SET utf8;
>>
>> On Tue, Feb 12, 2019 at 10:49 AM Jon Subscripted <
>> jonsubscripti...@gmail.com> wrote:
>>
>>> Thanks Ben,
>>> I did what you suggested and somehow I think I moved on.
>>>
>>> Still I got a weird error: InternalError: (1060, u"Duplicate column name
>>> 'fen__tmp'")
>>>
>>> import sys
>>>
>>> sys.path.append(r'C:\Users\Jon\Downloads\web2py_src\web2py\gluon')
>>>
>>> from gluon import DAL,Field
>>> from gluon import *
>>>
>>> dbpath =
>>> r'C:\Users\Jon\Downloads\web2py_src\web2py\applications\xakemate_scratch\databases'
>>> problemsuri = 'mysql://root:web2py@localhost/xakemate'
>>> posFEN = 'rnb2rk1/pp4pp/1qpbp3/3p4/4P3/3P1NP1/PPPN1RBP/R1BQ3K b - - 0 13'
>>>
>>>
>>> db = DAL(problemsuri)#,folder=dbpath)#,auto_import=True)
>>>
>>> db.define_table(
>>> "problem",
>>> Field("question_hint",type="string"),
>>>
>>> Field("fen",type="string"),#,requires=(IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'problem.fen'))),
>>> Field("solutionSAN",type="list:string",requires=IS_NOT_EMPTY()),
>>> Field("solutionUCI",type="list:string",requires=IS_NOT_EMPTY()),
>>> Field("solordered",type="boolean",default=True),
>>> Field("pcomment",type="string"),
>>> Field("previousSAN",type="string",default=''),
>>> Field("previousUCI",type="string",default=''),
>>> Field("previousFEN",type="string",default=''),
>>> Field("game_control",type="string",default=''),
>>> Field("ply_control",type="integer",default=0)
>>> )
>>>
>>> query = (db.problem.fen == posFEN)
>>> problem = db(q

[web2py] Long text internationalization

2019-02-12 Thread Jon Subscripted
Hi everyone,
Which is the common practice when facing long text internationalization?

For instance, What should be done when you want to render a web page,
sharing a common layout, that has several paragraphs that must be
completelly translated?

Based on the manual (
http://www.web2py.com/books/default/chapter/29/04/the-core#Internationalization-and-Pluralization-with-T
) only string constants should be used with T. My guess is that large texts
should be treated differently.

Thanks & Regards, Jon.

-- 
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] Accessing MySQL data without define tables

2019-02-12 Thread Jon Subscripted
Hi,
BTW I was checking "sql.log" file just in case I had unintentionally messed
up redefining the fen field twice and saw that every execution of the
script in my previous email led to a CREATE TABLE (see below). There's more
than one (one per each test I performed with the script).

Is this normal? Should the table definition in the script outside
web2py-app lead to a CREATE TABLE?

I also realized that the original CREATE TABLE statement created by web2py
(at the very top of the "sql.log" file, right after auth tables are
created) does have a different length VARCHAR( `fen` VARCHAR(512),).

Can this kind of length difference lead to MySQL to create a duplicated
field?

Thanks in advance.
Regards, Jon.

timestamp: 2019-02-11T16:33:57.499000
CREATE TABLE problem(
id INT AUTO_INCREMENT NOT NULL,
question_hint VARCHAR(255),
fen VARCHAR(255),
solutionSAN LONGTEXT,
solutionUCI LONGTEXT,
solordered CHAR(1),
pcomment VARCHAR(255),
previousFEN VARCHAR(255),
previousSAN VARCHAR(255),
previousUCI VARCHAR(255),
game_control VARCHAR(255),
ply_control INT,
PRIMARY KEY(id)
) ENGINE=InnoDB CHARACTER SET utf8;

On Tue, Feb 12, 2019 at 10:49 AM Jon Subscripted 
wrote:

> Thanks Ben,
> I did what you suggested and somehow I think I moved on.
>
> Still I got a weird error: InternalError: (1060, u"Duplicate column name
> 'fen__tmp'")
>
> import sys
>
> sys.path.append(r'C:\Users\Jon\Downloads\web2py_src\web2py\gluon')
>
> from gluon import DAL,Field
> from gluon import *
>
> dbpath =
> r'C:\Users\Jon\Downloads\web2py_src\web2py\applications\xakemate_scratch\databases'
> problemsuri = 'mysql://root:web2py@localhost/xakemate'
> posFEN = 'rnb2rk1/pp4pp/1qpbp3/3p4/4P3/3P1NP1/PPPN1RBP/R1BQ3K b - - 0 13'
>
>
> db = DAL(problemsuri)#,folder=dbpath)#,auto_import=True)
>
> db.define_table(
> "problem",
> Field("question_hint",type="string"),
>
> Field("fen",type="string"),#,requires=(IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'problem.fen'))),
> Field("solutionSAN",type="list:string",requires=IS_NOT_EMPTY()),
> Field("solutionUCI",type="list:string",requires=IS_NOT_EMPTY()),
> Field("solordered",type="boolean",default=True),
> Field("pcomment",type="string"),
> Field("previousSAN",type="string",default=''),
> Field("previousUCI",type="string",default=''),
> Field("previousFEN",type="string",default=''),
> Field("game_control",type="string",default=''),
> Field("ply_control",type="integer",default=0)
> )
>
> query = (db.problem.fen == posFEN)
> problem = db(query).select(orderby=db.problem.id).first()
>
> No handlers could be found for logger "web2py"
> WARNING:root:Unable to import plural rules: No module named plural_rules
>
> Traceback (most recent call last):
>   File "C:\Python27\withoutdefine.py", line 27, in 
> Field("ply_control",type="integer",default=0)
>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 7085, in
> define_table
> table = self.lazy_define_table(tablename,*fields,**args)
>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 7117, in
> lazy_define_table
> polymodel=polymodel)
>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 948, in
> create_table
> fake_migrate=fake_migrate)
>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 1054, in
> migrate_table
> self.execute(sub_query)
>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 1693, in execute
> return self.log_execute(*a, **b)
>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 1687, in
> log_execute
> ret = self.cursor.execute(*a, **b)
>   File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 170, in
> execute
> result = self._query(query)
>   File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 328, in
> _query
> conn.query(q)
>   File "C:\Python27\lib\site-packages\pymysql\connections.py", line 517,
> in query
> self._affected_rows = self._read_query_result(unbuffered=unbuffered)
>   File "C:\Python27\lib\site-packages\pymysql\connections.py", line 732,
> in _read_query_result
> result.read()
>   File "C:\Python27\lib\site-packages\pymysql\connections.py", line 1075,
> in read
> first_packet = self.connection._read_packet()
>   File "C:\Python27\lib\site-packages\pymysql\connections.py", line 684,
> in _read_packet

Re: [web2py] Accessing MySQL data without define tables

2019-02-12 Thread Jon Subscripted
Thanks Ben,
I did what you suggested and somehow I think I moved on.

Still I got a weird error: InternalError: (1060, u"Duplicate column name
'fen__tmp'")

import sys

sys.path.append(r'C:\Users\Jon\Downloads\web2py_src\web2py\gluon')

from gluon import DAL,Field
from gluon import *

dbpath =
r'C:\Users\Jon\Downloads\web2py_src\web2py\applications\xakemate_scratch\databases'
problemsuri = 'mysql://root:web2py@localhost/xakemate'
posFEN = 'rnb2rk1/pp4pp/1qpbp3/3p4/4P3/3P1NP1/PPPN1RBP/R1BQ3K b - - 0 13'


db = DAL(problemsuri)#,folder=dbpath)#,auto_import=True)

db.define_table(
"problem",
Field("question_hint",type="string"),

Field("fen",type="string"),#,requires=(IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'problem.fen'))),
Field("solutionSAN",type="list:string",requires=IS_NOT_EMPTY()),
Field("solutionUCI",type="list:string",requires=IS_NOT_EMPTY()),
Field("solordered",type="boolean",default=True),
Field("pcomment",type="string"),
Field("previousSAN",type="string",default=''),
Field("previousUCI",type="string",default=''),
Field("previousFEN",type="string",default=''),
Field("game_control",type="string",default=''),
Field("ply_control",type="integer",default=0)
)

query = (db.problem.fen == posFEN)
problem = db(query).select(orderby=db.problem.id).first()

No handlers could be found for logger "web2py"
WARNING:root:Unable to import plural rules: No module named plural_rules

Traceback (most recent call last):
  File "C:\Python27\withoutdefine.py", line 27, in 
Field("ply_control",type="integer",default=0)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 7085, in
define_table
table = self.lazy_define_table(tablename,*fields,**args)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 7117, in
lazy_define_table
polymodel=polymodel)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 948, in
create_table
fake_migrate=fake_migrate)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 1054, in
migrate_table
self.execute(sub_query)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 1693, in execute
return self.log_execute(*a, **b)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 1687, in
log_execute
ret = self.cursor.execute(*a, **b)
  File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 170, in
execute
result = self._query(query)
  File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 328, in
_query
conn.query(q)
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 517, in
query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 732, in
_read_query_result
result.read()
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 1075,
in read
first_packet = self.connection._read_packet()
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 684, in
_read_packet
packet.check_error()
  File "C:\Python27\lib\site-packages\pymysql\protocol.py", line 220, in
check_error
err.raise_mysql_exception(self._data)
  File "C:\Python27\lib\site-packages\pymysql\err.py", line 109, in
raise_mysql_exception
raise errorclass(errno, errval)
InternalError: (1060, u"Duplicate column name 'fen__tmp'")

I'm not aware of defining the 'fen' field twice, so I do not understande
where did this come from.
What does this mean?
Regards, Jon.


On Mon, Feb 11, 2019 at 6:08 PM Ben Duncan  wrote:

> No , all you need is the db.define for the table you are going to access,
> unless there is foreign keyes involved.
> Then include the PARENT table if these are child tables.
>
> *Ben Duncan*
> DBA / Chief Software Architect
> Mississippi State Supreme Court
> Electronic Filing Division
>
>
> On Mon, Feb 11, 2019 at 9:27 AM Jon Subscripted <
> jonsubscripti...@gmail.com> wrote:
>
>> Thanks Ben,
>> Should I include just the define_table for that very table (there are
>> more, but will not be accessed)?
>> Regards, Jon.
>>
>> On Mon, Feb 11, 2019 at 4:26 PM Ben Duncan  wrote:
>>
>>> If this script is being run OUTSIDE the web2py environment then you will
>>> need to include the define inside the python program itself.
>>>
>>> *Ben Duncan*
>>> DBA / Chief Software Architect
>>> Mississippi State Supreme Court
>>> Electronic Filing Division
>>>
>>>
>>> On Mon, Feb 11, 2019 at 9:01

Re: [web2py] Accessing MySQL data without define tables

2019-02-11 Thread Jon Subscripted
Thanks Ben,
Should I include just the define_table for that very table (there are more,
but will not be accessed)?
Regards, Jon.

On Mon, Feb 11, 2019 at 4:26 PM Ben Duncan  wrote:

> If this script is being run OUTSIDE the web2py environment then you will
> need to include the define inside the python program itself.
>
> *Ben Duncan*
> DBA / Chief Software Architect
> Mississippi State Supreme Court
> Electronic Filing Division
>
>
> On Mon, Feb 11, 2019 at 9:01 AM Jon Subscripted <
> jonsubscripti...@gmail.com> wrote:
>
>> Thanks Ben,
>> Honestly I do not know if I understood what you suggest, sorry... it's
>> actually my fault as I'm still trying to learn web2py (reading the manual,
>> etc.).
>>
>> My web2py-app is actually working, but I still have lost of data to load
>> in the DB. Most of the data to populate de DB is created outside the app
>> itself (this may change in the future, but unfortunatelly it is like that
>> now).
>>
>> As this data creation is done outside my web2py-app I wanted the scripts
>> creating this data to check which data has already been uploaded to the
>> web2py-app database. In order to do so I wrote a python script which is
>> meant to be run apart from the web2py-app to check if the data is already
>> in the DB (calling the snippet below), if it's not create it and then load
>> it.
>>
>> problemsuri = 'mysql://root:web2py@localhost/xakemate'
>> dbpath =
>> r'C:\Users\Jon\Downloads\web2py_src\web2py\applications\xakemate_scratch\databases'
>>
>> def checkproblem(posFEN):
>> print "checking",posFEN
>> dbproblems = DAL(problemsuri,folder=dbpath,auto_import=True)
>>
>> query = (dbproblems.problem.fen == posFEN)
>> problem = dbproblems(query).select(orderby=dbproblems.problem.id
>> ).first()
>> print "DUPLICATED problem",problem
>> return problem
>>
>> But when I do run the code I get an error telling me "AttributeError:
>> 'DAL' object has no attribute 'problem'".
>>
>> Do I need to define the table I'm trying to access again ('cause it's
>> already defined in models folder, but not in this script)?
>> If I do need to define the table again, How should I do it?
>> Regards, Jon.
>>
>>
>>
>> On Mon, Feb 11, 2019 at 3:43 PM Ben Duncan  wrote:
>>
>>> Oh yeah. One thing I missed explaining is that I spend the end of last
>>> year creating a python library that would take file layouts I've gleaned
>>> from a 4GL, old cobol systems and an Informix database, and some Oracle
>>> Financials.
>>>
>>> I've create a "layout template" that the library will generate the
>>> create table, primary keyes, secondary keyes, foreign keyes, grants and
>>> views.
>>> As part of the library it will generate the pydal "define" statements as
>>> well.
>>>
>>>
>>> *Ben Duncan*
>>> DBA / Chief Software Architect
>>> Mississippi State Supreme Court
>>> Electronic Filing Division
>>>
>>>
>>> On Mon, Feb 11, 2019 at 8:36 AM Ben Duncan  wrote:
>>>
>>>> I'm not sure what your statement means, however i will give it my best
>>>> shot to explain> I'm new to web2py myself.
>>>> Her goes:
>>>>
>>>> In my models folder i have several different sub folders:
>>>> ar, ap ,gl ...etc...
>>>>
>>>> Each has the definition. For example under ar there is the
>>>> dbf_arfiles_dal.py which starts likes this:
>>>>
>>>> db.define_table('ar_cusmas_billing_info',
>>>> Field('company_number', type='reference client.company_number',
>>>> ondelete='CASCADE'),
>>>> Field('client_number', type='reference client.client_number',
>>>> ondelete='CASCADE'),
>>>> Field('bank_name', type='string', length=30),
>>>> Field('bank_route', type='integer'),
>>>> Field('bank_acct', type='integer'),
>>>> Field('cc', type='string', length=2),
>>>> Field('ccno', type='integer'),
>>>> Field('exp1', type='date'),
>>>> Field('holder1', type='string', length=50),
>>>> Field('cc2', type='string', length=2),
>>>> Field('ccno2', type='integer'),
>>>> Field('exp2', type='date'),
>>>> Field('holder2', type='string', length=50),
>>>> primarykey=['company_number','client_number'],
>>>> migrate=False)
>>>>
>&g

Re: [web2py] Re: Migrate from sqlite to mysql

2019-02-11 Thread Jon Subscripted
Hi Andrea,
Is this " problem about requirements " a notification that MySQL
installation wizard showed?
If it is, in my experience you can ignore it and move on with the
installation. Python3.X is optional for MySQL, it just suggests to install
it.
Regards, Jon.

On Sun, Feb 10, 2019 at 12:19 PM 黄祥  wrote:

> but, what happen if I install python 3.7 on windows? Does web2py still use
>> 2.7?
>>
>
> this question is vague
> not sure what do you have in web2py? win version or source version?
> if use source version, then web2py run on python is depending on the
> command you use
> *e.g. in ubuntu environment*
> python web2py.py # for python 2
> python3 web2py.py # for python 3
>
>
>> Or installinh mysql without this connector?
>>
>
> not sure, not tested, perhaps can try it first in virtual machine first
> e.g. virtualbox or vmware
>
>
>> What does you think? Other suggestions? I don't like to use different
>> things because I need to publish my application to pythonanywhere...
>>
>
> think mysql and mariadb is not different things, it's same :
> In 2010, when Oracle acquired Sun, Widenius forked the open-source MySQL
> project to create MariaDB.
> ref:
> https://en.wikipedia.org/wiki/MySQL
>
> for conda, is python package manager just think about it's like a
> versioning for python installation
> ref:
> https://en.wikipedia.org/wiki/Conda_(package_manager)
>
> best regards,
> stifan
>
> --
> 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.
>

-- 
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] Accessing MySQL data without define tables

2019-02-11 Thread Jon Subscripted
uuid
>>
>> from gluon.validators import CLEANUP, CRYPT, IS_ALPHANUMERIC,
>> IS_DATE_IN_RANGE, IS_DATE, \
>> IS_DATETIME_IN_RANGE, IS_DATETIME, IS_DECIMAL_IN_RANGE, \
>> IS_EMAIL, IS_EMPTY_OR, IS_EXPR, IS_FLOAT_IN_RANGE, IS_IMAGE, \
>> IS_IN_DB, IS_IN_SET, IS_INT_IN_RANGE, IS_IPV4, IS_LENGTH, \
>> IS_LIST_OF, IS_LOWER, IS_MATCH, IS_EQUAL_TO, IS_NOT_EMPTY, \
>> IS_NOT_IN_DB, IS_NULL_OR, IS_SLUG, IS_STRONG, IS_TIME, \
>> IS_UPLOAD_FILENAME, IS_UPPER, IS_URL
>>
>> # from gluon.validators import CRYPT, IS_EMAIL, IS_EQUAL_TO,
>> IS_INT_IN_RANGE, IS_LOWER, IS_MATCH, IS_NOT_EMPTY, \
>> # IS_NOT_IN_DB
>> from pydal.objects import Table, Field, Row
>>
>>  (and so on till I get to the bottom)
>>
>> #
>> -
>> # Local application settings
>> #
>> -
>>
>> settings = Storage()
>>
>> settings.migrate = False
>> settings.title = request.application
>> settings.subtitle = T('Ben Duncan')
>> settings.author = 'Ben Duncan'
>> settings.author_email = 'y...@example.com'
>> settings.keywords = 'Ben Duncan'
>> settings.description = 'Ben Duncan'
>> settings.layout_theme = 'Default'
>> settings.database_uri = 'postgres://
>> web2py:web2py@10.13.70.47:7103/ac03303_live'
>> settings.security_key = 'c4d5c7ec-97b4-474b-98d3-9c1582dad510'
>> settings.email_server = 'localhost'
>> settings.email_sender = 'y...@example.com'
>> settings.email_login = ''
>> settings.login_method = 'local'
>> settings.login_config = ''
>> settings.plugins = []
>> session.is_logged_in = 'NO'
>>
>> --
>>
>> Then in db.py I have:
>>
>> # -*- coding: utf-8 -*-
>>
>> #
>> -
>> # Database model
>> #
>> -
>>
>> db = DAL(settings.database_uri, pool_size=10, migrate_enabled=False,
>> fake_migrate_all=True )
>>
>> #
>> -
>> # Here is sample code if you need for
>> # - email capabilities
>> # - authentication (registration, login, logout, ... )
>> # - authorization (role based authorization)
>> # - services (xml, csv, json, xmlrpc, jsonrpc, amf, rss)
>> # - old style crud actions
>> # (more options discussed in gluon/tools.py)
>> #
>> -
>> # host names must be a list of allowed host names (glob syntax allowed)
>> # auth = Auth(db, host_names=configuration.get('host.names'))
>> # auth = Auth(db, secure=True)
>> #
>> -
>> #auth = Auth(db,signature=False)
>> crud = Crud(db)
>>
>> .. (every thing else is commented out  as well. this is because I am
>> doing my own custome authentication and other
>> things - which MAYBE the grief I'm causing myself. ..)
>>
>> --
>>
>>
>> Hopefully this should get you going
>>
>> If I've missed anything, Anthony can you fill in ?
>>
>> Good Luck ...
>>
>>
>> *Ben Duncan*
>> DBA / Chief Software Architect
>> Mississippi State Supreme Court
>> Electronic Filing Division
>>
>>
>> On Sat, Feb 9, 2019 at 10:56 AM Jon Subscripted <
>> jonsubscripti...@gmail.com> wrote:
>>
>>> Hi Ben,
>>> Inside my app folder I do have the table defined, but not in my script
>>> (accessing   the db outside web2py).
>>> I thought that the folder path reference solved this (*).
>>> Should i add the define table in my script?
>>> Thanks and regards, Jon.
>>>
>>> (*) I guess that’s why .table files are kept even when SQLite is no
>>> longer usted.
>>>
>>> El El vie, 8 feb 2019 a las 14:28, Ben Duncan 
>>> escribió:
>>>
>>>> Did you set up the db_define table for the database in models.
>>>>
>>>> For example, the accounting package I am working on for our Supreme
>>>> Cour

Re: [web2py] Accessing MySQL data without define tables

2019-02-09 Thread Jon Subscripted
Hi Ben,
Inside my app folder I do have the table defined, but not in my script
(accessing   the db outside web2py).
I thought that the folder path reference solved this (*).
Should i add the define table in my script?
Thanks and regards, Jon.

(*) I guess that’s why .table files are kept even when SQLite is no longer
usted.

El El vie, 8 feb 2019 a las 14:28, Ben Duncan  escribió:

> Did you set up the db_define table for the database in models.
>
> For example, the accounting package I am working on for our Supreme Court
> has and external postgres database.
> From the DDL, I've created, for example, the "ship to code" file (we reuse
> for something else)
>
> -
> db.define_table('ar_ship_code',
> Field('company_number', type='reference company.company_number',
> ondelete='CASCADE'),
> Field('code', type='string', length=10),
> Field('short_desc', type='string', length=20),
> Field('description', type='string', length=255),
> Field('notes', type='text'),
> primarykey=['company_number','code'],
> migrate=False)
>
> ---
>
> For each table you want to access, you will need a "db.define_table" entry
> in the model directory.
>
> Hope this helps
> *Ben Duncan*
> DBA / Chief Software Architect
> Mississippi State Supreme Court
> Electronic Filing Division
>
>
> On Fri, Feb 8, 2019 at 7:17 AM Jon Subscripted 
> wrote:
>
>> Hi everyone,
>> I'm trying to access the data stored in my app db from a different piece
>> of software (apart from my web2py app). But I get an error AttributeError.
>>
>> Based on the manual:
>>
>>
>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Using-DAL-without-define-tables
>>
>> I used the code below (from IDLE):
>>
>> import sys
>>
>> sys.path.append(r'C:\Users\Jon\Downloads\web2py_src\web2py\gluon')
>>
>> from gluon import DAL
>>
>> dbpath =
>> r'C:\Users\Jon\Downloads\web2py_src\web2py\applications\xakemate_scratch\databases'
>> problemsuri = 'mysql://root:web2py@localhost/xakemate'
>> pos = 'test_position'
>>
>> db = DAL(problemsuri,folder=dbpath,auto_import=True)
>> query = (db.problem.fen == pos)
>> problem = db(query).select(orderby=db.problem.id).first()
>>
>> I get the following error:
>>
>> Traceback (most recent call last):
>>   File "", line 1, in 
>> query = (dbproblems.problem.fen == posFEN)
>>   File "C:\Python27\lib\site-packages\gluon\dal.py", line 7150, in
>> __getattr__
>> return ogetattr(self, key)
>> AttributeError: 'DAL' object has no attribute 'problem'
>>
>> From what I understood the tables should be auto-imported and thus known
>> to my code. Why is it not finding the table?
>>
>> In addition to that I've got a couple of questions:
>>
>> 1st Should I import PYDAL (from pydal import DAL)  or GLUON.DAL (as I
>> did)?
>>
>> 2nd Even when using the db different from SQLite should we point to
>> "applications/myapp/databases"?
>>
>> Thanks in advance, Jon.
>>
>>
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>>  Libre
>> de virus. www.avast.com
>> <https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
>> <#m_-6215750885323799383_m_5787271047422858639_m_-5898545075541849496_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>
>> --
>> 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.
>>
> --
> 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.
>

-- 
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] Accessing MySQL data without define tables

2019-02-08 Thread Jon Subscripted
Hi everyone,
I'm trying to access the data stored in my app db from a different piece of
software (apart from my web2py app). But I get an error AttributeError.

Based on the manual:

http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Using-DAL-without-define-tables

I used the code below (from IDLE):

import sys

sys.path.append(r'C:\Users\Jon\Downloads\web2py_src\web2py\gluon')

from gluon import DAL

dbpath =
r'C:\Users\Jon\Downloads\web2py_src\web2py\applications\xakemate_scratch\databases'
problemsuri = 'mysql://root:web2py@localhost/xakemate'
pos = 'test_position'

db = DAL(problemsuri,folder=dbpath,auto_import=True)
query = (db.problem.fen == pos)
problem = db(query).select(orderby=db.problem.id).first()

I get the following error:

Traceback (most recent call last):
  File "", line 1, in 
query = (dbproblems.problem.fen == posFEN)
  File "C:\Python27\lib\site-packages\gluon\dal.py", line 7150, in
__getattr__
return ogetattr(self, key)
AttributeError: 'DAL' object has no attribute 'problem'

>From what I understood the tables should be auto-imported and thus known to
my code. Why is it not finding the table?

In addition to that I've got a couple of questions:

1st Should I import PYDAL (from pydal import DAL)  or GLUON.DAL (as I did)?

2nd Even when using the db different from SQLite should we point to
"applications/myapp/databases"?

Thanks in advance, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

-- 
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: problem with cpdb.py "EXCEPTION: could not set DAL"

2019-02-07 Thread Jon Subscripted
Hi eveyone,
Just one clarification.

When I said "I do not really know why, but some of the tables did not make
it into the new db." in my previous email, I meant that some table data (as
a whole) did not make it into the new db.

This meaning the table is there but none of the original data (not a
record) is in the db. Even if the data was correctly export to the .csv
file. Surprinsingly when a new record is inserted in any of the tables
presenting this problem, the id will start as if previous data had been
correctly loaded (e.g. if N record were in the original SQLite table, the
new will get N+1 id).

Regards, Jon.

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Thu, Feb 7, 2019 at 1:05 PM Jon Subscripted 
wrote:

> Hi everyone,
> Eventually I managed to move on, without cpdb.py.
>
> I had to do it as Massimo suggests in this thread "Best way to migrate
> from sqlite to postgresql (or other db)":
>
> https://groups.google.com/forum/#!topic/web2py/mQk2hoRf7gw
>
> Eventhough, auth tables game me a lot of issues and had to tweak the
> processs a little. I followed the steps below:
>
> 1) Launched my old app from command line:
> >>> python web2py.py -S old_sqlite_based_app -M -P
> 2) Export the db to a single .csv file:
> >>> db.export_to_csv_file(open('backup.csv','wb'))
> 3) Create new empty app with SQLite
> 4) Create empty db (schema only, no tables) in mysql
> 5) Change db uri to mysql empty db
> 6) Launch app from command line to get models built (mainly auth tables):
> >>> python web2py.py -S new_empty_app -M -P
> 7) Stop it and check auth tables were built in mysql correctly
> 8) Clone my old app code with Mercurial in the new app folder
> 9) Launch app from command line to get models built (all remaining tables,
> except auth which were already built)
> 10) Stop it and check all remaining tables were built in mysql correctly
> 11) Launch app from command line and load .csv file data
> >>> db.import_from_csv_file(open('backup.csv','rb'))
>
> I do not really know why, but some of the tables did not make it into the
> new db.
>
> I'm pretty happy with the result anyway.
> Regards, Jon.
>
> PS. When I was doing the process as orginally suggested by Massimo and
> Michael Beller (without steps 3,5,6 and 6) I got the error below. Which I
> do not understand, but led me to create the empty db to get some fresh auth
> tables.
> I just wonder if there's some kind of problem in my original tables...
>
> C:\Users\Jon\Downloads\web2py_src\web2py>python web2py.py -S old_app -M -P
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2019
> Version 2.17.2-stable+timestamp.2018.10.06.18.54.02
> Database drivers available: sqlite3, imaplib, pyodbc, pymysql
> Traceback (most recent call last):
>   File "C:\Users\Jon\Downloads\web2py_src\web2py\gluon\restricted.py",
> line 219, in restricted
> exec(ccode, environment)
>   File "applications\old_app\models\menu.py", line 19, in 
> if auth.has_membership('managers'):
>   File "C:\Users\Jon\Downloads\web2py_src\web2py\gluon\authapi.py", line
> 592, in has_membership
> group_id = self.id_group(group_id)  # interpret group_id as a role
>   File "C:\Users\Jon\Downloads\web2py_src\web2py\gluon\authapi.py", line
> 454, in id_group
> rows = self.db(self.table_group().role == role).select()
>   File "C:\Python27\lib\site-packages\pydal\objects.py", line 2250, in
> select
> return adapter.select(self.query, fields, attributes)
>   File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 762,
> in select
> return self._select_aux(sql, fields, attributes, colnames)
>   File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 718,
> in _select_aux
> rows = self._select_aux_execute(sql)
>   File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 712,
> in _select_aux_execute
> self.execute(sql)
>   File "C:\Python27\lib\site-packages\pydal\adapters\__init__.py", line
> 67, in wrap
> return f(*args, **kwargs)
>   File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 412,
> in execute
> rv = self.cursor.execute(command, *args[1:], **kwargs)
>   File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 170, in
> execute
> result = self._query(query)
>   File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 328, in
> _quer

Re: [web2py] Re: problem with cpdb.py "EXCEPTION: could not set DAL"

2019-02-07 Thread Jon Subscripted
Hi everyone,
Eventually I managed to move on, without cpdb.py.

I had to do it as Massimo suggests in this thread "Best way to migrate from
sqlite to postgresql (or other db)":

https://groups.google.com/forum/#!topic/web2py/mQk2hoRf7gw

Eventhough, auth tables game me a lot of issues and had to tweak the
processs a little. I followed the steps below:

1) Launched my old app from command line:
>>> python web2py.py -S old_sqlite_based_app -M -P
2) Export the db to a single .csv file:
>>> db.export_to_csv_file(open('backup.csv','wb'))
3) Create new empty app with SQLite
4) Create empty db (schema only, no tables) in mysql
5) Change db uri to mysql empty db
6) Launch app from command line to get models built (mainly auth tables):
>>> python web2py.py -S new_empty_app -M -P
7) Stop it and check auth tables were built in mysql correctly
8) Clone my old app code with Mercurial in the new app folder
9) Launch app from command line to get models built (all remaining tables,
except auth which were already built)
10) Stop it and check all remaining tables were built in mysql correctly
11) Launch app from command line and load .csv file data
>>> db.import_from_csv_file(open('backup.csv','rb'))

I do not really know why, but some of the tables did not make it into the
new db.

I'm pretty happy with the result anyway.
Regards, Jon.

PS. When I was doing the process as orginally suggested by Massimo and
Michael Beller (without steps 3,5,6 and 6) I got the error below. Which I
do not understand, but led me to create the empty db to get some fresh auth
tables.
I just wonder if there's some kind of problem in my original tables...

C:\Users\Jon\Downloads\web2py_src\web2py>python web2py.py -S old_app -M -P
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2019
Version 2.17.2-stable+timestamp.2018.10.06.18.54.02
Database drivers available: sqlite3, imaplib, pyodbc, pymysql
Traceback (most recent call last):
  File "C:\Users\Jon\Downloads\web2py_src\web2py\gluon\restricted.py", line
219, in restricted
exec(ccode, environment)
  File "applications\old_app\models\menu.py", line 19, in 
if auth.has_membership('managers'):
  File "C:\Users\Jon\Downloads\web2py_src\web2py\gluon\authapi.py", line
592, in has_membership
group_id = self.id_group(group_id)  # interpret group_id as a role
  File "C:\Users\Jon\Downloads\web2py_src\web2py\gluon\authapi.py", line
454, in id_group
rows = self.db(self.table_group().role == role).select()
  File "C:\Python27\lib\site-packages\pydal\objects.py", line 2250, in
select
return adapter.select(self.query, fields, attributes)
  File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 762, in
select
return self._select_aux(sql, fields, attributes, colnames)
  File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 718, in
_select_aux
rows = self._select_aux_execute(sql)
  File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 712, in
_select_aux_execute
self.execute(sql)
  File "C:\Python27\lib\site-packages\pydal\adapters\__init__.py", line 67,
in wrap
return f(*args, **kwargs)
  File "C:\Python27\lib\site-packages\pydal\adapters\base.py", line 412, in
execute
rv = self.cursor.execute(command, *args[1:], **kwargs)
  File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 170, in
execute
result = self._query(query)
  File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 328, in
_query
conn.query(q)
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 517, in
query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 732, in
_read_query_result
result.read()
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 1075,
in read
first_packet = self.connection._read_packet()
  File "C:\Python27\lib\site-packages\pymysql\connections.py", line 684, in
_read_packet
packet.check_error()
  File "C:\Python27\lib\site-packages\pymysql\protocol.py", line 220, in
check_error
err.raise_mysql_exception(self._data)
  File "C:\Python27\lib\site-packages\pymysql\err.py", line 109, in
raise_mysql_exception
raise errorclass(errno, errval)
ProgrammingError: (1146, u"Table 'test2.auth_group' doesn't exist")

<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
Libre
de virus. www.avast.com
<https://www.avast.com/sig-email?utm_medium=email_source=link_campaign=sig-email_content=webmail>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Feb 5, 2019 at 10:38 AM Jon Subscripted 
wrote:

> Hi everyone,
> I took a look at cpdb.py code and saw that "-d" option is just used 

Re: [web2py] Re: problem with cpdb.py "EXCEPTION: could not set DAL"

2019-02-05 Thread Jon Subscripted
Hi everyone,
I took a look at cpdb.py code and saw that "-d" option is just used to find
where "dal.py" and add the folder sys.path.

So, instead of the relative path, I decided to use the absolute path. I do
not get the "could not set DAL" exception anymore, but now I get the
following error:

"Field auth_cas.id is already bound to a table"

And the warning regarding the "plural_rules".
This is the command I executed:

C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python scripts/cpdb.py
-f applications/paravolcar10enero_tarde/databases  -y
sqlite://storage.sqlite -Y sqlite://storage3.sqlite -d
C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon
No handlers could be found for logger "web2py"
WARNING:root:Unable to import plural rules: No module named plural_rules
creating tables...
EXCEPTION: could not make a copy of the database
Field auth_cas.id is already bound to a table

Any suggestions? What does this mean?
Thanks, Jon.

PS. I'm just using sqlite to sqlite copy for now, for the sake of
simplicity.

On Mon, Feb 4, 2019 at 10:06 AM Jon Subscripted 
wrote:

> Hi Dave,
> Yes, if you refer to the Python installed in the computer I'm using Python
> 2.7.5.
>
> C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python scripts/cpdb.py
> -f applications/paravolcar10enero_tarde/databases  -y
> sqlite://storage.sqlite -Y sqlite://storage3.sqlite -d ../gluon
> No handlers could be found for logger "web2py"
> WARNING:root:Unable to import plural rules: No module named plural_rules
> EXCEPTION: could not set DAL
> No module named dal
> creating tables...
> EXCEPTION: could not make a copy of the database
> 'NoneType' object is not iterable
>
> C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python.exe
> Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32
> bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>>
>
> Thanks, Jon.
>
> PS. I'm not fully aware of the relationship between the existing Python
> installation in the computer and the pre-packed Python (delivered as part
> of Web2py).
>
> On Sun, Feb 3, 2019 at 10:21 PM Dave S  wrote:
>
>>
>>
>> On Saturday, February 2, 2019 at 6:05:55 AM UTC-8, Jonsubs wrote:
>>>
>>> Hi everyone,
>>> I'm trying to copy my database (already populated) using cbpd.py but I
>>> get an error.
>>> (I'm working in Windows 10 with Web2py
>>> 2.17.2-stable+timestamp.2018.10.06.18.54.02)
>>>
>>>
>> So you're using the in-box python, which is python2?
>>
>> /dps
>>
>>
>>> 1st I changed the database URI in appconfig.ini from
>>> sqlite://storage.sqlite to sqlite://storage3.sqlite
>>> 2nd I checked with SQLite Browser that sqlite://storage3.sqlite was
>>> created and tables are created also (but empty)
>>> 3rd I launched the command below, but I does not work.
>>>
>>> C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python
>>> scripts/cpdb.py -f applications/paravolcar10enero_tarde/databases  -y
>>> sqlite://storage.sqlite -Y sqlite://storage3.sqlite -d ../gluon
>>> No handlers could be found for logger "web2py"
>>> WARNING:root:Unable to import plural rules: No module named plural_rules
>>> EXCEPTION: could not set DAL
>>> No module named dal
>>> creating tables...
>>> EXCEPTION: could not make a copy of the database
>>> 'NoneType' object is not iterable
>>>
>>> Any suggestions? I do not really know how to interpret the error.
>>> Thanks, Jon.
>>>
>> --
>> 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.
>>
>

-- 
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: problem with cpdb.py "EXCEPTION: could not set DAL"

2019-02-04 Thread Jon Subscripted
Hi Dave,
Yes, if you refer to the Python installed in the computer I'm using Python
2.7.5.

C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python scripts/cpdb.py
-f applications/paravolcar10enero_tarde/databases  -y
sqlite://storage.sqlite -Y sqlite://storage3.sqlite -d ../gluon
No handlers could be found for logger "web2py"
WARNING:root:Unable to import plural rules: No module named plural_rules
EXCEPTION: could not set DAL
No module named dal
creating tables...
EXCEPTION: could not make a copy of the database
'NoneType' object is not iterable

C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python.exe
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32
bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>

Thanks, Jon.

PS. I'm not fully aware of the relationship between the existing Python
installation in the computer and the pre-packed Python (delivered as part
of Web2py).

On Sun, Feb 3, 2019 at 10:21 PM Dave S  wrote:

>
>
> On Saturday, February 2, 2019 at 6:05:55 AM UTC-8, Jonsubs wrote:
>>
>> Hi everyone,
>> I'm trying to copy my database (already populated) using cbpd.py but I
>> get an error.
>> (I'm working in Windows 10 with Web2py
>> 2.17.2-stable+timestamp.2018.10.06.18.54.02)
>>
>>
> So you're using the in-box python, which is python2?
>
> /dps
>
>
>> 1st I changed the database URI in appconfig.ini from
>> sqlite://storage.sqlite to sqlite://storage3.sqlite
>> 2nd I checked with SQLite Browser that sqlite://storage3.sqlite was
>> created and tables are created also (but empty)
>> 3rd I launched the command below, but I does not work.
>>
>> C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python scripts/cpdb.py
>> -f applications/paravolcar10enero_tarde/databases  -y
>> sqlite://storage.sqlite -Y sqlite://storage3.sqlite -d ../gluon
>> No handlers could be found for logger "web2py"
>> WARNING:root:Unable to import plural rules: No module named plural_rules
>> EXCEPTION: could not set DAL
>> No module named dal
>> creating tables...
>> EXCEPTION: could not make a copy of the database
>> 'NoneType' object is not iterable
>>
>> Any suggestions? I do not really know how to interpret the error.
>> Thanks, Jon.
>>
> --
> 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.
>

-- 
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] problem with cpdb.py "EXCEPTION: could not set DAL"

2019-02-02 Thread Jon Subscripted
Hi everyone,
I'm trying to copy my database (already populated) using cbpd.py but I get
an error.
(I'm working in Windows 10 with Web2py
2.17.2-stable+timestamp.2018.10.06.18.54.02)

1st I changed the database URI in appconfig.ini from
sqlite://storage.sqlite to sqlite://storage3.sqlite
2nd I checked with SQLite Browser that sqlite://storage3.sqlite was created
and tables are created also (but empty)
3rd I launched the command below, but I does not work.

C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py>python scripts/cpdb.py
-f applications/paravolcar10enero_tarde/databases  -y
sqlite://storage.sqlite -Y sqlite://storage3.sqlite -d ../gluon
No handlers could be found for logger "web2py"
WARNING:root:Unable to import plural rules: No module named plural_rules
EXCEPTION: could not set DAL
No module named dal
creating tables...
EXCEPTION: could not make a copy of the database
'NoneType' object is not iterable

Any suggestions? I do not really know how to interpret the error.
Thanks, Jon.

-- 
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: MySQL based Web2Py app

2019-02-01 Thread Jon Subscripted
Hi everyone,
Following with the above subject.

I'm not completely sure I haven't lost my track already, so I might be
forgetting some of the things I tested. But somehow now I'm facing a
different error.

This is what I did. Starting from scratch:
1st I created a regular application in Web2py using SQLite.
2nd I changed the URI from 'sqlite://storage.sqlite' to
'mysql://root:web2py@localhost:3306/test4'. But this time I keep my
databases folder as it is.
(No file removing at all. All *.table files are there storage.sqlite is
there and sql.txt is also there.)
3rd I launch the app and I get the following error.


Traceback (most recent call last):
  File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\restricted.py",
line 219, in restricted
exec(ccode, environment)
  File
"C:/Users/Jon/Downloads/web2py_winAPPLIANCES/web2py/applications/mysqltest3/models/db.py",
line 36, in 
check_reserved=['all'])
  File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\base.py",
line 170, in __call__
obj = super(MetaDAL, cls).__call__(*args, **kwargs)
  File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\base.py",
line 475, in __init__
"Failure to connect, tried %d times:\n%s" % (attempts, tb)
RuntimeError: Failure to connect, tried 5 times:
Traceback (most recent call last):
  File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\base.py",
line 440, in __init__
self._dbname = REGEX_DBNAME.match(uri).group()
AttributeError: 'NoneType' object has no attribute 'group'

What does this mean?

Thanks in advance.

Regards, Jon.

On Wed, Jan 30, 2019 at 5:06 PM Jon Subscripted 
wrote:

> Hi everyone,
> Is there a step by step guide on how to create a MySQL based Web2Py app?
>
> I've been doing fine with SQLite so far, but my db is getting bigger and I
> need to move on.
>
> I tried to do it myself but I must be missing something. I already created
> a db in MySQL and I'm trying to create an app that connects to it from
> scratch but it does not work:
>
> First I tried to do it with the "Application Wizard" (I know it is
> experimental) inserting the uri 'mysql://root:web2py@localhost/test3' in
> the "Database Uri:" entry. Even though it did not complain at all,
> eventually a storage.sqlite file was created in the 'databases' folder.
>
> So I stopped the server, removed the files from databases folder and
> modified the uri in "appconfig.init" uri from "uri =
> sqlite://storage.sqlite" to "uri = mysql://root:web2py@localhost/test3".
> But then, when I start the server again I get the following error:
>
>  Failure to connect, tried 5 times:
> Traceback (most recent call last): File
> "C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\base.py",
> line 455, in __init__ self._adapter = adapter(**kwargs) File
> "C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\__init__.py",
> line 40, in __call__ obj = super(AdapterMeta, cls).__call__(*args,
> **kwargs) File
> "C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\base.py",
> line 369, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs)
> File
> "C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\base.py",
> line 53, in __init__ self.reconnect() File
> "C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\connection.py",
> line 172, in reconnect self.connection = self.connector() File
> "C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\mysql.py",
> line 52, in connector return self.driver.connect(**self.driver_args) File
> "MySQLdb/__init__.py", line 81, in Connect File "MySQLdb/connections.py",
> line 193, in __init__ OperationalError: (1251, 'Client does not support
> authentication protocol requested by server; consider upgrading MySQL
> client')
>
> In order to be sure that MySQL was running and the db was reachable I
> checked from IDLE and it worked (see code below), even if I got a warning
> and had to instal pymysql (using: pip install pymysql). I was able to check
> with MySQL Workbench (on Windows10) that a table was successfully created
> in the db.
>
> >>> from pydal import DAL, Field
> >>> uri = 'mysql://root:web2py@localhost/test3'
> >>> db = DAL(uri)
> >>> ftable = db.define_table('files',
> Field('fullname','string'),
> Field('number','integer'),
> Field('opendatetime','datetime'))
>
> Warning (from warnings mod

Re: [web2py] Re: How to solve '\x00' error

2019-01-31 Thread Jon Subscripted
Thanks!

On Tue, Jan 15, 2019 at 12:36 PM Leonel Câmara 
wrote:

> Jonsubs yes it could if for some reason web2py wasn't graciously stopped
> which can happen depending on the OS and if web2py is taking too long to
> shutdown. Again don't leave migrations enabled otherwise the pickle files
> will be being written which if stopped halfway can lead to corrupted pickle
> files.
>
> --
> 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.
>

-- 
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] MySQL based Web2Py app

2019-01-30 Thread Jon Subscripted
Hi everyone,
Is there a step by step guide on how to create a MySQL based Web2Py app?

I've been doing fine with SQLite so far, but my db is getting bigger and I
need to move on.

I tried to do it myself but I must be missing something. I already created
a db in MySQL and I'm trying to create an app that connects to it from
scratch but it does not work:

First I tried to do it with the "Application Wizard" (I know it is
experimental) inserting the uri 'mysql://root:web2py@localhost/test3' in
the "Database Uri:" entry. Even though it did not complain at all,
eventually a storage.sqlite file was created in the 'databases' folder.

So I stopped the server, removed the files from databases folder and
modified the uri in "appconfig.init" uri from "uri =
sqlite://storage.sqlite" to "uri = mysql://root:web2py@localhost/test3".
But then, when I start the server again I get the following error:

 Failure to connect, tried 5 times:
Traceback (most recent call last): File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\base.py",
line 455, in __init__ self._adapter = adapter(**kwargs) File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\__init__.py",
line 40, in __call__ obj = super(AdapterMeta, cls).__call__(*args,
**kwargs) File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\base.py",
line 369, in __init__ super(SQLAdapter, self).__init__(*args, **kwargs)
File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\base.py",
line 53, in __init__ self.reconnect() File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\connection.py",
line 172, in reconnect self.connection = self.connector() File
"C:\Users\Jon\Downloads\web2py_winAPPLIANCES\web2py\gluon\packages\dal\pydal\adapters\mysql.py",
line 52, in connector return self.driver.connect(**self.driver_args) File
"MySQLdb/__init__.py", line 81, in Connect File "MySQLdb/connections.py",
line 193, in __init__ OperationalError: (1251, 'Client does not support
authentication protocol requested by server; consider upgrading MySQL
client')

In order to be sure that MySQL was running and the db was reachable I
checked from IDLE and it worked (see code below), even if I got a warning
and had to instal pymysql (using: pip install pymysql). I was able to check
with MySQL Workbench (on Windows10) that a table was successfully created
in the db.

>>> from pydal import DAL, Field
>>> uri = 'mysql://root:web2py@localhost/test3'
>>> db = DAL(uri)
>>> ftable = db.define_table('files',
Field('fullname','string'),
Field('number','integer'),
Field('opendatetime','datetime'))

Warning (from warnings module):
  File "C:\Python27\lib\site-packages\pymysql\cursors.py", line 170
result = self._query(query)
Warning: (3719, u"'utf8' is currently an alias for the character set
UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please
consider using UTF8MB4 in order to be unambiguous.")

>>> ftable


Could someone help me understand what's going on or suggest some
documentation, please?
Thanks in advance, Jon.

-- 
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: Generate query based on other db table content

2019-01-25 Thread Jon Subscripted
Ups!! Yes, you're right.
Thanks, Jon.

On Fri, Jan 25, 2019 at 10:00 PM Anthony  wrote:

> #- query generator based on db
>> def get_training_query(training_id):
>> training = db.training[training_id]
>> player_query = player[training.player]
>> color_query = color[training.color]
>> query_total = None
>> for q in [player_query,color_query]:
>> if q is None:
>> continue
>> if query_total is None:
>> query_total = q
>> else:
>> query_total = (query_total & q)
>> return locals()
>>
>
> Above you are returning locals(), whereas I think you want to return
> query_total (also, be mindful of the case where it might end up being None).
>
> 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.
>

-- 
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] Generate query based on other db table content

2019-01-25 Thread Jon Subscripted
Hi all,
I having a weird problem. I'm clueless. I do not even know how to look it
up in the manual.

I'm trying to store in the database (training table) user defined
configurations that will lead to specific queries (accessed through
list_problems_by_training controller's default view).
These configurations are stored, in the db, as options that are mapped into
query chunks afterwards.

If I split the controller code in 2 functions it stops to work, but if I
collapse everything in one single function it works (see code at the end).

OPTION 1) 1 function WORKS

OPTION 2) 2 functions FAILS

I'd like to know why?

Thanks in advance, Jon.

NOTE: I simplified the code below (removing options) to make the email
shorter.

#- in the models
#- option to query mapping
player = {
'any':None,
'me':((db.probdata.white=='jonsubscriptions')|(db.probdata.black=='jonsubscriptions'))
}
color = {
'all':None,
'black':(db.probdata.color==False),
'white':(db.probdata.color==True),
}

#- field option sets
PLAYER_SET = ('any','me')
COLOR_SET = ('all','black','white')

#- tables
db.define_table(
"training",
Field("player",requires=IS_IN_SET(PLAYER_SET),default='any'),
Field("color",requires=IS_IN_SET(COLOR_SET),default='all'),
)
db.define_table(
"user_training",
Field("training","reference
training",requires=(IS_NOT_EMPTY(),IS_IN_DB(db,'training.id'))),
Field("ucomment","string"),
auth.signature)

#- in the controllers
#OPTION 1: 1 function WORKS

def list_problems_by_training():
training_id = request.args(0,cast=int,default=1)
page = request.args(1,cast=int,default=0)
start = page*PROBS_PER_PAGE
stop = start+PROBS_PER_PAGE
#query = get_training_query(training_id)
training = db.training[training_id]
player_query = player[training.player]
color_query = color[training.color]
query_total = None
for q in [player_query,color_query]:
if q is None:
continue
if query_total is None:
query_total = q
else:
query_total = (query_total & q)
total = db(query_total).count()
rows = db(query_total).select(db.probdata.problem,
  db.probdata.color,
  limitby=(start,stop))
return locals()


#OPTION 2: 2 functions FAILS
#- query generator based on db
def get_training_query(training_id):
training = db.training[training_id]
player_query = player[training.player]
color_query = color[training.color]
query_total = None
for q in [player_query,color_query]:
if q is None:
continue
if query_total is None:
query_total = q
else:
query_total = (query_total & q)
return locals()

#example URL
http://127.0.0.1:8000/myapp/default/list_problems_by_training/4/0
def list_problems_by_training():
training_id = request.args(0,cast=int,default=1)
page = request.args(1,cast=int,default=0)
start = page*PROBS_PER_PAGE
stop = start+PROBS_PER_PAGE
query = get_training_query(training_id)
#WHENEVER I UNCOMMENT THIS STATEMENT BELOW I GET AN ERROR  'op'
#rows = db(query).select(limitby=(start,stop))
return locals()
I get this error.
Traceback (most recent call last):
  File "C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\restricted.py",
line 219, in restricted
exec(ccode, environment)
  File
"C:/Users/Jon/Downloads/web2py_win_CB/web2py/applications/myapp/controllers/default.py",
line 1156, in 
  File "C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\globals.py", line
419, in 
self._caller = lambda f: f()
  File "C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\tools.py", line
3982, in f
return action(*a, **b)
  File
"C:/Users/Jon/Downloads/web2py_win_CB/web2py/applications/myapp/controllers/default.py",
line 809, in list_problems_by_training
rows = db(query).select(limitby=(start,stop))
  File
"C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\packages\dal\pydal\base.py",
line 687, in __call__
return self.where(query, ignore_common_filters)
  File
"C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\packages\dal\pydal\base.py",
line 698, in where
return Set(self, query, ignore_common_filters=ignore_common_filters)
  File
"C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\packages\dal\pydal\objects.py",
line 2081, in __init__
query = self.parse(query)
  File
"C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\packages\dal\pydal\objects.py",
line 2152, in parse
return self.build(self.dquery)
  File
"C:\Users\Jon\Downloads\web2py_win_CB\web2py\gluon\packages\dal\pydal\objects.py",
line 2156, in build
op, first, second = (d["op"], d["first"],
KeyError: 'op'

-- 
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 

Re: [web2py] Re: How to solve '\x00' error

2019-01-08 Thread Jon Subscripted
Hi Leonel,
Could a PC reboot lead to the same problem Mostwanted reported?
Regards, Jon.


Libre
de virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Dec 10, 2018 at 7:51 AM mostwanted  wrote:

> Can you please explain further Leonel?
>
> On Wednesday, December 5, 2018 at 1:02:22 AM UTC+2, Leonel Câmara wrote:
>>
>> The application should be running with migration disabled in production
>> in which case this won't happen.
>>
> --
> 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.
>

-- 
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: Show "count()" result in view

2018-12-29 Thread Jon Subscripted
Thanks guys. That's exactly what I needed.
Sorry I was not able to fint it myself...
Regards, Jon.

On Sat, Dec 29, 2018 at 4:19 AM Anthony  wrote:

> See
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Grouping-and-counting
> .
>
> On Friday, December 28, 2018 at 6:46:25 AM UTC-5, Jonsubs wrote:
>>
>> Hi all,
>> I'd like to know how to access the ".count()" result of a query from a
>> view.
>>
>> I have the following query in the controller:
>>
>> rows =
>> db(db.probdata).select(db.probdata.game,db.probdata.game.count(),groupby=db.probdata.game)
>>
>> And would like to show both the 'game' field and the number of entries
>> for each game. I tried the code below, but it crashes:
>>
>> 
>> {{for r in rows:}}
>>
>> {{=A(r.probdata.game,_href=URL('list_problems_by_game',args=r.probdata.game))}}
>> {{=r.probdata.game.count()}}
>> {{pass}}
>> 
>>
>> How should I access the result of the ".count()" part of the query from
>> the view?
>> Thanks, Jon.
>>
> --
> 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.
>

-- 
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: Show "count()" result in view

2018-12-28 Thread Jon Subscripted
Thanks Stifan,
I see how can I do that for the whole query.

How can I do this row-wise? Can I create a "count_db" variable per row? As
I'm grouping by game and counting how many entries I have per game (after
grouping them), I would like to show the count per row.

The closest I got so far is by printing the whole row using:

{{=r}}
{{=A(r.probdata.game,_href=URL('list_problems_by_game',args=r.probdata.game))}}

And getting the result below:

   -  338841246
   
   -  338978835
   
   -  338995915
   

But I just want the  {'COUNT("probdata"."game")': 1L} part of the row.
Which for the lines above it would be something like this:


   - Game 338841246
   
1
   - Game 338978835
   
2
   - Game 338995915
   
2

Thanks & regards, Jon.

On Fri, Dec 28, 2018 at 1:52 PM 黄祥  wrote:

> just assign it to variable then pass it to the view
> *e.g. (not tested)*
> *controllers/default.py*
> def index():
> count_db = db(db.person.id > 0).count()
> dict(count_db = count_db)
>
> *views/default/index.html*
> {{= count_db}}
>
> *ref:*
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#count-isempty-delete-update
>
> best regards,
> stifan
>
> --
> 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.
>

-- 
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] Show "count()" result in view

2018-12-28 Thread Jon Subscripted
Hi all,
I'd like to know how to access the ".count()" result of a query from a view.

I have the following query in the controller:

rows =
db(db.probdata).select(db.probdata.game,db.probdata.game.count(),groupby=db.probdata.game)

And would like to show both the 'game' field and the number of entries for
each game. I tried the code below, but it crashes:


{{for r in rows:}}

{{=A(r.probdata.game,_href=URL('list_problems_by_game',args=r.probdata.game))}}
{{=r.probdata.game.count()}}
{{pass}}


How should I access the result of the ".count()" part of the query from the
view?
Thanks, Jon.

-- 
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: dependencies inside 'static' folder

2018-06-27 Thread Jon Subscripted
Thanks for your response Anthony, I'll try what you suggest.

On Sun, Jun 24, 2018 at 5:20 AM, Anthony  wrote:

> On Saturday, June 23, 2018 at 11:05:35 PM UTC-4, Jonsubs wrote:
>>
>> Hi everyone,
>> I'm a web2py newbie and I'm trying to use a third party JS library
>> (chessboard.js from http://www.chessboardjs.com/). The library is used
>> to show a chessboard in the webpage. It does use some images to show the
>> chess pieces, the javascript has a relative path in the code:
>>
>> cfg.pieceTheme = 'img/chesspieces/wikipedia/{piece}.png';
>>
>
> This is relative to the path of the current file (which is the JS file
> itself), so you should put the /img folder inside the /static/js folder.
>
>
>> b) cfg.pieceTheme = URL('static','img/chesspieces/wikipedia/{piece}.png');
>> //and it fails also
>>
>
> Note, URL() is a Python function that works only on the server in the
> web2py environment -- you cannot insert it into a static JS file, which is
> executed entirely within the browser.
>
>
>> The only way I found, so far, to display images is to use the absolute
>> path, see below, which looks like a really bad work around.
>>
>> cfg.pieceTheme = 'http://127.0.0.1:8000/tablero/static/img/chesspieces/
>> wikipedia/{piece}.png';
>>
>
> If you want to keep the file in /static/img, you can still use a relative
> URL:
>
> cfg.pieceTheme = '../img/chesspieces/wikipedia/{piece}.png
> 
> ';
>
> The ../ will traverse from the /js folder up one level to the /static
> folder.
>
> 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.
>

-- 
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.