[web2py] Re: Using an external lib - Twython

2013-03-29 Thread Annet
Hi Nate,

I am using a module relativedelta and have the following import statement 
in db.py

from applications.init.modules.relativedelta import*

Where init is the name of my application.


Annet

-- 

--- 
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/groups/opt_out.




[web2py] Social media icons.

2013-03-29 Thread Annet
I like the social media icons that come with web2py, are they part of a 
larger set?

I need icons for social media other than facebook, gplus and twitter.


Kind regards,

Annet

-- 

--- 
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/groups/opt_out.




[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-29 Thread Craig Matthews
How about including jQuery jNotify?  http://www.myjqueryplugins.com/


On Tuesday, March 26, 2013 12:55:12 PM UTC-4, LightDot wrote:

 I prefer to keep web2py.js stock, to ease updates, so I add a similar 
 fadeout js to layout.html when I need it.

 I'm not sure I'd alter the default though. App user can miss a message 
 that fades out quickly, so I prefer to leave such decisions to the UI 
 designer. We have apps that have flash messages with a fixed timeout (4-8 
 sec if I remember correctly), apps that have flash messages with no time 
 out at all and apps entirely without flash messages. All this is a valid 
 design approach and I see no benefit to changing the default, since one 
 solution will never fit all usage cases. Perhaps it would benefit web2py 
 users if fadeout was pre-set in code as a variable (ie. off or value in 
 seconds)? It would be easier to hack the setting. But then again, web2py is 
 a programming framework. web2py users are expected to know how to alter 
 such things or at least search trough the docs and google groups.

 I like the idea of having flash messages with different categories (ie. 
 error, warning, info), which could be treated differently (sticky, fadeout, 
 different graphical design etc.). But isn't this pushing it too far..? I 
 mean, isn't it getting too complex? It does sound like a nice idea, 
 though...

 Regards,
 Ales

 On Tuesday, March 26, 2013 4:36:43 PM UTC+1, Mika Sjöman wrote:

 Hi

 Had a user pointing out how irritating it was that the response.flash 
 never goes away automatically. Found this fix thou in the group, how about 
 making a standard 4 second fadeout on it?

 in web2py.js:

 var flashBox = jQuery(.flash), flashTimer;
   flashBox.click(function(){
   if (flashTimer) clearTimeout(flashTimer);
   flashBox.fadeOut(400, function(){jQuery(.flash).html('')});
   });
   flashTimer = setTimeout(function(){flashBox.fadeOut(400, function(){
 jQuery(.flash).html('')});}, 4000); 



-- 

--- 
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/groups/opt_out.




[web2py] Re: how about setting a standard fadeout to response.flash?

2013-03-29 Thread Niphlod
fits better in a plugin.

On Friday, March 29, 2013 8:49:57 AM UTC+1, Craig Matthews wrote:

 How about including jQuery jNotify?  http://www.myjqueryplugins.com/


 On Tuesday, March 26, 2013 12:55:12 PM UTC-4, LightDot wrote:

 I prefer to keep web2py.js stock, to ease updates, so I add a similar 
 fadeout js to layout.html when I need it.

 I'm not sure I'd alter the default though. App user can miss a message 
 that fades out quickly, so I prefer to leave such decisions to the UI 
 designer. We have apps that have flash messages with a fixed timeout (4-8 
 sec if I remember correctly), apps that have flash messages with no time 
 out at all and apps entirely without flash messages. All this is a valid 
 design approach and I see no benefit to changing the default, since one 
 solution will never fit all usage cases. Perhaps it would benefit web2py 
 users if fadeout was pre-set in code as a variable (ie. off or value in 
 seconds)? It would be easier to hack the setting. But then again, web2py is 
 a programming framework. web2py users are expected to know how to alter 
 such things or at least search trough the docs and google groups.

 I like the idea of having flash messages with different categories (ie. 
 error, warning, info), which could be treated differently (sticky, fadeout, 
 different graphical design etc.). But isn't this pushing it too far..? I 
 mean, isn't it getting too complex? It does sound like a nice idea, 
 though...

 Regards,
 Ales

 On Tuesday, March 26, 2013 4:36:43 PM UTC+1, Mika Sjöman wrote:

 Hi

 Had a user pointing out how irritating it was that the response.flash 
 never goes away automatically. Found this fix thou in the group, how about 
 making a standard 4 second fadeout on it?

 in web2py.js:

 var flashBox = jQuery(.flash), flashTimer;
   flashBox.click(function(){
   if (flashTimer) clearTimeout(flashTimer);
   flashBox.fadeOut(400, function(){jQuery(.flash).html('')});
   });
   flashTimer = setTimeout(function(){flashBox.fadeOut(400, function(){
 jQuery(.flash).html('')});}, 4000); 



-- 

--- 
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/groups/opt_out.




[web2py] Re: Using an external lib - Twython

2013-03-29 Thread Niphlod
@annet: you can import with a simple from relativedelta import *
@nate: according to the module documentation, you need to do 

from twython import Twython




On Friday, March 29, 2013 7:21:15 AM UTC+1, Annet wrote:

 Hi Nate,

 I am using a module relativedelta and have the following import statement 
 in db.py

 from applications.init.modules.relativedelta import*

 Where init is the name of my application.


 Annet


-- 

--- 
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/groups/opt_out.




[web2py] web2py user login form encoding problem

2013-03-29 Thread Yebach
hello

I have a login form for user registration

If user writes name surname password including signs š, č, ž, ć  there is 
an error 'ascii' codec can't decode byte 0xc5 in position 0: ordinal not in 
range(128)

Where can I set the encoding for form??

thank you

-- 

--- 
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/groups/opt_out.




[web2py] DAL is not joining tables if I have multiple clauses?

2013-03-29 Thread Dragan Matic
I have a table that shows family connections for users (I need one way 
connections) defined as: 

db.define_table('family_members', 
Field('user_id', 'integer'), 
Field('connected_to', 'integer'))

I need to read and to show all users that are connected to a logged user, 
basically an inner join between auth_user and family_members table. This 
select is giving me the following sql query:

family_members_set = db(db.family_members.user_id == auth.user_id and db.
family_members.connected_to==db.auth_user.id).select(db.family_members.
connected_to, db.auth_user.last_name, db.auth_user.first_name)

SELECT family_members.connected_to, auth_user.last_name, auth_user.first_name 

FROM auth_user, family_members 
WHERE (family_members.connected_to = auth_user.id);

According to documentation I think it should have created this query:

SELECT family_members.connected_to, auth_user.last_name, auth_user.first_name 

FROM auth_user, family_members 
WHERE (family_members.connected_to = auth_user.id and family_members.user_id
=2)


Obviously it is ignoring that I want to select only rows for current_user. 

When I explicitly say it to use join, it generates the correct sql:

family_members_set = db(auth.user_id==db.family_members.user_id).select(db.
family_members.connected_to, db.auth_user.last_name, db.auth_user.first_name
, 
join=db.family_members.on(db.family_members.connected_to==db.
auth_user.id))

SELECT family_members.connected_to, auth_user.last_name, auth_user.first_name 
FROM auth_user JOIN family_members ON (family_members.connected_to =auth_user
.id) WHERE (family_members.user_id = 2);

What am I doing wrong in the first query?


-- 

--- 
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/groups/opt_out.




[web2py] Re: Using an external lib - Twython

2013-03-29 Thread Annet
Hi Niphold,

@annet: you can import with a simple from relativedelta import *


Thanks, for letting me know.


Kind regards,

Annet 

-- 

--- 
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/groups/opt_out.




[web2py] Re: DAL is not joining tables if I have multiple clauses?

2013-03-29 Thread Cliff Kachinske
For starters, look closely.

db(db.family_members.user_id == auth.user_id and 
db.family_members.connected_to==db.auth_user.id).select(db.family_members.connected_to,
 
db.auth_user.last_name, db.auth_user.first_name)


Also read the text here 
http://web2py.com/books/default/chapter/29/06#Logical-operators




On Friday, March 29, 2013 7:34:55 AM UTC-4, Dragan Matic wrote:

 I have a table that shows family connections for users (I need one way 
 connections) defined as: 

 db.define_table('family_members', 
 Field('user_id', 'integer'), 
 Field('connected_to', 'integer'))

 I need to read and to show all users that are connected to a logged user, 
 basically an inner join between auth_user and family_members table. This 
 select is giving me the following sql query:

 family_members_set = db(db.family_members.user_id == auth.user_id and db.
 family_members.connected_to==db.auth_user.id).select(db.family_members.
 connected_to, db.auth_user.last_name, db.auth_user.first_name)

 SELECT family_members.connected_to, auth_user.last_name, auth_user.first_name 

 FROM auth_user, family_members 
 WHERE (family_members.connected_to = auth_user.id);

 According to documentation I think it should have created this query:

 SELECT family_members.connected_to, auth_user.last_name, auth_user.first_name 

 FROM auth_user, family_members 
 WHERE (family_members.connected_to = auth_user.id and family_members.
 user_id=2)


 Obviously it is ignoring that I want to select only rows for current_user. 

 When I explicitly say it to use join, it generates the correct sql:

 family_members_set = db(auth.user_id==db.family_members.user_id).select(db
 .family_members.connected_to, db.auth_user.last_name, db.auth_user.
 first_name, 
 join=db.family_members.on(db.family_members.connected_to==db.
 auth_user.id))

 SELECT family_members.connected_to, auth_user.last_name, auth_user.first_name 
 FROM auth_user JOIN family_members ON (family_members.connected_to =auth_user
 .id) WHERE (family_members.user_id = 2);

 What am I doing wrong in the first query?




-- 

--- 
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/groups/opt_out.




[web2py] Re: DAL is not joining tables if I have multiple clauses?

2013-03-29 Thread Annet
Hi Dragan,

In your first query 'and' should be ''
in case of 'or' it's '|'


Annet

-- 

--- 
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/groups/opt_out.




[web2py] Re: DAL is not joining tables if I have multiple clauses?

2013-03-29 Thread Niphlod
Annet got it right.

On Friday, March 29, 2013 1:16:34 PM UTC+1, Cliff Kachinske wrote:

 For starters, look closely.

 db(db.family_members.user_id == auth.user_id and 
 db.family_members.connected_to==db.auth_user.id).select(db.family_members.connected_to,
  
 db.auth_user.last_name, db.auth_user.first_name)

  
PS: auth.user_id is perfectly fine ... returns either the id of the 
logged-in user or None. 

-- 

--- 
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/groups/opt_out.




Re: [web2py] [FYI] Pyodel is now a plugin

2013-03-29 Thread Alan Etkin


 I tried pyodel and faced with the same issue of google login requirement. 
 I signed in with google account but redirect to the Sign in with your 
 google 
 accounthttps://www.google.com/accounts/ServiceLogin?service=ahpassive=truecontinue=https://appengine.google.com/_ah/conflogin%3Fcontinue%3Dhttp://pyodel.appspot.com/ltmpl=gmshdf=ChILEgZhaG5hbWUaBlB5b2RlbAwSAmFoIhSZY5By1PCj3EjZf9NrJ3GmqIjN_SgBMhR51VTpu4b1JO0uu3RNmEpSXxw4bA.
  
 page, cannot go any further.


This is very odd, I belive it is a bug in the app authentication 
configuration itself, since I cannot reproduce the  behavior in another GAE 
app which also relies in auth for access control. In case I find a way 
around this I'll post it here: 
http://code.google.com/p/pyodel/issues/detail?id=1

-- 

--- 
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/groups/opt_out.




[web2py] What does this do?

2013-03-29 Thread maneesh2611
authorize=lambda row: auth.is_logged_in()

-- 

--- 
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/groups/opt_out.




Re: [web2py] Re: web2py app repository

2013-03-29 Thread felix jimenez
El 28/03/2013 15:16, Anthony abasta...@gmail.com escribió:

 Maybe we could add Plugin and Application types to web2pyslices.com and
 post them there. Authors could host the source for each plugin/application
 in its own Github repo and provide a description and link on web2pyslices.
 web2pyslices might then be able to provide an API to access lists of
 plugins and applications (e.g., for automatic installation via admin, etc.).

 Anthony

 On Thursday, March 28, 2013 3:26:55 PM UTC-4, Massimo Di Pierro wrote:

 If you post it here it will be added to http://web2py.com/poweredby
 If the source is public we can  add it to 
 http://web2py.com/**applianceshttp://web2py.com/appliances
 We need a better place where people can submit code, gets reviewed, taged
 and published.

 massimo

 On Thursday, 28 March 2013 14:11:13 UTC-5, Yoel Benitez Fonseca wrote:

 Is there any public repository where I can publish an application made
 in web2py? ie something web2py specific.

  --

 ---
 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/groups/opt_out.




-- 

--- 
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/groups/opt_out.




[web2py] Re: Auth with Janrain but still require registration

2013-03-29 Thread DeanK
@Massimo - First of all i'm a new web2py user and I'm really enjoying it so 
far.  The only problem I've had so far is I did my database design in a 
traditional sense before fully understanding the web2py DAL limitations and 
had to redesign things to fit (no compound keys for example).  Overall 
great job and keep up the awesome work.

Regarding this post, from my perspective I like the default auth behavior 
and think you just need to integrate Janrain better.  The only real 
difference here is that instead of maintaining credentials locally, you let 
Janrain handle it (also it's one less password for users to remember).  So 
when registering I imagine you would authenticate via Janrain and then 
redirect to a registration page that lets you collect additional info for 
the user if desired (possibly prepopulated via Janrain).  Log in would be 
modified then to somehow verify that the user has already registered before 
accepting the Janrain token.  If the user hasn't registered (even if 
Janrain accepts their credentials) you redirect to the registration page. 
 Obviously the forgot password functionality would disable automatically.

@Anthony - As I said I'm new to web2py and some of the built in stuff is 
still a black box to me.  Could you point me to where the auth code is? 
Also if I enable Janrain the register button disables and I'm not sure 
where that behavior comes from.  Thanks for your help.

Dean

On Thursday, March 28, 2013 11:39:54 AM UTC-4, Anthony wrote:

 On Thursday, March 28, 2013 11:06:25 AM UTC-4, DeanK wrote:

 I don't want to have to approve all registrations, but I want to be able 
 to control when people can register (basically just because you have a 
 gmail account doesn't mean you can sign in and use the service).  The web 
 app i'm creating is being rolled out to specific people in a controlled 
 manner so I need this capability.  I was thinking about having some sort of 
 secret early access token that if you know lets you register before it is 
 completely open to all users.


 Sure, that sounds reasonable. Just have the login function check for the 
 token in the URL query string (i.e., via request.vars), and if not present, 
 redirect or return an appropriate message.
  

 Also I do want to have people fill out some additional information after 
 the initial Janrain log in.


 You can define an auth.settings.login_onaccept function that checks to see 
 whether the required elements of the profile have been filled out yet, and 
 if not, redirect to the profile page.

 Anthony


-- 

--- 
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/groups/opt_out.




[web2py] Re: Auth with Janrain but still require registration

2013-03-29 Thread Anthony


 @Anthony - As I said I'm new to web2py and some of the built in stuff is 
 still a black box to me.  Could you point me to where the auth code is?


In order to use Auth, you have to do:

from gluon.tools import Auth

which indicates that the Auth code is in the Auth class within the 
gluon.tools.py module: 
https://code.google.com/p/web2py/source/browse/gluon/tools.py#843.

For Janrain, you do:

from gluon.contrib.login_methods.rpx_account import use_janrain

So, that code is here: 
https://code.google.com/p/web2py/source/browse/gluon/contrib/login_methods/rpx_account.py
.

Also if I enable Janrain the register button disables and I'm not sure 
 where that behavior comes from.


In the 
use_janrain()https://code.google.com/p/web2py/source/browse/gluon/contrib/login_methods/rpx_account.py#131function,
 auth.settings.actions_disabled is set to include 'register'. In 
fact, you don't want to re-enable this because users are automatically 
registered the first time they log in with Janrain. You don't want to 
expose the standard register action because that allows setting a password. 
Instead, you probably want to direct users to the 'profile' action (or some 
customized version of it) where they can fill in their name, etc. (some of 
the social login services may already have filled in the name).

Anthony

-- 

--- 
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/groups/opt_out.




[web2py] smartgrid multiple links to related table - how to suppress all but one

2013-03-29 Thread Cliff Kachinske
There is a table something like this:

db.define_table('example',
  ...
  field('user_id', 'reference auth_user', requires=IS_IN_DB(.)),
  field('created_by',  'reference auth_user', requires=IS_IN_DB(.)),
  field('modified_by',  'reference auth_user', requires=IS_IN_DB(.)),
  ...
)

Then I do something like

form = SQLFORM.smartgrid(db.auth_user, linked_tables=['example' ...], 
fields=[db.example.user_id, ...] ...)

smartgrid gives me three links to the example table: example.user_id, 
example.created_by, example.modified_by


How can I suppress the example.created_by and example.modified_by links?  I 
thought the entry in fields would do it, but it does not.

Thanks for any help on this.

-- 

--- 
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/groups/opt_out.




[web2py] Re: Auth with Janrain but still require registration

2013-03-29 Thread DeanK
Thanks.  I could/should have figured most of that out myself so sorry for 
the lame question but I appreciate the quick answer.  Also I talk about 
using Janrain because it exists and works, but all my comments are 
applicable to something that is completely free such as sanction if it was 
integrated.  I'm really just looking for social/oauth integration.  Thanks 
again.

On Friday, March 29, 2013 10:17:05 AM UTC-4, Anthony wrote:

 @Anthony - As I said I'm new to web2py and some of the built in stuff is 
 still a black box to me.  Could you point me to where the auth code is?


 In order to use Auth, you have to do:

 from gluon.tools import Auth

 which indicates that the Auth code is in the Auth class within the 
 gluon.tools.py module: 
 https://code.google.com/p/web2py/source/browse/gluon/tools.py#843.

 For Janrain, you do:

 from gluon.contrib.login_methods.rpx_account import use_janrain

 So, that code is here: 
 https://code.google.com/p/web2py/source/browse/gluon/contrib/login_methods/rpx_account.py
 .

 Also if I enable Janrain the register button disables and I'm not sure 
 where that behavior comes from.


 In the 
 use_janrain()https://code.google.com/p/web2py/source/browse/gluon/contrib/login_methods/rpx_account.py#131function,
  auth.settings.actions_disabled is set to include 'register'. In 
 fact, you don't want to re-enable this because users are automatically 
 registered the first time they log in with Janrain. You don't want to 
 expose the standard register action because that allows setting a password. 
 Instead, you probably want to direct users to the 'profile' action (or some 
 customized version of it) where they can fill in their name, etc. (some of 
 the social login services may already have filled in the name).

 Anthony


-- 

--- 
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/groups/opt_out.




[web2py] Re: What does this do?

2013-03-29 Thread Anthony
The authorize argument applies to upload fields only. You can specify a 
function that takes the Row object of a given record and returns True or 
False to indicate whether the file is allowed to be retrieved (it is used 
in the Field's .retrieve() method, which is called by response.download() 
when attempting to download uploaded files). The particular function below 
simply checks that the user is logged in (i.e., authorization only depends 
on login and not anything specific to the Row itself). If authorization 
fails, and 403 response is returned.

Anthony

On Friday, March 29, 2013 9:59:01 AM UTC-4, manee...@gmail.com wrote:

 authorize=lambda row: auth.is_logged_in()


-- 

--- 
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/groups/opt_out.




[web2py] Re: nginx + uwsgi + web2py + PAM

2013-03-29 Thread Matt Broadstone
For further info, these are relevant configuration files:

/etc/nginx/sites-enabled/site:
server {
listen  80;
server_name $hostname;
rewrite ^ https://$server_name$request_uri? permanent;
}

server {
listen  443;
server_name $hostname;
ssl on;
ssl_certificate /etc/nginx/ssl/certificate.crt;
ssl_certificate_key /etc/nginx/ssl/certificate.key;
location / {
uwsgi_pass  127.0.0.1:9001;
include   uwsgi_params;
uwsgi_param UWSGI_SCHEME $scheme;
uwsgi_param SERVER_SOFTWAREnginx/$nginx_version;
}

}

/etc/uwsgi/apps-enabled/site.xml
uwsgi
pluginpython/plugin
socket127.0.0.1:9001/socket
pythonpath/opt/web/site//pythonpath
pamuwsgi/pam
app mountpoint=/
scriptwsgihandler/script
/app
/uwsgi


/etc/pam.d/uwsgi:
@include common-auth
@include common-account

On Fri, Mar 29, 2013 at 11:45 AM, Matt Broadstone mbroa...@gmail.com wrote:
 Hi,
 We're trying to migrate our web2py deployment to nginx and running
 into a problem using pam_auth as a login method. Before I go further I
 should clarify that PAM authentication works just fine with apache2
 and a simple debug run with rocket. Also, we are trying to do this on
 Ubuntu 12.04, and the nginx setup is basically verbatim from the
 script provided by web2py
 (scripts/setup-web2py-nginx-uwsgi-ubuntu.sh).

 I am unable to log into web2py with local users, and the only relevant
 log message I can find is in my /var/log/auth.log:

 Mar 29 11:38:17 mbroadst-build unix_chkpwd[7073]: check pass; user unknown
 Mar 29 11:38:17 mbroadst-build unix_chkpwd[7073]: password check
 failed for user (mbroadst)
 Mar 29 11:38:17 mbroadst-build uwsgi: pam_unix(login:auth):
 authentication failure; logname= uid=33 euid=33 tty= ruser= rhost=
 user=mbroadst

 There is surprisingly little information on the internet related to
 these messages, but it seems (from a post on Cherokees forums) that
 this indicates that the user is unable to access the /etc/shadow file.
 I can verify that the nginx and uwsgi configurations are correct, and
 working. Both are running as the www-data user, and the www-data user
 has been added to the shadow group.

 Does anyone have a clue what's going on here? I'm getting to the point
 that maybe web2py's pam auth module is the culprit, but I am very
 inexperienced with the technologies involved here.

 Matt

-- 

--- 
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/groups/opt_out.




[web2py] nginx + uwsgi + web2py + PAM

2013-03-29 Thread Matt Broadstone
Hi,
We're trying to migrate our web2py deployment to nginx and running
into a problem using pam_auth as a login method. Before I go further I
should clarify that PAM authentication works just fine with apache2
and a simple debug run with rocket. Also, we are trying to do this on
Ubuntu 12.04, and the nginx setup is basically verbatim from the
script provided by web2py
(scripts/setup-web2py-nginx-uwsgi-ubuntu.sh).

I am unable to log into web2py with local users, and the only relevant
log message I can find is in my /var/log/auth.log:

Mar 29 11:38:17 mbroadst-build unix_chkpwd[7073]: check pass; user unknown
Mar 29 11:38:17 mbroadst-build unix_chkpwd[7073]: password check
failed for user (mbroadst)
Mar 29 11:38:17 mbroadst-build uwsgi: pam_unix(login:auth):
authentication failure; logname= uid=33 euid=33 tty= ruser= rhost=
user=mbroadst

There is surprisingly little information on the internet related to
these messages, but it seems (from a post on Cherokees forums) that
this indicates that the user is unable to access the /etc/shadow file.
I can verify that the nginx and uwsgi configurations are correct, and
working. Both are running as the www-data user, and the www-data user
has been added to the shadow group.

Does anyone have a clue what's going on here? I'm getting to the point
that maybe web2py's pam auth module is the culprit, but I am very
inexperienced with the technologies involved here.

Matt

-- 

--- 
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/groups/opt_out.




Re: [web2py] [FYI] Pyodel is now a plugin

2013-03-29 Thread Alan Etkin


 This is very odd, I belive it is a bug in the app authentication 
 configuration itself, since I cannot reproduce the  behavior in another GAE 
 app which also relies in auth for access control. In case I find a way 
 around this I'll post it here: 
 http://code.google.com/p/pyodel/issues/detail?id=1


I think I found the cause of the funny GAE login redirection loop: It 
occurs in any app which uses the auth.wiki feature. This doesn't happen 
without auth.wiki(...) in the model or controller, even if the app uses 
auth for authentication.

I only tested this with the last python sdk and two different apps, but 
probably will be the same for any app in production using the web2py 2.4 or 
better, so I guess this should be submitted as a web2py issue.

-- 

--- 
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/groups/opt_out.




[web2py] Re: nginx + uwsgi + web2py + PAM

2013-03-29 Thread Niphlod
uhm. Before smashing heads against the wall, there are 3 different 
available methods here.

1) rely on nginx to authenticate users through pam (kinda of a basic auth, 
but checked against PAM)
2) rely on uwsgi to authenticate users through pam (kinda of a basic auth, 
but checked against PAM)
3) rely on web2py module to authenticate users through pam

