Re: [web2py] Re: Future of web2py

2017-09-17 Thread Marlysson Silva
Then will be there are other framework? And no just to port the web2py 
codebase to py3..

Em quinta-feira, 14 de setembro de 2017 15:18:58 UTC-3, Dave S escreveu:
>
>
>
> On Thursday, September 14, 2017 at 8:02:00 AM UTC-7, Muhammad Hashim Malik 
> wrote:
>>
>> Hello folks
>>
>> Is there any update regarding web3py?
>>
>> Truly,
>> Malik Muhammad Hashim
>>
>>
>
> The emphasis the last 2 months has been in getting a good 2.16.x done.  
> Much of the work on 2.16.x is also applicable to web3py, even though the 
> views are going to be different.
>
> /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: Web2py with SPA

2017-08-25 Thread Marlysson Silva
Do you saw web2py vue scaffold in github project...?

Em quarta-feira, 23 de agosto de 2017 17:27:30 UTC-3, J Boggy escreveu:
>
> Is Web2py support with React Ember or other SPA framework! not like web2py 
> scaffold !Build spa framework for front end and combine with web2py rest 
> service.Have anyone tried before?

-- 
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: Integrating existing web2py with GitHub

2017-08-01 Thread Marlysson Silva
Do you want more easy than git command line? A interface maybe...?

Or automatize this process to send to remote repository.

Em sexta-feira, 28 de julho de 2017 13:13:23 UTC-3, William Ross escreveu:
>
> Hello, I have an existing web2py project that I edit through the admin 
> interface. To backup the project I am manually pushing that code to a 
> GitHub.
>
> I saw that under the 'Manage' tab there are options to 'Git Pull' and 'Git 
> Push' which requires the gitpython module. Looking through threads on this 
> subject from the Google Group there was discussion in 2012 that said these 
> GitHub buttons are experimental.
>
> Are those buttons still experimental currently?
>
> What's the best way to seamlessly integrate my web2py project with GitHub?
>
> Thank you.
>

-- 
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: JWT web2py

2017-07-31 Thread Marlysson Silva
Fixing referral link:

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1129

And at class's documentation there are some examples..

Em segunda-feira, 31 de julho de 2017 05:44:31 UTC-3, Dave S escreveu:
>
>
>
> On Sunday, July 30, 2017 at 8:38:49 PM UTC-7, J Boggy wrote:
>>
>> How can i apply JWT in web2py. And chatMessage web2py too!
>
>
>
> At the moment, the best documentation for JWT is in the source, gluon/
> contrib.webp2y_jwt.py   Niphlod also provided some simple examples in 
> this forum when he delivered the code.
>
> /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: wrong home page presented

2017-07-18 Thread Marlysson Silva
Do you clicked in "Reload webapp" in web tab view?

Em terça-feira, 18 de julho de 2017 06:34:15 UTC-3, mostwanted escreveu:
>
> Guys i need help, i dont know what i'm doing wrong  or if there is 
> something wrong with my code, i hosted my application with 
> pythonanywhere.com but when i go to the url *sesowa.pythonanywhere.com 
> * i get the wrong home page where as it 
> is this address*(http://sesowa.pythonanywhere.com/init/default/index 
> )* of this home page 
> i want to appear!!!
>
> 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.


[web2py] Re: hello

2017-07-13 Thread Marlysson Silva
To handle with databases use the PyDal.

Em quinta-feira, 13 de julho de 2017 14:04:09 UTC-3, Navaf escreveu:
>
> hello, i'm new in  Python.
>
> sorry  with my grematic , my natal idiome is Spanish
> i'm worked in JAVA,  C#  EntityFramework ASP.NET,   Mysql , Sql server 
> and firebase
>
> i have a question or problem 
>
> i try to  create a proyect in layer,  (MVC)
>
> Control call  a  a modules.
> and  some module of layer will be work with the database,  
> some like a DAO, ,   give some responsability to some class,
>
> how do you build your proyect in layer 
>
> or how can a create some class  with only work with the data base
>

-- 
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 Cron depreciado ?

2017-07-08 Thread Marlysson Silva
Are you a brazilian developer? If so , a brazilian in core developer of 
web2py, it's great! ..

Em quinta-feira, 6 de julho de 2017 11:49:46 UTC-3, Leonel Câmara escreveu:
>
> A alternativa é usar o scheduler do web2py ( 
> http://www.web2py.com/books/default/chapter/29/04#web2py-Scheduler ), 
> nota que podes não ter problemas continuando a usar o cron mesmo que isso 
> não seja recomendado.
>
> Da próxima vez, por favor escreve a tua pergunta em Inglês, repara que 
> este grupo é internacional.
>

-- 
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 login page layout

2017-07-05 Thread Marlysson Silva
Do you replace the first line "extends" in pages that inherits from 
"layout.html" by the "mylayout.html" ?

Em quarta-feira, 5 de julho de 2017 13:22:46 UTC-3, Pierre escreveu:
>
> Hi,
>
> how do i tell web2py to use *mylayout.html* instead of *layout.html*  for 
> *login* and other auth related pages ?
>

-- 
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: Rendering SVG files

2017-07-02 Thread Marlysson Silva
It seem just html problem..
Or do you are generating the svg by controller ?

Em domingo, 2 de julho de 2017 20:34:51 UTC-3, Gualter Portella escreveu:
>
> Hi everyone,
> I am formatting the landing page of my app and found that the svg  files 
> have not been rendered. So far I have converted all of them into png, jpg 
> etc, but some got really ugly.
> Do you know of any workarounds so that I can render the actual svg files 
> with web2py? Many 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: web2py 2.15.1

2017-06-08 Thread Marlysson Silva
+1 to change built in date picker , I same already changed it by other in 
my apps .

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

2017-06-02 Thread Marlysson Silva
o.O 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-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-05-31 Thread Marlysson Silva
What do you think about weppy?
It is based in web2py and have some thoughts interests

-- 
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: redirect an upload

2017-05-30 Thread Marlysson Silva
The request.requires_https() is written on top of models file once time..

And to respect of redirect .. Could you use the absolute URL .. Create 
completly 

The doc of URL() have this..

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

2017-05-30 Thread Marlysson Silva
I think that it will take a little .. I suggest start with web2py .. After 
the core developers will see the backward compatibility

Em terça-feira, 30 de maio de 2017 03:41:38 UTC-3, T.R.Rajkumar escreveu:
>
> I am now porting a jsp application to web2py. Should I stay with web2py or 
> wait for web3py? Will there be web2py group support like now after web3py. 
> Pl guide. 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: Future of web2py

2017-05-30 Thread Marlysson Silva
Could you put this thoughts about web2py's future in some place to 
community? In issues , documentation , topic discussion ..

So the community would know what have to do and could suggest more 
enhancements ..

Because the people stay waiting by some programmers to develop some 
features of framework..  and showing to others programmers and discussing, 
they could help.


Em terça-feira, 30 de maio de 2017 07:38:23 UTC-3, Karoly Kantor escreveu:
>
> Hello Massimo, May I have two questions on this?
>
> 1. You say current web2py interprets code on every request. What does this 
> mean on Google App Engine? (Every time I deploy, GAE seems to compile...)
>
> 2. Overall, what do your plans exactly mean for people with an existing 
> app on web2py? Is this a brand new and different framework or is there an 
> upgrade path?
>
> 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: redirect an upload

2017-05-29 Thread Marlysson Silva
You tried use the request.requires_https() in your models?

Em sexta-feira, 26 de maio de 2017 16:35:41 UTC-3, Dave S escreveu:
>
> I have a function shove() with decorator @request.restful(), used to 
> handle uploading a file, and as part of moving to https, I have a check for 
> https and redirect if it isn't s-full.
>
>
> @request.restful()
> def shove():
> if not request.is_https:
>redirect(URL(shove, args=request.args, scheme=https, host=True))
> def POST(*args, **vars):
>etc
>
>
> This almost works, but the file being uploaded is a zip-file (by extension 
> and by method of creation),
>
> and the redirect is to "
> https://myserver.my/myapp/default/shove.zip/myarg0/myarg1; (with the 
> dot-zip elided, but with name not yet hashed).  [Too much detail:  myarg0 
> is the tablename for the upload file tracking]
> How do I get the dot-zip in the right place?
>
> Moving the check into the POST doesn't change the behavior.
>
> Thanks
>
> Dave
> /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: wsgihandler.py hangs after updating pandas library

2017-05-02 Thread Marlysson Silva
Why you don't install pip globally ? Or in a virtual enviroment..

Em sexta-feira, 28 de abril de 2017 07:50:56 UTC-3, Nicolas Petitclerc 
escreveu:
>
> Hi,
>
> I need to update pandas - web2py uses the Ubuntu distribution version 
> (which is getting old Pandas 0.17.0). So I pip installed the latest version 
> into 'web2py/site-packages/' but then the page hangs for like 5min and then 
> all I get is this error message in /var/log/apache2/error.log :
> [Fri Apr 28 10:24:17.228021 2017] [core:error] [pid 8261] [client 
> 81.133...] End of script output before headers: wsgihandler.py, referer: 
> https://.../user/login?_next=/... 
>
> And I get a 'Internal Server Error' in the browser.
>
> Any idea, what could be wrong, or help debugging this further?
>
> Setup: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.21 OpenSSL/1.0.1f 
> mod_wsgi/3.4 Python/2.7.6
>
> BTW I tried switching to nginx, but that opened up an other can of worm... 
> and I ended up giving up after getting a Segmentation Fault from uwsgi... 
>  in hindsight I should have checked if it was that same issue with pandas, 
> but I curled up in a ball and cried instead...
>
> PS updating pandas also updates: six, numpy and dateutil 
>
> Thanks,
> Nicolas
>

-- 
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: Help with building query functions in a web app - links to tutorials etc

2017-05-02 Thread Marlysson Silva
There are the documentarion in section of DAL to declare and handle your 
data .. 

http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer

Basically you using the define_table and queries dal..

What you already done?

Em sábado, 29 de abril de 2017 14:09:13 UTC-3, Matthew J Watts escreveu:
>
> Hi there everyone!
>
> I'm new to Web2py, i'm really enjoying using the framework so far. 
>
> I am trying to rebuild a legacy database. 
>
> I want to produce a web app that can query data from multiple tables using 
> drop down boxes e.g. locations, species etc.. I want to be able to select 
> info using drop down boxes,  Then i want to display the result and get the 
> option to download them. 
>
> Could someone please point me in the right direction in regards to a 
> tutorials and methods
>
> Thanks
>
> matt
>

-- 
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: user profile

2017-05-02 Thread Marlysson Silva
Just a reference to what Dave said:

http://web2py.com/books/default/chapter/29/07/forms-and-validators#The-process-and-validate-methods

Em terça-feira, 2 de maio de 2017 05:05:56 UTC-3, Annet escreveu:
>
> When a user updates his profile I want to use the form data to update data 
> in another table,
> what is the best way to do so?
>
> Kind regards,
>
> Annet
>

-- 
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] web2py i cant submit customized form with input

2017-04-30 Thread Marlysson Silva
Try out form.custom.submit as button's form..

-- 
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] Communication between server and python script help

2017-04-30 Thread Marlysson Silva
1. In your python script you are achiving handle the data's arduino?

2. To "real time" changing exists the rethink dB .. To this propose..

-- 
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] Add pie chart in evote project

2017-04-30 Thread Marlysson Silva
At case one what you already done?

You would have a view that return a json with voting data..

And use a ajax request to this view..
Using the structure's lib.

I recommend the chartjs.

Basically you will use the simplejson to format that dal data and use in view 
this json formatted..

-- 
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 is not starting with python 3.0/3.1

2017-04-27 Thread Marlysson Silva
This feature seems to be in a commit of branch's web2py repository , I 
think that still do not was merged with master branch .. But cloning the 
repository and checking this branch you can run in py3 enviroment.

Em segunda-feira, 24 de junho de 2013 06:19:15 UTC-3, Pradeeshnarayan 
escreveu:
>
> I am trying to run a web2py application. Using python2.7 it is running 
> fine. But I want to use python higher version. When I try with python3.0 or 
> 3.1, am getting an error as
>
> Traceback (most recent call last):
>   File "/var/www/vhosts/astrozon/web2py/web2py.py", line 18, in 
> import gluon.widget
>   File "/var/www/vhosts/astrozon/web2py/gluon/__init__.py", line 15, in 
> 
> from globals import currentImportError: No module named globals
>
> I have checked, the module gobals is present in the same folder. and 
> python2.7 is able to import that module but not for 3.0 or 3.1.
>
> I would greatly appreciate any suggestions.
>

-- 
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: sql COUNT function and DAL

2017-04-27 Thread Marlysson Silva
You have the table definition written in dal ? 

To populate them and test .

