[web2py] Re: Web2py Developer Jobs

2015-09-06 Thread Matheus Cardoso
Congrats, dude. You also reminded to me to ask to community if we have any 
channel about web2py jobs. Have we? We all know that Django and Flask took 
over the python market and I think it would be nice to broadcast such news 
to community. 

On Sunday, September 6, 2015 at 1:55:30 AM UTC-3, Lane Campbell wrote:
>
> Hello All,
>
> I just launched my startup June to help balance the needs of developers 
> with those doing hiring.  In fact, we flip hiring on it's head.  If you are 
> looking for web2py jobs you can sign up and set it as a skill, then 
> companies doing hiring can find you and will pay you to pitch you jobs.  
>
> Check it out: http://www.joinjune.com 
>
> Regards,
> Lane
>

-- 
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: [IS_LENGTH(128), IS_NOT_EMPTY()] vs IS_LENGTH(minsize=1, maxsize=128)

2015-09-06 Thread Anthony
Should be, though you would get different error messages.

Anthony

On Sunday, September 6, 2015 at 7:00:35 AM UTC-4, Annet wrote:
>
> I have this validator:
>
> requires=[IS_LENGTH(128), IS_NOT_EMPTY()]
>
> and wonder whether this validator
>
> requires=IS_LENGTH(minsize=1, maxsize=128)
>
> validates the same way.
>
>
> 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.


Re: [web2py] Re: Web2py Developer Jobs

2015-09-06 Thread Michele Comitini
+1.  Nice and brave idea for a startup!

mic


2015-09-06 7:01 GMT+02:00 Massimo Di Pierro :

> Thank you Lane. Congratulations!
>
>
> On Saturday, 5 September 2015 23:55:30 UTC-5, Lane Campbell wrote:
>>
>> Hello All,
>>
>> I just launched my startup June to help balance the needs of developers
>> with those doing hiring.  In fact, we flip hiring on it's head.  If you are
>> looking for web2py jobs you can sign up and set it as a skill, then
>> companies doing hiring can find you and will pay you to pitch you jobs.
>>
>> Check it out: http://www.joinjune.com
>>
>> Regards,
>> Lane
>>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: auth.wiki deployment issue

2015-09-06 Thread 黄祥
had you already tried the web2py latest version?

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] About web2py

2015-09-06 Thread Richard Vézina
HTML : *HyperText Markup Language*, commonly referred to as *HTML*, is the
standard markup language 
used to create web pages .
*Ref :* https://en.wikipedia.org/wiki/HTML

web2py : Free open source full-stack framework for rapid development of
fast, scalable, secure
 and portable
database-driven web-based applications. Written and programmable in Python
.
*Documentation :* http://web2py.com/book


web2py will generate HTML content as many other things...

The scope of your question is to broad, and you should consider make some
reading, that why I provide you some pointer...

Richard

On Thu, Sep 3, 2015 at 1:21 AM, Jagadeesh  wrote:

> what is the difference between html and web2py in detail??
>
>
>
>
>
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] storing blob field on s3

2015-09-06 Thread Mark Graves
Hey everyone,

Quick question.

Is there a quick workaround for storing a blob db field on s3?

Would it work to set uploadfs = S3FS(bucket)?

Or would I have to change it to an upload type field and then set the 
uploadfs for the uploadfield?

-Mark

-- 
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: Persistent Login?

2015-09-06 Thread Anthony
Unless you enable the "remember me" option, the login will only last as 
long as the session, as it relies on a session cookie (session cookies have 
no expiration, so the browser deletes them when the browser is closed). If 
you enable the "remember me" option, the session cookie is given an 
expiration, which technically converts it to a non-session cookie (even 
though web2py uses it to identify the session on the server side). To 
enable the "remember me" option, do:

auth.settings.remember_me_form = True
auth.settings.long_expiration = 3600

Note, that will give the user the option to choose the extended login. If 
you instead want to force an extended login, you can skip the first line 
above, and instead, create a login_onaccept callback that does the 
following:

session.auth.expiration = response.session_cookie_expires = auth.
settings.long_expiration
session.auth.remember_me = True

Anthony

