[web2py] Re: web2pyslices password hash method

2010-05-14 Thread Frank
you are pefectly right, I include below in web2py_ajax.html

{{=page.render()}}

it's ok now, thank you very much.

Frank







[web2py] Re: PGP Mail

2010-05-14 Thread Iceberg


On May15, 10:39am, Massimo Di Pierro  wrote:
> Thanks to szimszon we have PGP in Mail (trunk only)
>
> mail.send(
>         self,
>         to,
>         subject='None',
>         message='None',
>         attachments=None,
>         cc=None,
>         bcc=None,
>         reply_to=None,
>         encoding='utf-8',
>         cipher_type=None,
>         sign=True,
>         sign_passphrase=None,
>         encrypt=True,
>         )
>
> Please check it. Should
>         cipher_type=None,
>         sign=True,
>         sign_passphrase=None,
>         encrypt=True,
> be set at the send level or at the mail.settings level? Do people tend  
> to use different passphrases for different emails or the same one?


Nice to know that.  And I agree those cipher options be set at send()
level, because a website might want to send out automatic email FROM
different account, say, most normal notice from
"donotre...@mydomain.com", but some interview confirmation from
"h...@mydomain.com", etc.?

But it doesn't harm if mail.settings contains all those cipher
options, and then inside send() we code like this:

  def send(...,
cipher_type=None,
sign=True,
sign_passphrase=None,
encrypt=True,
):
if not cipher_type:
cipher_type = self.settings.cipher_type
...


[web2py] Re: web2pyslices password hash method

2010-05-14 Thread Frank
you are pefectly right, I include below in web2py_ajax.html

{{=page.render()}}

it's ok now, thank you very much.

Frank





[web2py] Re: web2pyslices password hash method

2010-05-14 Thread mr.freeze
Make sure you have {{=page.render()}} in your view. This is what all
of the javascript that clienttools.py produces is rendered through.

On May 15, 12:04 am, Frank  wrote:
> and more I use following in def user in default.py, it's same.
> page.include(URL(r=request,c='static',f='jquery.sha256.min.js'))
>
> Frank


[web2py] Re: web2pyslices password hash method

2010-05-14 Thread Frank

and more I use following in def user in default.py, it's same.
page.include(URL(r=request,c='static',f='jquery.sha256.min.js'))

Frank




[web2py] Re: web2pyslices password hash method

2010-05-14 Thread mr.freeze
Do you have this in your view somewhere?:

{{=page.render()}}

This will render the output of client tools PageManager.

On May 14, 11:59 pm, Frank  wrote:
> like you did, I do following code in def user, and the jquery.sha256.min.js 
> file
> are properly downloaded. the passward box does not fill up by masked ch like
> your slices code.
>
> page.include("http://plugins.jquery.com/files/
>  jquery.sha256.min.js.txt",
>                       download=True,filename="jquery.sha256.min.js")
>
> what you mean is that I need include sha256 in view file again?
>
> Frank


[web2py] Re: web2pyslices password hash method

2010-05-14 Thread Frank

like you did, I do following code in def user, and the jquery.sha256.min.js file
are properly downloaded. the passward box does not fill up by masked ch like
your slices code.

page.include("http://plugins.jquery.com/files/
 jquery.sha256.min.js.txt",
  download=True,filename="jquery.sha256.min.js")

what you mean is that I need include sha256 in view file again?

Frank



[web2py] Re: web2pyslices password hash method

2010-05-14 Thread mr.freeze
This line below should add it to the page.  If you inspect the head
section, you should be able to expand the 

[web2py] Re: web2pyslices password hash method

2010-05-14 Thread Frank

I have jquery, jquqery.idtabs and calendar.js, not sha256.

Frank




[web2py] Re: web2pyslices password hash method

2010-05-14 Thread mr.freeze
Can you verify that the jQuery sha256 plugin is being included on the
page properly with firebug?

On May 14, 11:05 pm, Frank  wrote:
> thank you freeze for your slices code,
>
> now I try hash my password like you did in slices, copy clienttools.py to
> cd/modules folder,I use the code in "def user" in default.py and "def
> clientcrypt_auth" in db.py like below,but fail, I can register user but 
> password
> was not hashed in database and still plain text. when I log out, I can not 
> login
> again with the register one. what I missed in this?
>
> please advise. Frank
>
> def user():
>     if maint_mode and not 'logout' in request.args:
>         session.flash = "Site is read-only for maintenance."
>         redirect(URL(r=request,f='index'))
>     if request.args:
>         response.statusbar = request.args(0).replace("_"," ").capitalize()    
>     form = handler = None
>     if not session.token:
>         import uuid
>         session.token=str(uuid.uuid4())    
>     auth.settings.login_methods = [clientcrypt_auth(db,session.token)]
>     page.include("http://plugins.jquery.com/files/jquery.sha256.min.js.txt";,
>                      download=True,filename="jquery.sha256.min.js")
>     if request.args(0) == 'register':
>         setpass = jq("#auth_user_password").val(jq().sha256hmac(
>                       jq("#auth_user_username"),
>                       jq("#auth_user_password"))
>                     )()
>         setverify = jq("input[name='password_two']").val(jq().sha256hmac(
>                       jq("#auth_user_username"),
>                       jq("input[name='password_two']"))
>                     )()
>         handler = setpass + setverify
>
>     if request.args(0) == 'login':
>         auth.settings.captcha = None
>         form=auth()      
>         hdn = INPUT(_type="hidden",_name="token",_value=session.token)
>         form.components.append(hdn)
>         setpass = jq("#auth_user_password").val(jq().sha256hmac(
>                       jq("#auth_user_username").val().toLowerCase(),
>                       jq("#auth_user_password"))
>                     )()
>         setagain = jq("#auth_user_password").val(jq().sha256hmac(jq(hdn),
>                      jq("#auth_user_password"))
>                      )()  
>         handler = setpass + setagain    
>
>     if request.args(0)== "retrieve_password" and request.vars.email:
>         user = db(db.auth_user.email== request.vars.email).select()
>         if user:
>             user=user[0]
>             t = auth.settings.table_user
>             t.password.requires = CRYPT(key=user.username,digest_alg="sha256")
>
>     if request.args(0)=="change_password" and auth.is_logged_in():
>         form=auth()      
>         hdn = INPUT(_type="hidden",_name="username",_value=auth.user.username)
>         form.components.append(hdn)        
>         setold = jq("#no_table_old_password").val(jq().sha256hmac(
>                       jq(hdn),
>                       jq("#no_table_old_password"))
>                     )()
>         setnew = jq("#no_table_new_password").val(jq().sha256hmac(
>                       jq(hdn),
>                       jq("#no_table_new_password")) )()
>         setverify = jq("#no_table_new_password2").val(jq().sha256hmac(
>                         jq(hdn),
>                         jq("#no_table_new_password2"))
>                       )()
>         handler = setold + setnew + setverify  
>
>     if not form: form=auth()
>     if handler:  event.listen("submit","form", handler )
>     return dict(form=form)
>
> from applications.cd.modules.clienttools import *
> page = PageManager(globals())
> event = EventManager(page)
> js = ScriptManager(page)
> jq = JQuery
>
> def clientcrypt_auth(db, key):
>     def clientcrypt_login_aux(username, password, db=db, key=key):      
>         user = db(db.auth_user.username == username).select()
>         if user:
>             user=user[0]
>             userpass_crypt, error =
> CRYPT(key=key,digest_alg="sha256")(user.password)
>             if request.vars.password==userpass_crypt: return True    
>         return False        
>     return clientcrypt_login_aux


[web2py] web2pyslices password hash method

2010-05-14 Thread Frank
thank you freeze for your slices code,

now I try hash my password like you did in slices, copy clienttools.py to
cd/modules folder,I use the code in "def user" in default.py and "def
clientcrypt_auth" in db.py like below,but fail, I can register user but password
was not hashed in database and still plain text. when I log out, I can not login
again with the register one. what I missed in this? 

please advise. Frank

def user():
if maint_mode and not 'logout' in request.args:
session.flash = "Site is read-only for maintenance."
redirect(URL(r=request,f='index'))
if request.args: 
response.statusbar = request.args(0).replace("_"," ").capitalize()
form = handler = None
if not session.token:
import uuid
session.token=str(uuid.uuid4())
auth.settings.login_methods = [clientcrypt_auth(db,session.token)]
page.include("http://plugins.jquery.com/files/jquery.sha256.min.js.txt";,
 download=True,filename="jquery.sha256.min.js")
if request.args(0) == 'register':
setpass = jq("#auth_user_password").val(jq().sha256hmac(
  jq("#auth_user_username"),
  jq("#auth_user_password"))
)()
setverify = jq("input[name='password_two']").val(jq().sha256hmac(
  jq("#auth_user_username"),
  jq("input[name='password_two']")) 
)()
handler = setpass + setverify

if request.args(0) == 'login':
auth.settings.captcha = None
form=auth()   
hdn = INPUT(_type="hidden",_name="token",_value=session.token)
form.components.append(hdn) 
setpass = jq("#auth_user_password").val(jq().sha256hmac(
  jq("#auth_user_username").val().toLowerCase(),
  jq("#auth_user_password")) 
)() 
setagain = jq("#auth_user_password").val(jq().sha256hmac(jq(hdn),
 jq("#auth_user_password")) 
 )()  
handler = setpass + setagain
 
if request.args(0)== "retrieve_password" and request.vars.email:
user = db(db.auth_user.email== request.vars.email).select()
if user: 
user=user[0]
t = auth.settings.table_user
t.password.requires = CRYPT(key=user.username,digest_alg="sha256")