You want the users to reach web2py no matter what, and let the 
authentication happen using web2py's logic assuming that the only 
thing you want is not having the username/password combos checked against a 
table in web2py's database but against PAM's database.

Unless I understood it wrong, apache and rocket work. This means (if you 
didn't mess with apache configs) that 3) works out of the box

What it seems by your config is that you're trying to do 2), i.e. stopping 
users one step before, letting uwsgi interact deal pam 
authentication..that is a different thing. Do you want 1), 2) or 3) ?

-- 

--- 
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/groups/opt_out.




Re: [web2py] [FYI] Pyodel is now a plugin

2013-03-29 Thread 冷春辉
Hi Alan,

It's true I'm using auth.wiki() in my app. Is there any work around for the
time being?
On Mar 30, 2013 12:02 AM, Alan Etkin spame...@gmail.com wrote:

 This is very odd, I belive it is a bug in the app authentication
 configuration itself, since I cannot reproduce the  behavior in another GAE
 app which also relies in auth for access control. In case I find a way
 around this I'll post it here: http://code.google.com/p/**
 pyodel/issues/detail?id=1http://code.google.com/p/pyodel/issues/detail?id=1


 I think I found the cause of the funny GAE login redirection loop: It
 occurs in any app which uses the auth.wiki feature. This doesn't happen
 without auth.wiki(...) in the model or controller, even if the app uses
 auth for authentication.

 I only tested this with the last python sdk and two different apps, but
 probably will be the same for any app in production using the web2py 2.4 or
 better, so I guess this should be submitted as a web2py issue.

  --

 ---
 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/acd1SylusMo/unsubscribe?hl=en.
 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/groups/opt_out.




