[web2py] a first py4web video tutorial - running on pythonanywhere.com

2019-09-22 Thread Massimo Di Pierro
https://youtu.be/Wxjl_vkLAEY

-- 
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/5e2f3a90-3d98-4748-86bd-77e92eff7493%40googlegroups.com.


[web2py] Re: py4web grid syntax - needs testers

2019-09-22 Thread isi_jca
Hi!!!

In models.py, I have this table

db.define_table('tempresa',
Field('descripcion','string',length=50,label = T('Enterprise')),
Field('email','string',length=50, label = T('Email')),
Field('phone','string',length=50, label = T('Phone')),
Field('estado','reference trestado',label = T('State')),migrate=False)

When I use grid get this string:

{ "__class__": "lazyT", "kwargs": {}, "text": "Enterprise", "translator": { 
"__class__": "method" } } 
{ "__class__": "lazyT", "kwargs": {}, "text": "Email", "translator": { 
"__class__": "method" } } 
{ "__class__": "lazyT", "kwargs": {}, "text": "Phone", "translator": { 
"__class__": "method" } } 
{ "__class__": "lazyT", "kwargs": {}, "text": "State", "translator": { 
"__class__": "method" } }


In init.py my script is this.

# exposed as /examples/grid
@action('empresa_grid', method=['GET','POST'])
@action.uses('empresa_grid.html',db, session,T)
def empresa_grid():
Titulo = T('Enterprise')
grid=publisher.grid(db.tempresa)
return locals() 

-- 
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/a483bd50-ef58-446d-b215-9ffe5873e4dd%40googlegroups.com.


Re: [web2py] Re: Unable to add auth.signature in table - PY4WEB

2019-09-22 Thread Massimo Di Pierro
Posted a new _scaffold. Now both db and auth are defined in common. If you 
import common from models, you are fine.

On Sunday, 22 September 2019 17:48:53 UTC-7, Massimo Di Pierro wrote:
>
>  The problem is that your code is executed before 
>
> auth.enable() 
>
> in common.py. The above statement defines the auth_user table.
> I will refactor the scaffolding app to make sure common.py is imported 
> before models.py
>

-- 
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/fb874578-e6cf-4c8c-8db3-7b427c047d7a%40googlegroups.com.


Re: [web2py] Re: Unable to add auth.signature in table - PY4WEB

2019-09-22 Thread Massimo Di Pierro
 The problem is that your code is executed before 

auth.enable() 

in common.py. The above statement defines the auth_user table.
I will refactor the scaffolding app to make sure common.py is imported 
before models.py

-- 
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/ec5192a0-f2ef-4e18-bfcf-832bf765147d%40googlegroups.com.


[web2py] Virtual machine for web2py with (Debian) Linux, Apache and Python 3.7

2019-09-22 Thread martel berends

I'm looking for a pre-build production like Virtual Machine with the 
complete infrastructure like Turnkey Linux. The Turnkey linux web2py 
appliance works on Python 2.7, and (or but) is working fine. 
Since Python 2 is officially end of life by the end of this year I would 
like to setup a new environment with Python 3.7 My local development 
machine works perfectly on Python 3.7.
I've started building a complete new virtual machine with Debian 10, but it 
takes a lot of time (and expertise) to configure all elements (Apache, 
Python, mod_wsgi, ssl, ssh, etc, etc)
The configuration steps in the deployment recipes in the handbook are for 
Python 2.7

Any suggestions would be very welcome.

-- 
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/82307584-cb15-493e-bc76-6450ac28c147%40googlegroups.com.


[web2py] Web2Py Data POST Failure

2019-09-22 Thread Ben Mull
I am posting some dictionarty data to Web2py,  Certain data POSTS 
consistently succeed, and certain data POSTS consistently fail.  Both 
return , but the second data dictionary fails to post, with 
no error / exception raised.

This data consistently succeeds to POST:

data = {"batt chrg": {
"dat": "-999%",
"measurement": "percent",
"unit": "electric",
"entrytype": "subunitStatus"
},
 "pv gen": {
 "dat": "-999 W",
 "measurement": "level",
 "unit": "electric",
 "entrytype": "subunitStatus"
 }
 }

This data (longer dictionary) consistently Fails to POST:

data = {"download": {
"entrytype": "subunitStatus",
"dat": "9 Mbit/s",
"measurement": "level",
"unit": "comms"},
"batt chrg": {
"entrytype": "subunitStatus",
"dat": "94.4%",
"measurement": "percent",
"unit": "electric"},
 "pv gen": {
 "entrytype": "subunitStatus",
 "dat": "543 W",
 "measurement": "level",
 "unit": "electric"},
 "living space": {
 "entrytype": "subunitStatus",
 "dat": "72 F",
 "measurement": "level",
 "unit": "hvac"},
 "ping": {
 "entrytype": "subunitStatus",
 "dat": "60 ms",
 "measurement": "level",
 "unit": "comms"},
 "invert load": {
 "entrytype": "subunitStatus",
 "dat": "402 W",
 "measurement": "level",
 "unit": "electric"},
 "humidity": {
 "entrytype": "subunitStatus",
 "dat": "45%",
 "measurement": "level",
 "unit": "hvac"},
 "upload": {
 "entrytype": "subunitStatus",
 "dat": "8 Mbit/s",
 "measurement": "level",
 "unit": "comms"
 }
 }

Client-side python code:

import requests
from requests.auth import HTTPBasicAuth
from datetime import datetime
import json

auth=HTTPBasicAuth('LoginID', 'Password')
unitid = '19700111'
uploaded = 'no'
data = {
'unitid': unitid,
'uploaded': uploaded,
'time_stamp': str(datetime.now()),
'data_list': json.dumps(data),
}

rq = requests.post(
"https://X.pythonanywhere.com/XXX/default/api/packed_data.json;,
data=data,
auth=auth,
headers={'Connection':'close'}
)

Here is the (standard) server-side Web2py code:
def api():  
response.view = 'generic.'+request.extension
def GET(*args,**vars):
patterns = 'auto'
parser = db.parse_as_rest(patterns,args,vars)
if parser.status == 200:
return dict(content=parser.response)
else:
raise HTTP(parser.status,parser.error)
def POST(table_name,**vars):
return db[table_name].validate_and_insert(**vars)
def PUT(table_name,record_id,**vars):
return db(db[table_name]._id==record_id).update(**vars)
def DELETE(table_name,record_id):
return db(db[table_name]._id==record_id).delete()
return dict(GET=GET, POST=POST, PUT=PUT, DELETE=DELETE)

-- 
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/0a418b46-5385-4124-a280-fda439da717e%40googlegroups.com.


Re: [web2py] Re: Problem with encoding (INSERT web2py)

2019-09-22 Thread Luciano Fain
I installed psycopg2 and all work fine now. Thanks anyway Massimo


El dom., 22 sep. 2019 03:48, Massimo Di Pierro 
escribió:

> ... and can you show us the complete traceback?
>
> On Saturday, 21 September 2019 23:47:28 UTC-7, Massimo Di Pierro wrote:
>>
>> Can you try?
>>
>> nombre_cliente = u'SECRETARÍA'
>>
>> What is your connection string? which python version?
>>
>> On Saturday, 21 September 2019 23:43:42 UTC-7, Luciano Fain wrote:
>>>
>>> Dear Team
>>>
>>> I have a string with an special charater on it:  'SECRETARÍA XXX'
>>>
>>> When i try to do an insert on DB
>>>
>>> id_encabezado = db.encabezado.insert(tipo_reg = 0,nombre_cliente =
>>> 'SECRETARÍA' )
>>>
>>> got the following error:
>>>
>>> 'ascii' codec can't decode byte 0xc3 in position 942:
>>> ordinal not in range(128)
>>>
>>> I have tried:
>>>
>>> nombre_cliente = unicode ('SECRETARÍA')
>>>
>>> nombre_cliente = ('SECRETARÍA').encode('utf-8)
>>>
>>> and nothing seems to work
>>>
>> --
> 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/4e6457db-20f5-422c-9bc0-02a53f5ce689%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/CANSBBCkEVt%2Bva_nKydkz6-WMmh4RHG5MYYQwKTr3qe6P2pWhyA%40mail.gmail.com.


Re: [web2py] Re: does having similar controller names or app folder names cause conflict in web2py?

2019-09-22 Thread Rahul Dhakate
Hi Massimo,
 I appreciate your reply. I had an application where in I had two
controllers one called as default.py and the other called as
default_0001.py in the same folder. I experienced strange issues which were
fixed in the new default.py but were still there reflecting in the
application. When I remove the back up default_0001.py the issues were
fixed automatically. Due to this I derived that there might be issues with
having the same controller name. Sort of. So now I have deleted the back up
files and it worked fine.
I will still investigate this and get back with my findings.


Regards,

Rahul

On Sun, 22 Sep 2019 at 12:15 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> I do not see any problem with that
>
> On Saturday, 21 September 2019 01:09:36 UTC-7, Rahul wrote:
>>
>>
>> Hello All,
>>Will having a structure like below cause conflicts with web2py
>> controllers or applications ? I've found it does and when removed it
>> removes a few issues automatically.
>>
>>
>>
>> 1] *Controllers *-
>>
>>  Example we have default.py in controllers folder along with
>> default_01.py .. default_02.py
>>
>> 2] *Applications *- Multple applications in web2py Applications folder
>>
>> Example app1, app1_001, app1_002
>>
>> Regards,
>>
>> *Rahul*
>>
> --
> 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/So2bg9Zd9iA/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/8220d18c-d9bf-4b4c-a5ec-9f2238c0161b%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/CA%2B6uMjfVoNxafw9n95On2SLE6p7WbT9jpeqmsXNtz50ezBeEEQ%40mail.gmail.com.


