[web2py] FYI this is a useful website for extra Web2py info and examples

2020-08-26 Thread AGRogers
Hi

I find myself ending up on this site every now and then:
https://web2py.wordpress.com/tag/reference/

There are examples there that have really helped me. Interestingly, after I
see the example i often discover that the same info was available in the
book, i was just not smart enough to work out how to use it!

I hope it helps someone.

Cheers
Andrew

-- 
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/CACWMBMPxxyHWCCKUKBQAT5xVn9mbQVwoqeU_6K%3DPHLGm2r%2Bamw%40mail.gmail.com.


Re: [web2py] Re: fake_migrate=True is not working

2020-08-26 Thread Jim Steil
You still have migrate set to False in your appconfig.ini.

-Jim

On Wed, Aug 26, 2020 at 10:14 AM Andrea Fae'  wrote:

> Thank you for your suggestions...Like this (see attaached files)?
> but, no way, no .tables created...I don't know why...
>
> Il giorno mercoledì 26 agosto 2020 14:46:05 UTC+2, Jim S ha scritto:
>>
>> Did you remove the apostrophe at the bottom as well?
>>
>> I haven't used migrate / fake migrate in the past the way that you are
>> implementing.
>>
>> Are you intentionally trying to set it by table?
>>
>> For me, on my DAL statement I'd include:
>>
>> migrate_enabled=myconf.get('db.migrate')
>> fake_migrate_all=myconf.get('db.fake_migrate_all')
>>
>>
>> then in appconfig.ini I'd have:
>>
>> [db]
>> uri = mssql4://sa/Web2PyPassword@TS-SQL2016R2/itassetdb
>> migrate = True
>> fake_migrate_all = True
>>
>>
>>
>> Can you try that and see if it helps?
>>
>> Also, I'd remove all the migrate stuff from auth and all the individual
>> tables.  I just set it globally, but that may be a personal preference kind
>> of thing.
>>
>> -Jim
>>
>> On Wednesday, August 26, 2020 at 1:32:13 AM UTC-5, Andrea Fae' wrote:
>>>
>>> Hello, thank you for your answer.
>>> I deleted the character but nothing changes.
>>> Best regards
>>> Andrea
>>>
>>> Il giorno lunedì 24 agosto 2020 12:39:47 UTC+2, Clemens ha scritto:

 Hi,

 I'm not very deep in your issue. But opening your appconfig.ini with my
 default editor shows that the apostrophe in your authors value could be a
 problem:

 [image: Untitled.jpg]

 Thus, just delete it and have try. If it doesn't change anything,
 please let me know and I will have a closer look.

 Best regards
 Clemens




 On Monday, August 24, 2020 at 11:18:32 AM UTC+2 and...@gmail.com wrote:

> Hello, if I chose migrate= False and fake_migrate=True the .tables in
> databases folder are not created.
> Why?
> I'm attaching appconfig.ini and py.db and my custom db db_asset.py
> Thank you
>
 --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/PLIV6cNvRnc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/web2py/e1702e2a-1c5f-4d0b-a27b-67cece00d923o%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/CAERBpoC3T1bUdh%3DjoMp4GXDwdT3ZwbpS6cau4PsJQ6mu3Ud2uQ%40mail.gmail.com.


[web2py] Re: fake_migrate=True is not working

2020-08-26 Thread Andrea Fae'
Thank you for your suggestions...Like this (see attaached files)?
but, no way, no .tables created...I don't know why...

Il giorno mercoledì 26 agosto 2020 14:46:05 UTC+2, Jim S ha scritto:
>
> Did you remove the apostrophe at the bottom as well?
>
> I haven't used migrate / fake migrate in the past the way that you are 
> implementing.
>
> Are you intentionally trying to set it by table?
>
> For me, on my DAL statement I'd include:
>
> migrate_enabled=myconf.get('db.migrate')
> fake_migrate_all=myconf.get('db.fake_migrate_all')
>
>
> then in appconfig.ini I'd have:
>
> [db]
> uri = mssql4://sa/Web2PyPassword@TS-SQL2016R2/itassetdb
> migrate = True
> fake_migrate_all = True
>
>
>
> Can you try that and see if it helps?
>
> Also, I'd remove all the migrate stuff from auth and all the individual 
> tables.  I just set it globally, but that may be a personal preference kind 
> of thing.
>
> -Jim
>
> On Wednesday, August 26, 2020 at 1:32:13 AM UTC-5, Andrea Fae' wrote:
>>
>> Hello, thank you for your answer.
>> I deleted the character but nothing changes.
>> Best regards 
>> Andrea
>>
>> Il giorno lunedì 24 agosto 2020 12:39:47 UTC+2, Clemens ha scritto:
>>>
>>> Hi,
>>>
>>> I'm not very deep in your issue. But opening your appconfig.ini with my 
>>> default editor shows that the apostrophe in your authors value could be a 
>>> problem:
>>>
>>> [image: Untitled.jpg]
>>>
>>> Thus, just delete it and have try. If it doesn't change anything, please 
>>> let me know and I will have a closer look.
>>>
>>> Best regards
>>> Clemens
>>>
>>>
>>>
>>>
>>> On Monday, August 24, 2020 at 11:18:32 AM UTC+2 and...@gmail.com wrote:
>>>
 Hello, if I chose migrate= False and fake_migrate=True the .tables in 
 databases folder are not created.
 Why?
 I'm attaching appconfig.ini and py.db and my custom db db_asset.py
 Thank you

>>>

-- 
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/e1702e2a-1c5f-4d0b-a27b-67cece00d923o%40googlegroups.com.
# -*- coding: utf-8 -*-