-- 

--- 
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/groups/opt_out.




[web2py] Re: web2py user login form encoding problem

2013-03-29 Thread Massimo Di Pierro
The encoding should be be set in the HTML header. Yet it should not fail. 
Please open a ticket about this we may need to patch CRYPT.

On Friday, 29 March 2013 03:09:33 UTC-5, Yebach wrote:

 hello

 I have a login form for user registration

 If user writes name surname password including signs š, č, ž, ć  there is 
 an error 'ascii' codec can't decode byte 0xc5 in position 0: ordinal not in 
 range(128)

 Where can I set the encoding for form??

 thank you


-- 

--- 
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/groups/opt_out.




[web2py] Re: smartgrid multiple links to related table - how to suppress all but one

2013-03-29 Thread Massimo Di Pierro
Have you tried making the fields that you do not want readable=False?

On Friday, 29 March 2013 09:17:50 UTC-5, Cliff Kachinske wrote:

 There is a table something like this:

 db.define_table('example',
   ...
   field('user_id', 'reference auth_user', requires=IS_IN_DB(.)),
   field('created_by',  'reference auth_user', requires=IS_IN_DB(.)),
   field('modified_by',  'reference auth_user', requires=IS_IN_DB(.)),
   ...
 )

 Then I do something like

 form = SQLFORM.smartgrid(db.auth_user, linked_tables=['example' ...], 
 fields=[db.example.user_id, ...] ...)

 smartgrid gives me three links to the example table: example.user_id, 
 example.created_by, example.modified_by


 How can I suppress the example.created_by and example.modified_by links? 
  I thought the entry in fields would do it, but it does not.

 Thanks for any help on this.


