Re: [web2py] Re: use memcache

2017-04-12 Thread 黄祥
tried to pull request on git, result not expected, here is the step i took : *# fork web2py* cd ~/Git/ git clone --recursive https://github.com/web2py/web2py.git cd web2py/ git submodule update --init --recursive *# Create the branch on your local machine* git checkout -b fix_memcache_appadmin *#

[web2py] Re: Any more elegant way to redirect to user login when updating a div by ajax callback if not auth.user

2017-04-12 Thread Massimo Di Pierro
You may want to return something even if not auth.user. On Saturday, 1 April 2017 12:03:55 UTC-5, Paco Bernal wrote: > > Sorry I lost my own question for almost a year :S > > Finally I was doing this: > > def get_index(): > if not auth.user: > return 'Your session has expired, you have

[web2py] Re: IntegrityError('NOT NULL constraint failed:post.message)

2017-04-12 Thread Massimo Di Pierro
I think the problem is that db.post.insert(answers=report) should be under if form.process().accepted: On Sunday, 2 April 2017 07:30:15 UTC-5, Maurice Waka wrote: > > I thought I had escaped/ solved this error. But now am stuck. My db.py > code: > > Post = db.define_table('post', >

Re: [web2py] how string_agg for groupby?

2017-04-12 Thread Massimo Di Pierro
You have to use db.executesql for that. Sorry. On Sunday, 2 April 2017 16:12:26 UTC-5, Alex wrote: > > Is it possible to do more advanced queries (like using string_agg) with > DAL in the meantime? Especially string_agg is very useful for efficient > queries and I need it frequently. As it seems

[web2py] Re: How to implement exclusive_domain=True when using pattern routes?

2017-04-12 Thread Massimo Di Pierro
You have to add a rule for that that redirects the route that you do not want to expose to a custom error page. On Monday, 3 April 2017 12:06:25 UTC-5, Lisandro wrote: > > When you use parameter router system, you have the possibility to set a > dictionary mapping each domain with an app and the

[web2py] Re: how to get ALL db._timings -- override TIMINGSSIZE without touching base.py

2017-04-12 Thread Massimo Di Pierro
I do not see that variable in the latest pydal: grep TIMINGSIZE gluon/packages/dal/pydal/*/*.py return nothing. On Tuesday, 4 April 2017 06:24:58 UTC-5, Jurgis Pralgauskis wrote: > > Hi, > > in some older web2py ( Version > 2.10.4-stable+timestamp.2015.04.26.15.11.54 ) > and I want to get all

[web2py] Re: WEB2PY CAS with basic auth

2017-04-12 Thread Massimo Di Pierro
This is probably a bug. Can I open an issue so it will be tracked? Can you also provide a simple code example that does not work? On Tuesday, 4 April 2017 08:31:54 UTC-5, Muhammad Bilal wrote: > > Hi Massimo > > I am developing a project where I have two web2py applications App A is > provider a

[web2py] Re: Displaying images

2017-04-12 Thread Massimo Di Pierro
I would do: def custom_download(): filename = request.args(0) # maybe validate filename full_path = os.path.join('/whereever/it/is', filename) return response.stream(full_path) and call with http:///custom_download/yourfilename On Wednesday, 5 April 2017 02:44:47 UTC-5, D

Re: [web2py] Re: web2py and python3

2017-04-12 Thread Massimo Di Pierro
Basically web2py works with python 3. Not thanks to me but thanks to the many excellent contributors. Have you tried: $ python3 web2py.py web2py with pyhton 2 and web2py with python use the same code base but are not compatible with each other for obvious reasons. I am working on web3py which

[web2py] Re: Dropdown lists cascade in Crud form

2017-04-12 Thread Massimo Di Pierro
Please do not use crud nobody has supported them in ages. replace return dict(form=crud.create(db.Person, message=T("The person was created!" ))) with return dict(form=SQLFORM(db.Person).process(message_onsuccess=T("The person was created!"))) On Sunday, 9 April 2017 14:52:46 UTC-5, Winter Kry

[web2py] Re: Cockroach DB

2017-04-12 Thread Massimo Di Pierro
Interesting... bad name On Tuesday, 11 April 2017 07:40:38 UTC-5, mcm wrote: > > This seems a real bargain (postgresql dialect and protocol). > > https://www.cockroachlabs.com/ > > Sorry for the others... ;-) > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

Re: [web2py] Re: web2py and python3

2017-04-12 Thread Ovidio Marinho
what has changed : https://docs.python.org/3/library/2to3.html [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio...@gmail.com

[web2py] legacy sqlite only shows id field in appadmin

2017-04-12 Thread ArtDijk
Hi, I use a sqlite db which is build by another pyhton app. The table has 254 fields and one id field. I define the db via the output of extract_sqlite_model.py (a script of web2py). legacy_db = DAL('sqlite://story.sqlite') legacy_db.define_table('inbox_encrypted', migrate=False) #

[web2py] Re: legacy sqlite only shows id field in appadmin

2017-04-12 Thread Anthony
Well, as you can see, none of those models have any fields defined, so you're not going to see anything in appadmin (the DAL can only access fields it knows about). I guess extract_sqlite_model.py didn't work very well in this case. You'll have to manually add the appropriate field definitions

[web2py] Re: how to get ALL db._timings -- override TIMINGSSIZE without touching base.py

2017-04-12 Thread Anthony
On Wednesday, April 12, 2017 at 7:26:48 AM UTC-4, Massimo Di Pierro wrote: > > I do not see that variable in the latest pydal: > > grep TIMINGSIZE gluon/packages/dal/pydal/*/*.py > It is in the version of the DAL associated with the current web2py release, but in pydal master, it has been moved t

[web2py] UPDATE BOOTSTRAP VERSION FROM 3 TO 4

2017-04-12 Thread Áureo Dias Neto
Hello guys, How to update version 3 bootstrap to 4 on web2py? I tried to replace the .css and .js files, however I got a lot of bug and unrecognized classes .. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Re: Highlighting the fields that user can't leave blank

2017-04-12 Thread Anthony
First, don't use Crud, as it has been deprecated. Just use SQLFORM. To apply special formatting to required fields, you can either create custom widgets or create a custom formstyle function that generates the desired HTML markup. A custom widget might look like this: Field('name', widget=lamb

Re: [web2py] Re: web2py and python3

2017-04-12 Thread JorgeH
On Wednesday, April 12, 2017 at 6:37:44 AM UTC-5, Massimo Di Pierro wrote: > > > > I am working on web3py which is not to be confused with web2py for python > 3. For this reason it will have another name. It will not be compatible > with web2py (python 2 or python 3) but it will have a lot of t

[web2py] Re: auth_user email rename name to data attribute

2017-04-12 Thread Anthony
This might be of interest: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion On Tuesday, April 11, 2017 at 8:43:55 PM UTC-4, lucas wrote: > > hello one and all, > > I'm not sure of the mechanism here. using SQLFORM on auth_user table and >

Re: [web2py] Re: web2py and python3

2017-04-12 Thread Massimo Di Pierro
May be some code will be released at the end of April. Very preliminary but I will be looking for feedback. On Wednesday, 12 April 2017 07:56:17 UTC-5, JorgeH wrote: > > > > On Wednesday, April 12, 2017 at 6:37:44 AM UTC-5, Massimo Di Pierro wrote: >> >> >> >> I am working on web3py which is not

[web2py] web2py admin app

2017-04-12 Thread James Holstead
I was testing clustering in our test environment and noticed the admin app didn't behave well. Is there a way to push admin sessions to a pG database? -v/r J -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

[web2py] Re: legacy sqlite only shows id field in appadmin

2017-04-12 Thread ArtDijk
Thanks Anthony. I'm surprised there is no working solution for this. I try to prevent the need to define all 250+fileds by hand... In DB Browser for SQLite I have the SQL statement to create this db. Is it possible to create the DAL database definitions with a SQL statement ? -- Resources: - http

[web2py] Re: Auth change password confirmation

2017-04-12 Thread Alfonso Serra
What i wanted is a profile page with all the auth forms, profile, change password and create users if the logged in user is an admin. As for the change password confirmation i have to use session.flash to got the success message but the problem was it is always empty even when the form was succ

[web2py] Re: legacy sqlite only shows id field in appadmin

2017-04-12 Thread Anthony
On Wednesday, April 12, 2017 at 10:56:20 AM UTC-4, ArtDijk wrote: > > Thanks Anthony. I'm surprised there is no working solution for this. > I try to prevent the need to define all 250+fileds by hand... > In DB Browser for SQLite I have the SQL statement to create this db. > Is it possible to creat

[web2py] Re: legacy sqlite only shows id field in appadmin

2017-04-12 Thread Anthony
On Wednesday, April 12, 2017 at 11:24:31 AM UTC-4, Anthony wrote: > > On Wednesday, April 12, 2017 at 10:56:20 AM UTC-4, ArtDijk wrote: >> >> Thanks Anthony. I'm surprised there is no working solution for this. >> I try to prevent the need to define all 250+fileds by hand... >> In DB Browser for SQ

Re: [web2py] Re: use memcache

2017-04-12 Thread Paolo Valleri
you have to clone your fork, which I guess is https://github.com/sugizo/web2py then follow the same steps, at the end, from the github website create a PR. Mind that your fork (https://github.com/sugizo/web2py) is really out of date, update it before everything else. Paolo 2017-04-12 12:40 GMT+0

[web2py] Re: legacy sqlite only shows id field in appadmin

2017-04-12 Thread ArtDijk
Thanks Anthony for your time. I doesn't work with the new hit line. I wrote some simple code to print the columns of a dataframe and then some minor manual work. The tables are defined and now I get (an obvious) error table exist. Yes that normal with a legacy db is used. What to do ? Arthur --

[web2py] Re: legacy sqlite only shows id field in appadmin

2017-04-12 Thread Anthony
On Wednesday, April 12, 2017 at 12:42:48 PM UTC-4, ArtDijk wrote: > > Thanks Anthony for your time. > I doesn't work with the new hit line. > I wrote some simple code to print the columns of a dataframe and then some > minor manual work. > The tables are defined and now I get (an obvious) error ta

Re: [web2py] Re: use memcache

2017-04-12 Thread 黄祥
done with steps : *# fork repository* mkdir ~/git/ cd ~/git/ git clone --recursive https://github.com/sugizo/web2py.git cd web2py/ *# List the current configured remote repository for your fork* git remote -v *# Specify a new remote upstream repository that will be synced with the fork* git remo

[web2py] seek advice on how to integrate oracle jet with web2py

2017-04-12 Thread Wen
I recently start to use oracle jet - an open source javascript tool kit with tons of UI widget. (see cookbook section at http://www.oracle.com/webfolder/technetwork/jet/jetCookbook.html) It is built on top of requirejs, knockoutjs, hammerjs I can use Yeoman generator to create a UI project and d