[web2py] Clarification please on autocomplete widget...

2018-06-18 Thread 'jim kaubisch' via web2py-users
What am I misunderstanding... ??

Building a form with fields that really need to be autocompleted 
(potentially 1,000+ possible values). 

Looked at the book which says "two possible uses for the autocomplete widget: 
to autocomplete a field that takes a value from a *list* or to autocomplete 
a *reference field*"
I assumed that "list" meant an ordinary Python list object, but when I try:

  fields = []
  ...

 name_list = ['name1', 'name2']
  fields.append(Field('school', 'string' , label=T('School Name?')
 , 
widget=SQLFORM.widgets.autocomplete(request , name_list, limitby=(0,10), 
min_length=0)
 , requires=IS_NOT_EMPTY()))
   ...

  enter_data_form=SQLFORM.factory(*fields, table_name='enter_data')

I get the following:
 'list' object has no attribute 
'tablename'

which I interpret to mean that 'list' in this case means something 
different than I expected.

What am I doing wrong?

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 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: "unarchive" a record?

2018-06-18 Thread 'jim kaubisch' via web2py-users
Thanks for your inputs. Used it, checked to make sure the results were as I 
expected them to be. Good progress on this since then...

On Tuesday, June 12, 2018 at 9:45:46 AM UTC-7, Anthony wrote:
>
> current.update_record(name=version.name, description=version.description)
>>
>>
> And note, if you have a lot of fields to update, the above can be 
> simplified to:
>
> current.update_record(**db.record._filter_fields(version))
>
> 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.


[web2py] Re: CHANGE THE LOGIN FLASH MESSAGE

2018-06-18 Thread 黄祥
usually auth.settings is declare in models e.g. models/db.py

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.


[web2py] Re: managing latin characters

2018-06-18 Thread Leonel Câmara
Web2py uses utf-8 everywhere by default, you don't need to worry about it. 
If you're smart you will use utf-8 in the database too and everything 
pretty much just works, otherwise you will just have to tell the DAL about 
the encoding the database uses using db_codec.

-- 
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: wired transform

2018-06-18 Thread Leonel Câmara
I'm guessing you're asking in the wrong group, and I don't really use R. 
I'm guessing the problem is:

cal = robjects.r(''vector'')

Which according to the rpy2 documentation I've looked at for the first time 
should probably be:

cal = robjects.r(''vector'')[0]

-- 
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] managing latin characters

2018-06-18 Thread Richard Vézina
It depends... If it coming from the form you have nothing to do... If you
add them in your code as hardcoded value you have to encode them properly,
you don't just do 'ton text en français' as it gonna fails...

You always better work in english in your code anyway as it makes not much
sens to work with other language and use the magic T() sometimes you will
sometimes you will not and that mean that your app will be automatically
translate if you do use T() but not if you hardcoded thing in other then
english language...

If you do use other software source of information that are coming with
various encoding (they better support UTF-8) you will have to use
variable_name.decode(utf-8) once when you get the stuff in and
variable_name.encode(utf-8) when you push stuff in this other softwares...
If you do such thing I recommand you to search for python and endocing and
read the doc...

Richard

On Mon, Jun 18, 2018 at 3:40 PM, Andrea Fae'  wrote:

> How to manage latin character, like italian character like è,é, à, ò
> If I want to insert for example à it "translate" to “/xe0153"
> How to wotk with this type of charater...Do I need to change from utf-8
> to? 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 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] managing latin characters

2018-06-18 Thread Andrea Fae'
How to manage latin character, like italian character like è,é, à, ò
If I want to insert for example à it "translate" to “/xe0153"
How to wotk with this type of charater...Do I need to change from utf-8 to? 
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 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: Select ALL products

2018-06-18 Thread Val K
You should perform an ajax request to pass model  (id or name) to the 
controller that would perform corresponding query  like  db((db.stock.id == 
db.products.stock) & (db.products.model==request.args(0)) 
).select(db.products.ALL) and return it back
You can use the same controller to do it with this simple logic:
if not request.args(0):  # url is .../table_stock

else: # url is .../table_stock/some_model
   

and, of course, you have to write some js-code