-- 

--- 
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/groups/opt_out.




Re: [web2py] Re: nginx + uwsgi + web2py + PAM

2013-03-29 Thread Matt Broadstone
On Fri, Mar 29, 2013 at 12:05 PM, Niphlod niph...@gmail.com wrote:
 uhm. Before smashing heads against the wall, there are 3 different
 available methods here.

 1) rely on nginx to authenticate users through pam (kinda of a basic auth,
 but checked against PAM)
 2) rely on uwsgi to authenticate users through pam (kinda of a basic auth,
 but checked against PAM)
 3) rely on web2py module to authenticate users through pam


Yes, this is my understanding as well.

 You want the users to reach web2py no matter what, and let the
 authentication happen using web2py's logic assuming that the only
 thing you want is not having the username/password combos checked against a
 table in web2py's database but against PAM's database.


Yes, this is what we are trying to do. To reiterate: we always want to
provide access to web2py, and through web2py's auth (using a username
and password form) we want to authenticate using PAM in the backend.

 Unless I understood it wrong, apache and rocket work. This means (if you
 didn't mess with apache configs) that 3) works out of the box

 What it seems by your config is that you're trying to do 2), i.e. stopping
 users one step before, letting uwsgi interact deal pam
 authentication..that is a different thing. Do you want 1), 2) or 3) ?