On Sunday, September 6, 2015 at 12:55:26 AM UTC-4, Robert Porter wrote:
>
> How can I make a login persistent.  I want you to have to clean your 
> cookies to ever be logged out.
>
> Right now I have a bug where I get logged out after a pretty short time 
> (even though I set auth.settings.expiration=3600), so I just want a way 
> where you absolutely cannot logout unless you clean your cookies or hit my 
> logout button.  I want to disable the possibility, not just "extend" the 
> expiration.
>

-- 
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: auth.wiki deployment issue

2015-09-06 Thread pj00016
Thanks very much for the response. Nothing seems to work. The force_render 
option didn't make any difference. The auth.wiki.get_renderer caused an 
error.
Here is my controller with some debugging code. I am simply trying to 
access the wiki_page table:

# -*- coding: utf-8 -*-
def index(): return auth.wiki(force_render=True)


@auth.requires_membership('administrator')
def refreshWiki():
count = 0
for row in db(db.wiki_page).select():
count = count+1
return "pages "+str(count)

When I trigger the refreshWiki method, I get a ticket on the "for row..." 
line:
 'DAL' object has no attribute 'wiki_page'
This is strange because the database has the table 'wiki_page' and I can 
access the table from the wiki menu in the application. 
The variable auth is defined in the db.py code as
auth = Auth(db)

The version of web2py is 2.9.12stable.
Again, the wiki works fine on the local host. This is an issue when the 
application is packaged and uploaded to pythonanywhere.

Thanks for any help you can provide.
Peter

On Friday, August 21, 2015 at 1:26:18 AM UTC-4, Massimo Di Pierro wrote:
>
> The wiki caches the rendered pages in HTML for speed. So when the app 
> moves the cached pages contain the wrong links.
>
> the auth.wiki(...) method has a force_render which you can set to True
>
> auth.wiki(force_render=True) which will re-create the cached content when 
> pages are called. 
> or you can do:
>
> render = auth.wiki.get_renderer
> for row in db(db.wiki_page).select():
>  row.update_record(html=render(row.page))
> db.commit()
>
> Massimo
>
>
>
>
> On Thursday, 20 August 2015 14:13:48 UTC-5, pj0...@gmail.com  
> wrote:
>>
>> I have the same problem as Andrew W. When deployed to pythonanywhere.com 
>> the pages still point to the local host.
>>
>>

-- 
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: pypfdf - how to make text wrap table cells?

2015-09-06 Thread at

Thanks a lot Edwood for your help. I'll definitely try to follow your tips.

Best Regards,
AT 

On Sunday, 6 September 2015 09:55:25 UTC+5, Edwood wrote:
>
> Hi.
>
> Wrapping inside table columns is not currently supported by "write_html", 
> nor are CSS properties.  
>
> One way to render wrapped text inside tables is to build the table using 
> lines and then use "multi_cell" to wrap text inside the columns.  This 
> technique will require you to maintain careful track of the current 
> position inside de PDF document.  Some examples that may help you 
> (disclaimer: wrote by me):
>
>- Wrapping with multi_cell: 
>https://pyfpdfbook.wordpress.com/2015/03/22/wrapping-text-with-multicell/
>
>
>- Putting two adjacent multicell blocks: 
>
> https://pyfpdfbook.wordpress.com/2015/03/22/putting-two-adjacent-multicell-blocks/
>
>  You may also try Weasyprint (http://weasyprint.org/) which supports CSS 
> styles.  I have no experience with it yet, but looks interesting.
>
>
> On Thursday, September 3, 2015 at 6:43:40 AM UTC-4, at wrote:
>>
>> Hi,
>>
>> I was trying to use the first sample report from: 
>> https://code.google.com/p/pyfpdf/wiki/Web2Py. I modified it a little to 
>> fill the data dynamically inside the table, but the long text is not 
>> wrapping inside the table cells. I've tried setting different css to 
>> address the issue but no luck. 
>>
>> Any idea how to fix it?
>>
>> 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] [IS_LENGTH(128), IS_NOT_EMPTY()] vs IS_LENGTH(minsize=1, maxsize=128)

2015-09-06 Thread Annet
I have this validator:

requires=[IS_LENGTH(128), IS_NOT_EMPTY()]

