[web2py] web2py and peewee model class

2022-03-10 Thread
*controlelrs/test.py* from peewee import * db = SqliteDatabase('peewee.sqlite') class BaseModel(Model): class Meta: database = db class Person(BaseModel): name = CharField() def peewee_create_tables(): with db: db.create_tables([Person] ) def peewee_get():

[web2py] modules load another function that define tables

2022-03-08 Thread
*modules/database_pydal* def database(): from pydal import DAL DB_URI = "sqlite://test.sqlite" db = DAL(DB_URI, pool_size = 1, migrate = True, fake_migrate = False) return db def table_customer(): from pydal import Field from pydal.validators import

[web2py] request vars data file

2022-02-18 Thread
def barcode(): req_vars = request.vars #first_key = list(req_vars.keys() )[0] first_key = next(iter(req_vars) ) reader = BarCodeReader() results = reader.decode(first_key) return results """ curl -X POST --user admin:password -d '@filename.png' -i

[web2py] update database directly from REST API using sqlalchemy and pandas

2022-02-13 Thread
*document/api.py* def test(): import pandas as pd from sqlalchemy import create_engine data = {'Name': ['Alex', 'Ronald', 'Jane'], 'Age': [10, 18, 33] } df = pd.DataFrame(data) table = 'stifix' #engine = create_engine('sqlite://', echo = False) engine =

[web2py] REST API method POST automatic download csv with the data content from curl -X POST

