[web2py] Re: Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-07 Thread Seth J
Neah, I never compile my apps for that very reason.

-- 
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: Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-07 Thread Anthony
Did you compile the app? If so, after making changes you must re-compile, as 
changes you make to the source files will otherwise have no effect.

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: Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-07 Thread Seth J
That's the thing! There's no difference in my code, apart from connecting to 
different database. Controller and view are exactly the same. Same behavior is 
exhibited by all other controllers/views (about 10 in total).
I am not saying that there's an error in framework. Apps created on Win Server 
installation of web2py hide unneeded export options just fine.
It's just this app that was originally done on Linux, 2.13 web2py, 2.6 python; 
when packed and installed on Win Server running web2py does not respond to 
disabling selected export options.

I am at a loss how to even debig this problem?! 路

-- 
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: web site down??

2017-06-07 Thread Richard P
I have also been experiencing problems over the last few weeks. Seems to be 
down for a few hours at a time then comes back.

On Wednesday, 7 June 2017 08:13:17 UTC+1, Manuele wrote:
>
> Hi, 
>
> from some time (days but maybe weeks) the web2py web site seams not 
> reacheable for me... anybody has the same trouble? 
>
> Cheers 
>
> Manuele 
>
>

-- 
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: Future of web2py

2017-06-07 Thread tessercat845
According to github, there were semi-regular releases going back to 2013, 
then they stopped about a year ago, so I guess it's only natural for people 
to wonder about the status of the project. Personally, I'm wondering if the 
project will continue to build production releases in the future. I see 
that master still gets some love, so maybe master is now stable for 
production and I missed it?

Anyhow, thank you for all your work on this framework. I admire the project 
itself and I think the community speaks for its integrity. I read your post 
earlier in this thread on your plans for web3py, and I thought I would say 
that as a web2py user, I loved how it gave me a current version of a few 
nice libraries and flattened web development into a single Python layer. 
Basically it gave me a mostly pre-built good-enough web interface and let 
me get on with the business of developing services for users.

Your web3py post concedes that the days of the flat development stack are 
over, and I agree it's unavoidable to use some of the newer JS components 
and move a lot of the work to the browser. I haven't checked out the stack 
you've listed in your reply yet, but I'll very likely end up using whatever 
you put together because I want to keep using helpers, validators and the 
DAL. I look forward to the day the lineup is stable enough for release, and 
thanks again for your past work on web2py.

On Friday, June 2, 2017 at 2:59:12 PM UTC-6, Massimo Di Pierro wrote:
>
> OK course it is still maintained why do you ask?
>
> On Wednesday, 31 May 2017 14:21:40 UTC-5, Oasis Agano wrote:
>>
>>
>> But web2py is still maintained right? or we start buying flask books
>> On Saturday, May 27, 2017 at 9:11:02 AM UTC+2, Andrea Fae' wrote:
>>>
>>> Hello guys,
>>> I'd like to know if there will be future of web2py? Any information 
>>> about it?
>>> 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: queue_task :: trouble with quoted json strings for pvars and args

2017-06-07 Thread Richard P
I just came across this same issue when using the web2py scheduler for the 
first time with an Oracle DB. I spent a good amount of time googling 
 before finding this post which pointed me to where the problem was.

I have implemented a work around  by creating the below trigger in the 
database that will strip out the single quotes before the data is inserted 
into the table. 
It's not pretty but it works. Now my tasks are running fine.

create or replace trigger replace_quotes
before insert on SCHEDULER_TASK
for each row
begin
:new.args := replace( :new.args, , '' );
:new.vars := replace( :new.vars, , '' );
end;
/