On Monday, June 18, 2018 at 4:44:13 PM UTC+3, Ayron Rangel wrote:
>
> Massime, 
>
> I would like it to show on the "modal" the list of all models products 
> equal to the table row. Ex.:
> I have in my first row of the table all products with the model A (in 
> query i'm using group by = 'db(query).select(db.products.ALL, 
> db.stock.ALL,count,somar, groupby=db.products.model')). So appears just the 
> product model name.
>
> In the same row, when i click in the icon, i want to list all products 
> with the same "group by model". 
>
> Did u get it?
>

-- 
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: CHANGE THE LOGIN FLASH MESSAGE

2018-06-18 Thread Ayron Rangel

Anthony,

Will I use the auth.settings.login in the controller? or in the view??

-- 
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] Last version supporting Python 2.6

2018-06-18 Thread Carlos Cesar Caballero Díaz

Thank you so much!!

Greetings.


El 18/06/18 a las 11:28, Richard Vézina escribió:

And previous version was : 2.14.6

On Mon, Jun 18, 2018 at 11:27 AM, Richard Vézina 
mailto:ml.richard.vez...@gmail.com>> wrote:


Changelog file in web2py folder :

*## 2.15.1-4*
- pydal 17.08
*- dropped support for python 2.6*
- dropped web shell
- experimental python 3 support
- experimental authapi for service login
- allow ajax file uploads
- more tests
- more pep8 compliance
- d3.js model visulization
- improved scheduler
- is_email support for internationalized Domain Names
- improved used of cookies with CookieJar
- SQLFORM.grid(showblobs=True)
- import JS events (added w2p.componentBegin event)
- added support for CASv3
- allow first_name and last_name placeholders in verify_email message
- added three-quote support in markmin
- updated pg8000 driver (but we still recommend psycopg2)
- compiled views use . separator not _ separator (must recompile code)
- better serbian, french, and catalan translations
- speed improvements (refactor of compileapp and pyc caching)
- removed web shell (never worked as intended)
- allow Expose(..., follow_symlink_out=False).
- Updated fpdf to latest version
- JWT support
- import fabfile for remote deployment
- scheduler new feature: you can now specify intervals with cron
- gluon/* removed from sys.path. Applications relying on
statements like e.g.
  "from storage import Storage"
  will need to be rewritten with
  "from gluon.storage import Storage"
- tests can only be run with the usual web2py.py
--run_system_tests OR with
  python -m unittest -v gluon.tests on the root dir
- jQuery 3.2.1
- PyDAL 17.07 including:
  allow jsonb support for postgres
  correctly configure adapters that need connection for configuration
  better caching
  updated IMAP adapter methods to new API
  experimental suport for joinable subselects
  improved Teradata support
  improved mongodb support
  overall refactoring
  experimental support for Google Cloud SQL v2
  new pymysql driver

On Mon, Jun 18, 2018 at 10:48 AM, Carlos Cesar Caballero Díaz
mailto:carlos.caball...@cfg.jovenclub.cu>> wrote:

Hi guys, what was the last web2py version supporting Python 2.6?

Greetings.


-- 
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] wired transform

2018-06-18 Thread yifan li
1. vector= robjects.FloatVector([4,3,2,2,1,2,4,5])
2. print("vector is: ",type(vector),vector)
3. cal = robjects.r('''
4.  vector
5.  '''
6. )
7. print('this is type of cal', type(cal()))

Hi all, 

I have encountered a very strange problem. I was trying to pass a 
python float list into R code. In my example, I'm passing [4,3,2,2,1,2,4,5] 
to R code. My code is above. Before executing R code, the result of print 
statement on second line is my type of my vector is a float vector. 
However, after I execute R code from line 3 to line 6, I print the type of 
vector a again at line 7, the type of my vector becomes a Boolean vector. 
Does anyone know how can I solve this problem or how can I pass a vector 
into R? Thank you!

Best regards,
Yifan

-- 
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] Last version supporting Python 2.6

2018-06-18 Thread Richard Vézina
And previous version was : 2.14.6

On Mon, Jun 18, 2018 at 11:27 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> Changelog file in web2py folder :
>
> *## 2.15.1-4*
> - pydal 17.08
> *- dropped support for python 2.6*
> - dropped web shell
> - experimental python 3 support
> - experimental authapi for service login
> - allow ajax file uploads
> - more tests
> - more pep8 compliance
> - d3.js model visulization
> - improved scheduler
> - is_email support for internationalized Domain Names
> - improved used of cookies with CookieJar
> - SQLFORM.grid(showblobs=True)
> - import JS events (added w2p.componentBegin event)
> - added support for CASv3
> - allow first_name and last_name placeholders in verify_email message
> - added three-quote support in markmin
> - updated pg8000 driver (but we still recommend psycopg2)
> - compiled views use . separator not _ separator (must recompile code)
> - better serbian, french, and catalan translations
> - speed improvements (refactor of compileapp and pyc caching)
> - removed web shell (never worked as intended)
> - allow Expose(..., follow_symlink_out=False).
> - Updated fpdf to latest version
> - JWT support
> - import fabfile for remote deployment
> - scheduler new feature: you can now specify intervals with cron
> - gluon/* removed from sys.path. Applications relying on statements like
> e.g.
>   "from storage import Storage"
>   will need to be rewritten with
>   "from gluon.storage import Storage"
> - tests can only be run with the usual web2py.py --run_system_tests OR with
>   python -m unittest -v gluon.tests on the root dir
> - jQuery 3.2.1
> - PyDAL 17.07 including:
>   allow jsonb support for postgres
>   correctly configure adapters that need connection for configuration
>   better caching
>   updated IMAP adapter methods to new API
>   experimental suport for joinable subselects
>   improved Teradata support
>   improved mongodb support
>   overall refactoring
>   experimental support for Google Cloud SQL v2
>   new pymysql driver
>
> On Mon, Jun 18, 2018 at 10:48 AM, Carlos Cesar Caballero Díaz <
> carlos.caball...@cfg.jovenclub.cu> wrote:
>
>> Hi guys, what was the last web2py version supporting Python 2.6?
>>
>> Greetings.
>>
>>
>> --
>> 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] Last version supporting Python 2.6

2018-06-18 Thread Richard Vézina
Changelog file in web2py folder :

*## 2.15.1-4*
- pydal 17.08
*- dropped support for python 2.6*
- dropped web shell
- experimental python 3 support
- experimental authapi for service login
- allow ajax file uploads
- more tests
- more pep8 compliance
- d3.js model visulization
- improved scheduler
- is_email support for internationalized Domain Names
- improved used of cookies with CookieJar
- SQLFORM.grid(showblobs=True)
- import JS events (added w2p.componentBegin event)
- added support for CASv3
- allow first_name and last_name placeholders in verify_email message
- added three-quote support in markmin
- updated pg8000 driver (but we still recommend psycopg2)
- compiled views use . separator not _ separator (must recompile code)
- better serbian, french, and catalan translations
- speed improvements (refactor of compileapp and pyc caching)
- removed web shell (never worked as intended)
- allow Expose(..., follow_symlink_out=False).
- Updated fpdf to latest version
- JWT support
- import fabfile for remote deployment
- scheduler new feature: you can now specify intervals with cron
- gluon/* removed from sys.path. Applications relying on statements like
e.g.
  "from storage import Storage"
  will need to be rewritten with
  "from gluon.storage import Storage"
- tests can only be run with the usual web2py.py --run_system_tests OR with
  python -m unittest -v gluon.tests on the root dir
- jQuery 3.2.1
- PyDAL 17.07 including:
  allow jsonb support for postgres
  correctly configure adapters that need connection for configuration
  better caching
  updated IMAP adapter methods to new API
  experimental suport for joinable subselects
  improved Teradata support
  improved mongodb support
  overall refactoring
  experimental support for Google Cloud SQL v2
  new pymysql driver

On Mon, Jun 18, 2018 at 10:48 AM, Carlos Cesar Caballero Díaz <
carlos.caball...@cfg.jovenclub.cu> wrote:

> Hi guys, what was the last web2py version supporting Python 2.6?
>
> Greetings.
>
>
> --
> 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] Last version supporting Python 2.6

2018-06-18 Thread Carlos Cesar Caballero Díaz

Hi guys, what was the last web2py version supporting Python 2.6?

Greetings.


--
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: CHANGE THE LOGIN FLASH MESSAGE

2018-06-18 Thread Anthony
You can customize the login message via auth.messages.logged_in. However, 
you won't be able to include the username in that message because it will 
not be known until after the login. Instead, you could append a callback 
function to the auth.settings.login_onaccept list, and in that function, 
you could explicitly set:

session.flash = 'Welcome %s' % auth.user.username

Anthony

On Monday, June 18, 2018 at 9:48:04 AM UTC-4, Ayron Rangel wrote:
>
> Guys,
>
> How do I change the response.flash message when I log in?
>
> Every time when I'm login, appears just "Logged In", i want to change this 
> message to Welcome ' username'. 
>
> Regards,
> Ayron Rangel
>

-- 
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] Is it possible to translate data in SQLFORM.grid?

2018-06-18 Thread Anthony
On Monday, June 18, 2018 at 7:50:23 AM UTC-4, Bruno Duarte Ramos wrote:
>
> Hi Anthony, actually I just want to translate the form on my view, like my 
> view was {{=T(form)}}.
>

Yes, but what exactly do you want translated in the form? Do you want the 
actual data values translated? If so, that doesn't quite make sense, 
because then the translated values would end up getting submitted and saved 
to the database.

Please described the exact user workflow and experience you are trying to 
achieve.

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.


Re: [web2py] Re: how do i import a module in my controller?

2018-06-18 Thread Anthony
On Monday, June 18, 2018 at 7:41:34 AM UTC-4, elisha bere wrote:
>
> python 3 is already installed on my computer
>

To run web2py with Python 3 you must (a) download the source version of 
web2py (the binary versions for Mac and Windows include their own Python 2 
interpreters -- they do not use your system-installed version of Python) 
and (b) make sure you start web2py using Python 3 (i.e., if you have both 
Python 2 and Python 3 installed, be sure to explicitly use Python 3).

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.


[web2py] Re: WEB2PY CAS with basic auth

2018-06-18 Thread Ben Hagen
I have filed an issue for this: https://github.com/web2py/web2py/issues/1938

Maybe someone can point me in the right direction how it could be fixed.

Am Mittwoch, 23. Mai 2018 16:19:02 UTC+2 schrieb Ben Hagen:
>
> Sorry yeah I truncated the URL in this message for privacy. In fact it 
> does look like this
>
> auth = Auth(db, cas_provider='https:/example.com/central/default/user/cas'
> )
> auth.settings.allow_basic_login = True
>
>
> @auth.requires_login()
> def default():
> return dict()
>
> CAS is working as expected. The only problem we have is that it does not 
> work for basic auth.
>
> Best regards
> Ben
>
> Am Dienstag, 22. Mai 2018 23:39:34 UTC+2 schrieb 黄祥:
>>
>> cas_provider value should be using the url
>>
>>1. auth = Auth(db,cas_provider = '
>>http://applocal/main/default/user/cas')
>>
>> *ref:*
>>
>> http://www.web2pyslices.com/slice/show/1877/single-login-by-two-different-ways
>>
>> 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.


[web2py] CHANGE THE LOGIN FLASH MESSAGE

2018-06-18 Thread Ayron Rangel
Guys,

How do I change the response.flash message when I log in?

Every time when I'm login, appears just "Logged In", i want to change this 
message to Welcome ' username'. 

Regards,
Ayron Rangel

-- 
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: Select ALL products

2018-06-18 Thread Ayron Rangel
Massime, 

I would like it to show on the "modal" the list of all models products 
equal to the table row. Ex.:
I have in my first row of the table all products with the model A (in query 
i'm using group by = 'db(query).select(db.products.ALL, 
db.stock.ALL,count,somar, groupby=db.products.model')). So appears just the 
product model name.

In the same row, when i click in the icon, i want to list all products with 
the same "group by model". 

Did u get it?

-- 
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] fabfile update on web2py 2.16.1

2018-06-18 Thread 黄祥
seems the fabfile.py won't work, must change the code
*e.g. *
from fabric.api import *
... the_rest_of_the_code ...
into 
from fabric import Connection
... the_rest_of_the_code ...

and test it

*ref:*
http://www.fabfile.org

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.


[web2py] Re: HOW DO I SET UP EMAIL RESET SETTIONGS IN MY MODELS ?

2018-06-18 Thread 黄祥
pls use either the value itself or the appconfig file
*e.g. value*
*models/db.py*
mail.settings.server = 'logging' if request.is_local else 
'smtp.gmail.com:587'

*e.g.appconfig file*
*models/db.py*
mail.settings.server = 'logging' if request.is_local else 
configuration.get('smtp.server')
*private/appconfig.ini*
[smtp]
server = smtp.gmail.com:587

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.


Re: [web2py] Is it possible to translate data in SQLFORM.grid?

2018-06-18 Thread 黄祥
perhaps you can achieve it using label=T()
e.g.
table.field.label = T('Field')

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.


Re: [web2py] Is it possible to translate data in SQLFORM.grid?

2018-06-18 Thread Bruno Duarte Ramos
Hi Anthony, actually I just want to translate the form on my view, like my
view was {{=T(form)}}.

2018-06-15 10:09 GMT-03:00 Anthony :

> On Thursday, June 14, 2018 at 10:37:55 AM UTC-4, Bruno Duarte Ramos wrote:
>>
>> Hello,
>>
>> Is is possible translate a data in a SQLFORM?
>>
>> Where my controller is:
>>
>> form=SQLFORM(db.cake)
>>
>> And my view:
>>
>> {{=form}}
>>
>
> Are you saying you want the stored values of an existing record to be
> translated before inserting them in an update form? If you did that, when
> the form is submitted, the translated values would be stored rather than
> the original ones. What exactly are you trying to achieve?
>
> 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.


Re: [web2py] Re: how do i import a module in my controller?

2018-06-18 Thread elisha bere
python 3 is already installed on my computer


On 18 June 2018 at 13:08, Anthony  wrote:

> On Monday, June 18, 2018 at 6:56:30 AM UTC-4, elisha bere wrote:
>>
>> i am using python 2 i guess , i do not know how i can use python 3
>>
>
> http.client is Python 3 only (it is called httplib in Python 2). Are you
> sure that's the module you want -- the Python docs note that it is not
> typically used directly but is the foundation of urllib? Consider urllib,
> urllib2, or the third-party Requests library.
>
> As for using Python 3 with web2py, you just have to install Python 3 (and
> of course make sure your app code is compatible with Python 3).
>
> 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.


Re: [web2py] Re: how do i import a module in my controller?

2018-06-18 Thread Anthony
On Monday, June 18, 2018 at 6:56:30 AM UTC-4, elisha bere wrote:
>
> i am using python 2 i guess , i do not know how i can use python 3
>

http.client is Python 3 only (it is called httplib in Python 2). Are you 
sure that's the module you want -- the Python docs note that it is not 
typically used directly but is the foundation of urllib? Consider urllib, 
urllib2, or the third-party Requests library.

As for using Python 3 with web2py, you just have to install Python 3 (and 
of course make sure your app code is compatible with Python 3).

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.


Re: [web2py] Re: how do i import a module in my controller?

2018-06-18 Thread elisha bere
i am using python 2 i guess , i do not know how i can use python 3

On 18 June 2018 at 12:52, Anthony  wrote:

> Are you using Python 2 or Python 3? What does your import statement look
> like?
>
> Anthony
>
> On Monday, June 18, 2018 at 3:41:07 AM UTC-4, elisha bere wrote:
>>
>> i want to import http.client and it it giving me an error > 'exceptions.ImportError'> (ImportError("Cannot import module
>> 'applications.fproject.modules.http'",), > 0x048C0A30>)
>>
> --
> 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] Re: how do i import a module in my controller?

2018-06-18 Thread Anthony
Are you using Python 2 or Python 3? What does your import statement look 
like?

Anthony

On Monday, June 18, 2018 at 3:41:07 AM UTC-4, elisha bere wrote:
>
> i want to import http.client and it it giving me an error  'exceptions.ImportError'> (ImportError("Cannot import module 
> 'applications.fproject.modules.http'",), ) 
>

-- 
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] HOW DO I SET UP EMAIL RESET SETTIONGS IN MY MODELS ?

2018-06-18 Thread elisha bere
 # create all tables needed by auth, maybe add a list of extra fields
# -
auth.settings.extra_fields['auth_user'] = []
auth.define_tables(username=False, signature=False)

# -
# configure email
# -
mail = auth.settings.mailer
mail.settings.server = configuration.get('smtp.gmail.com:587')
mail.settings.sender = configuration.get('myem...@gmail.com' )
mail.settings.login = 'myem...@gmail.com:PASSWORD'
mail.settings.tls = True
mail.settings.ssl = True

# -
# configure auth policy
# -
auth.settings.registration_requires_verification = True
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True

i tried doing the above but i am getting and error that is below

127.0.0.1.2018-06-18.11-37-46.5e07fa41-f98f-4917-879a-801e1a7e03c7
 Server address not specified Version
web2py™ Version 2.16.1-stable+timestamp.2017.11.14.05.54.25
Python Python 2.7.9: C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\web2py.exe (prefix: ) Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.

Traceback (most recent call last):
  File "C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\gluon\restricted.py", line 219, in
restricted
exec(ccode, environment)
  File "C:/Users/elisha.bere/Downloads/my_python_files/PIZZZA
PROJECT/web2py_win/web2py/applications/fproject/controllers/default.py"
,
line 59, in 
  File "C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\gluon\globals.py", line 419, in 
self._caller = lambda f: f()
  File "C:/Users/elisha.bere/Downloads/my_python_files/PIZZZA
PROJECT/web2py_win/web2py/applications/fproject/controllers/default.py"
,
line 48, in user
return dict(form=auth())
  File "C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\gluon\tools.py", line 1925, in __call__
return getattr(self, args[0])()
  File "C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\gluon\tools.py", line 3613, in
request_reset_password
if self.email_reset_password(user):
  File "C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\gluon\tools.py", line 3637, in
email_reset_password
message=self.messages.reset_password % d):
  File "C:\Users\elisha.bere\Downloads\my_python_files\PIZZZA
PROJECT\web2py_win\web2py\gluon\tools.py", line 431, in send
raise Exception('Server address not specified')
Exception: Server address not specified

Error snapshot [image: help]


(Server address not specified)

inspect attributes

-- 
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: Geolocation: how to execute js script (navigator.geolocation, ecc) before controller code?

2018-06-18 Thread Fabio Ceccarani
Thanks Donald, I will look itseem very interesting.
Fabio

Il giorno domenica 17 giugno 2018 23:02:08 UTC+2, Donald McClymont ha 
scritto:
>
> You could have a look at this -  
> https://github.com/DonaldMcC/gdms/blob/master/views/default/user.html
>
> It integrates a javascript geolocation plugin to web2py user registration 
> and also Leonel Camara's excellent plugin_location_picker which together 
> allowed me to do everything I was wanting to do.  Only downside seems to be 
> that I think you now need to provide payment details to use Google 
> geolocation API's for the mapping piece and address lookup piece  - however 
> it is still free for light to moderate use on published websites.
>
> Regards
> Donald
>
>

-- 
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] how do i import a module in my controller?

2018-06-18 Thread elisha bere
i want to import http.client and it it giving me an error  (ImportError("Cannot import module
'applications.fproject.modules.http'",), )

-- 
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: Making my custom layouts

2018-06-18 Thread elisha bere
ok thank you

On 15 June 2018 at 04:03, Massimo Di Pierro 
wrote:

> Look also the layout that comes with the welcome app (layout.html). Look
> at the {{}} tags in there. Than take any web page you want and add the
> same {{...}} tags.
> {{include}} is the most important as it determine the inclusion point,
> where extending views are placed.
>
> On Tuesday, 5 June 2018 15:53:01 UTC+2, elisha bere wrote:
>>
>> how can i make my own layouts on web2py?
>> please help
>>
> --
> 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.