2022-02-11 Thread
hello, *test/api.py*def csv(): import pandas as pd from io import StringIO import datetime today = datetime.date.today() req_vars = request.vars if len(req_vars) == 1 and '' in req_vars.values(): vars0 = "%s" % ",".join(["%s:%s" % (k,v) for k,v in

[web2py] Learning Management System (LMS)

2021-12-08 Thread
is there any web2py app or example to create Learning Management System (LMS) with the exam ? thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] vercel

2021-12-01 Thread
trying to deploy web2py on vercel, but no succeed, any hints ? *steps* npm i vercel wget -c http://web2py.com/examples/static/web2py_src.zip unzip -o web2py_src.zip cd web2py cat << EOF > requirements.txt EOF *with web2py.py* cat << EOF > vercel.json { "version": 0, "builds": [ {

[web2py] grouping and summing with sorting

2021-10-14 Thread
*modules function* def report_vars_10(table_name, field_group, field_calc, query): table_field_group = current.db[table_name][field_group] table_field_calc = current.db[table_name][field_calc] table_field_sum = table_field_calc.sum() rows =

[web2py] Re: belongs DAL syntax to search word contains in list:reference type Field

2021-10-11 Thread
nested_select = db(db.address.address.contains('boulevard') ).*_select* (db.address.id) *result in browser * SELECT "address"."id" FROM "address" WHERE (LOWER("address"."address") LIKE '%boulevard%' ESCAPE '\'); rows = db(db.customer.address.belongs(nested_select) ).select() *result in browser*

[web2py] belongs DAL syntax to search word contains in list:reference type Field

2021-10-10 Thread
*table* db.define_table('address', Field('address'), format = lambda r: f'{r.address}' ) db.define_table('customer', Field('name'), Field('address', 'list:reference address'), format = lambda r: f'{r.name}' ) *objective* search customer address by type the words that contains

Re: [web2py] date and datetime form field SQLFORM() and SQLFORM.grid() format

2021-10-10 Thread
root cause is on translation, correct it on languages folder thanks -- 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

[web2py] date and datetime form field SQLFORM() and SQLFORM.grid() format

2021-09-28 Thread
hi, html form field date in web2py form (2.21.1-stable version) is showing format DD-MM- expected -MM-DD tested using datetime is same, showing DD-MM- HH:MM:SS expected -MM-DD HH:MM:SS tested using SQLFORM() and SQLFORM.grid() both tested using chrome and firefox is there any

[web2py] avoid redundant data during import

2021-06-27 Thread
*e.g.on tables employee* id = 1 name = edy position = staff *on employee.csv* name,position erick,staff edy,staff jack,manager *expected result on table employee* id = 1 name = edy position = staff id = 2 name = erick position = staff id = 3 name = jack position = manager is there any way to

[web2py] Re: cant import exported file from appadmin

2021-06-11 Thread
thanks need to convert the byte object into str object e.g. # download_csv def download_csv(): stream = StringIO() db.export_to_csv_file(stream, delimiter = ',', quotechar = '"', write_colnames = True,

[web2py] cant import exported file from appadmin

2021-06-11 Thread
*step to reproduce* 1 create new app 2 edit db.py at the bottom : db.define_table('mytable', Field('myfield')) 3 insert data on appadmin 4 export as csv file on appadmin 5 import the exported file no data added and have flash error unable to parse csv fileiterator should return strings, not bytes

[web2py] Linear regression with Machine Learning Method

2021-06-04 Thread
is there any example web2py app for Linear regression with Machine Learning Method ? thanks and 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

[web2py] Re: DAL how to increment column value

2021-05-21 Thread
perhaps can learn from book : http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#Voting-and-rating best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: python app in cpanel

2021-04-04 Thread
another way around python path_to_web2py/web2py.py --no_gui --no-banner -a 'password' 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)

[web2py] Re: login to my web2py website with python 3 requests

2021-04-01 Thread
same, but use requests.cookie instead e.g. import requests import json import os import random, string from bs4 import BeautifulSoup from requests_toolbelt import MultipartEncoder cookie = requests.cookies.RequestsCookieJar() if os.path.exists('cookies'): cookie.load(ignore_discard=True,

[web2py] Re: Persian translation

2021-03-30 Thread
> > 3- How do I add a Persian translation to this framework?I used the T > function according to the instructions, but unfortunately it did not work. > - take a look at languages folders, then copy en.py, paste and rename it with persian langcode - you can start to translate what inside that

[web2py] Re: request.headers

2021-03-30 Thread
can use python module requests *e.g.* import requests url = 'https://sugizo.pythonanywhere.com/music/api/no_cache/instrument/1' requests.get(url).headers best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] test web2py with selenium, splinter or selene

2021-03-10 Thread
*video* https://www.loom.com/share/9d2daf9ea7de41e1b8e18712f8bdcfa5 *code and discussion* https://github.com/yashaka/selene/issues/287 best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] multi user login in same browser

2021-02-27 Thread
*step* 1. create New simple application : test 2. then register it http://localhost:8000/test/default/user/register with email : a...@a.com password : password 3. close the tab 4. open new tab http://localhost:8000/test/default/user/login with email : b...@b.com password : b this user does not

[web2py] Re: can i delete sql.log?

2021-02-10 Thread
> > can i delete sql.log? > *from book* web2py logs all migrations and migration attempts in the file "sql.log". *ref* http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=sql.log#Migrations perhaps can try to rename it first not deleted, in case an error

[web2py] web2py logout element not interactable

2021-01-31 Thread
*objective* test logout on web2py app *tried* using selenium, splinter, behave and robot (Maximize Browser Window) *result return an error* element not interactable *xpath of **logout on **default web2py welcome app* /html/body/nav/div/div[2]/ul[1]/li/ul/li[4]/a *question* how to achieve it

[web2py] Re: Is it possible to write to session variables from Web2py modules?

2021-01-22 Thread
> Is it possible to write to session variables from Web2py modules? > yes, it is ref: http://web2py.com/books/default/chapter/29/04/the-core?search=current.#Accessing-the-API-from-Python-modules best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] @auth.requires_login() on terminal

2021-01-15 Thread
*controllers/api.py* @auth.requires_login() def rows_as_json(): if not request.env.request_method == 'GET': raise HTTP(403) table_name = request.args(0) id = request.args(1) if id.isdigit() and int(id) > 0: query = (db[table_name]['id'] == id) else: query =

[web2py] github discussion feature

2021-01-07 Thread
*problem with google group* sometime the post is deleted automatically after posted *alternative* perhaps can use github discussion feature, some repo already use it to discuss about their project (request feature, ideas, qna, dll), but not found in web2py and py4web github repo thanks and

[web2py] Re: Happy New Year

2020-12-31 Thread
happy new year \(^o^)/ -- 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] Re: Demo/dev server