Em quinta-feira, 27 de abril de 2017 07:00:17 UTC-3, Pierre escreveu:
>
> Hi,
>
> Is there a way to transform this sql into a valid DAL expression ?
>
> "SELECT csp, COUNT(csp)AS freq FROM table GROUP BY csp ORDER BY COUNT(csp) 
> DESC LIMIT %s OFFSET %s;" %(limit,offset)
>
>
> I want to avoid executesql as much as i can..
>
>

-- 
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] list of dates into database

2017-04-18 Thread Marlysson Silva
You already tried populate method in built in contribuiu methods?

The populate function do that to some table of system , it generate some fake 
data in some large dataset .. Example

populate(db.mytable, 20)

The lib use the bayesian classifier to generate data based in type of field..

-- 
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: Python 2.7 mock library and web2py

2017-04-18 Thread Marlysson Silva
Do you have a file called db in your modules folder in your application?

Em domingo, 16 de abril de 2017 11:37:11 UTC-3, Robin Bryce escreveu:
>
> Hi,
>
> I'm attempting to use the python mock library with some unittest based 
> tests for a web2py application. It feels like I'm going against the grain. 
>
> General question: Is it generally a pain to use mock with web2py 
> applications or am I missing some trick to get it working ?
>
> Specifically, in models/db.py I have
>
> from gluon.contrib.login_methods.ldap_auth import ldap_auth
>
> in a unittest implementation I have
>
> def mock_ldap_auth(*args,**kw):
> return True
>
> mock_ldap_auth = mock.patch(
> 'db.ldap_auth',
> side_effect=mock_ldap_auth)
>
>
> I'm using web2py_utils and webtest to drive unittest.
>
> class TestSomething(unittest.TestCase):
> # __init__ method which intialises webtest
>
> def setUp(self):
> p = mock_ldap_auth.start()
> self.addCleanup(p.stop)
>
> The call to 'mock_ldap_auth.start()' produces this traceback::
>
> Traceback (most recent call last):
>   File "C:\Projects\web2py\applications\icss/tests\sign_infra.py", line 
> 49, in setUp
> p = mock_ldap_auth.start()
>   File "C:\Projects\pyenvs\icss\lib\site-packages\mock\mock.py", line 
> 1500, in start
> result = self.__enter__()
>   File "C:\Projects\pyenvs\icss\lib\site-packages\mock\mock.py", line 
> 1353, in __enter__
> self.target = self.getter()
>   File "C:\Projects\pyenvs\icss\lib\site-packages\mock\mock.py", line 
> 1523, in 
> getter = lambda: _importer(target)
>   File "C:\Projects\pyenvs\icss\lib\site-packages\mock\mock.py", line 
> 1206, in _importer
> thing = __import__(import_path)
>   File "C:\Projects\web2py\gluon\custom_import.py", line 89, in 
> custom_importer
> raise ImportError, 'Cannot import module %s' % str(e)
> ImportError: Cannot import module 'applications.icss.modules.db'
>
> Note: My purpose in asking this question is to avoid ugly and unnecessary 
> case specific work arounds.
>
> Thanks,
>
> Robin
>
>

-- 
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] testing applications

2017-04-18 Thread Marlysson Silva
You can use the webcliente and after construct the web2pyenv with data of 
webclient if this is possible..

-- 
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] testing applications

2017-04-15 Thread Marlysson Silva
You tried use the client web programatically of web2py to submit a post to 
users/login using your credentials?

-- 
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] testing applications

2017-04-14 Thread Marlysson Silva
Have this example:

https://github.com/viniciusban/web2py.test

-- 
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 and python3

2017-04-13 Thread Marlysson Silva
Awesome!! Which features massimo? :D

-- 
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 change the default auth.navbar controller

2017-04-10 Thread Marlysson Silva
There are this places..

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1487

http://web2py.readthedocs.io/en/latest/tools.html?highlight=auth#gluon.tools.Auth

Em domingo, 9 de abril de 2017 13:16:31 UTC-3, Rudy escreveu:
>
> Sorry Anthony, i just checked, your suggestion works when i have 
> accounting and ticketing systems sharing the same auth's tables, basically 
> it just uses the 'user' action under accounting controller to do all the 
> authentication.
>
> Appreciate if you can provide pointer for more info about Auth() 
> arguments. Thanks!
>
> On Monday, April 10, 2017 at 12:09:44 AM UTC+8, Rudy wrote:
>>
>> Hi Anthony,
>>
>> Thanks again, it works. Now it leads to another question - my application 
>> has accounting system and ticketing system sharing the same auth's tables. 
>> The 2 systems are in different controllers namely accounting & ticketing. 
>> All my accounting view htmls extend layout_accounting.html, all the 
>> ticketing view htmls extend layout_ticketing.html, inside these layout 
>> files, they include their corresponding menu i.e. response.menu_accounting, 
>> response.menu_ticketing. If i use your suggestion below, it will work well 
>> for accounting but not for ticketing under the same application. How should 
>> I address it?
>>
>> Could you tell me where I find the definition/documentation of Auth()'s 
>> arguments? What does function='user' do here? Many thanks in advance!
>>
>> On Sunday, April 9, 2017 at 11:48:43 PM UTC+8, Anthony wrote:
>>>
>>> auth = Auth(..., controller='accounting', function='user')
>>>
>>> Anthony
>>>
>>> On Sunday, April 9, 2017 at 11:13:33 AM UTC-4, Rudy wrote:

 Hi there,

 I have created an accounting application, say the landing page is 
 http://localhost:8000/tests/accounting/index. I need to change the 
 link under "LOG IN" dropdown menu on top right corner to 
 http://./tests/accounting/user/login instead of using 
 http://./tests/default/user/login. I thought it was pretty common & 
 simple, after I read a few posts on webypy-users group, I still don't know 
 how to change it. Below is what I have tried:

 1) Found below suggestion from Massimo, i commented out {{='auth' in 
 globals() and auth.navbar('Welcome', mode='dropdown') or ''}}, and added 
 below in layout.html
   {{if auth.user:}}
   Logout
   {{else:}}
   Login
   >>> href="{{=URL('accounting','user/register')}}">Register
   >>> href="{{=URL('accounting','user/retrieve_password')}}">Lost Password
   {{pass}}
 By doing above, I went 
 to http://./tests/accounting/user/login form, once I filled the form 
 and clicked the blue "LOG IN" button (the authentication went through), it 
 redirected to http:///tests/default/login#, same issue happened when I 
 logged out. How can I tell web2py where the next_url is? Or should I take 
 this approach at all to address my original question? If this is the way 
 to 
 do it, any easy way to make it as dropdown menu instead of just links?

 2) Then i tried to understand better how auth.navbar works by looking 
 into tools.py under gluon. I found navbar takes an argument action, i 
 modified it in layout.html to {{='auth' in globals() and 
 auth.navbar('Welcome', action='/tests/accounting/user', mode='dropdown') 
 or 
 ''}}.  I went to the correct form when I clicked the LOG IN link, the 
 redirect went to the correct controller and action, but only when I logged 
 out, the var _next pointed to and redirected to the default controller 
 again - ?_next=/tests/default/index. How do i fix it? What does the 
 argument "referred_action" do?

 3) I mixed point 1 above and Anthony suggestion - added point 1 above 
 in layout.html, so that it went to correct login form, then I added below 
 in tests/accounting/user action:
 form = auth()
 if request.args(0) == 'login':
 form['_action'] = URL(args=request.args)
   The behaviour went exactly like point 1 above

 I thought most applications would change this authentication urls, 
 there must be a better way to configure it, I already spent the weekend on 
 it. Any pointers are much appreciated.

>>>

-- 
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: pdf output of web2py-book app

2017-04-10 Thread Marlysson Silva
Here have some files to do that

https://github.com/web2py/web2py/tree/master/gluon/contrib/markmin

Do you tried use them ?

Em sábado, 8 de abril de 2017 11:49:11 UTC-3, alex escreveu:
>
> I have downloaded and used the book app 
> https://github.com/web2py/web2py-book to write some documentation. 
>
> The document's markmins and images are in the folder /sources/xx-doc-lang, 
> together with updated chapters.txt, info.txt and latex_template.tex 
> mimicking the original web2py documentations folders. 
>
> Now, which command should I use to create the pdf version of this 
> documentation, including content and indexes?
>
>

-- 
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: lack of documentation

2017-04-10 Thread Marlysson Silva
Do you are speaking about a couple of examples of "How to" ?

Em domingo, 9 de abril de 2017 11:35:04 UTC-3, Andrea Fae' escreveu:
>
> Web2py is wonderful, but it has a big challenge. No documentation. Or at 
> least no complete documentation. It's all based on the book and some site 
> that can give you suggestions...it's too less.
> Is there any person tha can tell me a complete reference of the language 
> (don't tell me the api, I'm not so skilled to understand completely this 
> docs...)
> Thank you
>

-- 
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] dynamic menu

2017-04-09 Thread Marlysson Silva
You can use the tables in database to handle the links and your permissions and 
in tour menu.py make the query search this links

-- 
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: appconfig.ini versus models/0.py

2017-04-07 Thread Marlysson Silva
But current welcome aplication already have the appconfig.ini file in 
wizard ..

https://github.com/web2py/web2py/tree/master/applications/welcome/private

Or do you want to say in create application in admin application..


Em quinta-feira, 30 de março de 2017 11:20:58 UTC-3, Anthony escreveu:
>
> The wizard was created before appconfig existed, and it looks like it was 
> never updated. Feel free to open a Github issue and link back to this 
> thread.
>
> Anthony
>
> On Thursday, March 30, 2017 at 12:33:07 AM UTC-4, Jared Priddle wrote:
>>
>> Hi guys,
>>
>> I created a new application with the wizard and noticed a lot of settings 
>> in models/0.py that I hadn't seen before.
>>
>> What is the purpose of this file versus appconfig.ini?  I'd rather have 
>> all the private settings in once place if possible and there seems like 
>> significant duplication between these two locations. For example:
>>
>> private/appconfig.ini
>>
>> [smtp]server = smtp.gmail.com:587sender = y...@gmail.com login  
>> = username:password
>>
>>
>> models/0.py
>>
>> settings.email_server = 'logging'
>> settings.email_sender = 'y...@example.com '
>> settings.email_login = ''
>>
>>
>> What am I missing?
>>
>

-- 
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: Why the response.flash can't be dismissed here?

2017-04-05 Thread Marlysson Silva
Do you altered something ?