My config is not doing 1 or 2, you may be confused by the fact that I
provided an /etc/pam.d/uwsgi configuration, and specified pam in the
uwsgi configuration.

Here's what I _think_ is going on (though my understanding is spotty at best).

* nginx is serving a python application using uwsgi
* nginx is properly configured, I can access the site and the web2py
app shows up
* web2py is running in the context of uwsgi (and thus inherits its permissions)
* web2py has a pam auth module that loads a pam library, attempts to
connect to pam and authenticate with the credentials provided

after all of those steps, I get the messages in my auth.log that I
posted above, indicating to me that whatever user is trying to
authenticate with pam doesn't actually have the rights to authenticate
against the /etc/shadow file. That was my intention with playing
around with /etc/pam.d/uwsgi config file, etc.

Matt


 --

 ---
 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/groups/opt_out.



-- 

--- 
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/groups/opt_out.




Re: [web2py] [FYI] Pyodel is now a plugin

2013-03-29 Thread Alan Etkin


 Hi Alan, 

 It's true I'm using auth.wiki() in my app. Is there any work around for 
 the time being? 

I don't think so, someone should look into web2py/gluon/tools.py to find 
out what is resetting the google accounts login status (or whatever) when 
it returns control to the app. I suppose the way of solving this, is 
patching that module, but there's no such patch so far.

-- 

--- 
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/groups/opt_out.




[web2py] Re: IMG in A tag of SQLFORM `submit_button`?

2013-03-29 Thread Derek
button type=submit works with images. 