if request.args(0)=="change_password" and auth.is_logged_in(): 
form=auth()   
hdn = INPUT(_type="hidden",_name="username",_value=auth.user.username)
form.components.append(hdn)
setold = jq("#no_table_old_password").val(jq().sha256hmac(
  jq(hdn),
  jq("#no_table_old_password")) 
)()
setnew = jq("#no_table_new_password").val(jq().sha256hmac(
  jq(hdn),
  jq("#no_table_new_password")) )()
setverify = jq("#no_table_new_password2").val(jq().sha256hmac(
jq(hdn),
jq("#no_table_new_password2")) 
  )()
handler = setold + setnew + setverify   
 
if not form: form=auth()
if handler:  event.listen("submit","form", handler )
return dict(form=form)


from applications.cd.modules.clienttools import *
page = PageManager(globals())
event = EventManager(page)
js = ScriptManager(page) 
jq = JQuery 

def clientcrypt_auth(db, key):
def clientcrypt_login_aux(username, password, db=db, key=key):   
user = db(db.auth_user.username == username).select()
if user: 
user=user[0]
userpass_crypt, error =
CRYPT(key=key,digest_alg="sha256")(user.password)
if request.vars.password==userpass_crypt: return True 
return False
return clientcrypt_login_aux



Re: [web2py] Re: Auth not showing all my custome feilds...

2010-05-14 Thread Jason Brower
It didn't seem to make any difference unfortunately.  To be thorough I
will include the entire db.py to make sure I didn't miss something. This
site goes live in a few weeks and it would be nice to have this feature.
Best Regards,
Jason Brower

On Wed, 2010-05-12 at 21:05 -0700, mdipierro wrote: 
> Not sure this should have ever worked. It needs
> 
> This:
> self.settings.table_user = db.users
> should be:
> self.settings.table_user_name = 'users'
> 
> Honestly I have not tested much what happens if you rename the
> auth_user table. Please let us know if you encouter ther problems.
> 
> 
> On May 12, 10:19 pm, Jason Brower  wrote:
> > It used to work back in the day.  But it doesn't seem to be working now.
> > Any idea on what I would be doing wrong?
> > This is my model and the view is below when I try to register.  As you
> > can see they don't go together. :/ For example, I should have university
> > affiliation there in the view. Any ideas what I did wrong here?
> > ---
> > Best Regards,
> > Jason Brower
> >
> >  Screenshot.png
> > 117KViewDownload
> >
> >  example-db.py
> > 2KViewDownload

from datetime import datetime, date, time
now = datetime.utcnow()
today = date.today()


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

db.define_table('users',
Field('nickname', 'string', length=20),
Field('first_name', 'string', length=15),
Field('last_name', 'string', length=15),
Field('phone_number', 'string', length=15),
Field('email', 'string'),
Field('password', 'password'),
Field('university_affiliation', 'string', length=25),
Field('created', 'datetime', default=now, readable=False, writable=False),
Field('registration_key', length=128, writable=False, readable=False, default=''),
Field('avatar', 'upload'),
Field('short_description','text'),
Field('sex','text'),)

###
# Authentication System
###
from gluon.tools import Mail, Auth

mail = Mail()
mail.settings.server='smtp.gmail.com:587'
mail.settings.sender= 'interes...@gmail.com'
mail.settings.login='interes...@gmail.com:'

class MyAuth(Auth):
def __init__(self, environment, T, db = None):
"Initialise parent class & make any necessary modifications"
Auth.__init__(self,environment,db)
self.messages.logged_in = T("Logged in")
self.messages.email_sent = T("Email sent")
self.messages.email_verified = T("Email verified")
self.messages.logged_out = T("Logged out")
self.messages.registration_successful = T("Registration successful")
self.messages.invalid_email = T("Invalid email")
self.messages.invalid_login = T("Invalid login")
self.messages.verify_email_subject = T("Password verify")
self.messages.username_sent = T("Your username was emailed to you.")
self.messages.new_password_sent = T("A new password was emailed to you.")
self.messages.password_changed = T("Password changed")
self.messages.retrieve_username=str(T("Your username is:"))+": %(username)s"
self.messages.retrieve_username_subject="Username retrieve"
self.messages.retrieve_password=str(T("Your password is:"))+": %(password)s"
self.messages.retrieve_password_subject = T("Password retrieve")
self.messages.profile_updated = T("Profile updated")
self.settings.table_user = "users"

auth = MyAuth(globals(), T, db)
auth.settings.mailer = mail
auth.define_tables()

db.define_table('tag',
Field('name', 'string'),
Field('description', 'text'),
Field('logo', 'upload'),
Field('created', 'date', default=now, writable=False),
Field('creator', 'string', writable=False))

db.define_table('user_tags',
Field('tag_id',db.tag),
Field('user_id',db.users))

db.define_table('user_photos',
Field('photo', 'upload'),
Field('description', 'text'),
Field('tag', db.tag),
Field('date_added', 'datetime', default=request.now, readable=False, writable=False))

db.user_photos.tag.requires = IS_IN_DB(db, db.tag.id, '%(name)s')

db.user_tags.tag_id.requires = IS_IN_DB(db,'tag.id')
db.user_tags.user_id.requires = IS_IN_DB(db,'users.id')

db.users.nickname.requires = IS_NOT_IN_DB(db,'users.nickname')
db.users.first_name.requires = IS_NOT_EMPTY()
db.users.last_name.requires = IS_NOT_EMPTY()
db.users.password.requires = CRYPT()
db.users.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db,'users.email')]
db.users.created.requires = IS_NOT_EMPTY()
db.users.sex.requires = IS_IN_SET(["Male","Female","Unset"])

db.tag.name.requires = [IS_NOT_EMPTY(), IS_NOT_IN_DB(db,'tag.name')]
db.tag.description.requires = IS_NOT_EMPTY()
db.tag.logo.requires = IS_NOT_EMPTY()
db.tag.created.requires = IS_NOT_EMPTY()

#Special condition to default to the current user.
if auth.user:
user_id=auth.user.email
else: user_id=0
db.tag.creator.default=user_id


Re: [web2py] Re: When and how to use command line option -f FOLDER?

2010-05-14 Thread Jonathan Lundell
On May 14, 2010, at 11:27 AM, Iceberg wrote:

> Turns out that the fix [1] is not completed. Most apps work when using
> "web2py -f another_web2py_folder", but not those contains
> local_import('my_module', app='my_app').
> 
> Should be easy to fix, but I even tried to add following lines at line
> 706 of gluon/widget.py, yet have no luck.
>sys.path.append(options.folder)
>sys.path.append(os.path.join(options.folder,'applications'))
> 
> What can I do?
> 
> [1] 
> http://code.google.com/p/web2py/source/detail?r=52c0b092adef8a96f1f18c84e5681d4548acd9ae

Suggestion.

path = os.path.normpath(path)
if path not in sys.path: sys.path.insert(0, path)

Two things: normalizing the path is a good idea, and using insert instead of 
append means that the new path will override what's in the old one.

[web2py] PGP Mail

2010-05-14 Thread Massimo Di Pierro

Thanks to szimszon we have PGP in Mail (trunk only)

mail.send(
   self,
   to,
   subject='None',
   message='None',
   attachments=None,
   cc=None,
   bcc=None,
   reply_to=None,
   encoding='utf-8',
   cipher_type=None,
   sign=True,
   sign_passphrase=None,
   encrypt=True,
   )

Please check it. Should
   cipher_type=None,
   sign=True,
   sign_passphrase=None,
   encrypt=True,
be set at the send level or at the mail.settings level? Do people tend  
to use different passphrases for different emails or the same one?


[web2py] Re: rpc from jquery

2010-05-14 Thread mdipierro
aha try replace