On Thursday, 8 September 2016 14:27:15 UTC+1, Erwn Ltmann wrote:
>
> Hi Dave,
>
> thx for your response. I'm sorry, but it doesn't helps me. My problem 
> concerning the usage of scheduler_task queueing. The web2py scheduler 
> transforms automatically the dictionary parameter 'pvars' into a string 
> represented JSON in order to save this value as VARCHAR2(512) into the vars 
> column of database (oracle) table scheduler_task. So far so good. But IMHO 
> with unnecessary quotes at begin and end. The scheduler part of web2py 
> tried to read scheduler records and fails because this (damn) extra quotes.
>
> E.
>
> On Thursday, September 8, 2016 at 4:01:37 AM UTC+2, Dave S wrote:
>>
>>
>>
>> On Wednesday, September 7, 2016 at 5:30:49 PM UTC-7, Erwn Ltmann wrote:
>>>
>>> Hi, 
>>>
>>> I'm used to create a new task for example: 
>>>
>>> scheduler.queue_task( 
>>>   "a_task", 
>>>   pvars = dict(csid=row.id, csname=row.name, action=row.action), 
>>>   ... 
>>> ) 
>>>
>>> In the past (version 2.10.1), everything was fine. Within the current 
>>> version (2.14.6) I have some trouble. See this code for example: 
>>>
>>> for row in db(db.scheduler_task.group_name == "agents").select( 
>>> db.scheduler_task.ALL): 
>>>  ... 
>>>  pvars = json.loads(row.vars) 
>>>
>>> ... will raise this exception: 
>>>
>>>   ... 
>>>   File "/usr/local/lib/python2.7/json/decoder.py", line 384, in 
>>> raw_decode 
>>> raise ValueError("No JSON object could be decoded") 
>>> ValueError: No JSON object could be decoded 
>>>
>>> The reason is a quoted string in column 'VARS' in table 'SCHEDULER_TASK' 
>>> (no quotes in web2py's old version 2.10.1). 
>>>
>>> A new value for 'VARS' with quotes for example: 
>>>
>>> '{"action": "script", "csname": "list", "csid": 121}' 
>>>
>>> I can skip the quotes with a trick: 
>>>
>>> pvars = json.loads(row.vars[1:-1]) 
>>>
>>> But, it is not a general solution. The same problem appears for column 
>>> 'ARGS' in scheduler.py when I process the tasks: 
>>>
>>>   File "/export/home/armadm/dev01/release/web2py/gluon/scheduler.py", 
>>> line 311, in executor 
>>> args = _decode_list(loads(task.args)) 
>>>   File "/usr/local/lib/python2.7/json/__init__.py", line 338, in loads 
>>> return _default_decoder.decode(s) 
>>>   File "/usr/local/lib/python2.7/json/decoder.py", line 366, in decode 
>>> obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 
>>>   File "/usr/local/lib/python2.7/json/decoder.py", line 384, in 
>>> raw_decode 
>>> raise ValueError("No JSON object could be decoded") 
>>> ValueError: No JSON object could be decoded 
>>>
>>> I use Oracle as database: 
>>>
>>> SQL> desc scheduler_task 
>>>  Name  Null?Type 
>>>  -  
>>>  
>>>  IDNOT NULL NUMBER 
>>>  ... 
>>>  ARGS  VARCHAR2(512) 
>>>  VARS  VARCHAR2(512) 
>>>
>>> Any ideas? 
>>>
>>> Thx, Erwn 
>>>
>>
>> the vars field is a dict, with the var names as keys and the stuff you 
>> want to pass as the values.  Both are strings.
>>
>> I use a single var in my code, the name is "where" and the value is a 
>> path.  So I do
>> if vars["where"]:
>>mywhere = vars["where"]
>>
>>
>> No stripping of quotes is needed to get the path.
>>
>> /dps
>>
>>

-- 
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: routes.py and how to activate them

2017-06-07 Thread Anthony
On Wednesday, June 7, 2017 at 3:21:44 PM UTC-4, Scorpa wrote:
>
> Ok, 
>
> Created new project from scratch, renamed this file, copied it everywhere 
> - app folder, web2py library etc etc.
> used breakpoints, but none of them works.
>

You're not supposed to copy it everywhere -- it stays in the app folder. A 
*different* routes.py file should be created in the /web2py folder, as 
noted in the docs. Also, you must change the "app" key in the sample file 
to the name of your actual application.

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: Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-07 Thread Anthony
There's nothing in the relevant framework code that would cause different 
behavior based on the OS or web server, so likely there is some other 
difference in your app code between the two systems.

Anthony

On Wednesday, June 7, 2017 at 4:41:38 PM UTC-4, Seth J wrote:
>
> I am experiencing a peculiar issue with smartgrid and grid.  I have web2py 
> installed on Apache/2.2.15 (Red Hat)  and everything works as it supposed 
> to with respect to disabling export options:
>
> title_grid = SQLFORM.smartgrid(db.title, linked_tables = ['title_archive'
> ], links=title_links, editable= dict(title=True, title_archive=False), 
> deletable= dict(title=True, title_archive=False), create= dict(title=True, 
> title_archive=False), user_signature=True, details=False, showbuttontext=
> True, paginate=30, maxtextlengths={'title.f_title_desc':50}, exportclasses
> =dict(csv_with_hidden_cols=False, xml=False, html=False, 
> tsv_with_hidden_cols=False, json=False), orderby=orderby, divider="»", 
> formname='title_grid')
>
> Here's a screenshot of it:
>
>
> 
> However, when the same exact application is installed on web2py 
> 2.14.5-stable+timestamp.2016.04.14.03.26.16
> (Running on Microsoft-IIS/8.5, Python 2.7.10)   I get the full Export 
> option regardless of the disabled options:
>
>
> 
>
> Is there something I am missing or something can be done to enable control 
> over Export options? 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: Trying to use a variable as a field name in a table insert

2017-06-07 Thread Anthony
That's not valid Python code, but you can do this:

db.payment_allocations.insert(**{'payment_ref': payment.id,
 ref_field: record.id,
 'amount_allocated': allocation})

Anthony

On Wednesday, June 7, 2017 at 10:42:28 PM UTC-4, Peter wrote:
>
>
> Good Morning.
>
> I'm hoping there is a way to solve this...
>
> This works fine for me...
>
> db.payment_allocations.insert(payment_ref=payment.id, 
> task_ref=record.id,
> amount_allocated=allocation) 
>
> but I want to add a little abstraction like this...
>
> ref_field = '%s_ref'  %  table_name# where resulting field name 
> will be either  'task_ref' or 'invoice_ref' (both fields are valid in the 
> insert table).  
> db.payment_allocations.insert(payment_ref=payment.id, 
> ref_field=record.id,
>   amount_allocated=allocation)
>
> which currently gives an Attribute Error (taking ref_field literally and 
> not substituting the variable's assigned value)
>
> Is this possible to achieve what I want?
> Any pointers would be appreciated.
>
> Thanks
> Peter
>

-- 
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: Future of web2py

2017-06-07 Thread João Gulineli
+1


Livre
de vírus. www.avast.com
.
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


João Henrique Gulineli Fachini;
Cel: 18 - 8107 8499




2017-06-04 7:46 GMT-03:00 Muhammad Hashim Malik :

> Respected Massimo
>
>
> You base idea of web3py is fantastic. Please share your web3py work. At
> least release its beta version, so that people play with it , be get
> acquaintance with it and positive feedback may be available so that
> direction of the web3py project may be in right direction. People like me
> are frustrated waiting web3py release. Please release it as soon as
> possible.
>
> Truly,
> Malik Muhammad Hashim
>
>
>
>
>
> On Tuesday, 30 May 2017 04:29:20 UTC+5, Massimo Di Pierro wrote:
>
>> My plan is this
>>
>> It is based on bottle + gevent + gunicorn + rethinkdb + pydal + vue.js +
>> some code ported from web2py (templates, helpers, validators,
>> internationalization, scheduler)
>>
>> Unlike web2py it uses modules not execfile and this makes it 10x faster
>> (this part is done) and code it no longer interpreted at every request.
>> Only on change.
>>
>> Routes are declared using decorators like in bottle and flask.
>>
>> It will use rethinkdb for storing errors, sessions, and anything user
>> defined. This allows to scale horizontally. Nothing gets stored on the file
>> system any more. Ever. Unless you choose to use sqlite for your app.
>>
>> No more forms and grids generated server side. Possible and will probably
>> backport SQLFrom and Gid but will discourage it. The default client will be
>> in vue.js. The forms and grids will be generated client-side based on
>> self-documenting APIs. This work must be done. It is not terribly hard just
>> pedantic.
>>
>> It has a redesigned admin. Not necessarily better but leaner. This part
>> is also done although it may need restyling.
>>
>> I am ditching a lot of the web2py auth logic. Nobody really uses groups
>> and permissions and the way it is done may not be the best way for
>> everybody. Instead I will default to auth0 integration.
>>
>> From a developer prospective the code will look very similar and I will
>> be able to recycle 90% of the documentation.
>>
>> The problems are that web2py grew a bit bloated and typical programming
>> patterns have shifted from postbacks to single page apps with form
>> submission via API. Also web2py does not provide enough tools for scaling
>> since uses filesystem by default. The new version will do less then current
>> web2py but will remedy those issues and make it easier to make responsive
>> and scalable apps.
>>
>> I am conflicted. I could use help to get this done quicker but I do not
>> want to post something that is half done people are unhappy with. What I
>> would like may not be what everybody likes but I am mostly building this in
>> a way that would work well for myself and share in the hope it is useful to
>> others. BSD license.
>>
>> If you are willing to help before the code is made public feel free to
>> contact me personally.
>>
>> Massimo
>>
>>
>>
>>
>>
>>
>> On Sunday, 28 May 2017 11:47:49 UTC-5, Oasis Agano wrote:
>>>
>>>
>>> Is the new framework web3py if so when is the official launch?
>>> On Sunday, May 28, 2017 at 2:32:01 AM UTC+2, Relsi Maron wrote:


 Hi Andrea,

 Yes, there will be a future for web2py!

 Web2py will remain being what it is. :)

 A new version, with support for Python 3, is about to come. Even
 though Massimo is developing a new framework, Web2py will continue to exist
 - with the same purpose for which it was created: to teach development.

 Cheers.


 Em sábado, 27 de maio de 2017 04:11:02 UTC-3, Andrea Fae' escreveu:
>
> Hello guys,
> I'd like to know if there will be future of web2py? Any information
> about it?
> 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 

[web2py] Trying to use a variable as a field name in a table insert

2017-06-07 Thread Peter

Good Morning.

I'm hoping there is a way to solve this...

This works fine for me...

db.payment_allocations.insert(payment_ref=payment.id, 
task_ref=record.id,
amount_allocated=allocation) 

but I want to add a little abstraction like this...

ref_field = '%s_ref'  %  table_name# where resulting field name 
will be either  'task_ref' or 'invoice_ref' (both fields are valid in the 
insert table).  
db.payment_allocations.insert(payment_ref=payment.id, 
ref_field=record.id,
  amount_allocated=allocation)

which currently gives an Attribute Error (taking ref_field literally and 
not substituting the variable's assigned value)

Is this possible to achieve what I want?
Any pointers would be appreciated.

Thanks
Peter

-- 
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 2.15.1

2017-06-07 Thread Carlos Costa
+1 on date picker. It is totally outdated.

Em segunda-feira, 5 de junho de 2017 05:39:11 UTC-3, Karoly Kantor escreveu:
>
> Dear Massimo,
>
> I saw your question in the developers group where I cannot post, therefore 
> i do it here.
>
> I am currently aware of the following issues to be fixed:
>
> 1. Google 2nd generation SQL is definitely a problem. Please note I made a 
> temporary hack to fix it, described here: 
> https://groups.google.com/forum/?fromgroups=#!topic/web2py/vs39zZpaH7g
>
> 2. We have a long overdue issue with the password reset emails not sending 
> on GAE. I am using a temporary dirty workaround that sends a plain text new 
> password, search for the issue about "lazyT object being passed to GAE".
>
> 3. I am having trouble making the date picker work nicely across all 
> browsers, especially where there is a native solution. Microsoft Edge is 
> the worst case. In general, would be good to have a nicer date picker
>
> 4. General comment: We have "batteries included", however, some of those 
> batteries now have newer versions than included, e.g. bootstrap
>
>
>
>
>

-- 
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] Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-07 Thread Seth J
I am experiencing a peculiar issue with smartgrid and grid.  I have web2py 
installed on Apache/2.2.15 (Red Hat)  and everything works as it supposed 
to with respect to disabling export options:

title_grid = SQLFORM.smartgrid(db.title, linked_tables = ['title_archive'], 
links=title_links, editable= dict(title=True, title_archive=False), 
deletable= dict(title=True, title_archive=False), create= dict(title=True, 
title_archive=False), user_signature=True, details=False, showbuttontext=
True, paginate=30, maxtextlengths={'title.f_title_desc':50}, exportclasses=
dict(csv_with_hidden_cols=False, xml=False, html=False, tsv_with_hidden_cols
=False, json=False), orderby=orderby, divider="»", formname='title_grid')

Here's a screenshot of it:


However, when the same exact application is installed on web2py 
2.14.5-stable+timestamp.2016.04.14.03.26.16
(Running on Microsoft-IIS/8.5, Python 2.7.10)   I get the full Export 
option regardless of the disabled options:



Is there something I am missing or something can be done to enable control 
over Export options? 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.


Re: [web2py] Re: web2py 2.15.1

2017-06-07 Thread Jim S
+1

On Wednesday, June 7, 2017 at 2:03:09 PM UTC-5, Richard wrote:
>
> flatpickr seems really nice... Any reason why we don't replace the actual 
> "built-in" calendar that we ship web2py with?
>
> Richard
>
> On Tue, Jun 6, 2017 at 9:31 AM, Anthony  
> wrote:
>
>> On Tuesday, June 6, 2017 at 5:02:10 AM UTC-4, tim.n...@conted.ox.ac.uk 
>>  wrote:
>>>
>>> Re #3: I highly recommend swapping in Eonasdan's 
>>> bootstrap-datetimepicker: 
>>> https://github.com/Eonasdan/bootstrap-datetimepicker
>>>
>>
>> That's nice but is tied to Bootstrap and has a lot of dependencies. 
>> Something more lightweight, such as https://chmln.github.io/flatpickr/, 
>> might be more appropriate.
>>
>> 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+un...@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: routes.py and how to activate them

2017-06-07 Thread Scorpa
Ok, 

Created new project from scratch, renamed this file, copied it everywhere - 
app folder, web2py library etc etc.
used breakpoints, but none of them works.

how can i debug routes ?
I couldn't find a root cause of this :(

понедельник, 5 июня 2017 г., 22:10:17 UTC+3 пользователь Anthony написал:
>
> For example, how actually routes.py works ? I renamed routes.example.py 
>>>  to routes.py according to internal notes. 
>>> Reloaded routes|reloaded web2py and... no effect.
>>>
>>
>> As the docs state, you don't just rename those files -- the routes.py 
>> file must be put in the /web2py root folder. If it is in the right place 
>> and still not working as expected, there is probably something wrong with 
>> the code.
>>
>
> Oh, I see you are referring to the example app-specific routes.py file, 
> which can remain where it is, in its own app's folder. However, you need to 
> make sure you also have a base routes.py file in the /web2py root folder, 
> and as noted in the routes.example.py file, you must change the 
> dictionary key "app" to be the name of your actual application.
>
> 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: web2py 2.15.1

2017-06-07 Thread Richard Vézina
flatpickr seems really nice... Any reason why we don't replace the actual
"built-in" calendar that we ship web2py with?

Richard

On Tue, Jun 6, 2017 at 9:31 AM, Anthony  wrote:

> On Tuesday, June 6, 2017 at 5:02:10 AM UTC-4, tim.nyb...@conted.ox.ac.uk
> wrote:
>>
>> Re #3: I highly recommend swapping in Eonasdan's
>> bootstrap-datetimepicker: https://github.com/Eonasdan/bo
>> otstrap-datetimepicker
>>
>
> That's nice but is tied to Bootstrap and has a lot of dependencies.
> Something more lightweight, such as https://chmln.github.io/flatpickr/,
> might be more appropriate.
>
> 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.


[web2py] Re: [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread Anthony
On Wednesday, June 7, 2017 at 11:47:22 AM UTC-4, e27...@gmail.com wrote:
>
> Actually, we also tried a fresh install of the latest Python 2.7.13 and 
> that version did not work either.
>

Interesting. I assume there must be some way to get the SSL module working 
on Windows.

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: [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread Anthony
On Wednesday, June 7, 2017 at 11:54:06 AM UTC-4, e27...@gmail.com wrote:
>
> Also, Apache does intercept requests to web2py apps and runs them through 
> an normally installed version of Python as it is written in WSCGI 
> configuration of Apache
>

Yes, that is as expected. That's why mail didn't work with Apache but did 
work with web2py.exe (which was not using the system Python).

-- 
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: Login page - Menu bar does not work

2017-06-07 Thread Jordan Ladora
Perfect, thank you.

On Tue, Jun 6, 2017 at 9:13 PM, Anthony  wrote:

> Note, this has already been fixed in the master branch, so should be fine
> in the next release.
>
> Anthony
>
>
> On Tuesday, June 6, 2017 at 11:11:26 PM UTC-4, Anthony wrote:
>>
>> On Tuesday, June 6, 2017 at 4:13:26 PM UTC-4, Jordan Ladora wrote:
>>>
>>> I notice the same problem.
>>>
>>> Using firefox, the js console reveals that web2py-bootstrap3.js is
>>> trying to call the function "web2py.validate_entropy", which is in
>>> web2py.js, but cannot find it.
>>>
>>
>> web2py.validate_entropy in web2py.js is inside a closure, so cannot be
>> accessed in web2py-bootstrap3.js. This is a bug -- the ajax_fields function
>> was copied from web2py.js, and the reference to web2py.validate_entropy was
>> left as is, even though the variable "web2py" is not defined in
>> web2py-bootstrap3.js. You can fix it by changing:
>>
>>   web2py.validate_entropy($(this));
>>
>> to:
>>
>>   $.web2py.validate_entropy($(this));
>>
>> Note, this problem only arises if you add the IS_STRONG validator to
>> db.auth_user.password.requires (which is not the default). In that case,
>> the PasswordWidget in sqlhtml.py adds a "data-web2py_entropy", which
>> triggers the call to the above line. The reason the menus don't work
>> properly is because the above line breaks the Javascript code.
>>
>> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/JOWoLDKpcaw/unsubscribe.
> To unsubscribe from this group and all its topics, 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: [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread e27gis
Also, Apache does intercept requests to web2py apps and runs them through 
an normally installed version of Python as it is written in WSCGI 
configuration of Apache

We tried to force Apache to run the Web2py embedded python 2.7.9 version, 
which actually work to display the apps, but for some reason the "admin" 
was not accessible due to some security reason.

Thierry

-- 
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: [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread e27gis
Also, Apache does intercept requests to web2py apps and runs them through 
an normally installed version of Python as it is written in WSCGI 
configuration of Apache

We tried to force Apache to run the Web2py embedded python 2.7.9 version, 
which actually work to display the apps, but for some reason the "admin" 
was not accessible due to some security reason.

Thierry

-- 
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: [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread e27gis
Actually, we also tried a fresh install of the latest Python 2.7.13 and 
that version did not work either.

Therefore, we went back to 2.7.9.

Thierry

-- 
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 to query json field (with filter in/out) by equality

2017-06-07 Thread Anthony
On Tuesday, June 6, 2017 at 10:40:34 PM UTC-4, Anthony wrote:
>
> Why have you defined custom filter_in and filter_out functions to convert 
> to/from JSON -- that is handled automatically by the DAL when you specify 
> the "json" field type?
>

If you get rid of your custom filter_in and filter_out functions and use 
the built-in JSON functionality, you should be able to run the query you 
have shown. If you stick with your current code, then the query would have 
to compare to a JSON string, not a Python object:

db.learn.responses == '["foo", "bar"]'


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: [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread Anthony
On Wednesday, June 7, 2017 at 9:52:02 AM UTC-4, e27...@gmail.com wrote:
>
> I have finally solved my email sending problem on port 587 with APACHE 
> 2.4, 
>
> It was due to the fact that the 
>
>
> *Web2py 2.14.6, Apache 2.4.23 and my Python 2.7.10 are just incompatible 
> when dealing to starttls() or import ssl.Any version Python version above 
> 2.7.9 does not work.*
> I have reinstalled Python 2.7.9 which is actually the native python 
> version of the Web2py 2.14.6 and the mail.send() function is working again.
>

As noted here 
, the 
discrepancy was due to your running two different Python interpreters 
(web2py binary vs. your system installed Python). There is no "native 
Python version" of web2py 2.14.6 (the web2py Windows binary includes a 
particular version of Python, but web2py source runs on any 2.x version 
starting with 2.6).
 

>
> There might be a workaround to use Python version above 2.7.9 with Apache 
> 2.4, but I leave that to the developers.
>

I don't think there should be any difference between 2.7.9 and 2.7.10. 
Probably when you did a fresh install of 2.7.9, you simply got the SSL 
module included (likely the same would happen with a fresh install of 
2.7.10).

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: "import ssl" impossible in Web2py with python 2.7.9 but "import ssl" working with python 2.7.9

2017-06-07 Thread Anthony
On Tuesday, June 6, 2017 at 4:03:09 PM UTC-4, e27...@gmail.com wrote:
>
> Funny thing :
>
> On the distant server, 
>
> 1/ If I launch the mail controller from Web2py.exe (127.0.0.1/admin), it 
> does find SSL module (python version 2.7.9) --> the mail is sent
>
> 2/ If I launch the mail controller as 'localhost/admin' i.e. through 
> Apache 2.4, it does not find the SSL module (python 2.7.10, the one that is 
> installed) --> the mail is not sent
>
> What is going on there ?
>

The Windows binary version of web2py (i.e., web2py.exe) includes its own 
Python interpreter and standard library, so when you run it, you are not 
using the Python installed on your system. Apparently the Python 2.7.10 you 
have installed on your system does not include the SSL module.

Note, in general, if you have Python installed on your system, there is no 
particular reason to run the binary version of web2py -- just run from 
source.

Also, for future reference, when having a problem (particularly something 
that seems related to the Python installation), it is a good idea to report 
your OS and the version of web2py (i.e., source vs. binary).

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: [web2py/web2py] Auth add_membership and del_membership mistakenly alter the logged-in user's session (#1638)

2017-06-07 Thread Richard Vézina
That what I thought too... filesystem is slow, database would requires a
new auth table or at least a new field (system reserved)...

What's about a persistent auth parameters?? We could make it persitent from
request to request in cache as long as cache (RAM) can be used by web2py
internal code??

Richard


On Tue, Jun 6, 2017 at 3:49 PM, Anthony  wrote:

> When you mention "persist the list of flagged users", it mean that there
>> is no such thing as persistence in web2py and that at each request web2py
>> is completely "ignorant" about any given state it may find itself in??
>>
>
> Well, each request is executed independently, though there are means of
> persisting state, such as the cache, a database, or the file system.
>
>
>> I guess using session as a persistence mean for make this possible would
>> involve security issue as we would using user centric persistence option
>> for storing general information which is sensitive as it provide a list of
>> ID and possibly other information to make this working...
>>
>
> It's not a security issue, as users are not able to inspect the data in
> their sessions (even cookie-based sessions are encrypted), but it wouldn't
> make sense to store a list that needs to be globally accessible across
> users inside the session of a single user. Sessions are for storing data
> specific to a particular user (actually, a particular session of a
> particular user).
>
>
>>
>> On Tue, Jun 6, 2017 at 12:12 PM, abastardi 
>> wrote:
>>
>>> How could we update someone else auth.user_groups?? Could we issue a one
>>> time reinitialization command by setting a flag on/off when use
>>> add_/del_membership?? We can then force a give user to reinit the
>>> auth.user_groups list on his next request...
>>>
>>> That's one approach, but then we need a way to persist the list of
>>> flagged users (preferably that easily scales horizontally), and there would
>>> be some cost on every request (at least every request that needs to check
>>> authorization) to check the list.
>>>
>>> Another option would be to keep a record of active session identifiers
>>> for each user, and whenever a role change occurs, update all of that user's
>>> active sessions (note, this will not work with cookie-based sessions --
>>> only sessions stored on the server).
>>>
>>> —
>>> You are receiving this because you were mentioned.
>>> Reply to this email directly, view it on GitHub
>>> ,
>>> or mute the thread
>>> 
>>> .
>>>
>>
>> --
> 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] [SOLVED] Problem sending email with new web2py version on Apache 2.4

2017-06-07 Thread e27gis
I have finally solved my email sending problem on port 587 with APACHE 2.4, 

It was due to the fact that the 


*Web2py 2.14.6, Apache 2.4.23 and my Python 2.7.10 are just incompatible 
when dealing to starttls() or import ssl.Any version Python version above 
2.7.9 does not work.*
I have reinstalled Python 2.7.9 which is actually the native python version 
of the Web2py 2.14.6 and the mail.send() function is working again.

There might be a workaround to use Python version above 2.7.9 with Apache 
2.4, but I leave that to the developers.

Any comment is appreciated.

Thierry.




-- 
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] auth.navbar modification

2017-06-07 Thread Pierre
  this expression in layout.html works for me combined with the login_next 
in db.py

   {{='auth' in globals() and auth.navbar(mode='dropdown',
referrer_actions=['register',
'request_reset_password','retrieve_username']) or ''}}


-- 
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] auth.navbar modification

2017-06-07 Thread Pierre
sorry I deleted the initial post this was caused by a bogue in my code
still what's the* referrer_actions complete list* I should subtract actions 
from. Actions I am aware of are :login, register ,request_reset_password, 
retrieve_username. Any other actions I should know ?

-- 
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: possible error in autocomplete code

2017-06-07 Thread Carlos Kitu
Anthony, being so helpful as you are, you need by no means to apologize.
Thank you so much.
Best regards.

El martes, 6 de junio de 2017, 21:15:29 (UTC+2), Anthony escribió:
>
> Sorry, I forgot about that -- you can in fact use a virtual field. 
> However, for it to work properly, you must specify the table name when 
> defining the virtual field:
>
> db.auth_user.full_name = Field.Virtual('full_name', 
>lambda row: '%s %s' %(row.auth_user
> .first_name,
>  row.auth_user
> .last_name),
>table_name='auth_user')
>
> Also, note that when you use a virtual field with autocomplete, it selects 
> all records (and all fields) in the table and does the filtering in Python, 
> so this could be quite slow for large tables.
>
> Anthony
>
> On Tuesday, June 6, 2017 at 9:51:33 AM UTC-4, Carlos Kitu wrote:
>>
>> Thanks a lot, Anthony.
>> I use to check the framework code before posting questions, and when I 
>> saw this in the callback method of the autocomplete widget:
>> def callback(self): 
>> if self.keyword in self.request.vars: 
>> field = self.fields[0] 
>> if type(field) is Field.Virtual: 
>> records = [] 
>> table_rows = self.db(self.db[field.tablename]).select(orderby
>> =self.orderby)
>>
>> I guessed wrongly that virtual fields were supported.
>> Thank you and best regards.
>>
>> El lunes, 5 de junio de 2017, 17:11:37 (UTC+2), Anthony escribió:
>>>
>>> You cannot use autocomplete to search a virtual field. It runs a 
>>> database query, so the field must exist in the database.
>>>
>>> Anthony
>>>
>>> On Monday, June 5, 2017 at 9:23:51 AM UTC-4, Carlos Kitu wrote:

 Good afternoon,
 I'm trying to create an autocomplete field to search in the table 
 db.auth_user, but the search must be done with the full name.
 As db.auth_user has two separate fields (first_name, and last_name), I 
 created a virtual field to compose both fields:

 db.auth_user.full_name = Field.Virtual('full_name', lambda row: '%s %s' 
 %(row.auth_user.first_name, row.auth_user.last_name))

 Then, I used the autocomplete widget in a field:

 db.define_table('my_table',
  Field('my_user', 'reference auth_user', notnull=True, unique=False, 
 label='User'),
  ...
 )


 db.my_table.my_user.widget = SQLFORM.widgets.autocomplete(
 request, db.auth_user.full_name, id_field=db.auth_user.id, db=
 db,
 at_beginning=False, limitby=(0, 10), min_length=2)



 And I get this error when creating a new form:

  'DAL' object has no attribute 'None'
 Versión
 web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47Rastreo

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

 Traceback (most recent call last):
   File 
 "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/restricted.py", line 
 227, in restricted
 exec ccode in environment
   File 
 "/home/clm/Documentos/p/productos/web2py_2.14.6/applications/VREscalas/controllers/default.py"
  
 ,
  line 1119, in 
   File "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/globals.py", 
 line 417, in 
 self._caller = lambda f: f()
   File "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/tools.py", 
 line 4241, in f
 return action(*a, **b)
   File 
 "/home/clm/Documentos/p/productos/web2py_2.14.6/applications/VREscalas/controllers/default.py"
  
 ,
  line 140, in programas
 lambda row: A('resumen', _href=URL(
   File "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/sqlhtml.py", 
 line 2307, in grid
 create_form = SQLFORM(table, **sqlformargs)
   File "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/sqlhtml.py", 
 line 1288, in __init__
 inp = field.widget(field, default)
   File "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/sqlhtml.py", 
 line 748, in __call__
 table_rows = 
 self.db(self.db[self.fields[0].tablename]).select(orderby=self.orderby)
   File 
 "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/packages/dal/pydal/base.py",
  line 914, in __getitem__
 return self.__getattr__(str(key))
   File 
 "/home/clm/Documentos/p/productos/web2py_2.14.6/gluon/packages/dal/pydal/base.py",
  line 921, in __getattr__
 return BasicStorage.__getattribute__(self, key)
 AttributeError: 'DAL' object has no attribute 'None':


 I printed in console the self.fields[0]:

[web2py] Key length error when trying to store encrypted value into field using gluon.contrib.AES

2017-06-07 Thread Maurice Ling
Hi all,

I am trying to store one or more encrypted values into their respective 
fields, which has to be decrypted during retrieval process.
The codes that I am trying to follow are from 
https://groups.google.com/forum/#!msg/web2py/uGFQD0PBefQ; however, I am 
getting ValueError

 Key length must be 16, 24 or 32 bytes
referring to 

File "C:\Users\Maurice Ling\Desktop\cynote2-master\gluon\contrib\aes.py", line 
94, in setkey
else:
ValueError: Key length must be 16, 24 or 32 bytes


Here are the codes (attached as file) to replicate this problem that I 
faced:

session.encryptkey = '12345678901234567890123456789012'

from gluon.utils import secure_dumps, secure_loads

def new_entry():
form = FORM(TABLE(
TR('Title: ', INPUT(_type='text', _name='title', _size=80)),
TR('Contents: ', TEXTAREA(_type='text', _name='contents'),
TR('',INPUT(_type='submit', _name='SUBMIT')
if form.accepts(request.vars, session):
print len(session.encryptkey)
cydb.encrypted_entries.insert(title=form.vars.title, 
  contents=form.vars.contents)
redirect(URL(r=request, f='entries'))
return dict(form=form)

cydb = SQLDB('sqlite://cydb.db')

cydb.define_table('encrypted_entries',
SQLField('title'),
SQLField('contents'),
SQLField('modified_on', 'datetime', default=now))

cydb.encrypted_entries.contents.filter_in = lambda value: 
secure_dumps(value, session.encryptkey)
cydb.encrypted_entries.contents.filter_out = lambda value: 
secure_loads(value, session.encryptkey)

1. I am sure that '12345678901234567890123456789012' is 32 bytes long, so I 
am not sure what is happening.

2. I am not able to use SQLFORM as there are other operations involved; 
hence, the above codes are just to replicate the error.

Can anyone help?

Thank you in advance.

Regards
Maurice

-- 
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.
session.encryptkey = '12345678901234567890123456789012'

from gluon.utils import secure_dumps, secure_loads

def new_entry():
form = FORM(TABLE(
TR('Title: ', INPUT(_type='text', _name='title', _size=80)),
TR('Contents: ', TEXTAREA(_type='text', _name='contents'),
TR('',INPUT(_type='submit', _name='SUBMIT')
if form.accepts(request.vars, session):
print len(session.encryptkey)
cydb.encrypted_entries.insert(title=form.vars.title, 
  contents=form.vars.contents)
redirect(URL(r=request, f='entries'))
return dict(form=form)

cydb = SQLDB('sqlite://cydb.db')

cydb.define_table('encrypted_entries',
SQLField('title'),
SQLField('contents'),
SQLField('modified_on', 'datetime', default=now))

cydb.encrypted_entries.contents.filter_in = lambda value: secure_dumps(value, session.encryptkey)
cydb.encrypted_entries.contents.filter_out = lambda value: secure_loads(value, session.encryptkey)


[web2py] Re: web site down??

2017-06-07 Thread stefaan
It works for me...

http://downforeveryoneorjustme.com/web2py.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.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Code editor with code completion

2017-06-07 Thread Assela Pathirana
Further, after following the instructions given by Wing IDE (
https://wingware.com/doc/howtos/web2p 

y) - even autocomplete on 'db' part does not work! So, it seems their 
instructions are incomplete. 



On Tuesday, June 6, 2017 at 9:18:59 PM UTC+2, Dave S wrote:
>
>
>
> On Tuesday, June 6, 2017 at 11:11:47 AM UTC-7, Ron Chatterjee wrote:
>>
>> wing IDE. 
>>
>>
> And do you have an answer to his question about Wing IDE?
>  
>
>> On Tuesday, June 6, 2017 at 9:34:01 AM UTC-4, Assela Pathirana wrote:
>>>
>>> Dear all, 
>>>
>>> I have started dabbling with web2py since a few weeks. Created several 
>>> simple apps of my own and quite happy with it as a web framework.   I have 
>>> the following questions, to which I could not find a satisfactory answer 
>>> within the mailing list. I would be very much grateful if someone can help 
>>> me on these. 
>>>
>>> 1. I liked very much to have the convenience of an IDE (especially the 
>>> debugger/code-completion features.  However, the way the whole package 
>>> works makes me prefer to work with the online editor/debugger system. The 
>>> Debugger is quite adequate for the purpose. However, what I could not 
>>> figure out is how to get code completion in the online editor. There is a 
>>> discussion about an editor called 'Amy' in this list a few years ago. 
>>> However, I did not find any information about how to get it going in the 
>>> current version of web2py. I tried adding 
>>>
>>> editor = Amy
>>>
>>> (Also with different capitalization like AMY, amy); but every time my 
>>> editor window is empty! (obviously it does not work this way). 
>>>
>>> I also tried adding 
>>>
>>> TEXT_EDITOR = 'amy'
>>>
>>> at the end of 0.py  file. It has no impact. 
>>>
>>> Can you help me how to set the proper editor with code completion on 
>>> web2py. 
>>>
>>> 2. What is your recommended way of getting web2py auto-completion to 
>>> work with an IDE (I use Wing IDE  - it's web site has some information 
>>> https://wingware.com/doc/howtos/web2p 
>>> y
>>>  
>>> but this is not complete (which modules should I import in addition to db 
>>> to get full web2py system to autocomplete?). Again, there are many old 
>>> threads in this list on this - but I could not find a methods that works 
>>> easily with the current version(s) of web2py. 
>>>
>>> Thank you very much in advance. 
>>>
>>> Assela
>>>
>>>

-- 
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] web site down??

2017-06-07 Thread Manuele Pesenti
Hi,

from some time (days but maybe weeks) the web2py web site seams not
reacheable for me... anybody has the same trouble?

Cheers

Manuele

-- 
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.