[web2py] Re: Odd MySQL connection problem

2019-09-22 Thread backseat
Resolution, in case anyone else sees this:

I had imported the database from our production system. The database 
includes a view. The database username, and thus the view creator name, are 
different on the production vs development system. That means the view is 
not visible to the MySQL user on the development system. Found by changing 
the connection string to use the MySQL root user, which gave more verbose 
error messages.

-- 
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/c1b26b51-06aa-4a2e-b80f-54c26b8c87cd%40googlegroups.com.


Re: [web2py] Re: Unable to add auth.signature in table - PY4WEB

2019-09-22 Thread sandeep patel
Now, I am getting another error.

#model
db.define_table('organization_info',
Field('name'),
Field('date_of_birth', 'date'),
Field('village'),
Field('block'),
Field('district'),
Field('state'),
Field('country'),
Field('pin'),
auth.signature()
)




On Sat, Sep 21, 2019 at 9:07 PM Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Minor change of behavior. In py4web you need auth.signature() notice the ()
>
> On Saturday, 21 September 2019 07:20:02 UTC-7, sandeep patel wrote:
>>
>> Hello,
>>
>> I am getting an error to add auth.signature in the table.
>>
>> #model.py
>> from . import common
>> auth = common.auth
>>
>> db.define_table('organization_info',
>> Field('name'),
>> Field('date_of_birth', 'date'),
>> Field('village'),
>> Field('block'),
>> Field('district'),
>> Field('state'),
>> Field('country'),
>> Field('pin'),
>> auth.signature
>> )
>>
>>
>>
>> Thanks
>> SP
>>
> --
> 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/48a3766b-dbac-4841-88f6-695e4f124d8f%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/CA%2BvcePVzJ-oM6WQKKBtyKQ_PkGHJ9qwGOu%2BTP%2Bv%2BOE-TzQduzw%40mail.gmail.com.


Re: [web2py] Re: How can add new fields in the existing table in PY4WEB?

2019-09-22 Thread sandeep patel
  Thank you for clarifying.

On Sat, Sep 21, 2019 at 9:10 PM Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Yes and not.
>
> You can define your own auth_table before you call Auth()  but you would
> also need to modify the html and js logic that handle the ajax forms.
> Maybe I will make this easier later.
>
> You can also make another table that refences auth_user and create your
> own forms to handle it.
>
> On Saturday, 21 September 2019 05:11:59 UTC-7, sandeep patel wrote:
>>
>> Hello Massimo,
>>
>> In web2py, We can add new fields in the existing table by
>> *auth.settings.extra_fields*.
>> In Py4web. we can do the same?
>>
>>
>>
>> Thanks
>> Sandeep
>>
> --
> 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/4f0eb569-2370-4241-bed6-3a92c700c01d%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/CA%2BvcePX0JWwAxQvG5ayqYP_--FtsB3VvEwtJV_n1VjdNSjJMYQ%40mail.gmail.com.


Re: [web2py] Re: Does Database validators work in PY4WEB?

2019-09-22 Thread sandeep patel
Thanks Massimo,
Now, it's working fine.