$(function() {
$('.dynamicsparkline').everyTime(1000,function(i) {
$.getJSON('{{=URL(r=request,f='call/json/
datapoints')}}/'+i, function(data) {
var b = [0,0,0,0,0,0,0]
var j = 2+i%5;
for(var k=0; k

[web2py] Re: rpc from jquery

2010-05-14 Thread MikeEllis
Thanks, Massimo! I've said it before, but it's certainly worth
repeating.  You are running the most responsive and helpful group on
the web.

So I've almost got it working with your suggestion,  but I'm running
into what seems to be an issue with javascript's scoping rules.

My service function is definitely being called once per second, but
nothing gets drawn unless I put both the 'b' array and the call to $
(this).sparkline(b) outside the getJSON() call, but then 'b' is not
changed outside the getJSON() call.  OTOH if I put the sparkline()
call inside the function(data) block, then it looks like $(this) is no
longer referring to the DIV element with class 'dynamicsparkline'.

I'm sure there's a way to sort it out. I think it's just that js is so
fugly compared to python that I have a hard time forcing myself to
really learn it.

Cheers,
Mike

On May 14, 7:53 pm, mdipierro  wrote:
> Try this: replace
>
>     $(function() {
>         $('.dynamicsparkline').everyTime(1000,function(i) {
>             var a = [10,9,8,7,6,5,4];
>             var b = [0,0,0,0,0,0,0]
>             var j = 2+i%5;
>             for(var k=0; k %j;}
>             $(this).sparkline(b);
>             });
>     });
>
> with
>
>     $(function() {
>         $('.dynamicsparkline').everyTime(1000,function(i) {
>             $.getJSON('{{=URL(r=request,f='call/json/
> datapoints')}}/'+i, function(data) {
>             var b = [0,0,0,0,0,0,0]
>             var j = 2+i%5;
>             for(var k=0; k %j;}
>             $(this).sparkline(b);
>             });
>         });
>     });
>
> AND
>
> @service.jsonrpc  ## or is xmlrpc easier?
> def datapoints(j):
>       return [n%j for n in [10,9,8,7,6,5,4]]
>
> WITH
>
> @service.json
> def datapoints(j):
>       return dict(a=[10,9,8,7,6,5,4])
>
> On May 14, 3:32 pm, MikeEllis  wrote:
>
> > Hi,
> > I'm trying to create an application that displays live sparklines
> > (small inline graphs).  A typical page might have a dozen or so of
> > these updating every few seconds, so it seems like either jsonrpc or
> > xlmrpc is the right thing to use.
>
> > As a test, I've currently got sparklines updating on the client side
> > using the jquery.sparkline and jquery.timers plugins.    The code to
> > make it work is pretty straightforward.  After including the
> > aforementioned plugins at the top of web2py_ajax.html,  I can create a
> > sparkline that updates once a second with code at the bottom of
> > web2py_ajax.html like the following:
>
> > 
> >     /*  >     $(function() {
>
> >         $('.dynamicsparkline').everyTime(1000,function(i) {
> >             var a = [10,9,8,7,6,5,4];
> >             var b = [0,0,0,0,0,0,0]
> >             var j = 2+i%5;
> >             for(var k=0; k > %j;}
> >             $(this).sparkline(b);
> >             });
> >     });
> >     /* ]]> */
> > 
>
> > and in my view the following code:
>
> > 
> > Sparkline with dynamic data: Loading.. > span>
> > 
>
> > displays a nice little wiggly graph that changes once a second.   Just
> > the effect I'm looking for.
>
> > So my question is this:  What's the most straightforward way to
> > rewrite this trivial little demo so the data calculation takes place
> > server side?  Clearly the work would be done by a function that looks
> > something like the following:
>
> > @service.jsonrpc  ## or is xmlrpc easier?
> > def datapoints(j):
> >       return [n%j for n in [10,9,8,7,6,5,4]]
>
> > but what plugins, initializations and function calls  are needed
> > client-side to replace the lines in my javascript example that fill
> > the 'b' array with the values to be plotted?
>
> > Thanks,
> > Mike
>
>


Re: [web2py] Re: Do you use web2py in your company?

2010-05-14 Thread Jonathan Lundell
On May 14, 2010, at 4:41 PM, mdipierro wrote:

>> *www.tenthrow.com is all webpy with cherokee and postgres.

(I was puzzling over "ten throw" until I visited the site)

We  use web2py in a server management application. There's a 
small local table for server ID and credentials, but most of the data that 
drives the forms and tables comes from the servers themselves, via xmlrpc 
connections to faceless agents (python, not web2py). I think of it as a kind of 
distributed database.

I was going to send along some screenshots, but our marketing folks say that, 
with v1.0 nearly ready for release, they plan to put up a live demo, so I'll 
wait for that.

v1.0 is deliberately minimalist. v2 will make more use of Ajax for more dynamic 
monitoring of the servers.

In addition to web2py, I'm using Blueprint CSS for typography, ez-css for 
layout, DataTables, and a sprinkle of jQuery.



[web2py] Re: rpc from jquery

2010-05-14 Thread mdipierro
Try this: replace

$(function() {
$('.dynamicsparkline').everyTime(1000,function(i) {
var a = [10,9,8,7,6,5,4];
var b = [0,0,0,0,0,0,0]
var j = 2+i%5;
for(var k=0; k wrote:
> Hi,
> I'm trying to create an application that displays live sparklines
> (small inline graphs).  A typical page might have a dozen or so of
> these updating every few seconds, so it seems like either jsonrpc or
> xlmrpc is the right thing to use.
>
> As a test, I've currently got sparklines updating on the client side
> using the jquery.sparkline and jquery.timers plugins.    The code to
> make it work is pretty straightforward.  After including the
> aforementioned plugins at the top of web2py_ajax.html,  I can create a
> sparkline that updates once a second with code at the bottom of
> web2py_ajax.html like the following:
>
> 
>     /*      $(function() {
>
>         $('.dynamicsparkline').everyTime(1000,function(i) {
>             var a = [10,9,8,7,6,5,4];
>             var b = [0,0,0,0,0,0,0]
>             var j = 2+i%5;
>             for(var k=0; k %j;}
>             $(this).sparkline(b);
>             });
>     });
>     /* ]]> */
> 
>
> and in my view the following code:
>
> 
> Sparkline with dynamic data: Loading.. span>
> 
>
> displays a nice little wiggly graph that changes once a second.   Just
> the effect I'm looking for.
>
> So my question is this:  What's the most straightforward way to
> rewrite this trivial little demo so the data calculation takes place
> server side?  Clearly the work would be done by a function that looks
> something like the following:
>
> @service.jsonrpc  ## or is xmlrpc easier?
> def datapoints(j):
>       return [n%j for n in [10,9,8,7,6,5,4]]
>
> but what plugins, initializations and function calls  are needed
> client-side to replace the lines in my javascript example that fill
> the 'b' array with the values to be plotted?
>
> Thanks,
> Mike


[web2py] Re: Do you use web2py in your company?

2010-05-14 Thread mdipierro
wow. fantastic sites

On May 14, 4:23 pm, howesc  wrote:
> Massimo,
>
> I'm using web2py in almost all of my work right now.
>
> *www.tenthrow.comis all webpy with cherokee and postgres.  (we are
> in the middle of a large redesign of the site and i was promised space
> in the footer for a link back to web2py)
> * the database backend for an iphone karaoke application.  the iphone
> app, the website (not written by me or in web2py), and an audio
> processing server all talk to web2py running on google app engine.
> for more zaniness, the audio processing is happening on Amazon EC2,
> and the web2py tool monitors the EC2 instance(s) and increases
> capacity as needed.  The website ishttp://starmakerapp.com/...just
> don't make fun of that part, it's not web2py (or my work)
> * a work in progress with a non-profit company for display and sale of
> artwork by cancer patients (to raise money to provide classes and
> supplies for other cancer patients to use art to cope).  when it's
> live i can share the url.
>
> hope that helps!  i know you can usewww.tenthrow.comin your examples
> list if you desire, and once the artwork site is live that too can go
> into your gallery.
>
> thanks for the excellent framework, and amazing support along the way!
>
> christian
>
> On May 10, 2:09 pm, mdipierro  wrote:
>
> > Anthony made some good 
> > points:http://groups.google.com/group/web2py/msg/a40b27807edc8603
>
> > For now let's concentrate on one of them for now. If you have
> > developed software in web2py that you use internally in your company
> > but you cannot release it open source, would you let us know? Can you
> > tell us what is the software for? Could you provide a screenshot? Can
> > we quote the name of the company?
>
> > Massimo


Re: [web2py] Re: Do you use web2py in your company?

2010-05-14 Thread Andrew Evans
Hi I just started using web2py

But I am hoping to integrate it in to my company. I own a web dev company
currently we are using PHP but I hope to fully integrate web2py on our two
dedicated, two vservers and our web sites

I must say I love this Framework :-P

*cheers

Andrew


[web2py] Re: Postgresql Schema in Web2py

2010-05-14 Thread howesc
Johny,

Perhaps i mis-understandbut you have all your tables already
created in postgres right?  if so, then you can just define your model
in web2py using the DAL, but set migrate=false for each table.  Then
you define the tables yourself (and have complete control over that
part), but the DAL can connect to the database and read and write
data.  or am i missing something?

christian

On May 14, 10:21 am, Jean6uy  wrote:
> Hi,
>
> I googled a lot on this topic before send this email.
>
> I am kind of postgresql newbie and of course also with web2py.
>
> I have already designed a database with PGAdminIII that respond to my
> need that has already around 50 tables with many foreign key
> relationship. I use schemas to group my tables...
>
> I need to manage all the constaints at the database level for
> conformity questions and audit of database by authority agencies... I
> will keep track of any modifications done in the database with
> triggers to allow to keep the history of modifications in the
> database. So I will have a second set of 50 tables...
>
> Now I need a GUI to let lambda user populate the database, so I am
> looking at all python framework (Django, web2py, ...) to find the one
> that will handle the job with ease and flexibility...
>
> Web2py seems a good choice for the task... But like Django, it create
> table in public schema when used with postgresql (public.TABLE)...
>
> This post pointed out many of the requirements of data centric
> application needs that are not yet fully implemented in web python
> frameworks in general :
>
> http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-d...
>
> I find here (http://nxsy.org/using-postgresql-schemas-with-sqlalchemy-
> and-elixir) that it could be possible to use PostgreSQL Schema with
> Elixir and SQL Alchemy. What I  understand is that the DAL is the
> equivalent of SQL Alchemy... I try this 
> :http://www.web2py.com/AlterEgo/default/show/189.
> But it seems to me that it's only a way to let use the synthaxe of SQL
> Alchemy in web2py models since SQL Alchemy is not installed.
>
> Is the explanation here can let me use SQL Alchemy instead of the
> DAL :http://www.web2py.com/AlterEgo/default/show/150???
>
> Can I use Elixir to allow web2py understand the postgresql schema?
>
> Is it planed to implement the management of postgresql schema in the
> DAL as seems to suggest the answer of reingart in this post 
> :http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-d...
>
> Please forgive me my dreadful english (thank to google translate)
>
> Thanks
>
> Johny


[web2py] Re: Do you use web2py in your company?

2010-05-14 Thread howesc
Massimo,

I'm using web2py in almost all of my work right now.

* www.tenthrow.com is all webpy with cherokee and postgres.  (we are
in the middle of a large redesign of the site and i was promised space
in the footer for a link back to web2py)
* the database backend for an iphone karaoke application.  the iphone
app, the website (not written by me or in web2py), and an audio
processing server all talk to web2py running on google app engine.
for more zaniness, the audio processing is happening on Amazon EC2,
and the web2py tool monitors the EC2 instance(s) and increases
capacity as needed.  The website is http://starmakerapp.com/ ...just
don't make fun of that part, it's not web2py (or my work)
* a work in progress with a non-profit company for display and sale of
artwork by cancer patients (to raise money to provide classes and
supplies for other cancer patients to use art to cope).  when it's
live i can share the url.

hope that helps!  i know you can use www.tenthrow.com in your examples
list if you desire, and once the artwork site is live that too can go
into your gallery.

thanks for the excellent framework, and amazing support along the way!

christian

On May 10, 2:09 pm, mdipierro  wrote:
> Anthony made some good 
> points:http://groups.google.com/group/web2py/msg/a40b27807edc8603
>
> For now let's concentrate on one of them for now. If you have
> developed software in web2py that you use internally in your company
> but you cannot release it open source, would you let us know? Can you
> tell us what is the software for? Could you provide a screenshot? Can
> we quote the name of the company?
>
> Massimo


[web2py] Re: large sites/application.

2010-05-14 Thread howesc
i have a variety of applications running on web2py.  www.tenthrow.com
has 33 tables in one postgres schema, and another 9 in another
schema.  it runs happily along with the low traffic we get right now.
all my tables of the same schema are in the same model file (maybe
it's time to split it out).  and i use the web2py access controls to
limit what users get to see the admin backend (at least i hope i have
it right!)

christian

On May 13, 8:44 pm, mdipierro  wrote:
> I assume those tables are not all referencing each other but they can
> be group based on their function and the groups can be organized in a
> tree where the children may refer a table in the parent group. I would
> create a module for each group of tables and have a function in the
> module that takes db and creates the table. In the development phase I
> would import all modules in one model file in the proper order. If
> this is slow, in production, move the imports into the controllers (or
> the actions) that need the tables.
>
> It may also be a good idea to do most of the settings
> db.table.field.attribute=whatever in the actions that generates the
> forms as opposed to the models.
>
> Anyway 30 tables should not be a problem but make sure migrate=False
> for speed and bytecde compiled the app.
>
> Massimo
>
> > On Thu, May 13, 2010 at 23:07, Thadeus Burgess  
> > wrote:
> > > But the problem with web2py is that what if you don't want portal
> > > models to execute when they are on the public portion of the site? But
> > > the public depends on the portals models and visa versa. No matter
> > > which way you hash it, your going to have a massive web2py spaghetti
> > > on your plate with some giant meatballs. =)
>
> > > If your not a stickler for perfection and don't mind everything being
> > > pulled in regardless of where they are in your site, you should be
> > > fine.
>
> > > Currently, it is not an appropriate solution to even put the models in
> > > an external file that can be imported by each app, as the way web2py
> > > works your not supposed to "import" your models... yes you can make a
> > > function and pass your db object, but like I said, plate of spaghetti.
>
> > What we can do (developers) to solve this problem?
>
> > > --
> > > Thadeus
>
> > > On Thu, May 13, 2010 at 7:54 PM, Alexandre Andrade
> > >  wrote:
> > >> to build large app, you can:
>
> > >> 1. split you tables over several models, like
> > >> db.py
> > >> db_000_user_management.py
> > >> db_001_portal.py
> > >> db_002_ecommerce.py
>
> > >> and so on.
>
> > >> 2. split your code and html over several controllers:
>
> > >> default.py
> > >> portal.py
> > >> shop.py
>
> > >> views/default/*.html
> > >> views/portal/*.html
> > >> views/shop/*.html
>
> > >>  and so on.
>
> > >> --
> > >> Atenciosamente
>
> > >> --
> > >> =
> > >> Alexandre Andrade
> > >> Hipercenter.com
>
> > >> 2010/5/13 thedangler 
>
> > >>> I'm confused when to make apps. I'll be making a pretty decent size
> > >>> website and it has over 30 tables. The site will have different
> > >>> functionalities and for the most part i have only seen code for apps
> > >>> that do two or one thing.
>
> > >>> So do i make multiple apps. If so how do i know when to make a new
> > >>> one. If not is there a proper way to build large applications.
>
> > >>> Thank you.
>
> > --
> > Álvaro Justen - Turicas
> >  http://blog.justen.eng.br/
> >  21 9898-0141


[web2py] rpc from jquery

2010-05-14 Thread MikeEllis
Hi,
I'm trying to create an application that displays live sparklines
(small inline graphs).  A typical page might have a dozen or so of
these updating every few seconds, so it seems like either jsonrpc or
xlmrpc is the right thing to use.

As a test, I've currently got sparklines updating on the client side
using the jquery.sparkline and jquery.timers plugins.The code to
make it work is pretty straightforward.  After including the
aforementioned plugins at the top of web2py_ajax.html,  I can create a
sparkline that updates once a second with code at the bottom of
web2py_ajax.html like the following:


/*  */


and in my view the following code:


Sparkline with dynamic data: Loading..


displays a nice little wiggly graph that changes once a second.   Just
the effect I'm looking for.

So my question is this:  What's the most straightforward way to
rewrite this trivial little demo so the data calculation takes place
server side?  Clearly the work would be done by a function that looks
something like the following:

@service.jsonrpc  ## or is xmlrpc easier?
def datapoints(j):
  return [n%j for n in [10,9,8,7,6,5,4]]

but what plugins, initializations and function calls  are needed
client-side to replace the lines in my javascript example that fill
the 'b' array with the values to be plotted?


Thanks,
Mike




[web2py] Re: Form Checkbox how to Use efectively

2010-05-14 Thread Andrew Evans
Hello I have been doing research and still trying to figure how to check if
a check box is checked

This is what I have but it doesn't work.. I think the values are not passed

myDimensions = []
if session.browser and session.browser == "on":
myDimensions.append("browser")
myMetrics = []
if session.pageviews and session.pageviews == "on":
myMetrics.append("pageviews")
if session.newVisits and session.newVisits == "on":
myMetrics.append("newVisits")


Any idea how to check for a value in a check box

Cheers

Andrew


[web2py] Re: When and how to use command line option -f FOLDER?

2010-05-14 Thread Iceberg
Hi Massimo,

Turns out that the fix [1] is not completed. Most apps work when using
"web2py -f another_web2py_folder", but not those contains
local_import('my_module', app='my_app').

Should be easy to fix, but I even tried to add following lines at line
706 of gluon/widget.py, yet have no luck.
sys.path.append(options.folder)
sys.path.append(os.path.join(options.folder,'applications'))

What can I do?

[1] 
http://code.google.com/p/web2py/source/detail?r=52c0b092adef8a96f1f18c84e5681d4548acd9ae

Regards,
Iceberg

On Apr8, 2:18pm, mdipierro  wrote:
> here is how it works now (its was more convoluted before)
>
> web2py must find gluon folder in path.
> it also expects to find applications/ in os.environ['web2py_path'] or
> in os.getcwd().
>
> -f path sets os.environ['web2py_path'] = path
>
> Massimo


[web2py] Re: Postgresql Schema in Web2py

2010-05-14 Thread Mengu
you can install sqlalchemy and use it with web2py. and i recommend
using declarative bases:

http://www.sqlalchemy.org/docs/ormtutorial.html#creating-table-class-and-mapper-all-at-once-declaratively

but remember, if you use sqlalchemy you won't be able to use the built-
in auth and crud systems.

On 14 Mayıs, 20:21, Jean6uy  wrote:
> Hi,
>
> I googled a lot on this topic before send this email.
>
> I am kind of postgresql newbie and of course also with web2py.
>
> I have already designed a database with PGAdminIII that respond to my
> need that has already around 50 tables with many foreign key
> relationship. I use schemas to group my tables...
>
> I need to manage all the constaints at the database level for
> conformity questions and audit of database by authority agencies... I
> will keep track of any modifications done in the database with
> triggers to allow to keep the history of modifications in the
> database. So I will have a second set of 50 tables...
>
> Now I need a GUI to let lambda user populate the database, so I am
> looking at all python framework (Django, web2py, ...) to find the one
> that will handle the job with ease and flexibility...
>
> Web2py seems a good choice for the task... But like Django, it create
> table in public schema when used with postgresql (public.TABLE)...
>
> This post pointed out many of the requirements of data centric
> application needs that are not yet fully implemented in web python
> frameworks in general :
>
> http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-d...
>
> I find here (http://nxsy.org/using-postgresql-schemas-with-sqlalchemy-
> and-elixir) that it could be possible to use PostgreSQL Schema with
> Elixir and SQL Alchemy. What I  understand is that the DAL is the
> equivalent of SQL Alchemy... I try this 
> :http://www.web2py.com/AlterEgo/default/show/189.
> But it seems to me that it's only a way to let use the synthaxe of SQL
> Alchemy in web2py models since SQL Alchemy is not installed.
>
> Is the explanation here can let me use SQL Alchemy instead of the
> DAL :http://www.web2py.com/AlterEgo/default/show/150???
>
> Can I use Elixir to allow web2py understand the postgresql schema?
>
> Is it planed to implement the management of postgresql schema in the
> DAL as seems to suggest the answer of reingart in this post 
> :http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-d...
>
> Please forgive me my dreadful english (thank to google translate)
>
> Thanks
>
> Johny


Re: [web2py] Postgresql Schema in Web2py

2010-05-14 Thread Russ Ferriday
*IF* you determine that web2py is too hard to integrate with your system...  

You might look at repoze.BFG. It's a python-based framework that inherits some 
of the best features of Django and Pylons, and can integrate with "any" (R)DBMS 
or ORM, quite easily.

Good luck with your project,

-r.
On May 14, 2010, at 10:21 AM, Jean6uy wrote:

> Hi,
> 
> I googled a lot on this topic before send this email.
> 
> I am kind of postgresql newbie and of course also with web2py.
> 
> I have already designed a database with PGAdminIII that respond to my
> need that has already around 50 tables with many foreign key
> relationship. I use schemas to group my tables...
> 
> I need to manage all the constaints at the database level for
> conformity questions and audit of database by authority agencies... I
> will keep track of any modifications done in the database with
> triggers to allow to keep the history of modifications in the
> database. So I will have a second set of 50 tables...
> 
> Now I need a GUI to let lambda user populate the database, so I am
> looking at all python framework (Django, web2py, ...) to find the one
> that will handle the job with ease and flexibility...
> 
> Web2py seems a good choice for the task... But like Django, it create
> table in public schema when used with postgresql (public.TABLE)...
> 
> This post pointed out many of the requirements of data centric
> application needs that are not yet fully implemented in web python
> frameworks in general :
> 
> http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-django-36278
> 
> 
> I find here (http://nxsy.org/using-postgresql-schemas-with-sqlalchemy-
> and-elixir) that it could be possible to use PostgreSQL Schema with
> Elixir and SQL Alchemy. What I  understand is that the DAL is the
> equivalent of SQL Alchemy... I try this : 
> http://www.web2py.com/AlterEgo/default/show/189.
> But it seems to me that it's only a way to let use the synthaxe of SQL
> Alchemy in web2py models since SQL Alchemy is not installed.
> 
> Is the explanation here can let me use SQL Alchemy instead of the
> DAL : http://www.web2py.com/AlterEgo/default/show/150 ???
> 
> Can I use Elixir to allow web2py understand the postgresql schema?
> 
> Is it planed to implement the management of postgresql schema in the
> DAL as seems to suggest the answer of reingart in this post :
> http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-django-36278#3223746
> 
> 
> Please forgive me my dreadful english (thank to google translate)
> 
> Thanks
> 
> Johny

Russ Ferriday - Topia Systems - Open Source content management with Plone and 
Zope
ru...@topia.com - mobile: +1 805 234 6915 - skype: ferriday



[web2py] Postgresql Schema in Web2py

2010-05-14 Thread Jean6uy
Hi,

I googled a lot on this topic before send this email.

I am kind of postgresql newbie and of course also with web2py.

I have already designed a database with PGAdminIII that respond to my
need that has already around 50 tables with many foreign key
relationship. I use schemas to group my tables...

I need to manage all the constaints at the database level for
conformity questions and audit of database by authority agencies... I
will keep track of any modifications done in the database with
triggers to allow to keep the history of modifications in the
database. So I will have a second set of 50 tables...

Now I need a GUI to let lambda user populate the database, so I am
looking at all python framework (Django, web2py, ...) to find the one
that will handle the job with ease and flexibility...

Web2py seems a good choice for the task... But like Django, it create
table in public schema when used with postgresql (public.TABLE)...

This post pointed out many of the requirements of data centric
application needs that are not yet fully implemented in web python
frameworks in general :

http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-django-36278


I find here (http://nxsy.org/using-postgresql-schemas-with-sqlalchemy-
and-elixir) that it could be possible to use PostgreSQL Schema with
Elixir and SQL Alchemy. What I  understand is that the DAL is the
equivalent of SQL Alchemy... I try this : 
http://www.web2py.com/AlterEgo/default/show/189.
But it seems to me that it's only a way to let use the synthaxe of SQL
Alchemy in web2py models since SQL Alchemy is not installed.

Is the explanation here can let me use SQL Alchemy instead of the
DAL : http://www.web2py.com/AlterEgo/default/show/150 ???

Can I use Elixir to allow web2py understand the postgresql schema?

Is it planed to implement the management of postgresql schema in the
DAL as seems to suggest the answer of reingart in this post :
http://it.toolbox.com/blogs/database-soup/stuff-id-love-to-see-from-django-36278#3223746


Please forgive me my dreadful english (thank to google translate)

Thanks

Johny


[web2py] Re: jqgrid onSelectRow refresh iframe

2010-05-14 Thread AsmanCom
Hi,

i am working with JQGrid plugin too.
Just to get your approach right.. you´ve realised a Master-Detail
function with the JQGrid?
Very nice! May i can use this too.

Is the code(for Controller, View) from your last post working, right
now?
Did you made any changes to the ##model code?

I am trying to implemented the "Subgrid" feature:
http://www.trirand.com/blog/jqgrid/jqgrid.html  ->"New since beta 3.0"
->"subgrid with JSON Data"

This could be a nice feature, and also it would be cool to let the
grid show Images from the "upload" Field.

Dieter Asman

On 14 Mai, 11:32, Jason Lotz  wrote:
> Sorry to keep replying to myself. Just wanted to let you know my
> progress. After stepping back and evaluating the case I managed to
> configure it as I wanted.
>
> ## View
> jQuery(document).ready(function(){jQuery("#%(id)s").jqGrid({
>    onSelectRow: function(postdata){$("#myframe").attr('src',"/MyApp/
> default/details/"+(postdata));}
>
> });
>
> ## Controller
> def details():
>    id = request.args[0]
>    // everything else
>    return dict()
>
> Jay
>
> On May 14, 5:58 pm, Jason Lotz  wrote:
>
> > The first and obvious thing I see I did wrong was trying to put python
> > into jquery script.
>
> >  jQuery("#%(id)s").jqGrid({ onSelectRow: function() {
> >    $
> > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}
>
> > But I still don't understand how I can make it dynamic src, or how to
> > get jquery to communicate with the server.
>
> > Jay
>
> > On May 14, 4:59 pm, Jason Lotz  wrote:
>
> > > Now I have two containers, one includes jqgrid_plugin the other
> > > includes iframe to display /default/details view. Both work fine on
> > > the initial load of the page. Using jqgrid onSelectRow event I tried
> > > to add a function to update the iframe page.
>
> > > ## View
> > > 
> > >    {{=plugin_jqgrid(db.test,columns=['fields'],height=200)}}
> > > 
> > > 
> > >     > > iframe>
> > > 
>
> > > ## model
> > > jQuery(document).ready(function(){
> > >    jQuery("#%(id)s").jqGrid({ onSelectRow: function() {$
> > > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}
>
> > > });
>
> > > However when a row is selected the iframe returns Invalid Request.
> > > It's not even calling the controller, just displays Invalid Request. I
> > > haven't quite figured out how to get jqgrid and the server
> > > communicating. I've been able to show grid values using alert and get
> > > jquery to handle data sent from server but can't get jqgrid to trigger
> > > the server and the server read jqgrid.Parameters.
>
> > > Any suggestions as to the best way to update iframe contents by
> > > selecting a row? And/Or someone kindly provide some sort of
> > > explanation how jquery and server communicate would be greatly
> > > appreciated !!..
>
> > > Jay
>
>


[web2py] Re: JqGrid Plugin

2010-05-14 Thread AsmanCom
@Andrea

Your plugin is absolutely awesome, that´s what i´ve looked for!
Are going to implement further JQGrid functions in the near future?

I would appreciate if the "Subgrid" feature would be implemented in
the plugin:
http://www.trirand.com/blog/jqgrid/jqgrid.html  ->"New since beta 3.0"
->"subgrid with JSON Data"

OR

If anyone could help me up a little adapt this feature for the
existing plugin?

Thank  you in anticipation!

Dieter Asman

On 27 Mrz., 18:51, parroit  wrote:
> Hi. I've developed a plugin to useJqGridwith inline editing and json
> updates.
> I've published some help at this page:http://app.ebansoftware.net,
> but I think it be more useful
> to publish it also onhttp://www.web2py.com/plugins. What is the
> correct procedure
> to publish the plugin on that site?
>
> Thanks
>
> Andrea


[web2py] Re: Idea: Appliance remote management

2010-05-14 Thread blackthorne
yes.

So I see on this thread 2 or 3 different ideas and a small roadmap:
- this web conf (YAML) editor as a first step to create/edit app
metadata based on a specification (yet to build). This is a general
application which can be applied to any yaml file in different
scenarios.
- On a second step, the Appliance Remote Manager (it should be called
something like web2py app supermarket)
- applying this to plugins/slices [?].

So, anyone open to share efforts to make this thing happen?

On May 14, 2:13 pm, mdipierro  wrote:
> > I think I will make a web yaml editor which should be perfect for 
> > configurating things with a browser...
>
> I can see many applications for it, for example a way to edit tables.
> It would be nice if it were possible to constrain the structure of the
> accessible yaml (for example the field types when describing a table).
> I would use jsTree.
>
> On May 14, 8:08 am, blackthorne  wrote:
>
>
>
> > that's exactly what I am suggesting.
> > speaking about that, I think I will make a web yaml editor which
> > should be perfect for configurating things with a browser...
>
> > On May 14, 2:01 pm, mdipierro  wrote:
>
> > > There is LICENSE and ABOUT. We can add another file where to keep
> > > metadata and make edtable via admin as with ABOUT.
>
> > > On May 14, 5:14 am, blackthorne  wrote:
>
> > > > Maybe, before going further with this there should be a place in
> > > > web2py framework to edit the app details such as the version,
> > > > dependencies, app name, which could be included in the app_conf.yml
> > > > file [?]. This would make things a lot easier when you want to
> > > > retrieve the details of an app or when you want to subscribe it, so
> > > > this file will hold everything needed.
>
> > > > Notice, it will always follow "convention over configuration". If
> > > > there is no conf file, version "1.0" could be assumed, the folder name
> > > > becomes the "app name".
>
> > > > Massimo, is there any already existant file to keep this data? is this
> > > > a good idea?
>
> > > > On May 14, 4:26 am, mdipierro  wrote:
>
> > > > > I agree.
>
> > > > > On May 13, 9:02 pm, Thadeus Burgess  wrote:
>
> > > > > > Massimo, we can take the ideas for plugin metadata and use it for
> > > > > > applications as well?
>
> > > > > > Change the name from plugincentral to web2pycentral. We can start an
> > > > > > open source version of the web2pycentral and decide who can work on
> > > > > > it.
>
> > > > > > --
> > > > > > Thadeus
>
> > > > > > On Thu, May 13, 2010 at 2:07 PM, Jason Brower  
> > > > > > wrote:
> > > > > > > I say we move forward with this one as it doesn't need so much 
> > > > > > > work as
> > > > > > > with the plugins.  At least at first thought.  It's just 
> > > > > > > additional
> > > > > > > metadata in the application.  I think some simple xml/html would 
> > > > > > > do the
> > > > > > > trick.  Just what data if for someone else to think about. :D
> > > > > > > But I think it's awesome.
> > > > > > > Best Regards,
> > > > > > > Jason Brower
>
> > > > > > > On Thu, 2010-05-13 at 09:13 -0700, mdipierro wrote:
> > > > > > >> This is a good idea.
>
> > > > > > >> On May 13, 11:09 am, blackthorne  wrote:
> > > > > > >> > ok, this one may be interesting...
>
> > > > > > >> > Currently, we can install web2py apps in one of 3 ways. 
> > > > > > >> > uploading it,
> > > > > > >> > providing its url or putting the files in the applications 
> > > > > > >> > folder
> > > > > > >> > manually. Nothing wrong with this but seems to me that with 
> > > > > > >> > little
> > > > > > >> > effort we could take this beyond.
> > > > > > >> > Think about an integrated (web) interface that  allowed you to 
> > > > > > >> > search
> > > > > > >> > or browser appliances and show its details when requested. 
> > > > > > >> > This could
> > > > > > >> > happen inside the web2py framework and you could even install 
> > > > > > >> > it by
> > > > > > >> > pressing a button (actually it just needs to use the already 
> > > > > > >> > existing
> > > > > > >> > "download/provide url" option inside).
> > > > > > >> > I think this could improve user/developer experience but 
> > > > > > >> > that's not
> > > > > > >> > all...
> > > > > > >> > Applications could have versions, and a changelog that could 
> > > > > > >> > make part
> > > > > > >> > of the details of the application and an "update" option, so 
> > > > > > >> > that
> > > > > > >> > users could keep all their apps on the edge.
>
> > > > > > >> > Who's with me?
>
> > > > > > >> > Thank you, best regards


[web2py] Re: Idea: Appliance remote management

2010-05-14 Thread mdipierro
> I think I will make a web yaml editor which should be perfect for 
> configurating things with a browser...

I can see many applications for it, for example a way to edit tables.
It would be nice if it were possible to constrain the structure of the
accessible yaml (for example the field types when describing a table).
I would use jsTree.



On May 14, 8:08 am, blackthorne  wrote:
> that's exactly what I am suggesting.
> speaking about that, I think I will make a web yaml editor which
> should be perfect for configurating things with a browser...
>
> On May 14, 2:01 pm, mdipierro  wrote:
>
> > There is LICENSE and ABOUT. We can add another file where to keep
> > metadata and make edtable via admin as with ABOUT.
>
> > On May 14, 5:14 am, blackthorne  wrote:
>
> > > Maybe, before going further with this there should be a place in
> > > web2py framework to edit the app details such as the version,
> > > dependencies, app name, which could be included in the app_conf.yml
> > > file [?]. This would make things a lot easier when you want to
> > > retrieve the details of an app or when you want to subscribe it, so
> > > this file will hold everything needed.
>
> > > Notice, it will always follow "convention over configuration". If
> > > there is no conf file, version "1.0" could be assumed, the folder name
> > > becomes the "app name".
>
> > > Massimo, is there any already existant file to keep this data? is this
> > > a good idea?
>
> > > On May 14, 4:26 am, mdipierro  wrote:
>
> > > > I agree.
>
> > > > On May 13, 9:02 pm, Thadeus Burgess  wrote:
>
> > > > > Massimo, we can take the ideas for plugin metadata and use it for
> > > > > applications as well?
>
> > > > > Change the name from plugincentral to web2pycentral. We can start an
> > > > > open source version of the web2pycentral and decide who can work on
> > > > > it.
>
> > > > > --
> > > > > Thadeus
>
> > > > > On Thu, May 13, 2010 at 2:07 PM, Jason Brower  
> > > > > wrote:
> > > > > > I say we move forward with this one as it doesn't need so much work 
> > > > > > as
> > > > > > with the plugins.  At least at first thought.  It's just additional
> > > > > > metadata in the application.  I think some simple xml/html would do 
> > > > > > the
> > > > > > trick.  Just what data if for someone else to think about. :D
> > > > > > But I think it's awesome.
> > > > > > Best Regards,
> > > > > > Jason Brower
>
> > > > > > On Thu, 2010-05-13 at 09:13 -0700, mdipierro wrote:
> > > > > >> This is a good idea.
>
> > > > > >> On May 13, 11:09 am, blackthorne  wrote:
> > > > > >> > ok, this one may be interesting...
>
> > > > > >> > Currently, we can install web2py apps in one of 3 ways. 
> > > > > >> > uploading it,
> > > > > >> > providing its url or putting the files in the applications folder
> > > > > >> > manually. Nothing wrong with this but seems to me that with 
> > > > > >> > little
> > > > > >> > effort we could take this beyond.
> > > > > >> > Think about an integrated (web) interface that  allowed you to 
> > > > > >> > search
> > > > > >> > or browser appliances and show its details when requested. This 
> > > > > >> > could
> > > > > >> > happen inside the web2py framework and you could even install it 
> > > > > >> > by
> > > > > >> > pressing a button (actually it just needs to use the already 
> > > > > >> > existing
> > > > > >> > "download/provide url" option inside).
> > > > > >> > I think this could improve user/developer experience but that's 
> > > > > >> > not
> > > > > >> > all...
> > > > > >> > Applications could have versions, and a changelog that could 
> > > > > >> > make part
> > > > > >> > of the details of the application and an "update" option, so that
> > > > > >> > users could keep all their apps on the edge.
>
> > > > > >> > Who's with me?
>
> > > > > >> > Thank you, best regards


[web2py] Re: Idea: Appliance remote management

2010-05-14 Thread blackthorne
that's exactly what I am suggesting.
speaking about that, I think I will make a web yaml editor which
should be perfect for configurating things with a browser...

On May 14, 2:01 pm, mdipierro  wrote:
> There is LICENSE and ABOUT. We can add another file where to keep
> metadata and make edtable via admin as with ABOUT.
>
> On May 14, 5:14 am, blackthorne  wrote:
>
>
>
> > Maybe, before going further with this there should be a place in
> > web2py framework to edit the app details such as the version,
> > dependencies, app name, which could be included in the app_conf.yml
> > file [?]. This would make things a lot easier when you want to
> > retrieve the details of an app or when you want to subscribe it, so
> > this file will hold everything needed.
>
> > Notice, it will always follow "convention over configuration". If
> > there is no conf file, version "1.0" could be assumed, the folder name
> > becomes the "app name".
>
> > Massimo, is there any already existant file to keep this data? is this
> > a good idea?
>
> > On May 14, 4:26 am, mdipierro  wrote:
>
> > > I agree.
>
> > > On May 13, 9:02 pm, Thadeus Burgess  wrote:
>
> > > > Massimo, we can take the ideas for plugin metadata and use it for
> > > > applications as well?
>
> > > > Change the name from plugincentral to web2pycentral. We can start an
> > > > open source version of the web2pycentral and decide who can work on
> > > > it.
>
> > > > --
> > > > Thadeus
>
> > > > On Thu, May 13, 2010 at 2:07 PM, Jason Brower  
> > > > wrote:
> > > > > I say we move forward with this one as it doesn't need so much work as
> > > > > with the plugins.  At least at first thought.  It's just additional
> > > > > metadata in the application.  I think some simple xml/html would do 
> > > > > the
> > > > > trick.  Just what data if for someone else to think about. :D
> > > > > But I think it's awesome.
> > > > > Best Regards,
> > > > > Jason Brower
>
> > > > > On Thu, 2010-05-13 at 09:13 -0700, mdipierro wrote:
> > > > >> This is a good idea.
>
> > > > >> On May 13, 11:09 am, blackthorne  wrote:
> > > > >> > ok, this one may be interesting...
>
> > > > >> > Currently, we can install web2py apps in one of 3 ways. uploading 
> > > > >> > it,
> > > > >> > providing its url or putting the files in the applications folder
> > > > >> > manually. Nothing wrong with this but seems to me that with little
> > > > >> > effort we could take this beyond.
> > > > >> > Think about an integrated (web) interface that  allowed you to 
> > > > >> > search
> > > > >> > or browser appliances and show its details when requested. This 
> > > > >> > could
> > > > >> > happen inside the web2py framework and you could even install it by
> > > > >> > pressing a button (actually it just needs to use the already 
> > > > >> > existing
> > > > >> > "download/provide url" option inside).
> > > > >> > I think this could improve user/developer experience but that's not
> > > > >> > all...
> > > > >> > Applications could have versions, and a changelog that could make 
> > > > >> > part
> > > > >> > of the details of the application and an "update" option, so that
> > > > >> > users could keep all their apps on the edge.
>
> > > > >> > Who's with me?
>
> > > > >> > Thank you, best regards


[web2py] Re: SSL Error on windows [SOLVED]

2010-05-14 Thread mdipierro
true and there are security advantages to have two processes serve 80
and 443 respectively. Let's think about this some more.

On May 14, 7:52 am, Timothy Farrell  wrote:
> The only question is: how do you want that to look?
>
> All web2py interfaces currently only take one IP and socket number.  I
> don't think it's wise to assume that if someone wants HTTPS they
> automatically want HTTP as well (and pick the port for them).  You
> decide how you want the Tk frontend, the options.py file and the
> command-line to handle it and I can adapt those to send it to Rocket.
>
> My recommendation would be to only change the options file to allow for
> multiple interfaces.  I'm inclined to think that very few people run
> production web2py from the Tk interface.
>
> -tim
>
> On 5/13/2010 3:12 PM, mdipierro wrote:
>
> > Since rocket does it, is there any way we can add support for 80+443
> > with one rocket and one web2py instance?
>
> > On May 13, 3:02 pm, Timothy Farrell  wrote:
>
> >> While Rocket supports listening on multiple sockets, web2py does not.  
> >> You will need to run two separate instances of web2py (one for SSL, one
> >> unencrypted) to do what you are asking.
>
> >> -tim
>
> >> On 5/13/2010 1:40 PM, Miguel Lopes wrote:
>
> >>> On Wed, May 12, 2010 at 7:45 PM, Timothy Farrell >>> >  wrote:
>
> >>>      This is the error that Jon Lundell's guys found already.  Note
> >>>      that it's trying to connect to port 8000 as HTTP.  Connect as
> >>>      HTTPS and it should work.
>
> >>>      Also try upgrading to trunk, that should issue a "400 Bad Request".
>
> >>>      -tim
>
> >>> Confirmed.
> >>> Updated from trunk to 1.77.3 and if attempting to access the server in
> >>> http (instead of https) server issues console warning like you said.
>
> >>> Since I'm on a LAN I installed SSL as a learning experience and to
> >>> access the admin interface anywhere on the LAN. However, now that I
> >>> have web2py running with SSL, even the applications must be accessed
> >>> via SSL. I expected that only the admin would require SSL. Is this
> >>> also a matter of configuration or is there some other reason? I do
> >>> have very little knowledge on networks and deployment in general. So I
> >>> wonder what is the reason.
>
> >>> Miguel


[web2py] Re: Idea: Appliance remote management

2010-05-14 Thread mdipierro
There is LICENSE and ABOUT. We can add another file where to keep
metadata and make edtable via admin as with ABOUT.

On May 14, 5:14 am, blackthorne  wrote:
> Maybe, before going further with this there should be a place in
> web2py framework to edit the app details such as the version,
> dependencies, app name, which could be included in the app_conf.yml
> file [?]. This would make things a lot easier when you want to
> retrieve the details of an app or when you want to subscribe it, so
> this file will hold everything needed.
>
> Notice, it will always follow "convention over configuration". If
> there is no conf file, version "1.0" could be assumed, the folder name
> becomes the "app name".
>
> Massimo, is there any already existant file to keep this data? is this
> a good idea?
>
> On May 14, 4:26 am, mdipierro  wrote:
>
> > I agree.
>
> > On May 13, 9:02 pm, Thadeus Burgess  wrote:
>
> > > Massimo, we can take the ideas for plugin metadata and use it for
> > > applications as well?
>
> > > Change the name from plugincentral to web2pycentral. We can start an
> > > open source version of the web2pycentral and decide who can work on
> > > it.
>
> > > --
> > > Thadeus
>
> > > On Thu, May 13, 2010 at 2:07 PM, Jason Brower  wrote:
> > > > I say we move forward with this one as it doesn't need so much work as
> > > > with the plugins.  At least at first thought.  It's just additional
> > > > metadata in the application.  I think some simple xml/html would do the
> > > > trick.  Just what data if for someone else to think about. :D
> > > > But I think it's awesome.
> > > > Best Regards,
> > > > Jason Brower
>
> > > > On Thu, 2010-05-13 at 09:13 -0700, mdipierro wrote:
> > > >> This is a good idea.
>
> > > >> On May 13, 11:09 am, blackthorne  wrote:
> > > >> > ok, this one may be interesting...
>
> > > >> > Currently, we can install web2py apps in one of 3 ways. uploading it,
> > > >> > providing its url or putting the files in the applications folder
> > > >> > manually. Nothing wrong with this but seems to me that with little
> > > >> > effort we could take this beyond.
> > > >> > Think about an integrated (web) interface that  allowed you to search
> > > >> > or browser appliances and show its details when requested. This could
> > > >> > happen inside the web2py framework and you could even install it by
> > > >> > pressing a button (actually it just needs to use the already existing
> > > >> > "download/provide url" option inside).
> > > >> > I think this could improve user/developer experience but that's not
> > > >> > all...
> > > >> > Applications could have versions, and a changelog that could make 
> > > >> > part
> > > >> > of the details of the application and an "update" option, so that
> > > >> > users could keep all their apps on the edge.
>
> > > >> > Who's with me?
>
> > > >> > Thank you, best regards


Re: [web2py] Re: SSL Error on windows [SOLVED]

2010-05-14 Thread Timothy Farrell

The only question is: how do you want that to look?

All web2py interfaces currently only take one IP and socket number.  I 
don't think it's wise to assume that if someone wants HTTPS they 
automatically want HTTP as well (and pick the port for them).  You 
decide how you want the Tk frontend, the options.py file and the 
command-line to handle it and I can adapt those to send it to Rocket.


My recommendation would be to only change the options file to allow for 
multiple interfaces.  I'm inclined to think that very few people run 
production web2py from the Tk interface.


-tim

On 5/13/2010 3:12 PM, mdipierro wrote:

Since rocket does it, is there any way we can add support for 80+443
with one rocket and one web2py instance?

On May 13, 3:02 pm, Timothy Farrell  wrote:
   
While Rocket supports listening on multiple sockets, web2py does not.  
You will need to run two separate instances of web2py (one for SSL, one

unencrypted) to do what you are asking.

-tim

On 5/13/2010 1:40 PM, Miguel Lopes wrote:



 

On Wed, May 12, 2010 at 7:45 PM, Timothy Farrellmailto:tfarr...@swgen.com>>  wrote:
   
 

 This is the error that Jon Lundell's guys found already.  Note
 that it's trying to connect to port 8000 as HTTP.  Connect as
 HTTPS and it should work.
   
 

 Also try upgrading to trunk, that should issue a "400 Bad Request".
   
 

 -tim
   
 

Confirmed.
Updated from trunk to 1.77.3 and if attempting to access the server in
http (instead of https) server issues console warning like you said.
   
 

Since I'm on a LAN I installed SSL as a learning experience and to
access the admin interface anywhere on the LAN. However, now that I
have web2py running with SSL, even the applications must be accessed
via SSL. I expected that only the admin would require SSL. Is this
also a matter of configuration or is there some other reason? I do
have very little knowledge on networks and deployment in general. So I
wonder what is the reason.
   
 

Miguel
   




Re: [web2py] "SSL is OFF" error message when starting the server

2010-05-14 Thread Timothy Farrell
As of version 1.77.3, web2py depends on the "ssl" package for HTTPS 
support.  It no longer uses the "pyOpenSSL" package.  You can get ssl 
for Python 2.3-2.5 from the cheeseshop.


-tim

On 5/13/2010 4:29 PM, OMAR wrote:

I have web2py installed on a remote Debian server. When connecting via
my local Windows box, the admin is disabled for Web2py because of the
unsecure channel. I set up an SSH tunnel for the connection, and I've
created a private certificate authority for the SSL connection.

When starting the server (the included web2py server) I'm passing the
path to the path to the certificates via command line switches, but
get the following error message:

"WARNING:root:Python "ssl" module unavailable. SSL is OFF"


Next, on the Debian box I installed python-openssl

Where to go from here. How to turn on SSL?

I followed this helpful blog post
http://skoroneos.blogspot.com/2010/01/web2py-getting-admin-panel-to-work.html
but my results were not the same.


Thanks in advance for any help. I look forward to learning web2py and
being part of this community. I just can't seem to get started with
the admin.




   




[web2py] Re: Do you use web2py in your company?

2010-05-14 Thread hywang
I am developing a lightweight CMS framework using web2py.

Maybe I will make it surpport multilanguages, but recently I am too
busy.

If you register, you will find that you can't do nothing, because you
has no enough privilege.

http://www.hibitty.com/

thanks.


[web2py] Re: Idea: Appliance remote management

2010-05-14 Thread blackthorne
Maybe, before going further with this there should be a place in
web2py framework to edit the app details such as the version,
dependencies, app name, which could be included in the app_conf.yml
file [?]. This would make things a lot easier when you want to
retrieve the details of an app or when you want to subscribe it, so
this file will hold everything needed.

Notice, it will always follow "convention over configuration". If
there is no conf file, version "1.0" could be assumed, the folder name
becomes the "app name".

Massimo, is there any already existant file to keep this data? is this
a good idea?


On May 14, 4:26 am, mdipierro  wrote:
> I agree.
>
> On May 13, 9:02 pm, Thadeus Burgess  wrote:
>
>
>
> > Massimo, we can take the ideas for plugin metadata and use it for
> > applications as well?
>
> > Change the name from plugincentral to web2pycentral. We can start an
> > open source version of the web2pycentral and decide who can work on
> > it.
>
> > --
> > Thadeus
>
> > On Thu, May 13, 2010 at 2:07 PM, Jason Brower  wrote:
> > > I say we move forward with this one as it doesn't need so much work as
> > > with the plugins.  At least at first thought.  It's just additional
> > > metadata in the application.  I think some simple xml/html would do the
> > > trick.  Just what data if for someone else to think about. :D
> > > But I think it's awesome.
> > > Best Regards,
> > > Jason Brower
>
> > > On Thu, 2010-05-13 at 09:13 -0700, mdipierro wrote:
> > >> This is a good idea.
>
> > >> On May 13, 11:09 am, blackthorne  wrote:
> > >> > ok, this one may be interesting...
>
> > >> > Currently, we can install web2py apps in one of 3 ways. uploading it,
> > >> > providing its url or putting the files in the applications folder
> > >> > manually. Nothing wrong with this but seems to me that with little
> > >> > effort we could take this beyond.
> > >> > Think about an integrated (web) interface that  allowed you to search
> > >> > or browser appliances and show its details when requested. This could
> > >> > happen inside the web2py framework and you could even install it by
> > >> > pressing a button (actually it just needs to use the already existing
> > >> > "download/provide url" option inside).
> > >> > I think this could improve user/developer experience but that's not
> > >> > all...
> > >> > Applications could have versions, and a changelog that could make part
> > >> > of the details of the application and an "update" option, so that
> > >> > users could keep all their apps on the edge.
>
> > >> > Who's with me?
>
> > >> > Thank you, best regards


[web2py] Re: Review my web2py app: Radbox.me

2010-05-14 Thread selecta
got it to work with FF
but the
   3. Favorites
   4. Archives
links jump when I hover with my mouse over them in FF

On May 12, 5:38 pm, Adi  wrote:
> We have not tested much with Opera - there may be some issues specific
> to the browser. I added the same video to my account (I use Chrome on
> Ubuntu 9.10) and I could add it:http://radbox.me/watch/video/502
> I'll test it on Opera some time.
>
> Perhaps try in a webkit-based browser (Firefox/Chrome/Safari)? We've
> encountered some bugs in IE as well since we use a lot of jquery
> effects that IE doesn't really like much (and we don't like IE at
> all!). When you saw "Saving..." message once it saves the message
> should change to "Saved". Give it another shot. Sorry for the issue.
>
> On May 12, 5:25 pm, selecta  wrote:
>
>
>
> > I cannot get I to work
> > I went tohttp://vimeo.com/10149605
> > pressed my bookmarklet, it said saving
> > but I cannot find any videos on myradboxpage?
> > did I do something wrong?
> > I am using opera 10.53 Internal on ubuntu 10.04


[web2py] Re: jqgrid onSelectRow refresh iframe

2010-05-14 Thread Jason Lotz
Sorry to keep replying to myself. Just wanted to let you know my
progress. After stepping back and evaluating the case I managed to
configure it as I wanted.

## View
jQuery(document).ready(function(){jQuery("#%(id)s").jqGrid({
   onSelectRow: function(postdata){$("#myframe").attr('src',"/MyApp/
default/details/"+(postdata));}
});


## Controller
def details():
   id = request.args[0]
   // everything else
   return dict()


Jay


On May 14, 5:58 pm, Jason Lotz  wrote:
> The first and obvious thing I see I did wrong was trying to put python
> into jquery script.
>
>  jQuery("#%(id)s").jqGrid({ onSelectRow: function() {
>    $
> ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}
>
> But I still don't understand how I can make it dynamic src, or how to
> get jquery to communicate with the server.
>
> Jay
>
> On May 14, 4:59 pm, Jason Lotz  wrote:
>
>
>
> > Now I have two containers, one includes jqgrid_plugin the other
> > includes iframe to display /default/details view. Both work fine on
> > the initial load of the page. Using jqgrid onSelectRow event I tried
> > to add a function to update the iframe page.
>
> > ## View
> > 
> >    {{=plugin_jqgrid(db.test,columns=['fields'],height=200)}}
> > 
> > 
> >     > iframe>
> > 
>
> > ## model
> > jQuery(document).ready(function(){
> >    jQuery("#%(id)s").jqGrid({ onSelectRow: function() {$
> > ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}
>
> > });
>
> > However when a row is selected the iframe returns Invalid Request.
> > It's not even calling the controller, just displays Invalid Request. I
> > haven't quite figured out how to get jqgrid and the server
> > communicating. I've been able to show grid values using alert and get
> > jquery to handle data sent from server but can't get jqgrid to trigger
> > the server and the server read jqgrid.Parameters.
>
> > Any suggestions as to the best way to update iframe contents by
> > selecting a row? And/Or someone kindly provide some sort of
> > explanation how jquery and server communicate would be greatly
> > appreciated !!..
>
> > Jay


[web2py] Re: Do you use web2py in your company?

2010-05-14 Thread Anand Vaidya
I have deployed a web2py based app in a high profile defence
contractor co.

I was told by the company not to disclose or publish any details about
the project . Sorry, no details.

Regards,
Anand


[web2py] Re: jqgrid onSelectRow refresh iframe

2010-05-14 Thread Jason Lotz
The first and obvious thing I see I did wrong was trying to put python
into jquery script.

 jQuery("#%(id)s").jqGrid({ onSelectRow: function() {
   $
('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}

But I still don't understand how I can make it dynamic src, or how to
get jquery to communicate with the server.


Jay


On May 14, 4:59 pm, Jason Lotz  wrote:
> Now I have two containers, one includes jqgrid_plugin the other
> includes iframe to display /default/details view. Both work fine on
> the initial load of the page. Using jqgrid onSelectRow event I tried
> to add a function to update the iframe page.
>
> ## View
> 
>    {{=plugin_jqgrid(db.test,columns=['fields'],height=200)}}
> 
> 
>     iframe>
> 
>
> ## model
> jQuery(document).ready(function(){
>    jQuery("#%(id)s").jqGrid({ onSelectRow: function() {$
> ('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}
>
> });
>
> However when a row is selected the iframe returns Invalid Request.
> It's not even calling the controller, just displays Invalid Request. I
> haven't quite figured out how to get jqgrid and the server
> communicating. I've been able to show grid values using alert and get
> jquery to handle data sent from server but can't get jqgrid to trigger
> the server and the server read jqgrid.Parameters.
>
> Any suggestions as to the best way to update iframe contents by
> selecting a row? And/Or someone kindly provide some sort of
> explanation how jquery and server communicate would be greatly
> appreciated !!..
>
> Jay


[web2py] Re: How to auto-login into an account from an specific computer.

2010-05-14 Thread cjrh
On May 14, 10:05 am, Benigno  wrote:
> Is there any simpler way or any example of this or something similar
> anywhere that I could use as an example?.

The presence of the "Session ID" in the "response" object is all
handled by web2py.  On the client side, whatever tool you're using to
make the HTTP connection should provide some means of accessing the
response data, and the headers within that data. You can examine the
headers to look for the session-id cookie.

I am afraid I don't have a useful example to show this right now.


[web2py] Re: How to auto-login into an account from an specific computer.

2010-05-14 Thread Benigno
Is there any simpler way or any example of this or something similar
anywhere that I could use as an example?.

On May 13, 11:32 am, cjrh  wrote:
> On May 13, 10:06 am, Benigno  wrote:
>
> > We have made an app with web2py to present data from a home-automated
> > home as a web service. There is a certain hardware at the home that
> > sends all the information that transverses the bus into our server,
> > and from there on, we process and present the data using web2py.
>
> I am doing something similar.   My client is a daemon process.  Upon
> my first contact with the server, the daemon client provides an
> authentication key.  This is checked in the web2py DB.  If found/
> valid, a session number is returned to the client (inside a cookie).
> The client stores this cookie, and returns it to the web2py server, as
> a cookie header, on each subsequent access.  This maintains the
> session.  So far, this strategy appears to be working well.  All
> functions in the controller used by the daemon process have an
> "IsLoggedIn" decorator, which checks first.   Depending on the
> specific details of your situation, you could extend the valid time of
> the session from the default value.  I don't know the value of that
> default offhand.


[web2py] jqgrid onSelectRow refresh iframe

2010-05-14 Thread Jason Lotz
Now I have two containers, one includes jqgrid_plugin the other
includes iframe to display /default/details view. Both work fine on
the initial load of the page. Using jqgrid onSelectRow event I tried
to add a function to update the iframe page.

## View

   {{=plugin_jqgrid(db.test,columns=['fields'],height=200)}}


   


## model
jQuery(document).ready(function(){
   jQuery("#%(id)s").jqGrid({ onSelectRow: function() {$
('#myframe').attr('src',"{{=URL(r=request,f='details',args=2)}}");}
});

However when a row is selected the iframe returns Invalid Request.
It's not even calling the controller, just displays Invalid Request. I
haven't quite figured out how to get jqgrid and the server
communicating. I've been able to show grid values using alert and get
jquery to handle data sent from server but can't get jqgrid to trigger
the server and the server read jqgrid.Parameters.

Any suggestions as to the best way to update iframe contents by
selecting a row? And/Or someone kindly provide some sort of
explanation how jquery and server communicate would be greatly
appreciated !!..


Jay


[web2py] Re: design issue

2010-05-14 Thread cjrh
On May 14, 9:24 am, annet  wrote:
> Thank you very much for your extensive reply, it's very helpful, at
> least I now have an idea of how to approach this problem.

If you come up with a better way, please share!


[web2py] Re: Do you use web2py in your company?

2010-05-14 Thread szimszon
Forgot to mention my parent's website: http://oregpreshaz.eu/ :)
 (email form, guestbook, photo gallery, recaptcha)

On máj. 13, 14:01, szimszon  wrote:
> I made several small apps, and installed a CAS to centralize the
> authentication but there are not enterprise grade...
>
> I made an Inventory app where we can follow the history of a piece of
> hardware installed and removed from computers, with categories,
> subcategories, sellers, invoice, warranty, e-mail notification...
>
> An app to track the duty times.
>
> Some looking glass functionality (mtr, ping, dig, traceroute...)
>
> I made a program to assist the printing of certificates of wine tests
> (http://linuxbox.hu/node/637) it works for me :)
>
> On máj. 10, 23:09, mdipierro  wrote:
>
>
>
> > Anthony made some good 
> > points:http://groups.google.com/group/web2py/msg/a40b27807edc8603
>
> > For now let's concentrate on one of them for now. If you have
> > developed software in web2py that you use internally in your company
> > but you cannot release it open source, would you let us know? Can you
> > tell us what is the software for? Could you provide a screenshot? Can
> > we quote the name of the company?
>
> > Massimo


[web2py] Re: design issue

2010-05-14 Thread annet
Hi,

Thank you very much for your extensive reply, it's very helpful, at
least I now have an idea of how to approach this problem.


Kind regards,

Annet