On Thursday, March 28, 2013 7:52:08 PM UTC-7, Anthony wrote:

 The value of submit_button goes in the value attribute of the submit 
 input element, so it can only be text, not more HTML elements. If you 
 need an alternative to a standard submit button with a text label, you can 
 do:

 SQLFORM.factory(..., buttons=[list of one or more button elements])

 The standard submit button will not appear, and instead the button(s) 
 specified in the list will be placed inside a DIV().

 I think there are a few ways to get images in submit buttons, including 
 input type='image' src='[image url]' name='submit' / or specifying a 
 background image for a standard input type='submit' ... / button. Google 
 it.

 Anthony

 On Tuesday, March 26, 2013 3:18:32 AM UTC-4, Alec Taylor wrote:

 {{=SQLFORM.factory(submit_button=XML(SPAN('hello', 
 IMG(_src=URL('static', 'img/bg.png')}} 

 How do I get this to work? 

 Thanks for all suggestions, 

 Alec Taylor 



-- 

--- 
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/groups/opt_out.




[web2py] Re: Can file/upload field value be retained when form has errors/is not accepted?

2013-03-29 Thread Lamps902
Thanks for the advice, Niphlod. I really should go read a good book on 
relational db design...

On Thursday, March 28, 2013 3:48:23 PM UTC-5, Niphlod wrote:

 cause usually you want to retrieve metadata more than you need the actual 
 contents.
 It makes you more **sure** when you have to select the entire content vs 
 just the metadata attached.
 When you'll switch to storing the contents too on the table, that table 
 can be partitioned and optimized further (some db don't handle well by 
 default large binaries).
 Generally, every application now treats the uploads in an async way, so if 
 there is any data attached is better to separate roles in different 
 tables anyway.
 Having them separated leads to a separation of concerns in the first 
 place, so your app would be less lenient to, e.g. retrieve the file 
 contents and discard it without using it.

 On Thursday, March 28, 2013 5:48:35 PM UTC+1, Lamps902 wrote:

 Thanks, niphlod and Anthony - some good suggestions and considerations 
 mentioned there. niphlod - can you clarify why you recommend using separate 
 tables specifically for large files (to prevent users from having to 
 re-upload large files when forms aren't accepted?)? The async idea sounds 
 pretty good, although it would require a pretty considerable rewrite of a 
 lot of the code I have...

 On Thursday, March 28, 2013 11:19:06 AM UTC-5, Niphlod wrote:

 It's a bad design choice using a single table with lots of fields plus 
 an attachment (if the attachment is large).
 I always store attachments in a separate table.

 That being said, I don't think that keepvalues will do the trick, cause 
 basically keepvalues sends back to the client the contents and prefills the 
 field ... throwing the file back to the client doesn't **sound smart**. 
 However, it's a chicken-and-egg problem let's say you want to upload a 
 picture, you require the picture to have a tag, but the user forgets 
 it. in this case, retaining in some way the file can be done...
 But let's say you want the file to end with .txt only . the .exe 
 file should be discarded at all.
 It's up to you to provide logic consistent with the workflow you want 
 for your users . 
 /me would provide an async upload, store the id on the session and let 
 the user play with the remaining fields in a form.
 Everyday I'd prune all the attachments received with no remaining 
 fields attached. 

 On Thursday, March 28, 2013 5:08:24 PM UTC+1, Lamps902 wrote:

 When a form has errors, the value of an upload field is reset upon 
 submission. Is there a way to retain this value, or does this pretty much 
 have to be handled manually (i.e. by storing the value of the upload field 
 or by prompting the user to specify the file again)?



-- 

--- 
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/groups/opt_out.




[web2py] not getting what this says

2013-03-29 Thread maneesh2611


type 'exceptions.ValueError'(need more than 1 value to unpack)

I got this weird kind of error and not able to figure out what this means.

-- 

--- 
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/groups/opt_out.




[web2py] Is there a stable web2py release for python 2.3?

2013-03-29 Thread Javier Luis de los Mozos
Hello, I manage a hosted web site and unfortunately the only pyhton version 
it supports is 2.3.

So far the content is static but I'd like to start using web2py. I've asked 
for a python version upgrade but I'm not quite confident I can get it so I 
wonder if I can use an old web2py release supporting python 2.3.

Thank you for your support.

-- 

--- 
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/groups/opt_out.




[web2py] PyCharm to Support web2py in the 3.0 release

2013-03-29 Thread Shawn Wheatley
According to their roadmap for 3.0:

http://confluence.jetbrains.com/display/PYH/PyCharm+3.0+Roadmap

web2py support is the 2nd bullet on the list. The feature is not marked as 
having been started or completed, but they are targeting a fall 2013 
release.

Shawn

-- 

--- 
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/groups/opt_out.




Re: [web2py] [FYI] Pyodel is now a plugin

2013-03-29 Thread Alan Etkin
  I suppose the way of solving this, is patching that module, but there's 
no such patch so far.

Here's the thing:

- plugin_pyodel needs to call auth.wiki in the model in order to start, 
since it uses the wiki model and also it has a wiki action
- When it calls auth.wiki, the Wiki constructor tries to create a wiki 
editor group and membership for the logged in user automatically in case it 
doesn't find them; for this purpose, the Wiki class checks the current user 
credentials.
- If your app runs on GAE, the check_credentials utility will always return 
a response with a link to the google login in case it doesn't detect a user 
authenticated as administrator. Therefore, you cannot use the wiki unless 
you are the app administrator. This behavior is the cause for the login 
loop.

I'll open an issue about fixing the Wiki constructor, but I think that 
check_credentials should also modified. What's the reason for always 
returning a response with a link to the login if the user is not admin, but 
not for the other environments?

-- 

--- 
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/groups/opt_out.




[web2py] Re: not getting what this says

2013-03-29 Thread Niphlod
depends on what line is raising it. 

On Friday, March 29, 2013 6:15:57 PM UTC+1, manee...@gmail.com wrote:

 type 'exceptions.ValueError'(need more than 1 value to unpack)

 I got this weird kind of error and not able to figure out what this means.


-- 

--- 
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/groups/opt_out.




[web2py] Re: smartgrid multiple links to related table - how to suppress all but one

2013-03-29 Thread Cliff Kachinske
Massimo,

I tried setting them that way in the controller but it didn't help.

On Friday, March 29, 2013 12:12:30 PM UTC-4, Massimo Di Pierro wrote:

 Have you tried making the fields that you do not want readable=False?

 On Friday, 29 March 2013 09:17:50 UTC-5, Cliff Kachinske wrote:

 There is a table something like this:

 db.define_table('example',
   ...
   field('user_id', 'reference auth_user', requires=IS_IN_DB(.)),
   field('created_by',  'reference auth_user', requires=IS_IN_DB(.)),
   field('modified_by',  'reference auth_user', requires=IS_IN_DB(.)),
   ...
 )

 Then I do something like

 form = SQLFORM.smartgrid(db.auth_user, linked_tables=['example' ...], 
 fields=[db.example.user_id, ...] ...)

 smartgrid gives me three links to the example table: example.user_id, 
 example.created_by, example.modified_by


 How can I suppress the example.created_by and example.modified_by links? 
  I thought the entry in fields would do it, but it does not.

 Thanks for any help on this.



-- 

--- 
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/groups/opt_out.




[web2py] Re: not getting what this says

2013-03-29 Thread Cliff Kachinske
I get those sometimes when I'm sloppy about refactoring.

Look for a stray comma on the left side of an equals

foo, = bar()

this is a problem, too

foo, bar = 'foobar'

and a third way to raise this error

def fubar():
  return 'hello, world'


foo, bar = fubar()

Those are the main ways I get that exception.

As you may realize, I am very experienced at getting exceptions:).

On Friday, March 29, 2013 1:15:57 PM UTC-4, manee...@gmail.com wrote:

 type 'exceptions.ValueError'(need more than 1 value to unpack)

 I got this weird kind of error and not able to figure out what this means.


-- 

--- 
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/groups/opt_out.




[web2py] Re: not getting what this says

2013-03-29 Thread Niphlod
those are many exceptions, but all of them raise

ValueError: too many values to unpack

he's getting the opposite
ValueError: need more than 1 value to unpack

On Friday, March 29, 2013 9:19:47 PM UTC+1, Cliff Kachinske wrote:

 I get those sometimes when I'm sloppy about refactoring.

 Look for a stray comma on the left side of an equals

 foo, = bar()

 this is a problem, too

 foo, bar = 'foobar'

 and a third way to raise this error

 def fubar():
   return 'hello, world'


 foo, bar = fubar()

 Those are the main ways I get that exception.

 As you may realize, I am very experienced at getting exceptions:).

 On Friday, March 29, 2013 1:15:57 PM UTC-4, manee...@gmail.com wrote:

 type 'exceptions.ValueError'(need more than 1 value to unpack)

 I got this weird kind of error and not able to figure out what this means.



-- 

--- 
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/groups/opt_out.




[web2py] Re: /views/default\index.html

2013-03-29 Thread BlueShadow
Hi I got a similar problem: 
I can edit all views except my index:
/admin/edit/MyApp/views/default/index.html?id=views__default__index__html
this one for example works:
/admin/edit/MyApp/views/default/displayImage.html?id=views__default__displayImage__html
I'm using the newest version of web2py:
2.4.5-stable+timestamp.2013.03.18.22.46.22

Thanks for your help.

On Friday, December 4, 2009 10:36:35 PM UTC+1, mdipierro wrote:

 Should be 
  /admin/default/edit/myApp/views/default/index.html 
 not 
  /admin/default/edit/myApp/views/default\index.html 

 You may had and old admin version. I thought this problem was fixed 
 long ago Did you --upgrade=yes? 

 On Dec 4, 3:32 pm, haftish21 haftis...@gmail.com wrote: 
  I'm using latest version of apache ... Everything is going fine except 
  I can't tell what is creating this error 404? 
  
  Not Found 
  
  The requested URL /admin/default/edit/myApp/views/default\index.html 
  was not found on this server 


-- 

--- 
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/groups/opt_out.




[web2py] Re: A Web2py CMS like Joomla ?

2013-03-29 Thread samuel bonilla
look

https://github.com/pyner/tiny_website


El jueves, 24 de mayo de 2012 22:54:54 UTC-5, Andrew W escribió:

 There have been numerous posts on a web2py based cms, and I know there are 
 many solutions out there, at varying stages of development.   They each 
 have a different focus so it is not a simple question of which one is 
 best.  I won't try and mention them by name.

 However,  A colleague of mine was talking about Joomla and I wanted to be 
 able to offer some strategy on a comparable web2py cms.   Would anyone 
 care to comment on which of the web2py cms' would be a contender to Joomla 
 ?  If not now, perhaps with a roadmap for the future.

 Personally, and I've said it before,  cms functionality is very important, 
 and I think we should highlight the cms offerings on the web2py website.  
 Not necessarily one, but showcase the best of For example, look 
 at http://www.zope.org/the-world-of-zope   It mentions Plone and Silva.  
 Such a thing would also strenghten the adopton of web2py.  Are they 
 production ready enough to do that ?

 Thankyou.

 Andrew W


-- 

--- 
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/groups/opt_out.




[web2py] Re: is there a stable blog app for web2py ?

2013-03-29 Thread samuel bonilla
look...

https://github.com/pyner/tiny_website
 
demo : http://www.espern.net/tiny_website/pages/show_page/index

El miércoles, 27 de marzo de 2013 22:37:32 UTC-5, RunSky ruan escribió:

 I need a blog app for my website.
 Is there a stable blog app for web2py,the instant-press seems last update 
 at 2010,it's not updated for a long time


-- 

--- 
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/groups/opt_out.




[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-29 Thread Alan Etkin


 you mean both on the original and on the new stacks ?


I suppose is enough if they are appended to the right side stack. That's 
what I'd use for browsing the places to modify in the chapter files.

-- 

--- 
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/groups/opt_out.




[web2py] Re: Social media icons.

2013-03-29 Thread rochacbruno

  pure css icons http://zocial.smcllns.com/


On Friday, March 29, 2013 3:49:21 AM UTC-3, Annet wrote:

 I like the social media icons that come with web2py, are they part of a 
 larger set?

 I need icons for social media other than facebook, gplus and twitter.


 Kind regards,

 Annet


-- 

--- 
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/groups/opt_out.




[web2py] Re: Is it possible to generate a file containing the update for book 4th to 5th?

2013-03-29 Thread Niphlod
not to question your method, I'd just like to know better the 
requirements..
line numbers change (a lot) between commits. They'll be valid only in the 
context of the commit, i.e. they will be exact pointers only referring to 
the past status of the source file.

What will happen is

head^2
1. lorem ipsum  1.dolor sit amet
2. dolor sit amet   2.

head^1
1. dolor sit amet 1.dolor sit amet
2.2.consectetur adipisicing elit

head
1.dolor sit amet  1.haha, big joke
2.consectur adipiscing elit   2.removed alltogether

If I were a translator at head^2, I'd just watch for new sections and 
removed ones, searching by context (that's why diffbook outputs some lines 
before and after each changed line)  then I'll insert new sections 
translating what's necessary. At that point linenumbers are just unhelpful 
(unless you managed to keep linenumbers in sync with the original source, 
hard to believe . but in that case either, you want to translate from 
head^2 to head, possibly skipping the partials  between head^2 -- head^1 
and head^1 -- head )

tl;dr : How can line numbers be helpful on a commit-by-commit base? 


On Friday, March 29, 2013 11:02:12 PM UTC+1, Alan Etkin wrote:

 you mean both on the original and on the new stacks ?


 I suppose is enough if they are appended to the right side stack. That's 
 what I'd use for browsing the places to modify in the chapter files.



-- 

--- 
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/groups/opt_out.




[web2py] Re: Social media icons.

2013-03-29 Thread Niphlod
70x more weight but nice, nonetheless ! TY Bruno.

On Friday, March 29, 2013 11:17:47 PM UTC+1, rochacbruno wrote:


   pure css icons http://zocial.smcllns.com/


 On Friday, March 29, 2013 3:49:21 AM UTC-3, Annet wrote:

 I like the social media icons that come with web2py, are they part of a 
 larger set?

 I need icons for social media other than facebook, gplus and twitter.


 Kind regards,

 Annet



-- 

--- 
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/groups/opt_out.




[web2py] web2py plugins threaded comments seems to be down

2013-03-29 Thread BlueShadow
I wanted to have a glance at the threaded comments and it raises an error 
when opening the page
http://web2py.com/plugins/default/comments

-- 

--- 
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/groups/opt_out.




[web2py] Re: pySerial - how to open port

2013-03-29 Thread Rufus
Perhaps it is already open by another process?

I'm not a major linux user (yet) but in windows only one process can open 
the serial port at a time.  Perhaps
Permission denied is the same as In use.

Also make sure you close it when, if your application doesn't terminate, as 
web2py doesn't, depending where
and how you opened it.



On Thursday, March 28, 2013 4:54:29 AM UTC-4, theoffi...@gmail.com wrote:

 Hello everyone. 
 I would like to use web2py as my Raspberry Pi webserver. i need to send 
 some serial data from the web application to Raspberry Pi and send to a 
 device. However, i encountered the error of  class 
 ‘serial.serialutil.SerialException’ could not open port /dev/ttyAMA0: 
 [Errno 13] Permission denied: ‘/dev/ttyAMA0′ 

 I have been stuck at this for weeks and i can't seem to find any solution 
 except moving on to using cherrypy and jquery. :( but i really wish to use 
 web2py!

 So, i have this code below that could work fine using normal python script 
 as well as cherrypy. in web2py, i put this under default.py and create a 
 new def for it. 

 import serial
 import time

 serialport= serial.Serial (/dev/ttyAMA0, 9600, timeout=0.5)
 serialport.write(\x03LI1234\x0D)
 response=serialport.readlines(1)
 print response
 time.sleep(1)

 what could have been done wrongly? :(

 Read more details here: 
 http://yvonnezoe.wordpress.com/2013/03/14/web2py-web-app-progress/ 


-- 

--- 
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/groups/opt_out.




[web2py] web2py + TurnKeyLinux + AWS + PyPy

2013-03-29 Thread james c.
PyPy is a just in time compiled Python and from my little testing is a lot 
faster than Python. For example, on my Toshiba Intel Pentium 64 2 core 
laptop, in Python a tight conditional, memory assignment, and variable 
increment done 500Milion times takes *1 minute and 43 seconds*. The same 
sequence only takes just a little more than *6 seconds* with pypy. At least 
on windows, I have no problem running web2py, admin app, and the example 
app with pypy. I searched AWS and TurnKeyLinux sites and there are no 
references to pypy. I expect the available AWS Ubuntu options can be 
configured with pypy, But, it seems the TurnKeyLinux Web2PY is suppose to 
have some features for simpler deployment and administration.

 Is anyone running TurnKeyLinux Web2Py on AWS with PyPY? Is the 
TurnKeyLinux Web2Py environment open where it is possible to just upload 
pypy and start: pypy.exe web2py.py? 

thanks in advance, James C.



-- 

--- 
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/groups/opt_out.




[web2py] Re: datetime diff between tables

2013-03-29 Thread 黄祥
i've tried both of it but the result is 0. any idea about this?

thank you so much

-- 

--- 
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/groups/opt_out.




[web2py] Re: web2py + TurnKeyLinux + AWS + PyPy

2013-03-29 Thread james c.
It looks like the answer is that you can create an install patch for the 
base Linux of TKL, Debian Squeeze, to install pypy.

regards, James

On Friday, March 29, 2013 4:07:23 PM UTC-7, james c. wrote:

 PyPy is a just in time compiled Python and from my little testing is a lot 
 faster than Python. For example, on my Toshiba Intel Pentium 64 2 core 
 laptop, in Python a tight conditional, memory assignment, and variable 
 increment done 500Milion times takes *1 minute and 43 seconds*. The same 
 sequence only takes just a little more than *6 seconds* with pypy. At 
 least on windows, I have no problem running web2py, admin app, and the 
 example app with pypy. I searched AWS and TurnKeyLinux sites and there are 
 no references to pypy. I expect the available AWS Ubuntu options can be 
 configured with pypy, But, it seems the TurnKeyLinux Web2PY is suppose to 
 have some features for simpler deployment and administration.

  Is anyone running TurnKeyLinux Web2Py on AWS with PyPY? Is the 
 TurnKeyLinux Web2Py environment open where it is possible to just upload 
 pypy and start: pypy.exe web2py.py? 

 thanks in advance, James C.





-- 

--- 
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/groups/opt_out.




[web2py] retrieving blobs from legacy (oracle) database

2013-03-29 Thread Martin Barnard
Hi, I have read-only access to a legacy oracle database which is storing 
image files as blobs.

I cannot modify the model to include a 'filename' field, or alter the table 
in any way. How can I display returned images as a stream?

I.e. model looks like this:
odb.define_table('player_photo',
Field('link_id','integer'),
Field('photo','blob')
)


So, without a filename field, I cannot figure out how to stream the photo 
to the server.

Any suggestions would be greatly appreciated.

Thanking you in advance.

Martin

-- 

--- 
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/groups/opt_out.




[web2py] ajax function in a grid, I'm getting None in a request.vars

2013-03-29 Thread Tim Richardson
I'm trying to learn more about LOAD and ajax.

I have an SQLFORM.grid loaded as a component. It's read only.
I've added a button to each row using 
links = [lambda row: INPUT(_name='toggle',_type=submit,_value=Toggle,
_onclick=ajax('toggle_order_import_v2',['id'] 
,':eval'))])


Each row of the grid indeed has the record ID in a column called ID. The 
toggle flips a boolean field.

The generated HTML looks fine: this is the button

input type=submit value=Toggle onclick=ajax('toggle_order_import_v2',[
'id'] ,':eval') name=toggle

the function toggle_order_import_v2() is in my controller.
it updates the database, so I want to refresh the LOADed sqlform.grid with 
the returned ':eval' JavaScript... I haven't got to that yet.

The called function first does
id = request.vars.id
as preparation for updating the record matchting the grid row.

but via the debugger I see that this is evaluating as None, which surprises 
me; I expect the ID of the row.

I see there are some threads on action buttons using the A helper but I was 
hoping to learn how to use the ajax function, which sounds like it should 
work in this situation.

(My legacy code does not use LOAD and the button uses a A tag; the legacy 
'toggle' controller updates the database and then uses redirect to reload 
the page. It works, but it's slow (and worse, user filters applied to the 
grid are reset)
When I put the SQLFORM.grid in a component but keep the legacy 'toggle' 
code, the redirect breaks, which is why I want to go 100% AJAX)





-- 

--- 
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/groups/opt_out.




[web2py] Re: ajax function in a grid, I'm getting None in a request.vars

2013-03-29 Thread Tim Richardson


On Saturday, 30 March 2013 16:23:26 UTC+11, Tim Richardson wrote:

 I'm trying to learn more about LOAD and ajax.

 I have an SQLFORM.grid loaded as a component. It's read only.


So this means the result is just an HTML table, not a form, so the field 
name is actually not there. 
looking at the ajax javascript, it seems that the second parameter can be a 
string, in which case it is serialised.
Is there a way that I can take advantage of this?

-- 

--- 
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/groups/opt_out.




[web2py] Re: pySerial - how to open port

2013-03-29 Thread Joe Barnhart
I think Niphlod is right. You need to add your user to teh dialout group.

http://dereenigne.org/linux/debianubuntu-serial-port-access

--Joe

On Thursday, March 28, 2013 1:54:29 AM UTC-7, theoffi...@gmail.com wrote:

 Hello everyone. 
 I would like to use web2py as my Raspberry Pi webserver. i need to send 
 some serial data from the web application to Raspberry Pi and send to a 
 device. However, i encountered the error of  class 
 ‘serial.serialutil.SerialException’ could not open port /dev/ttyAMA0: 
 [Errno 13] Permission denied: ‘/dev/ttyAMA0′ 

 I have been stuck at this for weeks and i can't seem to find any solution 
 except moving on to using cherrypy and jquery. :( but i really wish to use 
 web2py!

 So, i have this code below that could work fine using normal python script 
 as well as cherrypy. in web2py, i put this under default.py and create a 
 new def for it. 

 import serial
 import time

 serialport= serial.Serial (/dev/ttyAMA0, 9600, timeout=0.5)
 serialport.write(\x03LI1234\x0D)
 response=serialport.readlines(1)
 print response
 time.sleep(1)

 what could have been done wrongly? :(

 Read more details here: 
 http://yvonnezoe.wordpress.com/2013/03/14/web2py-web-app-progress/ 


-- 

--- 
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/groups/opt_out.