Em quarta-feira, 5 de abril de 2017 03:14:33 UTC-3, Mike Stephenson 
escreveu:
>
> I am using this layout from web2py's official 
> site: web2py.plugin.layout_Chasmogamous
>
> However I see that the response.flash can't be dismissed.
> I guess there is a problem with this snippet in its layout.html:
> {{=response.flash or ''}}
>
> How do I make it work like it does in default layout?
> This snippet no longer works:
>  {{=response.flash 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.


[web2py] best place to put style

2017-04-02 Thread Marlysson Silva
The first way is the best option because separate concerns ( views ( HTML ) and 
style (CSS) )

The second you are using all web page with componentes to include in current 
page.. I think that this is not a best pratice..

-- 
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: Delete confirmation popup

2017-03-28 Thread Marlysson Silva
No. 
This 
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function

More especifically this example 
: 
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#Ajax-form-submission

I suggest you put a attribute "data-id" in your delete button and when you 
click them get the "data-id" attribute pass to ajax_function that run some 
function in controller.

Em terça-feira, 28 de março de 2017 15:39:19 UTC-3, Winter Kryz escreveu:
>
> You mean the onclick: function() ?
>
> El martes, 28 de marzo de 2017, 10:09:04 (UTC-3), Marlysson Silva escribió:
>>
>> Have you tried the ajax function() from web2py ?
>>
>> It use the callback function on controller and the data( id by example ) 
>> , and the callback receive this data and process them ( make search and 
>> delete it ) .
>>
>> Em segunda-feira, 27 de março de 2017 20:49:59 UTC-3, Winter Kryz 
>> escreveu:
>>>
>>> Hello Everybody,
>>>
>>> I hope someone can help me, I have a table full of records from a data 
>>> base, each row has a delete button so what I want to do is to show a 
>>> "Yes/No" Javascript popup to confirm the delete action.
>>>
>>> So far what I did is:
>>>
>>>  *** controller ***
>>> def Person():
>>> person = db(db.Person.id>0).select()
>>> class Virtual(object):
>>> def button(self):
>>>   XML(A(SPAN(_class='glyphicon 
>>> glyphicon-remove'),_id="delete",_onclick='myFunction()',_class='btn 
>>> btn-default fechar Jview btn-xs')),_class='btn-group btn-group-justified 
>>> JpositionA')
>>> return bts
>>> person.setvirtualfields(campos_virtual = Virtual())
>>> return dict(formListar=person)
>>>
>>> *** View ***
>>> 
>>> function myFunction() {
>>> $('#myModal').modal('show');
>>> return false;
>>> };
>>>
>>>  function myFunctiondelete() {
>>>  };
>>> 
>>>
>>> 
>>> 
>>> 
>>> Name
>>> Surname
>>> 
>>> 
>>> 
>>> {{for person in formListar:}}
>>> 
>>> {{=person.Person.name}}
>>> {{=person.Person.surname}}
>>> >> class="options">{{=person.campos_virtual.buttons}}
>>> 
>>> 
>>>{{pass}}
>>> 
>>> 
>>> 
>>>   
>>> 
>>>   
>>>Confirmation 
>>>   
>>>   
>>>
>>>   Are you sure you want to delete?
>>>   
>>>   
>>>   
>>>   
>>> No
>>> Yes 
>>>  
>>>
>>> Basically, everytime I click on the button I defined on the controller 
>>> it calls a function "myFunction()" which shows a Javascript modal with the 
>>> Yes/No options. When I click on "Yes" it doesn't do anything because I 
>>> don't know how to pass the id of that particular record.
>>>
>>> Anyone knows an easier method or how can I pass the id of that 
>>> particular record?
>>>
>>> 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: can I use this vue.js template in a project?

2017-03-28 Thread Marlysson Silva
Avoiding the "real-time" ( part most complicated )... it possible do it yes.

Em terça-feira, 28 de março de 2017 12:04:48 UTC-3, JorgeH escreveu:
>
> I'd like to use it in a web2py project...  as a front end for a call 
> center.. 
>
> On Tuesday, March 28, 2017 at 9:47:42 AM UTC-5, Marlysson Silva wrote:
>>
>> Just to buy.
>>
>> Or you want implement it ?
>>
>> Em terça-feira, 28 de março de 2017 11:41:49 UTC-3, JorgeH escreveu:
>>>
>>> Hello
>>>
>>> I stumbled upon this template
>>>
>>> https://vueadmintemplate.com/#/
>>>
>>> http://clear.lcrm.in/light/
>>>
>>>
>>> Do you think it can be use it in a project with little hassle?
>>>
>>>
>>> <https://lh3.googleusercontent.com/-a6xihBaRZMw/WNp2HWiBZNI/BI4/Gs9yr7WLKs4Yi8yLSXST-D6AFzeZ9d-9gCLcB/s1600/light.png>
>>>
>>>

-- 
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: can I use this vue.js template in a project?

2017-03-28 Thread Marlysson Silva
Just to buy.

Or you want implement it ?

Em terça-feira, 28 de março de 2017 11:41:49 UTC-3, JorgeH escreveu:
>
> Hello
>
> I stumbled upon this template
>
> https://vueadmintemplate.com/#/
>
> http://clear.lcrm.in/light/
>
>
> Do you think it can be use it in a project with little hassle?
>
>
> 
>
>

-- 
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: RestApi

2017-03-27 Thread Marlysson Silva
Which problem are you having?

Em sexta-feira, 24 de março de 2017 15:20:31 UTC-3, PK escreveu:
>
> @request.restful()
> def api():
> response.view = 'generic.json'
> def GET(*args,**vars):
> patterns = [
> "/wishBoxes[wishBoxes]",
> "/wishBoxes[wishBoxes]/{wishBoxes.name.startswith}",
> "/boxes[Details]/{Details.Title_id}"
> ]
> parser = db.parse_as_rest(patterns,args,vars)
> if parser.status == 200:
> return dict(wishBoxes=parser.response)
> else:
> raise HTTP(parser.status,parser.error)
>
> how shuould i return depanding on request table name 
> /api/wishBoxes which return return dict(wishBoxes=parser.response) 
> /api/boxes/1 which return return dict(boxes=parser.response) 
>

-- 
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 import google-api-python-client in web2py?

2017-03-27 Thread Marlysson Silva
So you try install by pip?

Em segunda-feira, 20 de março de 2017 10:38:12 UTC-3, Peter Weicher 
escreveu:
>
> Hello, 
>
> I am trying to use web2py to build an application that requests data from 
> various google APIs.
>
> Using my local install of Python 3 or Python 2, I am able to import the 
> necessary modules and query the api. 
>
> I have tried the following, restarting the webserver between each action:
>
> 1) copying google-api-python-client modules 
> into C:\web2py\web2py\site-packages
>
>- This does not work, I get  
>'module' object has no attribute 'DEFAULT_MAX_REDIRECTS'
>- package httplib2 definitely has a value called 
>'DEFAULT_MAX_REDIRECTS'
>- see Traceback #1
>
> 2) delete files and then cmd: python -m pip install --target= 
> google-api-python-client
>
>- same result as first action
>- see Traceback #1
>
> 3) Copy or pip files to C:\web2py\web2py\applications\ping\modules
>
>
>- This does not work either, I get error: 'exceptions.ImportError'> cannot import name discovery
>- See Traceback #2
>
>
> Has anyone successfully imported google-api-python-client into a web2py 
> local instance?
> Is there a setup step I am missing?
>
> Full list of modules I am talking about is below, and the google 
> instructions are here: 
> https://developers.google.com/api-client-library/python/start/installation
>
>
> Thank you!
>
> Peter
>
>
> ___
>
> Traceback #1
>
> Traceback (most recent call last):
>   File "C:\web2py\web2py\gluon\restricted.py", line 227, in restricted
> exec ccode in environment
>   File "C:/web2py/web2py/applications/ping/models/db.py" 
> , line 10, in 
> 
> from apiclient import discovery
>   File "C:\web2py\web2py\gluon\custom_import.py", line 74, in custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "C:\web2py\web2py\site-packages\apiclient\__init__.py", line 19, in 
> 
> from googleapiclient import discovery
>   File "C:\web2py\web2py\gluon\custom_import.py", line 74, in custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "C:\web2py\web2py\site-packages\googleapiclient\discovery.py", line 
> 56, in 
> from googleapiclient import _auth
>   File "C:\web2py\web2py\gluon\custom_import.py", line 74, in custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "C:\web2py\web2py\site-packages\googleapiclient\_auth.py", line 27, in 
> 
> import oauth2client.client
>   File "C:\web2py\web2py\gluon\custom_import.py", line 74, in custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "C:\web2py\web2py\site-packages\oauth2client\client.py", line 39, in 
> 
> from oauth2client import transport
>   File "C:\web2py\web2py\gluon\custom_import.py", line 74, in custom_importer
> return NATIVE_IMPORTER(oname, globals, locals, fromlist, level)
>   File "C:\web2py\web2py\site-packages\oauth2client\transport.py", line 255, 
> in 
> redirections=httplib2.DEFAULT_MAX_REDIRECTS,
> AttributeError: 'module' object has no attribute 'DEFAULT_MAX_REDIRECTS'
>
>
> 
>
> Traceback #2
>
> Traceback (most recent call last):
>   File "C:\web2py\web2py\gluon\restricted.py", line 227, in restricted
> exec ccode in environment
>   File "C:/web2py/web2py/applications/ping/models/db.py" 
> , line 10, in 
> 
> from apiclient import discovery
>   File "C:\web2py\web2py\gluon\custom_import.py", line 95, in custom_importer
> return base_importer(pname, globals, locals, fromlist, level)
>   File "applications\ping\modules\apiclient\__init__.py", line 19, in 
> from googleapiclient import discovery
> ImportError: cannot import name discovery
>
>
> List of Modules
>
> 03/14/2017  11:57 AM  apiclient
> 03/14/2017  11:57 AM  googleapiclient
> 03/14/2017  11:57 AM 
>  google_api_python_client-1.6.2.dist-info
> 03/14/2017  11:57 AM  httplib2
> 03/14/2017  11:57 AM  httplib2-0.10.3-py2.7.egg-info
> 03/14/2017  11:57 AM  oauth2client
> 03/14/2017  11:57 AM  oauth2client-4.0.0.dist-info
> 03/14/2017  11:57 AM  pyasn1
> 03/14/2017  11:57 AM  pyasn1-0.2.3.dist-info
> 03/14/2017  11:57 AM  pyasn1_modules
> 03/14/2017  11:57 AM  pyasn1_modules-0.0.8.dist-info
> 03/14/2017  11:57 AM  rsa
> 03/14/2017  11:57 AM  rsa-3.4.2.dist-info
> 03/14/2017  11:57 AM  six-1.10.0.dist-info
> 03/14/2017  11:49 AM30,098 six.py
> 03/14/2017  11:57 AM  tests
> 03/14/2017  11:57 AM  uritemplate
> 03/14/2017  11:57 AM  

[web2py] Re: Web2py multiple request variables to filter database output

2017-03-27 Thread Marlysson Silva
You want select many images , highlight them and search at database by 
ids's images highlighted ?

Real-time?

Em segunda-feira, 20 de março de 2017 10:40:13 UTC-3, Scorpa escreveu:
>
> Hello folks!
>
> I'm struggling with one idea:
> I want to make visual filter such as - you can click on any image from 
> predefined set (select from db) then this image will be highlited and now 
> interesting part:
> i want to make select from database based on the id of this image like for 
> example: db(db.t_thing.id == request.vars.thing_id).select()
> Then user can select another image and this id should be added to list.
> I implemented tagging for this and took search function from this manual 
> https://www.packtpub.com/mapt/book/web-development/9781849515467/3/ch03lvl1sec43/efficiently-searching-by-tag
>
>
> i made ajax 
> ajax('{{=URL('default', 'filter_thing', vars=dict(thing_id=thing.id))}}'
> ,[], 'things');
>
>
> but obviously this will overwrite variable.
>
>
> So the question is - how to append variables to list ?
>
> Thank you ! 
>
>

-- 
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: web2pyslices

2017-03-27 Thread Marlysson Silva
And the stackoverflow documentation?

http://stackoverflow.com/documentation/web2py/topics


Em terça-feira, 21 de março de 2017 16:53:16 UTC-3, Massimo Di Pierro 
escreveu:
>
> web2pyslices is becoming hard to maintain. Right now the best solution is 
> to create a github repo and move all the recipes into issues. We will 
> deprecate by closing them. People with gihub accounts can post and comment 
> issues/recipes. Unless you have a better solution, this will be done within 
> the next week.
>
> One sideffect is that we will lose some information about authorship of 
> the recipes and the comments. We will add a notice "created by {...}" but 
> the {...} name will be the web2pyslices username and that may not mean 
> anything in the gihub context.
>
> At this I do not have a better solution but please share your thoughts. 
>
>

-- 
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: web2pyslices

2017-03-26 Thread Marlysson Silva
An approach as web2pyref would be interesting

-- 
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: web2pyslices

2017-03-25 Thread Marlysson Silva
Awesome.  This is in github?

-- 
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: inner join taking too long

2017-03-24 Thread Marlysson Silva
Show up some error on web2py's console?

Em segunda-feira, 20 de março de 2017 13:05:12 UTC-3, John Philip escreveu:
>
> Hi there,
>
> I have two tables that I have queried using an inner join the query 
> outputs about 50,000 + records this is no problem on sqlite however it does 
> not seem to load on web2py. Is there something I am doing wrong?
>
>
> import json
> def get_dpc():
> rows = 
> db(db.plf.PLF_NAME==db.pcf.PCF_NAME).select(db.plf.PLF_NAME,db.pcf.PCF_DESCR).as_list()
> return dict(dpc_list=gluon.contrib.simplejson.dumps(rows))
>
>
>
> any help would be greatly appreciated.
>
> regards,
>
> John
>

-- 
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 make Web2py not block 'get' as well as 'post' requests from external sources?

2017-03-24 Thread Marlysson Silva
What's happening?

Em sexta-feira, 24 de março de 2017 11:10:23 UTC-3, Mike Stephenson 
escreveu:
>
> $().ready(function () {
> var url = 'http://biglibrary.pythonanywhere.com/app/phonegap/temp.json';
>
>   $.get(url, function (data) {
>alert(data);
>   });
> });
>

-- 
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: Custom Login View

2017-03-24 Thread Marlysson Silva
1. By analysing the web2py's code I find this line:

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1520


Basically you should define a url to redirect when login fails. And 
internally açthe parameter ( next=??) that you want to do.

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L4309-L4311


Steps:

1.1 Search by "fail login" string.

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1520


1.2 Here it call the function call_or_redirect.

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L4310


1.3 That call a function and redirect

https://github.com/web2py/web2py/blob/master/gluon/tools.py#L93


That you can pass a url in string format or a function URL() using 
parameters..

I don't was tested but I think that it so:

auth.settings.on_failed_authentication = URL("YOUR ACTION")

or

auth.settings.on_failed_authentication = "YOUR ACTION"


2. In these section have what you want.
:

> http://web2py.com/books/default/chapter/29/09/access-control#Authentication


Especifically this code:

def mylogin(): return dict(form=auth.login())
def myregister(): return dict(form=auth.register())
def myprofile(): return dict(form=auth.profile())


You can expose auth action that youself created .

3. Logout instantly?

Em quinta-feira, 23 de março de 2017 13:35:25 UTC-3, Happy Rob escreveu:
>
>
> Hi guys
> I'm trying to make a membership site but I'm struggling a little and would 
> love a little help
> # 1. How can I select where go if login fails? Can I add something next to 
> the 'next=URL' that's similar?
> # 2. How can I select so uses c/b/b3 to login instead of 
> c/default/user/login?
> # 3. When I login, it logs me out instantly - how can I not logout 
> instantly?
>
> I'm on Pythonanywhere, and I've got an app called "c"
> APP: c
> --
> MODEL: a.py...
> db = DAL ('sqlite://storage.sqlite')
> from gluon.tools import Auth
> auth = Auth(db, controller='b')
>
> auth.settings.controller = 'b'
> auth.settings.on_failed_authorization = URL('c',args='b/b3')
> auth.settings.login_url = URL(request.application, 'c', 'b3')
> auth.define_tables(username=False,signature=False)
> --
> CONTROLLER: b.py...
> #home page
> def b1():
> display_page = XML('Home Page')
> return dict(display_page = display_page)
>
> #regn page
> def b2():
> display_page = XML('Registration Page')
> return dict(display_page = display_page, 
> form=auth.register(next=URL('b3')))
>
> #login page
> def b3():
> display_page = XML('Login Page')
> return dict(display_page = display_page, 
> form=auth.login(next=URL('b4')))
> # 1. How can I select where go if login fails? Can I add something next to 
> the 'next=URL' that's similar?
>
> #members page
> @auth.requires_login()
> # 2. How can I select so uses c/b/b3 to login instead of 
> c/default/user/login?
> def b4():
> auth.settings.login_url = URL('b', 'b3')
> display_page = XML('Members Page')
> return dict(display_page = display_page, 
> form=auth.logout(next=URL('b1')))
> # 3. When I login, it logs me out instantly (and sends me to b1) - how can 
> I not logout instantly?
> --
> VIEW: b/b1.html...
> {{=display_page}}
>
> VIEW: b/b2 and b3 and b4 are the same...
> {{=display_page}}
> {{=form}}
> --
>
> Any help would be greatly appreciated - especially with question 2.
>

-- 
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: Comparar hash dinamicamente em uma consulta

2017-03-19 Thread Marlysson Silva
Aqui é o grupo internacional , sugeriria postar a pergunta em inglês também.

Ou então postar no grupo pt-br do web2py, lá o pessoal ajuda também.
https://groups.google.com/forum/#!forum/web2py-users-brazil

Mas o que está querendo é validar o login do usuário?

Here it the web2py international group , would sugest you post the ask in 
english too.

Or so to post in portuguese group's web2py , there are person help too.

But what you want to do is validate the user login?

Em sábado, 18 de março de 2017 15:57:05 UTC-3, Rodrigo attique santana 
escreveu:
>
> Olá meus amigos.
> Estou postando esta dúvida aqui pois não encontrei nada na net e acredito 
> que possa ser de utilidade para muitos.
>
> Tenho a seguinte estrutura:
> Clientes = db.define_table('clientes'
>,Field('nome')
>,Field('documento',unique=True)
>,Field('email_login','string')
>,Field('senha','string')
>,Field('telefone','list:string')
>,Field('endereco','list:string')
>,Field('status')
>   )
>
> Eu preciso fazer uma validação para este cliente pois o sistema externo me 
> enviará um hash com um campo aleatório, email_login, senha, documento.
> No banco de dados estes campos não estão criptografados eu preciso 
> criptografá-los em tempo de consulta. Como em:
>
> cliente = db(hashlib.md5(
>   (Clientes.senha).hexdigest()==request.args(0)) | 
> (Clientes.documento).hexdigest()==request.args(0)) | 
>  (Clientes.email_login).hexdigest()==request.args(0)).select()
>
> Tipo, ele tem que converter em md5 no memento da consulta. Como ein:
>
> select * from clientes where md5(email_login) = argumento_hash 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.


[web2py] Re: detect selected language

2017-03-15 Thread Marlysson Silva
The diference between these files are the language withing of that ? ..

Em terça-feira, 14 de março de 2017 09:45:30 UTC-3, Yebach escreveu:
>
> Based on the selected language i send a different file to user when he/she 
> registers
>
> i user this
>
> if any("adminLanguage=sl" in s for s in request.env.HTTP_COOKIE.split(";")):
> formFile = os.path.join(request.folder, 'private', 
> 'formular_WoShi_podatki.doc')
> else:
> formFile = os.path.join(request.folder, 'private', 'form_WoShi_data.doc')
>
>
>
>
> I know it is not the most elegant way so if anyone has a better 
> suggestion.
>
> But it works :)
>
>
>
> O Tuesday, March 14, 2017 at 8:39:09 PM UTC+8, 黄祥 wrote:
>>
>> perhaps you can use request.cookies
>> e.g. taken from web2py admin app
>> *models/db.py*
>> if 'language' in request.cookies and not (request.cookies['language'] is 
>> None):
>> T.force(request.cookies['language'].value)
>> else:
>> T.force('en')
>>
>> *views/language.html*
>> {{extend 'layout.html'}}
>>
>> {{if hasattr(T,'get_possible_languages_info'):}}
>> 
>> {{for langinfo in sorted([(code,info[1]) for code,info in 
>> T.get_possible_languages_info().iteritems() if code != 'default']):}}
>> > {{='id='+langinfo[0]}} >{{=langinfo[1]}}
>> {{pass}}
>> 
>> {{else:}}
>> {{pass}}
>>
>> 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: Examples of tagging/labeling