2020-12-04 Thread
the default web server shipped with Rocket web server its written on the right side of admin page : Running on Rocket 1.2.6 best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] get the value of selected form input then pass it into form input checkbox

2020-12-02 Thread
*views/form.html* {{for row in rows:}} {{ for r in db(table.pitch_class == row.pitch_class).select(cache = cache_db, cacheable = True): }} {{=", ".join([row_name for row_name in r.name] ) }} {{pass}} {{pass}} *{{selected_table_id = jQuery('#table_id').val() }}* {{for i in range(1,

[web2py] web2py ajax function in py4web

2020-11-07 Thread
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function how to achieve this in py4web ? thx n best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] music and programming

2020-11-07 Thread
developing app for learning music https://sugizo.pythonanywhere.com/music critic and suggestion welcome both music and programming side thanks and best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] please help testing web3py

2019-07-07 Thread
run well on docker container : ubuntu and mac 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

[web2py] Re: please help testing web3py

2019-07-07 Thread
tested on ubuntu docker container (python 3.6) and mac (python 3.7), not work with error *question* - is web3py-start myapps can start on background e.g. web3py-start myapps & consider when server is run on isolated env (i.e. docker) and must access through tunnels (ssh or ngrok) ? *steps on

[web2py] Re: web2py 2.18.5 is OUT

2019-07-04 Thread
already tried define the length on field constructor and change web server because error above refer to rocket.py *ref:* https://groups.google.com/d/msg/web2py/2B9B9o151II/UyfREFmlBgAJ *modules/table_test.py* test = db.define_table('test', Field('test', length = 255), on_define =

[web2py] Re: TypeError: object of type 'Field' has no len()

2019-07-04 Thread
already tried define length on field constructor and change web server, because error above refer to rocket.py, so try gevent an error occured too *modules/table_test.py* test = db.define_table('test', Field('test', *length **= 255*), on_define = on_define_test) $ python

[web2py] set variable on models or modules

2019-07-04 Thread
is there any difference to set variable on models or modules ? *e.g.* *models/db_connect.py* db = DAL('sqlite://test.sqlite', pool_size = 1) *modules/db_connect.py* from gluon.dal import DAL from gluon import current db = DAL('sqlite://test.sqlite', pool_size = 1) cache = current.cache

Re: [web2py] Re: dna analysis web2py github project error ?

2019-07-04 Thread
> > 2.7 also not working .for dna apps .see error > unsupported pickle protocol 3 already discussed on this thread : https://groups.google.com/forum/#!msg/web2py-developers/4W4I1FBlGgI/t2ulp1AICgAJ another ref:

Re: [web2py] Re: dna analysis web2py github project error ?

2019-07-03 Thread
> > yes .my windows python 3.7.3 now ! what can i do for removing error ? > suggest me where i should change for update python code .? > pls follow roberto advice to use python 2.7, because cstringio no longer exist on python3 ref:

[web2py] Re: dna analysis web2py github project error ?

2019-07-01 Thread
which python version did you use ? perhaps you using python3 and the source code created in python2, so it'll return an error according to the module cstringio path best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

Re: [web2py] Re: mdipierro web2pyappliances need to update on github

2019-07-01 Thread
> > i try to install but not work .where should mathplotlib install ? on > my pc or application folder or web2py folder? or others folder ? > pls ensure it's installed on the same python environment that been used running web2py best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: mdipierro web2pyappliances need to update on github

2019-06-30 Thread
for capture.png 'requires matplotlib', perhaps you can install matplotlib first on terminal, then restart web2py server *e.g.* pip install matplotlib best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: web2py can import mathplotlib,bekeh ,sympy,numpy or any python library? how we can import it?

2019-06-26 Thread
> > web2py can import mathplotlib,bekeh ,sympy,numpy or any python library? > yes, can import all of python library how we can import it? > just import it either it in models, controllers, modules or views *e.g. * import numpy best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: Errors using web2py 2.18.5 , python3 and ssl

2019-06-25 Thread
another way around if you want to stick with rocket, and want ssl, think you can use another web server to serve it as reverse proxy (nginx, apache, etc) web2py also can be run with another server with anyserver.py, but not sure if it's accept the certificate parameter when execute it best

[web2py] Re: Web3py

2019-06-22 Thread
tested on ubuntu docker for pip3 install web3py with simple app (worked) *steps* apt install -y git python3-pip cython3 cd git clone https://github.com/web2py/web3py cd web3py python3 setup.py install pip3 install web3py cd mkdir -p ~/apps/test/databases cat << EOF > ~/apps/test/__init__.py

[web2py] Re: Web3py

2019-06-22 Thread
> > Ideas about how to ship apps when pip installing web3py? pardon, for current stage, can not, because you must: - clone web3py repo - run python3 setup.py install - then successfull install pip3 install web3py which imo inefficient detail tested on previous messages *ref (tests 5 works):*

[web2py] Re: Web3py

2019-06-21 Thread
compared the lightweight between alpine, ubuntu n debian, results are : *alpine (around 300mb) < ubuntu** (around 700mb)** < debian** (around 700mb)* $ docker history alpine/web3py IMAGE CREATED CREATED BY SIZE COMMENT

[web2py] Re: Web3py

2019-06-21 Thread
tested work Dockerfile alpine base image while execute 'make test', never thought the service started itself after installed, checked using service command in package openrc cat << EOF > Dockerfile FROM alpine:latest RUN apk add --no-cache git py3-pip gcc python3-dev musl-dev memcached openrc

[web2py] Re: Web3py

2019-06-21 Thread
tested work Dockerfile with alpine base image cat << EOF > Dockerfile FROM alpine:latest RUN apk add --no-cache git py3-pip gcc python3-dev musl-dev && \ addgroup -S web3py && \ adduser -D -G web3py web3py USER web3py RUN rm -rf /home/web3py/web3py && \ cd /home/web3py && \ export

[web2py] Re: Web3py

2019-06-20 Thread
as question on github, here another alternative works without using ubuntu or debian image base file (which posted on prev msg) docker pull alpine docker run -it --privileged alpine /bin/sh apk add --no-cache git py3-pip memcached gcc python3-dev musl-dev make /usr/bin/memcached -u memcached &

[web2py] Re: T() in modules

2019-06-18 Thread
> > See > http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules. > > You can use current.T. > forgot about that one, thx Anthony, think the same code can work in web2py n web3py just set the correct imported modules , seems the web2py have a hidden

[web2py] TypeError: object of type 'Field' has no len()

2019-06-18 Thread
*controllers/api.py* import table_test def test(): return table_test.test *modules/table_test.py* from gluon.dal import * from gluon.validators import * from gluon import current import field_constructor db = DAL('sqlite://test.sqlite', pool_size = 1) def on_define_test(table): T =

[web2py] T() in modules

2019-06-18 Thread
web2py™ Version 2.18.5-stable tryin to use T() in modules Traceback (most recent call last): File "/Users/sugizo/learn/python/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/sugizo/learn/python/web2py/applications/test/controllers/api.py", line

[web2py] Re: Web3py

2019-06-15 Thread
still have an error, a bit different told about __iter__ and __len__ $ pip3 install -U -r requirements.txt Successfully built yatl Installing collected packages: yatl Found existing installation: yatl 1.0.6 Uninstalling yatl-1.0.6: Successfully uninstalled yatl-1.0.6 Successfully

[web2py] Re: Web3py

2019-06-15 Thread
*work in web2py* def json_row_as_list(): if not request.env.request_method == 'GET': raise HTTP(403) import json table_name = request.args(0) id = request.args(1) if id.isdigit() and int(id) > 0: query = (db[table_name]['id'] == id) else: query =

[web2py] Re: Web3py

2019-06-14 Thread
> > Be careful that you can no longer change attributes everywhere you like as > in: > > db.tablename.fieldname.readable = False > > In web2py this is ok. In web3py this is not safe. Attributes must be > global. The state of fixtures must not be modified inside actions. > is it mean in

[web2py] Re: Web3py

2019-06-14 Thread
> > *url* = > http://localhost:8000/_dashboard/dbadmin?app=test=db=address > *result* = { "__class__": "lazyT", "kwargs": {}, "text": "Field 0", > "translator": { "__class__": "method" } } > *expected result *= Field 0 > no error occured but the result is not expected > there's told about

[web2py] Re: Web3py

2019-06-14 Thread
cache on select not work, modify apps/todo/api, cacheable=True is work without defining cache *apps/todo/__init__.py* @action('api') # a GET API function @action.uses(db)# all before starting a db connection def todo(): cache_time_expire = 10

[web2py] Re: Web3py

2019-06-13 Thread
represent doesn't show the content of the table field properly in _dashboard (database) - type of field is reference (show but the content just Ref.[id], e.g. Ref.[4] - type of field is list:string (doesn't show at all), yet the field is filled, checked in database attached : screen_shot.png

[web2py] Re: Web3py

2019-06-13 Thread
tryin to move define_tables from web2py to web3py, run well just a few note about field constuctor, (related with ui, FORM and T) : - comment : run well, but if you not use bootstrap, then it's should be modified (e.g. _class or function modal in boostrap) - represent : run well, but if you

[web2py] Re: Storage SQlite and Python

2019-06-13 Thread
pls try (not tested) > *1.* Change a already existing password of a user if I kow the username > of the user (username or ID) > db(db.auth_user.id == 2).update(password = db.auth_user.password.validate("password")[0] ) *2.* Create a new user if it's possible (with a username and a password

[web2py] Re: Web3py

2019-06-13 Thread
*models/db_schema_1_address.py* from web3py import Field from .db import * def on_define_address(table): table.field0.label = T('Field 0') db.define_table('address', Field('field0'), on_define = on_define_address, migrate = 'address.table') *test 1* *url* =

[web2py] Re: Upgrading from 2.08 to 2.18.5

2019-06-12 Thread
> > I will be moving a legacy application from my old shared host to a new > VPS, and would like to upgrade web2py at the same time from 2.08 to the > current version (2.18.5). How should I go about doing this? > since you said from shared host to a new host, perhaps can do it manually: -

[web2py] Re: Web3py

2019-06-11 Thread
since cython3 is needed to successful run 'python3 setup.py install' (detail in prev messages in this thread), just test it to run with cython3 in ubuntu docker, pls ignore, if not plan to support cython3 in the future *steps* apt install -y git python3-pip cython3 cd git clone

[web2py] Re: Form and insertion.

2019-06-10 Thread
another way around perhaps can use onvalidation to insert the mode data at the same time when the user click submit ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Web3py

2019-06-09 Thread
*http://localhost:8000/examples/dbform* *error on browser* 500 INTERNAL SERVER ERROR *error on terminal* ERROR:root:Traceback (most recent call last): File "/Users/sugizo/learn/python/web3py/web3py/core.py", line 413, in wrapper ret = func(*func_args, **func_kwargs) File

[web2py] Re: Web3py

2019-06-08 Thread
test pip3 install web3py on ubuntu docker container, known work must install cython3 to ensure gevent source can be build by gcc, and the procedure must clone repo first then run python3 setup.py install, then you can successful pip3 install web3py (inefficient i think), detail steps on test 5

[web2py] Re: Web3py

2019-06-08 Thread
tested latest commit 151 on docker ubuntu *problem* dont have web3py/apps/__init__.py *solution* touch web3py/apps/__init__.py *steps* apt install -y git python3-pip pip3 install git+https://github.com/web2py/web3py --upgrade git clone https://github.com/web2py/web3py python3 -c "from

[web2py] Re: Web3py

2019-06-08 Thread
> > try a db.commit() after your define_table(s). > already tried, same result (tested on different os), reported on previous message in this thread best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Web3py

2019-06-08 Thread
> > *steps* > apt install -y git python3-pip > pip3 install git+https://github.com/web2py/web3py --upgrade > git clone https://github.com/web2py/web3py > python3 -c "from pydal.validators import CRYPT; > open('password.txt','w').write(str(CRYPT()('a' )[0] ) )" > web3py-start -p ./password.txt -a

[web2py] Re: web2py on Raspbian and Python 2 or 3?

2019-06-07 Thread
shell script not work ? another way around perhaps can use conda 3 or miniconda 3, install it and it automatically add variable PATH on your bash file, reload it, then, the default of your python bash will refer to conda installed path best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: Web3py

2019-06-07 Thread
found https://pypi.org/project/web3py/ n test it on docker ubuntu return an error *steps* apt install -y python3-pip pip3 install web3py *result* Collecting web3py Downloading https:

[web2py] Re: Web3py

2019-06-07 Thread
retest (commits 147) pip install from git repo on docker ubuntu, but got different error traceback *steps* apt install -y git python3-pip pip3 install git+https://github.com/web2py/web3py --upgrade git clone https://github.com/web2py/web3py python3 -c "from pydal.validators import CRYPT;

[web2py] Re: Hidden Field

2019-06-06 Thread
perhaps can use readabe=False or show_if ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor http://web2py.com/books/default/chapter/29/07/forms-and-validators#Conditional-fields best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: Web3py

2019-06-05 Thread
test latest commits (146) *$ make test* tests/test_auth.py::TestAuth::test_register FAILED tests/test_auth.py::TestAuth::test_register_invalid FAILED tests/test_cache.py::CacheTest::test_change_detection PASSED tests/test_cache.py::CacheTest::test_different_keys PASSED

[web2py] Re: Web3py

2019-06-05 Thread
test another way around to installed web3py, seems can't work smoothly using this way pip3 install directly from git repo (which installed web3py-start on /usr/local/bin/), another problem is requirements.txt package not same like on setup.py install_requires=[...] *steps* docker pull ubuntu

[web2py] Re: web2py on Raspbian and Python 2 or 3?

2019-06-04 Thread
dont mess with the /usr/bin/ by create the symbolic link, the safest way perhaps you can create a shell script e.g. *start_web2py.sh* python3 /path_to_web2py/web2py.py then start your web2py server with ./start_web2py.sh best regards, stifan -- Resources: - http://web2py.com -

[web2py] Re: web2py delimiters conflict with vue.jsz

2019-06-04 Thread
another way around perhaps can use response.delimiter ref: http://web2py.com/books/default/chapter/29/04/the-core?search=delimiter best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] strange error pydal_connection

2019-06-03 Thread
*first attempt* Traceback (most recent call last): File "/Users/sugizo/learn/python/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/sugizo/learn/python/web2py/applications/mutualfunds/controllers/install_demo.py" , line 630, in File

[web2py] Re: Web3py

2019-06-03 Thread
face same error too on mac python3.7 *steps* ./web3py-start -p password.txt -a 0.0.0.0:8000 apps cat << EOF >> apps/_scaffold/models.py db.define_table('thing', Field('name') ) db.commit() db.define_table('think', Field('name') ) db.commit() EOF open http://localhost:8000/_dashboard error

[web2py] Re: How do i install a program?

2019-06-02 Thread
seems git haven't installed yet on your system, think first install the git then follow the steps above (on your prev message) ref: https://git-scm.com/download/win best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Web3py

2019-06-01 Thread
agree, flexible is no policy, long story short what i mean is, can user define templates on it's own path in the app ? *e.g. * *apps/_scaffold/settings.py* TMPLTS_FOLDER = os.path.join(APP_FOLDER, 'views') btw, no worries, it's fine test latest commit (142), error traceback about database

[web2py] Re: Web3py

2019-06-01 Thread
is it possible to have flexible folders pattern for templates and translations folders ? *e.g.* mkdir apps/_scaffold/controllers mkdir apps/_scaffold/models mv apps/_scaffold/controllers.py apps/_scaffold/controllers/default.py mv apps/_scaffold/models.py apps/_scaffold/models/db.py then adjust

[web2py] Re: Web3py

2019-05-30 Thread
just clarficiation, is it correct or it should be python3 setup.py sdist *web3py/Makefile* deploy: test python setup.py sdist *web3py/setup.py* install_requires=[ ... ], is not same like *web3py/requirements.txt* perhaps can create a reference that install_requires in web3py/setup.py is

[web2py] Re: Web3py

2019-05-30 Thread
*Dockerfile* # please change : # password.txt with your desire filename # password_admin with your desire password admin # 8000 with your available port FROM ubuntu:latest RUN apt update && \ apt install -y git python3-pip python-pip memcached && \ service memcached restart RUN groupadd -r

[web2py] Re: Web3py

2019-05-30 Thread
*suggestion for apps/_scaffold:* *- form validation not work during login and register* ** during register : * form field password and password (again) allow mismatched input (this case happen just in web form field, not in database table, when insert mismatch database table remain empty) **

[web2py] Re: Web3py

2019-05-29 Thread
test so far so good in latest commits (138) using docker (ubuntu n debian), a few error during test auth which i know is still work in progress or prefer to report the error traceback too ? *steps* docker pull ubuntu docker run -it --privileged ubuntu /bin/bash apt update apt install -y git

Re: [web2py] Re: CSV Dowload

2019-05-29 Thread
for download all tables at once try: import StringIO except ImportError: from io import StringIO def download_csv(): stream = StringIO.StringIO() db.export_to_csv_file(stream, delimiter = ',', quotechar = '"',

[web2py] Re: CSV Dowload

2019-05-29 Thread
ref: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Exporting-and-importing-data best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Web3py

2019-05-28 Thread
*problem* can't run it on background because of password required *e.g. * ./web3py-start apps -a 0.0.0.0: & perhaps can add parameter for password like web2py during start web3py *e.g.* python web2py/web2py.py --nogui --no-banner -a a -i 0.0.0.0 -p 8000 test latest commit 128: can register

Re: [web2py] Re: accessing the name of post vars

2019-05-24 Thread
> > I want to access the posting variable name not is value . Is there any way > ? > there should be any way for those who seeks *pls try (untested)* dict_post_vars = request.post_vars dict_post_vars.keys() *ref:* http://web2py.com/books/default/chapter/29/02/the-python-language#dict best

[web2py] Re: Pypi project link to web2py

2019-05-24 Thread
> > Is it possible uploading the project from my computer or using a github > repo? > think there are uploaded service in http://localhost:8000/admin on the right side said : 'Upload and install packed application' you can upload *.w2p file or github repo link or another way if you are in

[web2py] Re: web2py managing capacity ?

2019-05-24 Thread
> > how to use it with postgresql ? > pls set the uri connection first *e.g. private/appconfig.ini* uri = postgres://postgres:password@localhost/database_name *ref:* http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Connection-strings-the-uri-parameter- best

[web2py] Re: accessing the name of post vars

2019-05-24 Thread
> > www.example.com/welcome/default/index?sum > > how to get "sum" in controller ?? > did request.vars not work ? ref: http://web2py.com/books/default/chapter/29/04/the-core#request best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: has_membership('unicode string') raise an UnicodeDecodeError exception

2019-05-23 Thread
> > UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 72: > ordinal not in range(128) > > Any suggestions? > > perhaps you need to set LANG environment system variables *e.g. not tested* export LC_ALL=C.UTF-8 export LANG=C.UTF-8 seen many case error during run python 3 apps

[web2py] Re: OOT: bandit

2019-05-22 Thread
prev message, not scan recursively, tried to scan web2py take longer time, n think it can ignore the result under apps folder since it's just a scaffolding or examples, but can be a reminder when deploy in production $ bandit ./web3py/ -r [main] INFOprofile include tests: None [main] INFO

[web2py] OOT: bandit

2019-05-22 Thread
pardon, not sure, this thread proper or not here, tested web2py and web3py with bandit *steps* pip3 install bandit cd git clone https://github.com/web2py/web3py git clone https://github.com/web2py/web2py $ bandit web3py/*.py -r [main] INFOprofile include tests: None [main] INFOprofile

[web2py] Re: Web3py

2019-05-22 Thread
tested commit (123), need to create folder databases on examples webapp (mkdir apps/examples/databases) *phase 1 ([FAILED] loading examples)* rm -rf /tmp/* rm -rf web3py git clone https://github.com/web2py/web3py cd web3py pip3 install -U -r requirements.txt $ ./web3py-start apps ___

[web2py] Re: Web3py Auth

2019-05-20 Thread
> > I am thinking for something. I am thinking of a generic tagging api which > wold allow you to tag any object using efficient many2many and use > hierarchical tags. > You would be able to tag users with group tags and efficiently search > groups for users and users by group. I have a

  1   2   3   4   5   6   7   8   9   10   >