# -
# This scaffolding model makes your app work on Google App Engine too
# File is released under public domain and you can use without limitations
# -

if request.global_settings.web2py_version < "2.14.1":
raise HTTP(500, "Requires web2py 2.13.3 or newer")

# -
# if SSL/HTTPS is properly configured and you want all HTTP requests to
# be redirected to HTTPS, uncomment the line below:
# -
# request.requires_https()

# -
# app configuration made easy. Look inside private/appconfig.ini
# -
from gluon.contrib.appconfig import AppConfig

# -
# once in production, remove reload=True to gain full speed
# -
myconf = AppConfig(reload=True)

if not request.env.web2py_runtime_gae:
# -
# if NOT running on Google App Engine use SQLite or other DB
# -
db = DAL(myconf.get('db.uri'),
 pool_size=myconf.get('db.pool_size'),
 migrate_enabled=myconf.get('db.migrate'),
 fake_migrate_all=myconf.get('db.fake_migrate_all'),
 check_reserved=['all'])
else:
# -
# connect to Google BigTable (optional 'google:datastore://namespace')
# -
db = DAL('google:datastore+ndb')
# -
# store sessions and tickets there
# -
session.connect(request, response, db=db)
# -
# or store session in Memcache, Redis, etc.
# from gluon.contrib.memdb import MEMDB
# from google.appengine.api.memcache import Client
# session.connect(request, response, db = MEMDB(Client()))
# 

[web2py] Re: fake_migrate=True is not working

2020-08-26 Thread Jim S
Did you remove the apostrophe at the bottom as well?

I haven't used migrate / fake migrate in the past the way that you are 
implementing.

Are you intentionally trying to set it by table?

For me, on my DAL statement I'd include:

migrate_enabled=myconf.get('db.migrate')
fake_migrate_all=myconf.get('db.fake_migrate_all')


then in appconfig.ini I'd have:

[db]
uri = mssql4://sa/Web2PyPassword@TS-SQL2016R2/itassetdb
migrate = True
fake_migrate_all = True



Can you try that and see if it helps?

Also, I'd remove all the migrate stuff from auth and all the individual 
tables.  I just set it globally, but that may be a personal preference kind 
of thing.

-Jim

On Wednesday, August 26, 2020 at 1:32:13 AM UTC-5, Andrea Fae' wrote:
>
> Hello, thank you for your answer.
> I deleted the character but nothing changes.
> Best regards 
> Andrea
>
> Il giorno lunedì 24 agosto 2020 12:39:47 UTC+2, Clemens ha scritto:
>>
>> Hi,
>>
>> I'm not very deep in your issue. But opening your appconfig.ini with my 
>> default editor shows that the apostrophe in your authors value could be a 
>> problem:
>>
>> [image: Untitled.jpg]
>>
>> Thus, just delete it and have try. If it doesn't change anything, please 
>> let me know and I will have a closer look.
>>
>> Best regards
>> Clemens
>>
>>
>>
>>
>> On Monday, August 24, 2020 at 11:18:32 AM UTC+2 and...@gmail.com wrote:
>>
>>> Hello, if I chose migrate= False and fake_migrate=True the .tables in 
>>> databases folder are not created.
>>> Why?
>>> I'm attaching appconfig.ini and py.db and my custom db db_asset.py
>>> Thank you
>>>
>>

-- 
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/7c532145-073b-4007-a75d-56ae1e7d2b5bo%40googlegroups.com.


[web2py] Re: No handlers could be found for logger "web2py"

2020-08-26 Thread Andrea Fae'
hello, I have the same problem.
I don't have logging.conf in web2py folder and I don't have web2py.exe in 
it.

I'm using Windows 10.
thanks

Il giorno giovedì 27 dicembre 2012 14:43:45 UTC+1, Niphlod ha scritto:
>
> do you have a file named logging.conf in the same folder where web2py.py 
> or web2py.exe is ?
>
> Il giorno giovedì 27 dicembre 2012 13:27:44 UTC+1, Ramos ha scritto:
>>
>> hello 
>> im testing scheduler and it works but on the console "command line " i 
>> keep getting the message
>>
>>
>> *No handlers could be found for logger "web2py"*
>>
>> every time the task is run
>>
>> I'm using windows 7
>>
>> thank you
>> António
>>
>>
>>

-- 
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/830b94c8-ae1d-4e10-9946-b8cf44cabd1ao%40googlegroups.com.


[web2py] Re: fake_migrate=True is not working

2020-08-26 Thread Andrea Fae'
Hello, thank you for your answer.
I deleted the character but nothing changes.
Best regards 
Andrea

Il giorno lunedì 24 agosto 2020 12:39:47 UTC+2, Clemens ha scritto:
>
> Hi,
>
> I'm not very deep in your issue. But opening your appconfig.ini with my 
> default editor shows that the apostrophe in your authors value could be a 
> problem:
>
> [image: Untitled.jpg]
>
> Thus, just delete it and have try. If it doesn't change anything, please 
> let me know and I will have a closer look.
>
> Best regards
> Clemens
>
>
>
>
> On Monday, August 24, 2020 at 11:18:32 AM UTC+2 and...@gmail.com wrote:
>
>> Hello, if I chose migrate= False and fake_migrate=True the .tables in 
>> databases folder are not created.
>> Why?
>> I'm attaching appconfig.ini and py.db and my custom db db_asset.py
>> Thank you
>>
>

-- 
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/b5330bed-9c29-4d2c-8f31-0910fd34d0dfo%40googlegroups.com.