2017-03-13 Thread Marlysson Silva
Whats the mean the table blogpost_tag already that blogpost have a list 
reference to tag.

Em segunda-feira, 13 de março de 2017 10:08:32 UTC-3, Leonel Câmara 
escreveu:
>
> I actually like to have a list:reference on the table being tagged but 
> also have a table relating tags and the tagged table, This doesn't respect 
> data normalisation but makes things quite more efficient.
>
> To give an example:
> db.define_table('tag',
> Field('name'),
> Field('count', 'integer', writable=False, default=0),
> )
>
> db.define_table('blogpost',
> Field('title'),
> Field('body'),
> Field('tags', 'list:reference tag')
> )
>
>
> db.define_table('blogpost_tag',
> Field('blogpost', 'reference blogpost'),
> Field('tag', 'reference tag'),
> )
>
>
> I then define _after_insert, _after_update and _before_delete functions 
> for blogpost so I keep the blogpost_tag table updated when a blogpost is 
> changed or inserted. 
>
> This makes it very efficient to both search using a given tag and to know 
> which tags a blogpost has.
>
>

-- 
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: Python web2py console

2017-03-08 Thread Marlysson Silva
Ok , just remove the python command..

Em terça-feira, 7 de março de 2017 13:01:52 UTC-3, Paul Ellis escreveu:
>
> Hey Marlysson,
>
> This command doesn't work. But thanks for your time to try to help.
>
> Anthony has told me the correct command is:
>
> web2py.exe -S your_application -M
>
> Cheers
>
> On Mon, Mar 6, 2017 at 3:46 PM, Marlysson Silva <marly...@gmail.com 
> > wrote:
>
>> python web2py.exe -S your_application -M
>>
>> Em segunda-feira, 6 de março de 2017 11:14:53 UTC-3, Paul Ellis escreveu:
>>>
>>> Yes. I want an interactive shell with my application loaded.
>>>
>>> I know I can run a 'Test' page with output to the console, but it would 
>>> be much easier (and I know possible) if I could use an interactive shell.
>>>
>>> I have seen Massimo using it in his videos. But I can' t get the command 
>>> to work.
>>>
>>> On Mon, Mar 6, 2017 at 2:36 PM, Marlysson Silva <marly...@gmail.com> 
>>> wrote:
>>>
>>>> Try just double click in web2py.exe , it open a server in a screen.
>>>>
>>>> Or are you trying accessing models of application via shell?
>>>>
>>>> Em segunda-feira, 6 de março de 2017 09:14:34 UTC-3, Paul Ellis 
>>>> escreveu:
>>>>
>>>>> Hello, 
>>>>>
>>>>> I know this question has been asked before, but didn't solve the 
>>>>> problem for me.
>>>>>
>>>>> I am using Windows 10 and web2py binary and have replaced web2py.py 
>>>>> with web2py.exe in the command python web2py.py -s [applicaiton] -m and 
>>>>> am 
>>>>> getting this error:
>>>>>
>>>>> python web2py.exe -s [application] -m
>>>>> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, 
>>>>> but no encoding declared; see http://python.org/dev/peps/pep-0263/ for 
>>>>> details
>>>>>
>>>>> I have also tried: 
>>>>> python web2py.exe
>>>>>
>>>>> e:\web2py\py web2py.exe
>>>>> this gives a traceback, but the same error:
>>>>> Traceback (most recent call last):
>>>>>   File "", line 6, in 
>>>>>   File "__main__.py", line 126, in 
>>>>>   File "__main__py__.py", line 60, in 
>>>>>   File "web2py.exe", line 1
>>>>> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, 
>>>>> but no encoding declared; see http://python.org/dev/peps/pep-0263/ 
>>>>> for details
>>>>>
>>>>> What am I doing wrong?
>>>>>
>>>>> Cheers
>>>>>
>>>> -- 
>>>> 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/T1OH6haDHHM/unsubscribe.
>>>> To unsubscribe from this group and all its topics, 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 a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/T1OH6haDHHM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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: user-created documentation

2017-03-07 Thread Marlysson Silva
As a google docs collaborative?

Em terça-feira, 7 de março de 2017 04:33:45 UTC-3, Alex Glaros escreveu:
>
> I built a quick and dirty user-created documentation system where for each 
> topic, there is 1:M stakeholder-perspective content.
>
> Am asking the group if there might be a little less-dirty, less quick 
> method.
>
> Here is what currently exists:
>
> Example, for inventory system documentation there is for each topic, 
> documentation for these stakeholders:
> 1. business side documentation
> 2. programmer documentation
> 3. database administration documentation
> 4. architecture documentation
>
> It works okay with text fields containing the documentation. E.g.,
>
> TOPIC_TABLE
> 1. title (how to enter inventory data)
>
> STAKEHOLDER_TABLE
> 1. topic_ID  (1)
> 2. stakeholder_type_ID (database administrator)
> 3. content (text field, displayed with "pre" tag)
>
> The goal is to promote collaboration between business side, tech side by 
> having the content for a topic laid out by stakeholder perspective, side-by 
> side.
>
> Just wondering if there are any ideas to improve this without requiring 
> users to learn Sphinx or more complicated methods.
>
> thanks,
>
> Alex Glaros
>
>

-- 
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: new experimental feature in trunk - rows.join(...)

2017-03-06 Thread Marlysson Silva
It ever good have the software tested.

Desenvolvedor Frontend com um pé no Backend , e vice-versa.
Github: github.com/Marlysson
Email : marlyss...@gmail.com
Portfolio: marlysson.github.io/portfolio

2017-03-06 12:24 GMT-03:00 Richard Vézina <ml.richard.vez...@gmail.com>:

> I would not say it good practice but not all contrib that have been
> include are tested... But it definitly a good idea to test it properly and
> have test, so if the core change and you code break you know were it from
> (which commit to the core) as long as these tests are included in test suit.
>
> Richard
>
> On Mon, Mar 6, 2017 at 10:21 AM, Marlysson Silva <marlyss...@gmail.com>
> wrote:
>
>> The tests in contrib module are made by creator of module ( the core
>> developer of web2py don't test them ) .
>>
>> Desenvolvedor Frontend com um pé no Backend , e vice-versa.
>> Github: github.com/Marlysson
>> Email : marlyss...@gmail.com
>> Portfolio: marlysson.github.io/portfolio
>>
>> 2017-03-06 12:19 GMT-03:00 Jurgis Pralgauskis <
>> jurgis.pralgaus...@gmail.com>:
>>
>>> I'd like to.
>>> But it needs review and tests, I guess.
>>>
>>> 2017-03-06 17:00 "Richard Vézina" <ml.richard.vez...@gmail.com> rašė:
>>>
>>>> Hello Jurgis, maybe it could be included as a contrib??
>>>>
>>>> Because as Giovanni mention, your proposal would make the DAL more of
>>>> an ORM in case it been included.
>>>>
>>>> Richard
>>>>
>>>> On Sun, Mar 5, 2017 at 11:44 PM, Jurgis Pralgauskis <
>>>> jurgis.pralgaus...@gmail.com> wrote:
>>>>
>>>>> You can try mu plugin
>>>>>
>>>>> https://github.com/dz0/web2py_grand_helpers/blob/master/plug
>>>>> ins/modules/plugin_joins_builder/joins_builder.py
>>>>>
>>>>> Also mentioned as proposal
>>>>> https://github.com/web2py/pydal/issues/432
>>>>>
>>>>> --
>>>>> 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 a topic in the
>>>> Google Groups "web2py-users" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>> pic/web2py/_xQUWYXZG54/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 a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/web2py/_xQUWYXZG54/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 receivin

Re: [web2py] Re: new experimental feature in trunk - rows.join(...)

2017-03-06 Thread Marlysson Silva
The tests in contrib module are made by creator of module ( the core
developer of web2py don't test them ) .

Desenvolvedor Frontend com um pé no Backend , e vice-versa.
Github: github.com/Marlysson
Email : marlyss...@gmail.com
Portfolio: marlysson.github.io/portfolio

2017-03-06 12:19 GMT-03:00 Jurgis Pralgauskis 
:

> I'd like to.
> But it needs review and tests, I guess.
>
> 2017-03-06 17:00 "Richard Vézina"  rašė:
>
>> Hello Jurgis, maybe it could be included as a contrib??
>>
>> Because as Giovanni mention, your proposal would make the DAL more of an
>> ORM in case it been included.
>>
>> Richard
>>
>> On Sun, Mar 5, 2017 at 11:44 PM, Jurgis Pralgauskis <
>> jurgis.pralgaus...@gmail.com> wrote:
>>
>>> You can try mu plugin
>>>
>>> https://github.com/dz0/web2py_grand_helpers/blob/master/plug
>>> ins/modules/plugin_joins_builder/joins_builder.py
>>>
>>> Also mentioned as proposal
>>> https://github.com/web2py/pydal/issues/432
>>>
>>> --
>>> 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 a topic in the
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>> pic/web2py/_xQUWYXZG54/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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/web2py/_xQUWYXZG54/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.


Re: [web2py] Re: Python web2py console

2017-03-06 Thread Marlysson Silva
python web2py.exe -S your_application -M

Em segunda-feira, 6 de março de 2017 11:14:53 UTC-3, Paul Ellis escreveu:
>
> Yes. I want an interactive shell with my application loaded.
>
> I know I can run a 'Test' page with output to the console, but it would be 
> much easier (and I know possible) if I could use an interactive shell.
>
> I have seen Massimo using it in his videos. But I can' t get the command 
> to work.
>
> On Mon, Mar 6, 2017 at 2:36 PM, Marlysson Silva <marly...@gmail.com 
> > wrote:
>
>> Try just double click in web2py.exe , it open a server in a screen.
>>
>> Or are you trying accessing models of application via shell?
>>
>> Em segunda-feira, 6 de março de 2017 09:14:34 UTC-3, Paul Ellis escreveu:
>>
>>> Hello, 
>>>
>>> I know this question has been asked before, but didn't solve the problem 
>>> for me.
>>>
>>> I am using Windows 10 and web2py binary and have replaced web2py.py with 
>>> web2py.exe in the command python web2py.py -s [applicaiton] -m and am 
>>> getting this error:
>>>
>>> python web2py.exe -s [application] -m
>>> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, 
>>> but no encoding declared; see http://python.org/dev/peps/pep-0263/ for 
>>> details
>>>
>>> I have also tried: 
>>> python web2py.exe
>>>
>>> e:\web2py\py web2py.exe
>>> this gives a traceback, but the same error:
>>> Traceback (most recent call last):
>>>   File "", line 6, in 
>>>   File "__main__.py", line 126, in 
>>>   File "__main__py__.py", line 60, in 
>>>   File "web2py.exe", line 1
>>> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, 
>>> but no encoding declared; see http://python.org/dev/peps/pep-0263/ for 
>>> details
>>>
>>> What am I doing wrong?
>>>
>>> Cheers
>>>
>> -- 
>> 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/T1OH6haDHHM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.


Re: [web2py] Re: Python web2py console

2017-03-06 Thread Marlysson Silva
try:

python web2py.exe -S your_application -M



Em segunda-feira, 6 de março de 2017 11:14:53 UTC-3, Paul Ellis escreveu:
>
> Yes. I want an interactive shell with my application loaded.
>
> I know I can run a 'Test' page with output to the console, but it would be 
> much easier (and I know possible) if I could use an interactive shell.
>
> I have seen Massimo using it in his videos. But I can' t get the command 
> to work.
>
> On Mon, Mar 6, 2017 at 2:36 PM, Marlysson Silva <marly...@gmail.com 
> > wrote:
>
>> Try just double click in web2py.exe , it open a server in a screen.
>>
>> Or are you trying accessing models of application via shell?
>>
>> Em segunda-feira, 6 de março de 2017 09:14:34 UTC-3, Paul Ellis escreveu:
>>
>>> Hello, 
>>>
>>> I know this question has been asked before, but didn't solve the problem 
>>> for me.
>>>
>>> I am using Windows 10 and web2py binary and have replaced web2py.py with 
>>> web2py.exe in the command python web2py.py -s [applicaiton] -m and am 
>>> getting this error:
>>>
>>> python web2py.exe -s [application] -m
>>> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, 
>>> but no encoding declared; see http://python.org/dev/peps/pep-0263/ for 
>>> details
>>>
>>> I have also tried: 
>>> python web2py.exe
>>>
>>> e:\web2py\py web2py.exe
>>> this gives a traceback, but the same error:
>>> Traceback (most recent call last):
>>>   File "", line 6, in 
>>>   File "__main__.py", line 126, in 
>>>   File "__main__py__.py", line 60, in 
>>>   File "web2py.exe", line 1
>>> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, 
>>> but no encoding declared; see http://python.org/dev/peps/pep-0263/ for 
>>> details
>>>
>>> What am I doing wrong?
>>>
>>> Cheers
>>>
>> -- 
>> 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/T1OH6haDHHM/unsubscribe.
>> To unsubscribe from this group and all its topics, 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: Python web2py console

2017-03-06 Thread Marlysson Silva
Try just double click in web2py.exe , it open a server in a screen.

Or are you trying accessing models of application via shell?

Em segunda-feira, 6 de março de 2017 09:14:34 UTC-3, Paul Ellis escreveu:
>
> Hello, 
>
> I know this question has been asked before, but didn't solve the problem 
> for me.
>
> I am using Windows 10 and web2py binary and have replaced web2py.py with 
> web2py.exe in the command python web2py.py -s [applicaiton] -m and am 
> getting this error:
>
> python web2py.exe -s [application] -m
> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but 
> no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>
> I have also tried: 
> python web2py.exe
>
> e:\web2py\py web2py.exe
> this gives a traceback, but the same error:
> Traceback (most recent call last):
>   File "", line 6, in 
>   File "__main__.py", line 126, in 
>   File "__main__py__.py", line 60, in 
>   File "web2py.exe", line 1
> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but 
> no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>
> What am I doing wrong?
>
> Cheers
>

-- 
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: Python web2py console

2017-03-06 Thread Marlysson Silva
Try just double click in web2py.exe , it open a screen server.

Em segunda-feira, 6 de março de 2017 09:14:34 UTC-3, Paul Ellis escreveu:
>
> Hello, 
>
> I know this question has been asked before, but didn't solve the problem 
> for me.
>
> I am using Windows 10 and web2py binary and have replaced web2py.py with 
> web2py.exe in the command python web2py.py -s [applicaiton] -m and am 
> getting this error:
>
> python web2py.exe -s [application] -m
> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but 
> no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>
> I have also tried: 
> python web2py.exe
>
> e:\web2py\py web2py.exe
> this gives a traceback, but the same error:
> Traceback (most recent call last):
>   File "", line 6, in 
>   File "__main__.py", line 126, in 
>   File "__main__py__.py", line 60, in 
>   File "web2py.exe", line 1
> SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but 
> no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>
> What am I doing wrong?
>
> Cheers
>

-- 
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: javascript prompt and modal dialog

2017-03-05 Thread Marlysson Silva
What you make until here..?

Em domingo, 5 de março de 2017 15:29:29 UTC-3, Andrea Fae' escreveu:
>
> I need to open a jquery Dialog from inside a Select javascript in a view 
> web2py, taking some values from javascript, At closing dialog with OK I 
> need to insert record about the fields of this dialog to a database.
> Thank you
>
> Il giorno martedì 28 febbraio 2017 06:00:55 UTC+1, Marlysson Silva ha 
> scritto:
>>
>> The steps that your would made.
>>
>> The modal would be the form within a div , this div would have the 
>> trigger to activate the modal ( using sweetalert ) , then in the form ( 
>> within a modal ) you connect the function on controller receiving data from 
>> form and processing .
>>
>>
>>
>> Em quinta-feira, 23 de fevereiro de 2017 16:09:08 UTC-3, Andrea Fae' 
>> escreveu:
>>>
>>> When I click function select I want that appears a modal dialog using 
>>> jquery, asking some fields, and using this fields passing to controller
>>>
>>> Il giorno mercoledì 22 febbraio 2017 17:23:51 UTC+1, Ramos ha scritto:
>>>>
>>>> i like this one
>>>> https://limonte.github.io/sweetalert2/
>>>> and im using it with web2py
>>>>
>>>> 2017-02-22 13:44 GMT+00:00 Marlysson Silva <marly...@gmail.com>:
>>>>
>>>>> Explain more your problem?
>>>>>
>>>>> You are using just javascript or want integrate with web2py?
>>>>>
>>>>>
>>>>> Em sábado, 18 de fevereiro de 2017 16:11:30 UTC-3, Andrea Fae' 
>>>>> escreveu:
>>>>>>
>>>>>> Hello.
>>>>>> From Javascript I need to ask some different values and promt is good 
>>>>>> only for 1 text box.
>>>>>>
>>>>>> I know that I have to use jqury modal dialog, but I don't know 
>>>>>> nothing about it (I need to study?)
>>>>>>
>>>>>> Is there anyone that can write me a very simple example? You have to 
>>>>>> know that I have to use with select function in Fullcalendar scheduler 
>>>>>> addon.
>>>>>>
>>>>>> Thank you
>>>>>>
>>>>> -- 
>>>>> 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: New system like web2pyslices ( redesign and remodel maybe ) to web2py

2017-03-05 Thread Marlysson Silva
Like code example section?

Em domingo, 5 de março de 2017 10:14:54 UTC-3, Ben Lawrence escreveu:
>
> I prefer we keep everything in the web2py book with extra long code in 
> github. Example code can all go into the book. People go there. It is good.
>
> I tried to contribute to the book 
> https://github.com/web2py/web2py-book/pull/351
> but received no feedback. Is this the right way to do it?
>
> On Tuesday, February 28, 2017 at 5:13:57 AM UTC-8, Leonel Câmara wrote:
>>
>> Created an account just for this last night, need to start working 
>> towards that 150 reputation.
>>
>

-- 
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: HTTP_FROM

2017-03-03 Thread Marlysson Silva
This is a key of http header?

Em sexta-feira, 3 de março de 2017 09:00:20 UTC-3, Gael Princivalle 
escreveu:
>
> Hello.
>
> Is there a way to get the value of HTTP_FROM?
>
> I would like to use it for checking if value is googlebot(at)googlebot.com, 
> and redirect the url for avoiding tickets with my ajax functions.
>
> 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: Using Highcharts/Highstock to display data from the database

2017-03-03 Thread Marlysson Silva
Ok , That's good .

I will do a post blog about this : Make charts with Highcharts and web2py , 
or using chartjs.

Em quinta-feira, 2 de março de 2017 17:48:40 UTC-3, Oasis Agano escreveu:
>
> I ended up using pygal it looks more open on data organization and it 
> doesnt even require json format
>
> def mystat():
> response.files.append(URL('default', 'static/js/pygal-tooltips.min.js'))
> response.headers['Content-Type'] = 'image/svg+xml'
> import pygal
> from pygal.style import CleanStyle
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
>
> quants = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
>
> all_data= response.json([[r.created_on, r.qty] for r in rows])
> all_qty = [q.qty for q in quants]
> all_dates = [q.created_on for c in quants]
>
> graph = pygal.StackedLine(fill=True)
> graph.title = '% Water Consumption.'
> graph.x_labels = all_dates
> graph.add('Water in ML', all_qty)
>
> print all_qty
> print all_dates
>     return graph.render()
>
>
>
> On Thursday, March 2, 2017 at 12:50:31 PM UTC+2, Marlysson Silva wrote:
>>
>> Are you done?
>>
>> Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano 
>> escreveu:
>>>
>>> Greetings,
>>>
>>> Im using web2py to store data in an IOT project, saving data works 
>>> perfectly but i want to create some graphs to show stats or summary using 
>>> highcharts/highstock 
>>> *line chart.*
>>> Thats the code and the output
>>> CONTROLLER
>>>
>>> @auth.requires_login()
>>> @service.json
>>> def mystats():
>>>
>>>
>>> ownstats = db(db.water_flow_log.meter == 
>>> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
>>> rows = db(db.water_flow_log.meter == 
>>> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
>>> return response.json([[r.created_on, r.qty] for r in rows])
>>>
>>>
>>>
>>> VIEW
>>>
>>> {{extend 'layout.html'}}
>>> 
>>> https://code.highcharts.com/stock/highstock.js&quot</a>;>
>>> >> src="<a  rel="nofollow" href="https://code.highcharts.com/stock/modules/exporting.js&quot">https://code.highcharts.com/stock/modules/exporting.js&quot</a>;>
>>>
>>> 
>>> 
>>>  $.getJSON('<a  rel="nofollow" href="http://127.0.0.1:8000/Meter/default/call/json/mystats">http://127.0.0.1:8000/Meter/default/call/json/mystats</a>', 
>>> function (data) {
>>>
>>> // pie subscription
>>> $('#pie_subscription').highcharts({
>>>
>>> series: [{
>>> type: 'line',
>>> name: '{{=T('Subscription') }} ',
>>> data:  [
>>> {{for row_pie_subscription in rows:}}
>>> ['{{=T(row_pie_subscription.created_on) }}', 
>>> {{=row_pie_subscription.qty}} ],
>>> {{pass}}
>>> ]
>>> }],
>>>
>>> });
>>>
>>> });
>>>  
>>> 
>>>
>>>
>>>
>>> OUTPUT
>>>
>>> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], 
>>> ["2017-02-24 10:32:57", 270.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.


[web2py] Re: $.get jquery and controller

2017-03-02 Thread Marlysson Silva
This answer solved your problem?

http://stackoverflow.com/a/42519762/3908932


Em terça-feira, 28 de fevereiro de 2017 17:37:51 UTC-3, Andrea Fae' 
escreveu:
>
> I have this code in a view (from a select funcion javascript)
>
>
> $.get('{{=URL('default','nuovo_evento')}}',{risorsa:eventData.resourceId,titolo:eventData.title,start:start,end:end});
>  
>
> this code call a controller
>
> def nuovo_evento():
> form=crud.create(db.evento)
> return locals()
>
> this is the view very simple
> {{extend 'layout.html'}}
> {{=form}}
>
> Why I don't see the form?
>
>

-- 
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/pydal.Download uploaded file error when the original filename of uploaded file is chinese cha

2017-03-02 Thread Marlysson Silva
Appers some error ticket with a message? Or just just "server error" ..

Em quarta-feira, 1 de março de 2017 23:52:54 UTC-3, Yibing Liu escreveu:
>
> I am using web2py. I cloned the latest version of pydal. I define a 
> 'upload' field in my table. Then I upload a image whose filename is chinese 
> character. Everything seems ok so far. However when I try to access the 
> uploaded file with the download function, I get a server error. I have 
> found two solutions to avoid this error. The first solution is changing the 
> fllename to english character, the second solution is downgradeing the 
> pydal to the older version embedded in web2py(2.14.6,release at 
> May,10,2016). So I guess something is wrong in the latest pydal when 
> handling filename with chinese character. Hope to get your answer. Thank 
> you.
>

-- 
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: Using Highcharts/Highstock to display data from the database

2017-03-02 Thread Marlysson Silva
Are you done?

Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano 
escreveu:
>
> Greetings,
>
> Im using web2py to store data in an IOT project, saving data works 
> perfectly but i want to create some graphs to show stats or summary using 
> highcharts/highstock 
> *line chart.*
> Thats the code and the output
> CONTROLLER
>
> @auth.requires_login()
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/Meter/default/call/json/mystats', 
> function (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> OUTPUT
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.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.


[web2py] Re: Help! I need to show a short name of languages in a dropdown

2017-03-02 Thread Marlysson Silva
Are you getting this values from where?

Are you using which framework to frontend?

Em quarta-feira, 1 de março de 2017 22:33:58 UTC-3, Yoel Baez escreveu:
>
> How can I show a short name of the languages in a dropdow?
> I updated the languages files, but not working...
>
> Ej.
> "English (US)" = "EN"
> "Español" = "ES"
>
>
> 
>
>

-- 
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: Help! I need to show a short name of languages in a dropdown

2017-03-02 Thread Marlysson Silva
Are you getting this values from where?

Em quarta-feira, 1 de março de 2017 22:33:58 UTC-3, Yoel Baez escreveu:
>
> How can I show a short name of the languages in a dropdow?
> I updated the languages files, but not working...
>
> Ej.
> "English (US)" = "EN"
> "Español" = "ES"
>
>
> 
>
>

-- 
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: Using Highcharts/Highstock to display data from the database

2017-03-01 Thread Marlysson Silva
Try make the serialization in your controller , and in view just use the 
variable serializable. Avoid make iteraction in views.

Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano 
escreveu:
>
> Greetings,
>
> Im using web2py to store data in an IOT project, saving data works 
> perfectly but i want to create some graphs to show stats or summary using 
> highcharts/highstock 
> *line chart.*
> Thats the code and the output
> CONTROLLER
>
> @auth.requires_login()
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/Meter/default/call/json/mystats', 
> function (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> OUTPUT
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.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.


[web2py] Re: Using Highcharts/Highstock to display data from the database

2017-03-01 Thread Marlysson Silva
Show us how are your data returned by your query..

Em quarta-feira, 1 de março de 2017 05:48:51 UTC-3, Oasis Agano escreveu:
>
> Thank you for the reply but when i do this i get a serialization error on 
> datetime, plus i think my problem is on the view not the controller.
> kr
> oasis
>
> On Wednesday, March 1, 2017 at 1:17:42 AM UTC+2, Marlysson Silva wrote:
>>
>> In your controller try to use the simplejson from gluon intead json dumps 
>> from python and return the lists formatted to your chart.
>>
>> Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano 
>> escreveu:
>>>
>>> Greetings,
>>>
>>> Im using web2py to store data in an IOT project, saving data works 
>>> perfectly but i want to create some graphs to show stats or summary using 
>>> highcharts/highstock 
>>> *line chart.*
>>> Thats the code and the output
>>> CONTROLLER
>>>
>>> @auth.requires_login()
>>> @service.json
>>> def mystats():
>>>
>>>
>>> ownstats = db(db.water_flow_log.meter == 
>>> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
>>> rows = db(db.water_flow_log.meter == 
>>> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
>>> return response.json([[r.created_on, r.qty] for r in rows])
>>>
>>>
>>>
>>> VIEW
>>>
>>> {{extend 'layout.html'}}
>>> 
>>> https://code.highcharts.com/stock/highstock.js&quot</a>;>
>>> >> src="<a  rel="nofollow" href="https://code.highcharts.com/stock/modules/exporting.js&quot">https://code.highcharts.com/stock/modules/exporting.js&quot</a>;>
>>>
>>> 
>>> 
>>>  $.getJSON('<a  rel="nofollow" href="http://127.0.0.1:8000/Meter/default/call/json/mystats">http://127.0.0.1:8000/Meter/default/call/json/mystats</a>', 
>>> function (data) {
>>>
>>> // pie subscription
>>> $('#pie_subscription').highcharts({
>>>
>>> series: [{
>>> type: 'line',
>>> name: '{{=T('Subscription') }} ',
>>> data:  [
>>> {{for row_pie_subscription in rows:}}
>>> ['{{=T(row_pie_subscription.created_on) }}', 
>>> {{=row_pie_subscription.qty}} ],
>>> {{pass}}
>>> ]
>>> }],
>>>
>>> });
>>>
>>> });
>>>  
>>> 
>>>
>>>
>>>
>>> OUTPUT
>>>
>>> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], 
>>> ["2017-02-24 10:32:57", 270.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.


[web2py] Re: Using Highcharts/Highstock to display data from the database

2017-02-28 Thread Marlysson Silva
In your controller try to use the simplejson from gluon intead json dumps 
from python and return the lists formatted to your chart.

Em terça-feira, 28 de fevereiro de 2017 20:01:57 UTC-3, Oasis Agano 
escreveu:
>
> Greetings,
>
> Im using web2py to store data in an IOT project, saving data works 
> perfectly but i want to create some graphs to show stats or summary using 
> highcharts/highstock 
> *line chart.*
> Thats the code and the output
> CONTROLLER
>
> @auth.requires_login()
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/Meter/default/call/json/mystats', 
> function (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> OUTPUT
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.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.


[web2py] Re: manual for loop in views and json

2017-02-28 Thread Marlysson Silva
But analysing your code I see that you don't using the json.dumps converter 
in your data came from controller.

Try use this line , importing from gluon.contrib.simplejson:

 return gluon.contrib.simplejson.dumps( [ [r.created_on , r.qty] for r in 
rows] )


Em terça-feira, 28 de fevereiro de 2017 18:57:17 UTC-3, Oasis Agano 
escreveu:
>
> Hello im trying to add a line chart using this example but in the view i 
> see the json output instead of a graph.
> Any help?
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/test/default/call/json/mystats', function 
> (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> CONTROLLER
>
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> OUTPUT ON VIEW
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.0]]
>
>
>
> On Friday, October 7, 2016 at 8:52:18 PM UTC+2, 黄祥 wrote:
>>
>> it's work as expected, thank you so much marlysson
>> e.g.
>> import gluon.contrib.simplejson
>>
>> def test():
>> chosen = request.args(0)
>> query = (db.account.investor == chosen)
>> rows = db(query).select(orderby = ~db.account.id)
>> return gluon.contrib.simplejson.dumps([[r.product.name, 
>> r.subscription_amount] for r in rows] )
>>
>> thanks and best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report 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: manual for loop in views and json

2017-02-28 Thread Marlysson Silva
But analysing your code I see that you don't using the json.dumps converter 
in your data came from controller.

Try use this line , importing from gluon.contrib.simplejson:

 return gluon.contrib.simplejson.dumps( [ [r.created_on , r.qty] for r in 
rows] )
Em terça-feira, 28 de fevereiro de 2017 18:57:17 UTC-3, Oasis Agano 
escreveu:
>
> Hello im trying to add a line chart using this example but in the view i 
> see the json output instead of a graph.
> Any help?
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/test/default/call/json/mystats', function 
> (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> CONTROLLER
>
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> OUTPUT ON VIEW
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.0]]
>
>
>
> On Friday, October 7, 2016 at 8:52:18 PM UTC+2, 黄祥 wrote:
>>
>> it's work as expected, thank you so much marlysson
>> e.g.
>> import gluon.contrib.simplejson
>>
>> def test():
>> chosen = request.args(0)
>> query = (db.account.investor == chosen)
>> rows = db(query).select(orderby = ~db.account.id)
>> return gluon.contrib.simplejson.dumps([[r.product.name, 
>> r.subscription_amount] for r in rows] )
>>
>> thanks and best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report 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: manual for loop in views and json

2017-02-28 Thread Marlysson Silva
Oasis create a new post and reference it here that I would like help you.
This answer already aswered.

Em terça-feira, 28 de fevereiro de 2017 18:57:17 UTC-3, Oasis Agano 
escreveu:
>
> Hello im trying to add a line chart using this example but in the view i 
> see the json output instead of a graph.
> Any help?
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/test/default/call/json/mystats', function 
> (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> CONTROLLER
>
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> OUTPUT ON VIEW
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.0]]
>
>
>
> On Friday, October 7, 2016 at 8:52:18 PM UTC+2, 黄祥 wrote:
>>
>> it's work as expected, thank you so much marlysson
>> e.g.
>> import gluon.contrib.simplejson
>>
>> def test():
>> chosen = request.args(0)
>> query = (db.account.investor == chosen)
>> rows = db(query).select(orderby = ~db.account.id)
>> return gluon.contrib.simplejson.dumps([[r.product.name, 
>> r.subscription_amount] for r in rows] )
>>
>> thanks and best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report 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: manual for loop in views and json

2017-02-28 Thread Marlysson Silva
Oasis create a new post and reference them here that I would like help you.

This answer already was answered.

Em terça-feira, 28 de fevereiro de 2017 18:57:17 UTC-3, Oasis Agano 
escreveu:
>
> Hello im trying to add a line chart using this example but in the view i 
> see the json output instead of a graph.
> Any help?
>
> VIEW
>
> {{extend 'layout.html'}}
> 
> https://code.highcharts.com/stock/highstock.js";>
> https://code.highcharts.com/stock/modules/exporting.js";>
>
> 
> 
>  $.getJSON('http://127.0.0.1:8000/test/default/call/json/mystats', function 
> (data) {
>
> // pie subscription
> $('#pie_subscription').highcharts({
>
> series: [{
> type: 'line',
> name: '{{=T('Subscription') }} ',
> data:  [
> {{for row_pie_subscription in rows:}}
> ['{{=T(row_pie_subscription.created_on) }}', 
> {{=row_pie_subscription.qty}} ],
> {{pass}}
> ]
> }],
>
> });
>
> });
>  
> 
>
>
>
> CONTROLLER
>
> @service.json
> def mystats():
>
>
> ownstats = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> rows = db(db.water_flow_log.meter == 
> auth.user.username).select(db.water_flow_log.ALL,orderby=~db.water_flow_log.date_made)
> return response.json([[r.created_on, r.qty] for r in rows])
>
>
>
> OUTPUT ON VIEW
>
> [["2017-02-24 14:32:20", 275.0], ["2017-02-24 10:52:50", 272.0], ["2017-02-24 
> 10:32:57", 270.0]]
>
>
>
> On Friday, October 7, 2016 at 8:52:18 PM UTC+2, 黄祥 wrote:
>>
>> it's work as expected, thank you so much marlysson
>> e.g.
>> import gluon.contrib.simplejson
>>
>> def test():
>> chosen = request.args(0)
>> query = (db.account.investor == chosen)
>> rows = db(query).select(orderby = ~db.account.id)
>> return gluon.contrib.simplejson.dumps([[r.product.name, 
>> r.subscription_amount] for r in rows] )
>>
>> thanks and best regards,
>> stifan
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report 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: javascript prompt and modal dialog

2017-02-27 Thread Marlysson Silva
The steps that your would made.

The modal would be the form within a div , this div would have the trigger 
to activate the modal ( using sweetalert ) , then in the form ( within a 
modal ) you connect the function on controller receiving data from form and 
processing .



Em quinta-feira, 23 de fevereiro de 2017 16:09:08 UTC-3, Andrea Fae' 
escreveu:
>
> When I click function select I want that appears a modal dialog using 
> jquery, asking some fields, and using this fields passing to controller
>
> Il giorno mercoledì 22 febbraio 2017 17:23:51 UTC+1, Ramos ha scritto:
>>
>> i like this one
>> https://limonte.github.io/sweetalert2/
>> and im using it with web2py
>>
>> 2017-02-22 13:44 GMT+00:00 Marlysson Silva <marly...@gmail.com>:
>>
>>> Explain more your problem?
>>>
>>> You are using just javascript or want integrate with web2py?
>>>
>>>
>>> Em sábado, 18 de fevereiro de 2017 16:11:30 UTC-3, Andrea Fae' escreveu:
>>>>
>>>> Hello.
>>>> From Javascript I need to ask some different values and promt is good 
>>>> only for 1 text box.
>>>>
>>>> I know that I have to use jqury modal dialog, but I don't know nothing 
>>>> about it (I need to study?)
>>>>
>>>> Is there anyone that can write me a very simple example? You have to 
>>>> know that I have to use with select function in Fullcalendar scheduler 
>>>> addon.
>>>>
>>>> Thank you
>>>>
>>> -- 
>>> 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: New system like web2pyslices ( redesign and remodel maybe ) to web2py

2017-02-27 Thread Marlysson Silva
In brazilian stackoverflow don't disponible , need reputation to access , 
answer more questions in international stackoverflow .

Em segunda-feira, 27 de fevereiro de 2017 18:53:25 UTC-3, Anthony escreveu:
>
> We might also consider putting some material here: 
> http://stackoverflow.com/documentation/web2py
>
> On Monday, February 27, 2017 at 3:49:12 PM UTC-5, Dave S wrote:
>>
>> On Sunday, February 26, 2017 at 2:12:39 PM UTC-8, Donald McClymont wrote:
>>>
>>> I think something should be done - the current site never seems to be up 
>>> any more - I just get ticket issue unrecoverable when I access.  I also 
>>> think we could look at a different approach with basically just using 
>>> github for storing everything and the slices just provides a searchable 
>>> directory of links for web2py related stuff with some basic details rather 
>>> than actually storing the code/applications in two places.
>>>
>>> Donald
>>>
>>>
>> While I think the Slices avatar (mascot?) is cute, the search function 
>> seems to be inconsistent.  
>>
>> As for moving forward, I would be okay with several options (somebody 
>> needs to choose one, but I'm narrowing it down yet)
>>-- something that wasn't too different from the current but with the 
>> undercarriage cleaned up
>>-- something like a wiki
>>-- perhaps some new presentation, but I'd have to see some demos
>>
>> For any of the three paths, I'd be okay with using pointers to github for 
>> the code as long as the pointers could also be to bitbucket or to a snippet 
>> site.like Gist or Pastie or JSFiddle.
>>
>> /dps
>>
>>
>>
>>  
>>
>>> On Saturday, February 25, 2017 at 11:07:51 PM UTC, Marlysson Silva wrote:
>>>>
>>>>
>>>> Hi people.
>>>>
>>>> What you think about redesign the web2pyslices website?
>>>>
>>>

-- 
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: best way to put together components that interact between them

2017-02-27 Thread Marlysson Silva
Awesome , You could to write a post explain this :D .

Em sexta-feira, 24 de fevereiro de 2017 18:25:42 UTC-3, Bernardo Leon 
escreveu:
>
> Hi, I am trying to create a page that uses 3 components. I want each 
> component to be reusable.
>
> The first component is a search box, based on the search box result I want 
> to load the second component (a grid) with the first result as a parameter. 
> When I click on a link in the second component grid I want to load a third 
> component based on wich link I pressed in the second component.
>
> What would be the best way to accomplish this? Making this 3 components 
> interact while maintaining an elegant code and reusability of the 
> components?
>
> Thank you!
>

-- 
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: best way to put together components that interact between them

2017-02-26 Thread Marlysson Silva
Try on action in a component ( click , submit , any event ) make this:

http://web2py.com/books/default/chapter/29/12/components-and-plugins?search=load#Reload-another-component

Reload other component .. but before of the reload the component , use the 
javascript to show it and so perform the feature..
I think

The documentation too use the .reload method of jquery lib to reload the 
div that contains the component ( Other approach )

Em sexta-feira, 24 de fevereiro de 2017 18:25:42 UTC-3, Bernardo Leon 
escreveu:
>
> Hi, I am trying to create a page that uses 3 components. I want each 
> component to be reusable.
>
> The first component is a search box, based on the search box result I want 
> to load the second component (a grid) with the first result as a parameter. 
> When I click on a link in the second component grid I want to load a third 
> component based on wich link I pressed in the second component.
>
> What would be the best way to accomplish this? Making this 3 components 
> interact while maintaining an elegant code and reusability of the 
> components?
>
> Thank you!
>

-- 
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] New system like web2pyslices ( redesign and remodel maybe ) to web2py

2017-02-25 Thread Marlysson Silva

Hi people.

What you think about redesign the web2pyslices website?

-- 
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: best way to put together components that interact between them

2017-02-25 Thread Marlysson Silva
Are you using the some frontend framework? As Vuejs , angular , react ..

Or many pages html loaded by the *load *function ?

Em sexta-feira, 24 de fevereiro de 2017 18:25:42 UTC-3, Bernardo Leon 
escreveu:
>
> Hi, I am trying to create a page that uses 3 components. I want each 
> component to be reusable.
>
> The first component is a search box, based on the search box result I want 
> to load the second component (a grid) with the first result as a parameter. 
> When I click on a link in the second component grid I want to load a third 
> component based on wich link I pressed in the second component.
>
> What would be the best way to accomplish this? Making this 3 components 
> interact while maintaining an elegant code and reusability of the 
> components?
>
> Thank you!
>

-- 
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: javascript prompt and modal dialog

2017-02-22 Thread Marlysson Silva
Explain more your problem?

You are using just javascript or want integrate with web2py?

Em sábado, 18 de fevereiro de 2017 16:11:30 UTC-3, Andrea Fae' escreveu:
>
> Hello.
> From Javascript I need to ask some different values and promt is good only 
> for 1 text box.
>
> I know that I have to use jqury modal dialog, but I don't know nothing 
> about it (I need to study?)
>
> Is there anyone that can write me a very simple example? You have to know 
> that I have to use with select function in Fullcalendar scheduler addon.
>
> Thank you
>

-- 
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: Multiple files upload

2017-02-22 Thread Marlysson Silva
1 - You could to use the SQLFORM without io perform , here:
http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-without-database-IO

You can use the .validate() method in form to stop normal way processing in 
form , and do what you want ..

Or 

Using dbio parameter as False

Em sábado, 18 de fevereiro de 2017 17:45:11 UTC-3, Creator escreveu:
>
> Hello everyone!
> I wanna share a situation to which I can't figure a proper solution to see 
> if I get any ideas. Sorry if this specific topic has already been covered, 
> but I couldn't find it anywhere.
>
> I'm trying to upload multiple files only to make some processing and 
> return the results. At first, I don't need them saved to the upload folder, 
> but it might come in handy later, so I'd like to have this option.
> I mention this because my routine worked fine before, when I used the 
> structure "form=FORM(TABLE" and so on. Later I changed it to "form = 
> SQLFORM.factory(" to have the advantage of Bootstrap formatting and then 
> ran into a double problem:
>
>- when uploading multiple files, I can process them and everything 
>goes fine, but the files aren't saved to the upload folder;
>- when uploading a single file, it is saved to the upload folder, but 
>I can't read it the same way I read with multiple files OR the same way it 
>worked before, without using SQLFORM.factory.
>
> I understand I could read the file from the folder, but it really doesn't 
> make much sense to have different approaches to the same operation.
>
> So, if there's any question so far, it would be those two:
>
>1. How can I upload but not save a file using the SQLFORM upload field?
>2. How can I upload multiple files and get them saved using the 
>SQLFORM upload field?
>
> To finish, I managed to insert the "multiple" attribute on the form 
> created by the SQLFORM factory with this line:
>
> form.custom.widget['files_field']['_multiple'] = ""
>
> Thanks in advance!
>

-- 
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: Hide css of my application

2017-02-22 Thread Marlysson Silva
Web2py have this scripts:

To min static files
https://github.com/web2py/web2py/tree/master/gluon/contrib/minify

And this to zip in a single file:

https://github.com/web2py/web2py/blob/master/scripts/zip_static_files.py

Em domingo, 5 de fevereiro de 2017 14:35:29 UTC-3, Alessio Varalta escreveu:
>
> Hi, I have a web2py application.
> I use in my project web2py but also rails, and with rails you can comprim 
> all css in a single file...you can make this operation with web2py?
>

-- 
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: Agree on some terms before registration

2017-02-21 Thread Marlysson Silva
Sorry to survive a so old topic , but a alternative solution is:

http://web2py.com/books/default/chapter/29/07/forms-and-validators#Validators-with-dependencies

Em quinta-feira, 29 de março de 2012 19:15:31 UTC-3, Hassan Alnatour 
escreveu:
>
> Dear ALL,
>
> How can i make the user agree to some term using a check box before 
> registration ??
>

-- 
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: MySQL / Web2py datetime issue

2017-02-21 Thread Marlysson Silva
The others fields returns correctly?

Em terça-feira, 21 de fevereiro de 2017 02:07:00 UTC-3, Chris Dodson 
escreveu:
>
> I have a manually built the MySQL table and then use migrate=False in 
> Web2py.  I can enter hours use the add_to_table function passing in the 
> table_name, the work_date_start and work_date_end show up in this form as 
> the datetime picker.  I can choose from this and add the info into the 
> table, as they show up correctly in MySQL.  When I try to view the data in 
> show_table function these two dates show up as None.  The timestamp field 
> time_added_to_table does show the datetime correctly in a format like 
> '2017-02-10 19:37:35'.  Any ideas?
>
> Below are the descriptions of MySQL and the Web2py info used.
>
> I manually build tables in MySQL, here's the table using describe 
> billable_hours;
>
> +-+-+--+-+---++
> | Field   | Type| Null | Key | Default   | 
> Extra  |
>
> +-+-+--+-+---++
> | id  | bigint(20)  | NO   | PRI | NULL  | 
> auto_increment |
> | time_added_to_table | timestamp   | NO   | | CURRENT_TIMESTAMP 
> ||
> | work_date_start | datetime(6) | YES  | | NULL  
> ||
> | work_date_end   | datetime(6) | YES  | | NULL  
> ||
> | work_details| text| YES  | | NULL  
> ||
> | customer_id | bigint(20)  | YES  | MUL | NULL  
> ||
> | billing_state_id| bigint(20)  | YES  | MUL | NULL  
> ||
>
> +-+-+--+-+---++
> 7 rows in set (0.00 sec)
>
> Here's the web2py info in my_models.py:
> -
> db.define_table('billing_notes', Field('id', 'integer'), 
> Field('time_added_to_table', 'datetime', requires=IS_NOT_EMPTY(), 
> writable=False, readable=False), Field('note', 'string'),  
> format='%(note)s', migrate=False)
>
> db.define_table('customers', Field('id', 'integer'), 
> Field('time_added_to_table', 'datetime', requires=IS_NOT_EMPTY(), 
> writable=False, readable=False), Field('customer', 'string'),  
> format='%(customer)s', migrate=False)
>
> db.define_table('billing_states', Field('id', 'integer'), 
> Field('time_added_to_table', 'datetime', requires=IS_NOT_EMPTY(), 
> writable=False, readable=False), Field('billing_state', 'string'),  
> format='%(billing_state)s', migrate=False)
>
> db.define_table('billable_hours', Field('id', 'integer'), 
> Field('time_added_to_table', 'datetime', requires=IS_NOT_EMPTY(), 
> writable=False, readable=False), Field('work_date_start', 'datetime'), 
> Field('work_date_end', 'datetime'), Field('work_details', 'text'), 
> Field('customer_id', db.customers, requires=IS_IN_DB(db, "customers.id", 
> "%(customer)s")), Field('billing_state_id', db.billing_states, 
> requires=IS_IN_DB(db, "billing_states.id", "%(billing_state)s")),  
> format='%(work_date_start)s', migrate=False)
> ---
> My controller in default.py is:
> def add_to_table():
>table_name=request.vars['tname']
>form = SQLFORM(db[table_name])
>if form.process().accepted:
>response.flash = 'form accepted'
>elif form.errors:
>response.flash = 'form has errors'
>else:
>response.flash = 'please fill out the form'
>return dict(form=form)
>
> def show_table():
> # shows the table's data
> table_name=request.vars['tname']
> response.flash=table_name
> q=db[table_name]['id']>0
> s=db(q)
> rows=s.select()
> #print(rows)
> return dict(rows=rows
>
>
> ---
> Thanks!
> cd
>
>

-- 
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 & react

2017-02-18 Thread Marlysson Silva
Great!

Em quinta-feira, 16 de fevereiro de 2017 15:05:38 UTC-3, José L. escreveu:
>
> Inspired by 
> https://medium.com/react-redux/introducci%C3%B3n-a-redux-js-8bdf4fe0751e#.iqodqn8cc
> I have created a small project, using web2py instead of Django:
> https://github.com/jredrejo/web2pyreactpoc
>
>
> As usual, it's much easier ;)
>
> I've created three different pages, with different degrees of 
> integration/difficulty
>
> I plan to add one more page using redux and a form, but that will take me 
> longer and I don't have much free time.
>
> Just in case it helps anyone
>
> Regards
> José L.
>
>
> P.S. If someone can do the same using vue.js it would be great. I've never 
> worked with this library but I've only heard good things, so it would be a 
> nice way to compare them.
>
>
>

-- 
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] global name 'T' is not defined

2017-01-26 Thread Marlysson Silva
What caveats could happen have making this?

Em quarta-feira, 25 de janeiro de 2017 13:04:42 UTC-3, Anthony escreveu:
>
> On Wednesday, January 25, 2017 at 4:40:40 AM UTC-5, mweissen wrote:
>>
>> Try in the module:
>>
>> from gluon import current
>> T = current.T
>>
>
> Don't do T=current.T at the top level of the module (or as a class 
> property) -- instead, that should go inside a function or method.
>
> 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: Set the Atom Editor to auto complete web2py

2017-01-26 Thread Marlysson Silva
Try this:

http://web2py.com/books/default/chapter/29/14/other-recipes#Developing-with-IDEs-WingIDE-Rad2Py-Eclipse-and-PyCharm

Em quarta-feira, 7 de setembro de 2016 21:30:49 UTC-3, Rafael Oliveira 
escreveu:
>
>
> Good Morning. I wanted to set the Atom Editor to auto complete web2py, 
> already tried in some tutorials and I can not. I use Windows 10. I managed 
> to make Python auto complete. Thank you in advance.
>

-- 
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: websocket_messaging.py error on multiple connections

2017-01-24 Thread Marlysson Silva
Show me the code.. So stay more easy help

Em terça-feira, 24 de janeiro de 2017 00:10:34 UTC-3, Omicron VT escreveu:
>
> Following the example in websocket_messaging.py i have this config:
>
> A tv.html view that refresh its content when an event on client.html sends 
> a message to group1
>
> All of this works fine if tv.html is opened only 1 time. 
>
> When i open tv.html more than one time when first message is sended, 
> tv.html begins an infinite loop refreshing for ever.
>
> Any ideas ?  
>

-- 
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: Creating table from a controller

2017-01-06 Thread Marlysson Silva
Then the define_table is restricted to the "context" that they are within ? 
.. And not to the global object ( db connection )

Em sexta-feira, 6 de janeiro de 2017 10:03:00 UTC-3, Anthony escreveu:
>
>
> On Friday, January 6, 2017 at 6:49:15 AM UTC-5, Marlysson Silva wrote:
>>
>> You can use the variable_db_conection.define_table(...) into your 
>> controller , using the data received from form submitted ..
>>
>> def create_table():
>>
>> data = some_request_data_object
>>
>> variable_db.define_table(data['table_name'],
>> Field(data['field_name'],'type'),
>> Field(data['field_name_2'],'type_2')
>> )
>>
>> I think that so works..
>>
>
> That will indeed define the table, but it can then only be used from 
> within that specific function, as that is the only place the table is 
> defined (it will not exist on subsequent requests to other 
> functions/controllers).
>
> Anthony 
>
>>
>> Em sexta-feira, 6 de janeiro de 2017 01:18:46 UTC-3, Leonardo Dutra 
>> escreveu:
>>>
>>> Hi guys, 
>>> I need to create a table in my db from a controller, such as:
>>> I have my controller and after to submit a form it will create a new 
>>> table automatically, it's possible?
>>> If they have better suggestions, please feel free to tell me!
>>>
>>> Thanks a lot!
>>>
>>

-- 
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: Made with web2py

2017-01-06 Thread Marlysson Silva
Great , I will watch your project , I miss too of tests in web2py personal 
applications ..


Em sexta-feira, 6 de janeiro de 2017 08:56:21 UTC-3, Mathieu Clabaut 
escreveu:
>
> The idea is to make a pytest plugin, that would allow to run unit_test, 
> webclient and splinter (webclient with javascript enabled UI) tests.
> I have a version working (see branch master of the aforementioned github 
> project, and the README.md) , but which is still too much coupled with the 
> application. 
> The goal is to have an independent plugin, with as little constraint on 
> the application as possible. See the branch pytest_plugin 
> <https://github.com/matclab/pytest-web2py.wip/tree/pytest_plugin> for 
> first development steps.
>
>
> On Fri, Jan 6, 2017 at 12:37 PM Marlysson Silva <marly...@gmail.com 
> > wrote:
>
>> Great project..
>>
>> Can you explain the pytest plugin project?
>>
>> It is a plugin or a package to test web2py applications?
>>
>> I could like to contribute with more knowledgement of project
>>
>> Em quinta-feira, 5 de janeiro de 2017 18:32:17 UTC-3, Mathieu Clabaut 
>> escreveu:
>>>
>>> Hello everybody,
>>>
>>>  This is just to announce a new web2py powered website (my first one) 
>>> going live : http://bback.me
>>>  This site is in beta test for now, but you can ask for taking part in 
>>> the beta test phase at https://bback.me/user_/request_access. Note that 
>>> the English version has not been proofread for now.
>>>  Criticism, questions or comments are welcomed.
>>>
>>>   I must thank all the web2py community for the work done, and for its 
>>> kindness in helping other people.
>>>   I have still lot of work to do to improve the website, but I hope to 
>>> be able to spare a bit more time for contributing back to the web2py 
>>> ecosystem (and notably to the pytest plugin I'm working one : 
>>> https://github.com/matclab/pytest-web2py.wip/tree/pytest_plugin).
>>>
>>>  Best regards,
>>> -Mathieu
>>>
>>

-- 
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 csv (referenced fields)

2017-01-06 Thread Marlysson Silva
What structure of the table ?

She need start with name of tabel , following by next line being the name 
of field names ..

Em sexta-feira, 6 de janeiro de 2017 01:18:42 UTC-3, Adam Jed escreveu:
>
> Hi,
>
> I have defined tables: 
>
> db.define_table('BL',
> Field('name'),
> format='%(name)s'
> )
>
> db.define_table('PL',
> Field('name'),
> Field('BL_name', 'reference BL'),
> format='%(name)s'
> )
>
> db.define_table('PRO',
> Field('name'),
> Field('BL_name', 'reference BL'),
> Field('PL_name', 'reference PL'),
> format='%(name)s'
> )
>
> db.define_table('ALL',
> Field('PRO','reference PRO'),
> Field('PL','reference PL'),
> Field('BL','reference BL')
> )
>
> Now i want to import csv into ALL table with:
> import_from_csv_file(file,delimiter=",",id_map={})
>
> I'm receiving error: 
>  invalid literal for long() with base 10: 
> "the cell value of the filed here"
> It works only when I provide the referenced fields ID's into csv file. 
> I would like to import the csv with the string values that are defined in 
> the BL,PL,PRO tables.
>
> Any ideas how to make the import_from_csv_file accepts the "name" fields 
> from the tables instead of id's ?
>

-- 
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: Creating table from a controller

2017-01-06 Thread Marlysson Silva
You can use the variable_db_conection.define_table(...) into your 
controller , using the data received from form submitted ..

def create_table():

data = some_request_data_object

variable_db.define_table(data['table_name'],
Field(data['field_name'],'type'),
Field(data['field_name_2'],'type_2')
)

I think that so works..

Em sexta-feira, 6 de janeiro de 2017 01:18:46 UTC-3, Leonardo Dutra 
escreveu:
>
> Hi guys, 
> I need to create a table in my db from a controller, such as:
> I have my controller and after to submit a form it will create a new table 
> automatically, it's possible?
> If they have better suggestions, please feel free to tell me!
>
> Thanks a lot!
>

-- 
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: Made with web2py

2017-01-06 Thread Marlysson Silva
Great project..

Can you explain the pytest plugin project?

It is a plugin or a package to test web2py applications?

I could like to contribute with more knowledgement of project

Em quinta-feira, 5 de janeiro de 2017 18:32:17 UTC-3, Mathieu Clabaut 
escreveu:
>
> Hello everybody,
>
>  This is just to announce a new web2py powered website (my first one) 
> going live : http://bback.me
>  This site is in beta test for now, but you can ask for taking part in the 
> beta test phase at https://bback.me/user_/request_access. Note that the 
> English version has not been proofread for now.
>  Criticism, questions or comments are welcomed.
>
>   I must thank all the web2py community for the work done, and for its 
> kindness in helping other people.
>   I have still lot of work to do to improve the website, but I hope to be 
> able to spare a bit more time for contributing back to the web2py ecosystem 
> (and notably to the pytest plugin I'm working one : 
> https://github.com/matclab/pytest-web2py.wip/tree/pytest_plugin).
>
>  Best regards,
> -Mathieu
>

-- 
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: make your app name show first

2017-01-02 Thread Marlysson Silva
Try this:

http://web2py.com/books/default/chapter/29/04/the-core#Application-init

Defining a app how first..

Em segunda-feira, 2 de janeiro de 2017 04:48:12 UTC-3, David Shavers 
escreveu:
>
> Hi, I have an app and I had to name it 'init' because the 'welcome' app 
> kept coming up first. How can I make it so that a different app (e.g. 
> 'jbtus') comes before 'init?'

-- 
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: dynamic form component

2016-12-28 Thread Marlysson Silva
What structure you should like generate?

Em quarta-feira, 28 de dezembro de 2016 10:45:56 UTC-3, Pierre escreveu:
>
> Hi,
>
> I have a set of buttons displayed in a view. I'd like each  button to 
> pass different args to the form component (prepopulate some of the form 
> fields). I can probably achieve this via some tricky js/jquery but is there 
> a better option like loading the component when necessary with the 
> appropriate args (onclick LOAD..) already set ?
>

-- 
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: Layout and CSS

2016-12-27 Thread Marlysson Silva
Yes it possible.

Description of files:

- bootstrap.min.css - already known
- calendar.css - to styling native calendar component of web2py
- web2py-bootstrap.min.css - I think that it a old version from web2py.css
- web2py.css - styling component's web2py ( as flash messages , grid 
component , sqlform style ... )

Then you might create your css files and put in static/css folder , 
removing ( as I made ) the css files that you don't will use, and keeping 
the web2py.css to style sqlform and grid component ( if you want )

Em segunda-feira, 26 de dezembro de 2016 16:10:09 UTC-3, Andrea Fae' 
escreveu:
>
> I'm new using web2py.
> I'd like to know:
> - where is possible to change the layout of a new applilcazion. What css I 
> can change? There are minimun 3 in static folder!
> - where is possible to change table html settings in this css file...(you 
> will tell me who will be...)
> Thank you
>

-- 
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: Rotate image stored

2016-12-24 Thread Marlysson Silva
If you have the image in a storage server then use pilow ( library to 
images editing ) apply the effects and store again in storage server.

Here is a example to rotate a image 
http://matthiaseisen.com/pp/patterns/p0201/ .

You apply this algorithm in image ( or in many ) then use save method to 
overwrite old image..

Em quinta-feira, 22 de dezembro de 2016 14:52:17 UTC-3, Áureo Dias Neto 
escreveu:
>
> I have the images stored on database, i want to rotate this, and overwrite 
> the phisycal file.. 
>
> 2016-12-15 12:38 GMT-02:00 Marlysson Silva <marly...@gmail.com 
> >:
>
>> Use the pilow lib , before of the inserting in folder upload , make 
>> processing them and after push to server storage
>>
>> Or
>>
>> Save them normal and use css transform to rotate them ( whether it will 
>> only show in front-end )
>>
>> Em quinta-feira, 15 de dezembro de 2016 11:00:35 UTC-3, Áureo Dias Neto 
>> escreveu:
>>
>>> Good morning, young people!
>>>
>>> I need a function, that I can rotate a photo saved in the database, that 
>>> is, previously sent. And the same apples to be rotated, replace the current 
>>> one in the database/ file
>>>
>> -- 
>> 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.


  1   2   3   >