On Sat, Sep 21, 2019 at 9:06 PM Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> They work the same as in web2py but you must import them
>
> from pydal.validators import *
>
> On Saturday, 21 September 2019 08:15:43 UTC-7, sandeep patel wrote:
>>
>> Hello Massimo,
>>
>> I have added *IS_EMPTY_OR* validator in the field. I am getting an error.
>>
>> Is there any way to add a validator in the field in py4web?
>>
>> Please have a look at attached file.
>>
>>
>>
>> Thanks
>> SP
>>
>>
>>
>> --
> 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/8586c6d4-bd2e-4a50-b127-82b1d7dd5c45%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/CA%2BvcePU1ejtgx8Na-5%2BhdAPn%2BFEwe3DXnbtOrjFF1B0Qb5t_hw%40mail.gmail.com.


[web2py] Re: Problem with encoding (INSERT web2py)

2019-09-22 Thread Massimo Di Pierro
... and can you show us the complete traceback?

On Saturday, 21 September 2019 23:47:28 UTC-7, Massimo Di Pierro wrote:
>
> Can you try?
>
> nombre_cliente = u'SECRETARÍA' 
>
> What is your connection string? which python version? 
>
> On Saturday, 21 September 2019 23:43:42 UTC-7, Luciano Fain wrote:
>>
>> Dear Team
>>
>> I have a string with an special charater on it:  'SECRETARÍA XXX'
>>
>> When i try to do an insert on DB
>>
>> id_encabezado = db.encabezado.insert(tipo_reg = 0,nombre_cliente = 
>> 'SECRETARÍA' )
>>
>> got the following error:
>>
>> 'ascii' codec can't decode byte 0xc3 in position 942: 
>> ordinal not in range(128)
>>
>> I have tried:
>>
>> nombre_cliente = unicode ('SECRETARÍA')
>>
>> nombre_cliente = ('SECRETARÍA').encode('utf-8)
>>
>> and nothing seems to work
>>
>

-- 
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/4e6457db-20f5-422c-9bc0-02a53f5ce689%40googlegroups.com.


[web2py] Re: Problem with encoding (INSERT web2py)

2019-09-22 Thread Massimo Di Pierro
Can you try?

nombre_cliente = u'SECRETARÍA' 

What is your connection string? which python version? 

On Saturday, 21 September 2019 23:43:42 UTC-7, Luciano Fain wrote:
>
> Dear Team
>
> I have a string with an special charater on it:  'SECRETARÍA XXX'
>
> When i try to do an insert on DB
>
> id_encabezado = db.encabezado.insert(tipo_reg = 0,nombre_cliente = 
> 'SECRETARÍA' )
>
> got the following error:
>
> 'ascii' codec can't decode byte 0xc3 in position 942: ordinal 
> not in range(128)
>
> I have tried:
>
> nombre_cliente = unicode ('SECRETARÍA')
>
> nombre_cliente = ('SECRETARÍA').encode('utf-8)
>
> and nothing seems to work
>

-- 
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/d4d2b674-00e7-472c-bf08-c72fa8d9a9c9%40googlegroups.com.


[web2py] Re: does having similar controller names or app folder names cause conflict in web2py?

2019-09-22 Thread Massimo Di Pierro
I do not see any problem with that

On Saturday, 21 September 2019 01:09:36 UTC-7, Rahul wrote:
>
>
> Hello All,
>Will having a structure like below cause conflicts with web2py 
> controllers or applications ? I've found it does and when removed it 
> removes a few issues automatically. 
>
>
>
> 1] *Controllers *-
>
>  Example we have default.py in controllers folder along with default_01.py 
> .. default_02.py 
>
> 2] *Applications *- Multple applications in web2py Applications folder
>
> Example app1, app1_001, app1_002
>
> Regards,
>
> *Rahul*
>

-- 
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/8220d18c-d9bf-4b4c-a5ec-9f2238c0161b%40googlegroups.com.


[web2py] Problem with encoding (INSERT web2py)

2019-09-22 Thread Luciano Fain
Dear Team

I have a string with an special charater on it:  'SECRETARÍA XXX'

When i try to do an insert on DB

id_encabezado = db.encabezado.insert(tipo_reg = 0,nombre_cliente =
'SECRETARÍA' )

got the following error:

'ascii' codec can't decode byte 0xc3 in position 942: ordinal
not in range(128)

I have tried:

nombre_cliente = unicode ('SECRETARÍA')

nombre_cliente = ('SECRETARÍA').encode('utf-8)

and nothing seems to work

-- 
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/CANSBBCnbmpt%3Dv_%3DupnK%2BDTN-A_3W4%3DRqFT%2B8WcGPv7_hFnu6Sw%40mail.gmail.com.