and wonder whether this validator

requires=IS_LENGTH(minsize=1, maxsize=128)

validates the same way.


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] Re: help on form button inner text

2015-09-06 Thread dirman
This is the form

form2=FORM(
DIV(
INPUT(_type="text",_class="span2", _name="usr", 
requires=IS_NOT_EMPTY(error_message=()), _placeholder="username"),
BUTTON(_value='Pay!',_type="submit",_class="span2"),_style='margin:10px 
20px;'))

and i want to do an update after process

form.element('input[name=usr]')['_name']='tkn'
form.element('input[name=tkn]')['_placeholder']='token'
form.element('button[type=submit]')['_submit_button']='Confirm!'

but can't get the Confirm! text on the submit button 

On Saturday, September 5, 2015 at 11:13:55 PM UTC, Ben Lawrence wrote:
>
> I just write:
> form=SQLFORM.factory(*fields,buttons = [TAG.button('Send 
> Message',_type="submit")])
>
>
> On Saturday, September 5, 2015 at 3:21:09 PM UTC-7, dirman wrote:
>>
>> i need help here
>>
>> this works fine with form input
>>
>> form.element('input[type=submit]')['_value']='Go!'
>>
>> but this does not output the inner text on form button
>>
>> form.element('button[type=submit]')['_submit_button']='Go!'
>>
>

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

2015-09-06 Thread Annet
Thanks you both for your replies.
Problem solved.

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] Re: help on sessions

2015-09-06 Thread dirman
Thank you. 

On Sunday, September 6, 2015 at 4:54:01 AM UTC, Massimo Di Pierro wrote:
>
> del session.cart['name'] ?
>
> On Saturday, 5 September 2015 17:26:50 UTC-5, dirman wrote:
>>
>> is it possible to delete or clear an item in session.cart.items() ?
>>
>

-- 
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: Security issue with request.vars

2015-09-06 Thread Niphlod
def cart_callback():
try:
id = int(request.vars.id)
except:
raise HTTP(400, 'Use an integer')

On Sunday, September 6, 2015 at 1:16:36 AM UTC+2, dirman wrote:
>
>
> am having a security issue with this function
> i sent this ajax request: cart_callback?action=add=hacked
>  
>
> def cart_callback():
> id = request.vars.id
> if request.vars.action == 'add':
> session.cart[id]=session.cart.get(id,0)+1
> if request.vars.action == 'sub':
> session.cart[id]=max(0,session.cart.get(id,0)-1)
> return str(session.cart[id])
>
> and i got a ticket
>
> even with id=int(request.vars.id)
>
> how do i secure this function so that it accepts only integer on 
> request.vars.id
>

-- 
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: Random Logouts?

2015-09-06 Thread Niphlod
it's not an error, it's a simple expiration. Are you using file based 
sessions or cookie based ones ?

On Sunday, September 6, 2015 at 6:55:24 AM UTC+2, Robert Porter wrote:
>
>
> I seem to have a bug where it will log me out for no reason, but I can't 
> find a way to reproduce it.  I do not touch session cookies anywhere in my 
> site and I've set the auth expiration to 360.  I do not have any way 
> for the user to logout other than clicking the logout button.  I don't want 
> users ever to be logged out unless they push that button.
>
> Why do I seem to get logged out for no reason?  I don't even know how to 
> troubleshoot this because it doesn't cause any errors!
>

-- 
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 Restfull API Token authentication

2015-09-06 Thread Niphlod
code has been handed over and we're discussing on api details on the 
developers list. Shouldn't take much.

On Saturday, September 5, 2015 at 4:37:50 AM UTC+2, Dave S wrote:
>
> On Wednesday, September 2, 2015 at 1:15:48 AM UTC-7, Niphlod wrote:
>>
>> I'm back from holidays, JWT support is on the way to master repo. Stay 
>> tuned, also because I have some experience with js frameworks but not with 
>> Angular. We may tune the code for JWT to make Angular integration easy. If 
>> a slice comes out detailing the integration process wouldn't hurt :-P 
>>
>
> Ah, another expansion of the reading list.   I'm skimming RFC 7515 right 
> now.
>
> /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.