[web2py] Re: Setting the default user id derived from a custom auth table in a record
As far as I know auth.user.id should work. However, I faced a similar problem and solved it by setting the default in the function, something like: def add_comment(): db.comment.user.default=auth.user.id return dict(...) Maybe someone else can provide you (and me) with an explanation. Kind regards, Annet
[web2py] Re: Setting the default user id derived from a custom auth table in a record
I think what is happening is the model is exec'd at the start of the request but if the user is not logged in yet or the session has expired forcing a trip to the login page, the model with get None because auth is not in the session. Once the trip to the login page completes it goes back to the controller that was initially started but I am not sure it re-evaluates the model. Putting the code in the controller pushes in a value after login has completed. On Oct 24, 11:53 pm, annet annet.verm...@gmail.com wrote: As far as I know auth.user.id should work. However, I faced a similar problem and solved it by setting the default in the function, something like: def add_comment(): db.comment.user.default=auth.user.id return dict(...) Maybe someone else can provide you (and me) with an explanation. Kind regards, Annet
[web2py] Re: LOAD/web2py_component 'ajax' upload ... again
Another bump - has anyone had any further thoughts on how to get web2py-component-command or web2py-component-flash working with this code? On Oct 13, 1:38 pm, selecta gr...@delarue-berlin.de wrote: *bump* sinceuploadforms do not work in web2py components anyway this code could be integrated into web2py without the ajaxForm script itself On Oct 11, 1:35 pm, selecta gr...@delarue-berlin.de wrote: as I posted before I am trying to fix the issue ofajaxuploads The problem: uploadfields do not work inajaxloaded components The solution: modify web2py_ajax.html on the top add response.files.insert(3,URL(r=request,c='static/ js',f='jquery.form.js')) a bit below change the code to function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i){ var form=jQuery(this); if(!form.hasClass('no_trap')){ if(form.find('.upload').length0){ //using ajaxForm has the disadvantage that the header is not returned in xhr //can this be fixed in the ajaxForm plugin??? form.ajaxForm({ url: action, success: function(data, statusText, xhr) { complete_web2py_ajax_page(xhr, data, action, target) } }); }else{ form.submit(function(obj){ jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); } } });} function complete_web2py_ajax_page (xhr, text, action, target){ var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); var flash=xhr.getResponseHeader('web2py-component-flash'); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); else if(content!='hide') t.html(html); web2py_trap_form(action,target); web2py_ajax_init(); if(command) eval(command); if(flash) jQuery('.flash').html(flash).slideDown();} function web2py_ajax_page(method,action,data,target) { jQuery.ajax({'type':method,'url':action,'data':data, 'beforeSend':function(xhr) { xhr.setRequestHeader('web2py-component- location',document.location); xhr.setRequestHeader('web2py-component-element',target);}, 'complete':function(xhr,text){ complete_web2py_ajax_page(xhr, text, action, target); } }); } however this still has a problem if there is anuploadfield it will use ajaxForm which does some iFrame magic to upland the uploads. by doing this it will loose the response header and thus web2py-component-command and web2py-component- flash ... you can fix the flash by using session.flash (?not sure if this is true but I think it worked) and write the component-command directly into the returned HTML it would be nice if the header could be reconstructed by the ajaxform pluginhttp://github.com/malsup/form/blob/master/jquery.form.js somewhere around line 354 the dummy header object is constructed I have no clue if retrieving the header and rebuilding it is even possible because my js knowledge is still quite limited ... maybe somebody could help me out here and tell me if it is possible or not
Re: [web2py] Re: Request for a logo - PluginCentral
No, I do not have a server that can run web2py currently. (due to a conflict with simplejson. I require the version from pypi, which coincidentally is incompatible with web2py (and I do not feel like reconfiguring my server to use virtualenv)). The code is at http://code.google.com/p/plugincentral/ You are welcome to make a checkout and run it locally. Most of it is working actually... There are a few tweaks to be made security wise for the demo, but I think its almost done. Register account. Upload a plugin, provide name, descriptions, categories, license, the packed plugin file, a version, a screenshot, a packed demo application to showcase the plugin. There will also be featured plugins that the site admin can choose to display at the top of the index page. The admin can also download all demo applications and review them. If approved, it uses app_install to install the application into web2py and generates a link to it. So if you have a plugin named Comments it will make an app named plugin_central_Comments and for the demo you just get redirected there. I do need to go over the rules of a demo app 1) Must use sqlite 2) Cannot contain appadmin 3) Cannot be harmful to the filesystem 4) Cannot have functions that require minutes to complete. 5) Cannot have tons of data in the database. 6) Cannot contain external links 7) Must work. -- Thadeus On Sun, Oct 24, 2010 at 8:14 PM, mdipierro mdipie...@cs.depaul.edu wrote: Do you have a site up and running? On Oct 24, 6:09 pm, Thadeus Burgess thade...@thadeusb.com wrote: I am working on plugin central, finally have some free time to devote to the project. However I am a horrible artist, and wonder if anyone would like to help me with designing a logo? This is my color scheme White - body content #5E99E7 - Links main color (a light blue) #F5F4EF - Grey, page background I would like to use the new Ubuntu font since it is open source. -- Thadeus
[web2py] Re: LOAD/web2py_component 'ajax' upload ... again
I've had some success with a very simple workaround for web2py- component-command. In the form.accepts in my SQLFORM, I set a variable 'command', return it, and then in my component's view simply put {{if command:}} script $(document).ready(function(){ eval({{=command}}); }); /script {{pass}} It's ugly, but it seems to work ok for simple stuff... On Oct 25, 9:37 am, scausten scaus...@gmail.com wrote: Another bump - has anyone had any further thoughts on how to get web2py-component-command or web2py-component-flash working with this code? On Oct 13, 1:38 pm, selecta gr...@delarue-berlin.de wrote: *bump* sinceuploadforms do not work in web2py components anyway this code could be integrated into web2py without the ajaxForm script itself On Oct 11, 1:35 pm, selecta gr...@delarue-berlin.de wrote: as I posted before I am trying to fix the issue ofajaxuploads The problem: uploadfields do not work inajaxloaded components The solution: modify web2py_ajax.html on the top add response.files.insert(3,URL(r=request,c='static/ js',f='jquery.form.js')) a bit below change the code to function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i){ var form=jQuery(this); if(!form.hasClass('no_trap')){ if(form.find('.upload').length0){ //using ajaxForm has the disadvantage that the header is not returned in xhr //can this be fixed in the ajaxForm plugin??? form.ajaxForm({ url: action, success: function(data, statusText, xhr) { complete_web2py_ajax_page(xhr, data, action, target) } }); }else{ form.submit(function(obj){ jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); } } });} function complete_web2py_ajax_page (xhr, text, action, target){ var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); var flash=xhr.getResponseHeader('web2py-component-flash'); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); else if(content!='hide') t.html(html); web2py_trap_form(action,target); web2py_ajax_init(); if(command) eval(command); if(flash) jQuery('.flash').html(flash).slideDown();} function web2py_ajax_page(method,action,data,target) { jQuery.ajax({'type':method,'url':action,'data':data, 'beforeSend':function(xhr) { xhr.setRequestHeader('web2py-component- location',document.location); xhr.setRequestHeader('web2py-component-element',target);}, 'complete':function(xhr,text){ complete_web2py_ajax_page(xhr, text, action, target); } }); } however this still has a problem if there is anuploadfield it will use ajaxForm which does some iFrame magic to upland the uploads. by doing this it will loose the response header and thus web2py-component-command and web2py-component- flash ... you can fix the flash by using session.flash (?not sure if this is true but I think it worked) and write the component-command directly into the returned HTML it would be nice if the header could be reconstructed by the ajaxform pluginhttp://github.com/malsup/form/blob/master/jquery.form.js somewhere around line 354 the dummy header object is constructed I have no clue if retrieving the header and rebuilding it is even possible because my js knowledge is still quite limited ... maybe somebody could help me out here and tell me if it is possible or not
[web2py] Re: Link-pass data to new view via session not on URL
On Oct 25, 4:26 am, Brian M bmere...@gmail.com wrote: It may not be a concern for your app, but it is something to consider. You raise some very interesting points. I am probably not going to design anything for these kinds of situations right now, simply due to lack of time, but I'll certainly keep it in mind.
[web2py] Re: LOAD/web2py_component 'ajax' upload ... again
yes i did it the same way, somebody with javascript knowledge would be really helpful, just to know if fetching the header from the iframe is possible On Oct 25, 11:23 am, scausten scaus...@gmail.com wrote: I've had some success with a very simple workaround for web2py- component-command. In the form.accepts in my SQLFORM, I set a variable 'command', return it, and then in my component's view simply put {{if command:}} script $(document).ready(function(){ eval({{=command}}); }); /script {{pass}} It's ugly, but it seems to work ok for simple stuff... On Oct 25, 9:37 am, scausten scaus...@gmail.com wrote: Another bump - has anyone had any further thoughts on how to get web2py-component-command or web2py-component-flash working with this code? On Oct 13, 1:38 pm, selecta gr...@delarue-berlin.de wrote: *bump* sinceuploadforms do not work in web2py components anyway this code could be integrated into web2py without the ajaxForm script itself On Oct 11, 1:35 pm, selecta gr...@delarue-berlin.de wrote: as I posted before I am trying to fix the issue ofajaxuploads The problem: uploadfields do not work inajaxloaded components The solution: modify web2py_ajax.html on the top add response.files.insert(3,URL(r=request,c='static/ js',f='jquery.form.js')) a bit below change the code to function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i){ var form=jQuery(this); if(!form.hasClass('no_trap')){ if(form.find('.upload').length0){ //using ajaxForm has the disadvantage that the header is not returned in xhr //can this be fixed in the ajaxForm plugin??? form.ajaxForm({ url: action, success: function(data, statusText, xhr) { complete_web2py_ajax_page(xhr, data, action, target) } }); }else{ form.submit(function(obj){ jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); } } });} function complete_web2py_ajax_page (xhr, text, action, target){ var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); var flash=xhr.getResponseHeader('web2py-component-flash'); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); else if(content!='hide') t.html(html); web2py_trap_form(action,target); web2py_ajax_init(); if(command) eval(command); if(flash) jQuery('.flash').html(flash).slideDown();} function web2py_ajax_page(method,action,data,target) { jQuery.ajax({'type':method,'url':action,'data':data, 'beforeSend':function(xhr) { xhr.setRequestHeader('web2py-component- location',document.location); xhr.setRequestHeader('web2py-component-element',target);}, 'complete':function(xhr,text){ complete_web2py_ajax_page(xhr, text, action, target); } }); } however this still has a problem if there is anuploadfield it will use ajaxForm which does some iFrame magic to upland the uploads. by doing this it will loose the response header and thus web2py-component-command and web2py-component- flash ... you can fix the flash by using session.flash (?not sure if this is true but I think it worked) and write the component-command directly into the returned HTML it would be nice if the header could be reconstructed by the ajaxform pluginhttp://github.com/malsup/form/blob/master/jquery.form.js somewhere around line 354 the dummy header object is constructed I have no clue if retrieving the header and rebuilding it is even possible because my js knowledge is still quite limited ... maybe somebody could help me out here and tell me if it is possible or not
[web2py] Re: LOAD/web2py_component 'ajax' upload ... again
ah btw my solution was a bit simpler script type= text/javascript {{=command}} /script no need for document ready since all scripts in Ajax loaded HTML will be interpreted right away also no need for eval since the script will be interpreted anyway On Oct 25, 11:23 am, scausten scaus...@gmail.com wrote: I've had some success with a very simple workaround for web2py- component-command. In the form.accepts in my SQLFORM, I set a variable 'command', return it, and then in my component's view simply put {{if command:}} script $(document).ready(function(){ eval({{=command}}); }); /script {{pass}} It's ugly, but it seems to work ok for simple stuff... On Oct 25, 9:37 am, scausten scaus...@gmail.com wrote: Another bump - has anyone had any further thoughts on how to get web2py-component-command or web2py-component-flash working with this code? On Oct 13, 1:38 pm, selecta gr...@delarue-berlin.de wrote: *bump* sinceuploadforms do not work in web2py components anyway this code could be integrated into web2py without the ajaxForm script itself On Oct 11, 1:35 pm, selecta gr...@delarue-berlin.de wrote: as I posted before I am trying to fix the issue ofajaxuploads The problem: uploadfields do not work inajaxloaded components The solution: modify web2py_ajax.html on the top add response.files.insert(3,URL(r=request,c='static/ js',f='jquery.form.js')) a bit below change the code to function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i){ var form=jQuery(this); if(!form.hasClass('no_trap')){ if(form.find('.upload').length0){ //using ajaxForm has the disadvantage that the header is not returned in xhr //can this be fixed in the ajaxForm plugin??? form.ajaxForm({ url: action, success: function(data, statusText, xhr) { complete_web2py_ajax_page(xhr, data, action, target) } }); }else{ form.submit(function(obj){ jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); } } });} function complete_web2py_ajax_page (xhr, text, action, target){ var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); var flash=xhr.getResponseHeader('web2py-component-flash'); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); else if(content!='hide') t.html(html); web2py_trap_form(action,target); web2py_ajax_init(); if(command) eval(command); if(flash) jQuery('.flash').html(flash).slideDown();} function web2py_ajax_page(method,action,data,target) { jQuery.ajax({'type':method,'url':action,'data':data, 'beforeSend':function(xhr) { xhr.setRequestHeader('web2py-component- location',document.location); xhr.setRequestHeader('web2py-component-element',target);}, 'complete':function(xhr,text){ complete_web2py_ajax_page(xhr, text, action, target); } }); } however this still has a problem if there is anuploadfield it will use ajaxForm which does some iFrame magic to upland the uploads. by doing this it will loose the response header and thus web2py-component-command and web2py-component- flash ... you can fix the flash by using session.flash (?not sure if this is true but I think it worked) and write the component-command directly into the returned HTML it would be nice if the header could be reconstructed by the ajaxform pluginhttp://github.com/malsup/form/blob/master/jquery.form.js somewhere around line 354 the dummy header object is constructed I have no clue if retrieving the header and rebuilding it is even possible because my js knowledge is still quite limited ... maybe somebody could help me out here and tell me if it is possible or not
[web2py] Re: LOAD/web2py_component 'ajax' upload ... again
Ah, of course I don't need the eval :) However, I did require the document ready, I think because my form is in a jQuery overlay and the command, specifically, is location.reload() (i.e. refresh the whole page). Every other jQuery function I tried worked without the document ready, but for some reason location.reload doesn't work without it... On Oct 25, 12:08 pm, selecta gr...@delarue-berlin.de wrote: ah btw my solution was a bit simpler script type= text/javascript {{=command}} /script no need for document ready since all scripts in Ajax loaded HTML will be interpreted right away also no need for eval since the script will be interpreted anyway On Oct 25, 11:23 am, scausten scaus...@gmail.com wrote: I've had some success with a very simple workaround for web2py- component-command. In the form.accepts in my SQLFORM, I set a variable 'command', return it, and then in my component's view simply put {{if command:}} script $(document).ready(function(){ eval({{=command}}); }); /script {{pass}} It's ugly, but it seems to work ok for simple stuff... On Oct 25, 9:37 am, scausten scaus...@gmail.com wrote: Another bump - has anyone had any further thoughts on how to get web2py-component-command or web2py-component-flash working with this code? On Oct 13, 1:38 pm, selecta gr...@delarue-berlin.de wrote: *bump* sinceuploadforms do not work in web2py components anyway this code could be integrated into web2py without the ajaxForm script itself On Oct 11, 1:35 pm, selecta gr...@delarue-berlin.de wrote: as I posted before I am trying to fix the issue ofajaxuploads The problem: uploadfields do not work inajaxloaded components The solution: modify web2py_ajax.html on the top add response.files.insert(3,URL(r=request,c='static/ js',f='jquery.form.js')) a bit below change the code to function web2py_trap_form(action,target) { jQuery('#'+target+' form').each(function(i){ var form=jQuery(this); if(!form.hasClass('no_trap')){ if(form.find('.upload').length0){ //using ajaxForm has the disadvantage that the header is not returned in xhr //can this be fixed in the ajaxForm plugin??? form.ajaxForm({ url: action, success: function(data, statusText, xhr) { complete_web2py_ajax_page(xhr, data, action, target) } }); }else{ form.submit(function(obj){ jQuery('.flash').hide().html(''); web2py_ajax_page('post',action,form.serialize(),target); return false; }); } } });} function complete_web2py_ajax_page (xhr, text, action, target){ var html=xhr.responseText; var content=xhr.getResponseHeader('web2py-component-content'); var command=xhr.getResponseHeader('web2py-component-command'); var flash=xhr.getResponseHeader('web2py-component-flash'); var t = jQuery('#'+target); if(content=='prepend') t.prepend(html); else if(content=='append') t.append(html); else if(content!='hide') t.html(html); web2py_trap_form(action,target); web2py_ajax_init(); if(command) eval(command); if(flash) jQuery('.flash').html(flash).slideDown();} function web2py_ajax_page(method,action,data,target) { jQuery.ajax({'type':method,'url':action,'data':data, 'beforeSend':function(xhr) { xhr.setRequestHeader('web2py-component- location',document.location); xhr.setRequestHeader('web2py-component-element',target);}, 'complete':function(xhr,text){ complete_web2py_ajax_page(xhr, text, action, target); } }); } however this still has a problem if there is anuploadfield it will use ajaxForm which does some iFrame magic to upland the uploads. by doing this it will loose the response header and thus web2py-component-command and web2py-component- flash ... you can fix the flash by using session.flash (?not sure if this is true but I think it worked) and write the component-command directly into the returned HTML it would be nice if the header could be reconstructed by the ajaxform pluginhttp://github.com/malsup/form/blob/master/jquery.form.js somewhere around line 354 the dummy header object is constructed I have no clue if retrieving the header and rebuilding it is even possible because my js knowledge is still quite limited ... maybe somebody could help me out here and tell me if it is possible or not
[web2py] Re: Hidden form fields not accepted by form.accept()?
On Oct 25, 1:17 am, Ruiwen Chua rwc...@gmail.com wrote: I see. So form.accept() will not parse any field unless explicitly defined in SQLFORM? (Ok I'm not sure if I should start another thread for this, but a few issues I found with using SQLFORM.. so perhaps I'm still doing something wrong.) a) I have multiple forms (for the same model) on a page, now generated using SQLFORM However, each generated SQLFORM gives identical id attributes in the divs it generates, and that breaks validation http://www.web2py.com/book/default/chapter/07#Multiple-forms-per-page b) I need these forms to post to a different controller from the one that generated them (via normal post or AJAX) What's the best way to get the receiving controller to recognise the incoming form with the hidden fields, seeing as it was generated in a different controller? If you have the form object: accpets(request.post_vars,None,formname=None) If you do not just use request.vars and do an db io manually. Using a different controller function breaks validation. Thanks for the help so far though. On Oct 25, 1:15 pm, mdipierro mdipie...@cs.depaul.edu wrote: Say you have: db.define_table('user',Field('name'),Field('manager',writable=False,default ='no') and a registration form: def register(): form=SQLFORM(db.user) form.accepts(request.vars) If attackers were allowed to do http://.../register?name=memanager=yes they would be able to change the manager status even if it does not appears in the form. Only fields that are declared as writable and visible to SQLFORM can be inserted in the db. web2py has lots of security mechanisms and we are working on even more! Massimo On Oct 25, 12:07 am, Ruiwen Chua rwc...@gmail.com wrote: Thanks for the clarification. Though, in what way is this a security mechanism? On Oct 25, 1:03 pm, mdipierro mdipie...@cs.depaul.edu wrote: I understand. That is intended. That is a security mechanism. You must use SQLFORM(...,hidden=...) On Oct 24, 11:46 pm, Ruiwen Chua rwc...@gmail.com wrote: Yes, the hidden input values do seem to appear in request.post_vars. I call form.accepts(), like so: form.accepts(request.post_vars, formname=None) And even so, only the non-hidden field is saved to the database. On Oct 25, 12:43 pm, mdipierro mdipie...@cs.depaul.edu wrote: The hidden fields will be in request.vars but not in form.vars because accepts does not know they are supposed to be there and protects you from injection attacks. You can also try use this: form=SQLFORM(,hidden=dict(key='value')) Massimo On Oct 24, 11:39 pm, Ruiwen Chua rwc...@gmail.com wrote: Apologies, I wasn't clear. I meant that the form in the view is static HTML and not generated by SQLFORM. However, in the action that receives the POST, I instantiate a new SQLFORM for that model and pass request.post_vars to it. On Oct 25, 12:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: if you use form.accepts() what is form if you do not use FORM or SQLFORM? On Oct 24, 11:27 pm, Ruiwen Chua rwc...@gmail.com wrote: Hi all, I have created a manual HTML form (not FORM() or SQLFORM()) that has a few hidden fields (ie. input type=hidden..) When this form posts back to the controller, form.accepts() returns True, but only the non-hidden field (there is only one, the rest are hidden) is saved to the database. The other fields all get saved as NULL. Is there something I'm missing? Thanks
[web2py] Re: Setting the default user id derived from a custom auth table in a record
There are only two possibilities: - you are not logged in - the code above is executed before auth=Auth() in db.py is executed (remember models are executed alphabetically) On Oct 24, 2:18 pm, Luther Goh Lu Feng elf...@yahoo.com wrote: The snippet below defines a table that stores comments that are created. The 1st field `user` records the user id of the user who created the record. I am trying to set the default value to the current authenticated user, using auth.user_id as suggested in Chapter 13 of the web2py book. Although the transaction is successful, the value recorded is None. I have also used auth.user.id but this leads to AttributeError: 'NoneType' object has no attribute 'id Would anyone please kindly explain to me why auth.user.id and auth.user_id are failing as described? db.define_table('comment', Field('user', custom_auth_table, default=auth.user_id, writable=False, notnull=True), Field('question', 'reference question', writable=False, notnull=True), Field('text', 'text', length=512, required=True, requires=IS_NOT_EMPTY()), Field('created', 'datetime', default=request.now, writable=False, readable=False, notnull=False), format='%(user)s on %(question)s' )
[web2py] Re: Request for a logo - PluginCentral
This has some overlap with what I am doing... anyway... we can merge later. On Oct 25, 3:54 am, Thadeus Burgess thade...@thadeusb.com wrote: No, I do not have a server that can run web2py currently. (due to a conflict with simplejson. I require the version from pypi, which coincidentally is incompatible with web2py (and I do not feel like reconfiguring my server to use virtualenv)). The code is athttp://code.google.com/p/plugincentral/You are welcome to make a checkout and run it locally. Most of it is working actually... There are a few tweaks to be made security wise for the demo, but I think its almost done. Register account. Upload a plugin, provide name, descriptions, categories, license, the packed plugin file, a version, a screenshot, a packed demo application to showcase the plugin. There will also be featured plugins that the site admin can choose to display at the top of the index page. The admin can also download all demo applications and review them. If approved, it uses app_install to install the application into web2py and generates a link to it. So if you have a plugin named Comments it will make an app named plugin_central_Comments and for the demo you just get redirected there. I do need to go over the rules of a demo app 1) Must use sqlite 2) Cannot contain appadmin 3) Cannot be harmful to the filesystem 4) Cannot have functions that require minutes to complete. 5) Cannot have tons of data in the database. 6) Cannot contain external links 7) Must work. -- Thadeus On Sun, Oct 24, 2010 at 8:14 PM, mdipierro mdipie...@cs.depaul.edu wrote: Do you have a site up and running? On Oct 24, 6:09 pm, Thadeus Burgess thade...@thadeusb.com wrote: I am working on plugin central, finally have some free time to devote to the project. However I am a horrible artist, and wonder if anyone would like to help me with designing a logo? This is my color scheme White - body content #5E99E7 - Links main color (a light blue) #F5F4EF - Grey, page background I would like to use the new Ubuntu font since it is open source. -- Thadeus
[web2py] Re: Error tickets by number of occurrence
Good idea! On Oct 25, 6:37 am, selecta gr...@delarue-berlin.de wrote: Quite a while ago I wrote some code for my issue tracker to show error tickets by their number of occurrence. The Idea behind this is that you will see the error that appears most frequently and that needs fixing immediately. Since I am too busy to finish the issue tracker I will just share the relevant code screenshothttp://jaguar.biologie.hu-berlin.de/~fkrause/screenshot_error_frequec... the controller error_files_base = os.path.join(request.env.web2py_path,'applications',request.application,'errors') def errors(): import operator import os.path import hashlib import os import pickle #-- if request.vars.has_key('del'): for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() if request.vars['del'] == hash: os.remove( os.path.join(error_files_base,fn) ) #-- hash2error = dict() for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() try: hash2error[hash]['count'] += 1 except KeyError: error_lines = error['traceback'].split(\n) last_line = error_lines[-2] error_causer = os.path.split(error['layer'])[1] hash2error[hash] = dict(count = 1, pickel = error, causer = error_causer, last_line = last_line, hash = hash) decorated = [(x['count'],x) for x in hash2error.values()] decorated.sort(key=operator.itemgetter(0), reverse=True) return dict(errors = [x[1] for x in decorated]) the view table id='trck_errors' {{=THEAD(TR(TH('Delete'), TH('Count'), TH('File'), TH('Error')))}} tbody {{for e in errors:}} {{=TR(TD(BUTTON_DELETE(e['hash'])), TH(e['count']),TD(e['causer']),TD(e['last_line']), _onclick=collapse('%s');%e['hash'])}}{{=TR(TD(DIV(CODE(e['pickel'] ['traceback']), _id=e['hash']),_colspan=4 ))}} {{pass}} /tbody /table script $(document).ready(function(){ $('{{for e in errors:}}#{{=e['hash']}}, {{pass}}').hide(); }); /script feel free to use and improve
[web2py] Re: Error tickets by number of occurrence
so will you integrate it into the current issue tracker? like a tab or button with sort by number of occurrence On Oct 25, 1:59 pm, mdipierro mdipie...@cs.depaul.edu wrote: Good idea! On Oct 25, 6:37 am, selecta gr...@delarue-berlin.de wrote: Quite a while ago I wrote some code for my issue tracker to show error tickets by their number of occurrence. The Idea behind this is that you will see the error that appears most frequently and that needs fixing immediately. Since I am too busy to finish the issue tracker I will just share the relevant code screenshothttp://jaguar.biologie.hu-berlin.de/~fkrause/screenshot_error_frequec... the controller error_files_base = os.path.join(request.env.web2py_path,'applications',request.application,'errors') def errors(): import operator import os.path import hashlib import os import pickle #-- if request.vars.has_key('del'): for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() if request.vars['del'] == hash: os.remove( os.path.join(error_files_base,fn) ) #-- hash2error = dict() for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() try: hash2error[hash]['count'] += 1 except KeyError: error_lines = error['traceback'].split(\n) last_line = error_lines[-2] error_causer = os.path.split(error['layer'])[1] hash2error[hash] = dict(count = 1, pickel = error, causer = error_causer, last_line = last_line, hash = hash) decorated = [(x['count'],x) for x in hash2error.values()] decorated.sort(key=operator.itemgetter(0), reverse=True) return dict(errors = [x[1] for x in decorated]) the view table id='trck_errors' {{=THEAD(TR(TH('Delete'), TH('Count'), TH('File'), TH('Error')))}} tbody {{for e in errors:}} {{=TR(TD(BUTTON_DELETE(e['hash'])), TH(e['count']),TD(e['causer']),TD(e['last_line']), _onclick=collapse('%s');%e['hash'])}}{{=TR(TD(DIV(CODE(e['pickel'] ['traceback']), _id=e['hash']),_colspan=4 ))}} {{pass}} /tbody /table script $(document).ready(function(){ $('{{for e in errors:}}#{{=e['hash']}}, {{pass}}').hide(); }); /script feel free to use and improve
[web2py] Unable to open web2py using ip address
Hi, The problem is Works: http://127.0.0.1:8000//welcome/default/index Does not Work on both mobile and Dev machine: http://ipaddress:port //welcome/default/index Works on Dev machine: http://machinename:port//welcome/default/index Does not work on mobile in the same network: http://machinename:port//welcome/default/index I am trying to develop a mobile application using web2py. Now how do I proceed? rAm i Think, i Wait, i Fast -- Siddhartha http://sodidi.ramjeeganti.com
[web2py] Re: Facebook/Twitter/Google login + normal login
Hi Cfh, I tried to deploy your modules into my web2py app but failed. The error message is: Traceback (most recent call last): File /home/zhe/workspace/gaoshi/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /home/zhe/workspace/gaoshi/web2py/applications/init/models/ db.py, line 35, in module auth = CustomAuth(globals(), T, db, True) # authentication/ authorization File applications/init/modules/customAuth.py, line 48, in __init__ table = self.settings.table_user NameError: global name 'IS_NOT_EMPTY' is not defined However, after I added from gluon.validators import * in customAuth.py it still showed the same message. Could you help me with that please? Thanks! Cheers, Zhe On Oct 13, 11:06 pm, howesc how...@umich.edu wrote: yes. in the code i postedfacebookand google auto-attach to an existing account because as part of thelogincredentials those services provide the user's email address. for twitter, on tenthrow.com i added an option in the account profile section to add a twitter account when you are authenticated (so noone can 'steal' your account using a twitter account and your email address). this does depend on email address being unique in your system. also, if you are logged in via google, twitter, orfacebookand want to create a tenthrow.com password i allow users to do that from the account profile pages as well. i don't think my account profile pages are included in the posted code though. if they are useful to people i'll see if i can make them generic enough to post publicly. cfh On Oct 13, 5:46 am, selecta gr...@delarue-berlin.de wrote: looks great, seen the slice a while ago and wanted to integrate this for some time I have a question though: Are you able to attach a facbook/twitter/ normallogin... account with an already exising account later on? On Oct 12, 8:44 pm, howesc how...@umich.edu wrote: Try this: http://web2pyslices.com/main/slices/take_slice/77 see it in action onwww.tenthrow.com cfh On Oct 11, 4:57 pm, firedragon852 firedragon...@gmail.com wrote: I tried both the following methods: URL: .../login/facebook if request.args(0) == 'facebook': from gluon.contrib.login_methods.oauth20_account import OAuthAccount auth.settings.login_form = FacebookAccount(globals()) can get redirected tofacebookloginpage, but when it comes back web2py insists on going to .../loginfor authentication. URL: .../facebook_login = same effect On Oct 12, 1:42 am, Francisco Costa m...@franciscocosta.com wrote: anyone? On Oct 11, 5:18 pm, Francisco Costa m...@franciscocosta.com wrote: Hello, I'm trying to implement a twitterloginusing this auth.settings.login_form=TwitterTest(globals(),CLIENT_ID,CLIENT_SECRET, AUTH_URL, TOKEN_URL, ACCESS_TOKEN_URL) but when you use auth.settings.login_form you lose regularlogin is there a way to have both?
[web2py] Re: Error tickets by number of occurrence
If I have time, I would like to. On Oct 25, 7:03 am, selecta gr...@delarue-berlin.de wrote: so will you integrate it into the current issue tracker? like a tab or button with sort by number of occurrence On Oct 25, 1:59 pm, mdipierro mdipie...@cs.depaul.edu wrote: Good idea! On Oct 25, 6:37 am, selecta gr...@delarue-berlin.de wrote: Quite a while ago I wrote some code for my issue tracker to show error tickets by their number of occurrence. The Idea behind this is that you will see the error that appears most frequently and that needs fixing immediately. Since I am too busy to finish the issue tracker I will just share the relevant code screenshothttp://jaguar.biologie.hu-berlin.de/~fkrause/screenshot_error_frequec... the controller error_files_base = os.path.join(request.env.web2py_path,'applications',request.application,'errors') def errors(): import operator import os.path import hashlib import os import pickle #-- if request.vars.has_key('del'): for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() if request.vars['del'] == hash: os.remove( os.path.join(error_files_base,fn) ) #-- hash2error = dict() for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() try: hash2error[hash]['count'] += 1 except KeyError: error_lines = error['traceback'].split(\n) last_line = error_lines[-2] error_causer = os.path.split(error['layer'])[1] hash2error[hash] = dict(count = 1, pickel = error, causer = error_causer, last_line = last_line, hash = hash) decorated = [(x['count'],x) for x in hash2error.values()] decorated.sort(key=operator.itemgetter(0), reverse=True) return dict(errors = [x[1] for x in decorated]) the view table id='trck_errors' {{=THEAD(TR(TH('Delete'), TH('Count'), TH('File'), TH('Error')))}} tbody {{for e in errors:}} {{=TR(TD(BUTTON_DELETE(e['hash'])), TH(e['count']),TD(e['causer']),TD(e['last_line']), _onclick=collapse('%s');%e['hash'])}}{{=TR(TD(DIV(CODE(e['pickel'] ['traceback']), _id=e['hash']),_colspan=4 ))}} {{pass}} /tbody /table script $(document).ready(function(){ $('{{for e in errors:}}#{{=e['hash']}}, {{pass}}').hide(); }); /script feel free to use and improve
[web2py] Re: Unable to open web2py using ip address
what do you mean by does not work? On Oct 25, 8:32 am, Ramjee Ganti gant...@gmail.com wrote: Hi, The problem is Works:http://127.0.0.1:8000//welcome/default/index Does not Work on both mobile and Dev machine:http://ipaddress:port//welcome/default/index Works on Dev machine:http://machinename:port//welcome/default/index Does not work on mobile in the same network:http://machinename:port//welcome/default/index I am trying to develop a mobile application using web2py. Now how do I proceed? rAm i Think, i Wait, i Fast -- Siddharthahttp://sodidi.ramjeeganti.com
[web2py] Re: better mercurial integration
This may be useful: http://www.ke-cai.net/2010/05/tracking-change-with-google-diff-match.html http://neil.fraser.name/software/diff_match_patch/svn/trunk/demos/demo_diff.html look at the page source. It uses: http://neil.fraser.name/software/diff_match_patch/svn/trunk/javascript/diff_match_patch.js On Oct 24, 11:15 pm, mart msenecal...@gmail.com wrote: k, items 1 and 2 should be simple enough item 3, that is a different story, but ok, sure. I think merging outside of the mercurial context is best though, then simply update the remote repository with the merged file (and include good notes describing both source files and capturing the diffs of the merge is best). I will be under the gun at work for the next few days, but after that will be able to have something for you - by end of week is a good buffer. 1 question: how large of added disk space usage would you is acceptable - I have an idea that I will look into. (I always favor having less network IO, and more disk IO when possible). Let me know if end of week is good for you. Mart On Oct 24, 11:26 pm, mdipierro mdipie...@cs.depaul.edu wrote: I would be happier with much less... 1) a button in the /admin/mercurial/revision/n page that says [diff] and provides a text output with a diff between the revision and the current code 2) a few more fields in the /admin/mercurial/commit page that say changelog: write something here repository: https://.googlecode.com/hg/ push: yes/[no] (if yes code is pushed in googlecode) pop: yes/[no] (if yes, current code is cloned from googlecode and overwritten) I think of [merge] as a third order approximation and it is difficult to get it right. Massimo On Oct 24, 10:16 pm, mart msenecal...@gmail.com wrote: K, good stuff! I'll use what you and Boris came up with and integrate to mine (will help speed things up) the other project :) and for the other thing, great idea (i think). what do you mean by web repository? do you mean reproduce from the code behind a live web2py server instance? which would be a grand idea! if that's what you mean. I would doable if a well kept manifest (generated through automation on pull) describing in xml format file names (path) and rev # be installed long with web2py. then a simple xmlrpc meg over https should get you a nice xml file wich can be used to resolve the variables used in a hg pull cmd. (at least that's what I'd do to start) - I do something like that to get build automation to talk to the bug tracking system (keeps QA happy with reports like build X contains THIS list of bug fixes as described in THIS list of changelist description, which contains THIS list of affected files, which was checked in by THIS user, and reviewd by etc But, please let me know if I got the requirement all wrong, and I'll be happy to suggest another approach. For the diff requirement: I would definitely start fro the bottom up. This is what I do currently do with Perforce (logic should be similar). 1) I generate an XML representation of a directory structure (where I need to be able to specify any folder within my dir structure as the root folder (the starting point), and need to be able to exclude files and/folders as params to the function call. 2) once I have my xml object (I like a well structured Element Tree for this type of thing), I will simply pass the elements (in a loop) to a function that will have the know-how to return a correct mapping between repository and workspace (i think Mercurial calls this the Working Directory). 3) diff the file, capture the diff (if any) store it (keeping the the return strings in order is important, so I keep each return values as a dictionary within warm brackets of a collection that respects order (like a deque()). once done and have gone through the the complete fileset, then it just depends on how fancy we want to be (color, special indentation, format to 2 pages, etc..._) or the complete returned values can be formatted and handed to araxis (or something like that)... in the .hg word, its a little more convoluted in that I believe another repository needs to be created and changes pulled from the from the revision you are interested in (can be any revision or latest but it does need to be specified. Would look something like this: mkdir myTempDir cd myTempDir hg init hg pull myTempDir hg update -r N then do that recursive diff as discussed above is this what you were looking for? Mart :) connect to app admin through script: On Oct 24, 9:14 pm, mdipierro mdipie...@cs.depaul.edu wrote: Actually I just did this with some help from Boris from the mercurial mailing list. Now if you run web2py from source ad you have mercurial installed (easy_install mercurial) you can use the web2py admin to: - create a
Re: [web2py] Re: Request for a logo - PluginCentral
I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group attachment: PluginCentral_logo.png
[web2py] Re: Request for a logo - PluginCentral
Nice work! On Oct 25, 8:49 am, Branko Vukelic bg.bra...@gmail.com wrote: I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group PluginCentral_logo.png 52KViewDownload
[web2py] Re: Request for a logo - PluginCentral
https://docs.google.com/leaf?id=0BzPqKovYWlw-Mjg1NDBhNWQtOWM1MC00ZmE2LWJiZjktZWZjZTkyZTJhMmYyhl=enauthkey=COWQ8YEF On Oct 25, 10:12 am, mdipierro mdipie...@cs.depaul.edu wrote: Nice work! On Oct 25, 8:49 am, Branko Vukelic bg.bra...@gmail.com wrote: I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group PluginCentral_logo.png 52KViewDownload
Re: [web2py] Unable to open web2py using ip address
Have you tried serving off 0.0.0.0 instead of 127.0.0.1? 127.0.0.1 is only visible locally. On Mon, Oct 25, 2010 at 3:32 PM, Ramjee Ganti gant...@gmail.com wrote: Hi, The problem is Works: http://127.0.0.1:8000//welcome/default/index Does not Work on both mobile and Dev machine: http://ipaddress:port//welcome/default/index Works on Dev machine: http://machinename:port//welcome/default/index Does not work on mobile in the same network: http://machinename:port//welcome/default/index I am trying to develop a mobile application using web2py. Now how do I proceed? rAm i Think, i Wait, i Fast -- Siddhartha http://sodidi.ramjeeganti.com -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: Request for a logo - PluginCentral
Massimo, do you have what you are working on posted anywhere? -- Thadeus On Mon, Oct 25, 2010 at 9:17 AM, weheh richard_gor...@verizon.net wrote: https://docs.google.com/leaf?id=0BzPqKovYWlw-Mjg1NDBhNWQtOWM1MC00ZmE2LWJiZjktZWZjZTkyZTJhMmYyhl=enauthkey=COWQ8YEF On Oct 25, 10:12 am, mdipierro mdipie...@cs.depaul.edu wrote: Nice work! On Oct 25, 8:49 am, Branko Vukelic bg.bra...@gmail.com wrote: I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group PluginCentral_logo.png 52KViewDownload
Re: [web2py] Re: web2py wizard (alpha) is here
I've seen the wizard video http://vimeo.com/16048970 It's an awesome feature, much like RoR's scaffold, but with an UI. Nice. What I'd really like to see, though, is a handy toolbar in the Edit section that we could use to generate bits and pieces on the fly. Like do just one table, or just modify the menu, etc. Since I'm a developer _and_ a designer, I also have a comment regarding the themes. For me, personally, themes are just bloat. I am not saying they shouldn't be there. I'm sure some people appreciate it. What I would really love to see is a choice between a generic layout scaffold and a full theme. The scaffold would create blank EZ CSS layouts with menus and whatever minimal code is necessary to get the app going, and a style.css or whatever you choose to name the master CSS file, that contains nothing but is linked to the template, so I can just start coding CSS in it from scratch. I haven't tried the wizard yet, so please excuse me if I've mentioned something that's already implemented. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: Request for a logo - PluginCentral
Branko, Did you proposed a logo for web2py main site too ? You did an excelent work with this one, if we have a second round to submit and vote for logos, you would send your ideas. 2010/10/25 Branko Vukelic bg.bra...@gmail.com I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- http://rochacbruno.com.br
Re: [web2py] Re: Request for a logo - PluginCentral
On Mon, Oct 25, 2010 at 4:43 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, Did you proposed a logo for web2py main site too ? You did an excelent work with this one, if we have a second round to submit and vote for logos, you would send your ideas. Well, no I haven't proposed a logo for web2py. I wasn't aware of web2py until very recently, and then I just noted a change in the main website design. :) If a new logo is needed at any time, I will be delighted to propose one. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: Request for a logo - PluginCentral
No because I did not write anything yet. Anyway, my idea to have something that works very much like the layouts page: it exposes a list plugins via a json service and admin/ wizard has access to that. For regular plugins there may be version, dependencies, etc and this adds some complexity. Anyway, our projects may be complementary. You pay provide a plugin showcase. I may just provide a service for the wizard and select a subset of featured plugins, and we may link them. Massimo On Oct 25, 9:35 am, Thadeus Burgess thade...@thadeusb.com wrote: Massimo, do you have what you are working on posted anywhere? -- Thadeus On Mon, Oct 25, 2010 at 9:17 AM, weheh richard_gor...@verizon.net wrote: https://docs.google.com/leaf?id=0BzPqKovYWlw-Mjg1NDBhNWQtOWM1MC00ZmE2... On Oct 25, 10:12 am, mdipierro mdipie...@cs.depaul.edu wrote: Nice work! On Oct 25, 8:49 am, Branko Vukelic bg.bra...@gmail.com wrote: I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group PluginCentral_logo.png 52KViewDownload
[web2py] Re: web2py wizard (alpha) is here
The layout selector should include simpler cases as you suggest. Creating controller on the fly is a more complex issues because it assumes the wizard understands user's code and it does not. Massimo On Oct 25, 9:33 am, Branko Vukelic bg.bra...@gmail.com wrote: I've seen the wizard video http://vimeo.com/16048970 It's an awesome feature, much like RoR's scaffold, but with an UI. Nice. What I'd really like to see, though, is a handy toolbar in the Edit section that we could use to generate bits and pieces on the fly. Like do just one table, or just modify the menu, etc. Since I'm a developer _and_ a designer, I also have a comment regarding the themes. For me, personally, themes are just bloat. I am not saying they shouldn't be there. I'm sure some people appreciate it. What I would really love to see is a choice between a generic layout scaffold and a full theme. The scaffold would create blank EZ CSS layouts with menus and whatever minimal code is necessary to get the app going, and a style.css or whatever you choose to name the master CSS file, that contains nothing but is linked to the template, so I can just start coding CSS in it from scratch. I haven't tried the wizard yet, so please excuse me if I've mentioned something that's already implemented. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group
[web2py] Re: Ajax response is not complete
Sorry for the late response. Here is the ajax call : $.ajax( { url: makeUrl( { argList: [ 'getTree' ] } ), type: POST, data: { treeId: p.data.treeId }, success: getTreeOnSuccess } ); The controller function : def getTree(): tree = buildTree( { 'nodes': db( db.node.treeId == request.vars.treeId ).select( db.node.id, db.node.label, db.node.left, db.node.right, orderby = db.node.left ) } ) return ''.join( [ '{ id: ', request.vars.treeId, ', tree: ', tree.emit_json(), ' }' ] ) The method called on successfull retrieval : function getTreeOnSuccess( response ) { $('#treeInfoPanel').trigger( 'receivedTree', response ); } Then stuff happens. When I look at the response from firebug, the string sent back to the client is not all there. When I debug on the server, it writes the entire string to a file. The call works intermittently. Any suggestions ? On Sep 17, 10:47 pm, Adi aditya.sa...@gmail.com wrote: It would help to see some code. On Sep 17, 9:40 pm, topher.baron topher.ba...@gmail.com wrote: Hi web2py users, I'm encountering a strange issue. About half of every ajax response I get from web2py is not complete. For instance, I'm usually sending a json string from the server to the client. Upon trying to eval the json, I get an unterminated string literal error because the string is not a valid json string. In firebug, and alerting to the screen, the response indeed cuts off somewhere. Has anyone encountered anything like this or have any suggestions for me ? I'm happy to post code, more information. Please let me know. Thanks
Re: [web2py] Re: Request for a logo - PluginCentral
On Mon, Oct 25, 2010 at 5:33 PM, mdipierro mdipie...@cs.depaul.edu wrote: No because I did not write anything yet. Anyway, my idea to have something that works very much like the layouts page: it exposes a list plugins via a json service and admin/ wizard has access to that. All we have to do after that is click that green Make a web site button. :) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: web2py wizard (alpha) is here
On Mon, Oct 25, 2010 at 5:35 PM, mdipierro mdipie...@cs.depaul.edu wrote: The layout selector should include simpler cases as you suggest. Creating controller on the fly is a more complex issues because it assumes the wizard understands user's code and it does not. I've had something more along the line of creating empty controller methods+views combo, just as a starting point. But yeah, I guess that won't work until the wizard can understand at least model defs. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
RE: [web2py] Re: confused about services and authorization
Massimo, The webfaction server is Linux based and uses Apache as the web server. Additionally, below are the commands I used to test via a python console: -- The original app (from which the test was derived) import xmlrpclib rserver = xmlrpclib.Server(http://david.wald...@gmail.com:x...@www.meetingmonkey.net/i nit/default/call/xmlrpc) rserver.getmeetings() lserver = xmlrpclib.Server(http://david.wald...@gmail.com:x...@127.0.0.1:8000/mm_beta_ 1/default/call/xmlrpc) lserver.getmeetings() The test app I sent last evening tserver = xmlrpclib.Server(http://david.wald...@gmail.com:x...@127.0.0.1:8000/svctest/ default/call/xmlrpc) tserver.getmeetings() rserver = xmlrpclib.Server(http://david.wald...@gmail.com:x...@www.meetingmonkey.net/w elcome/default/call/xmlrpc) rserver.getmeetings() -Original Message- From: David Waldrop [mailto:david.wald...@gmail.com] Sent: Sunday, October 24, 2010 5:35 PM To: web2py@googlegroups.com Subject: RE: [web2py] Re: confused about services and authorization Its the standard webfaction config, web2py and python installed using their scripts. -Original Message- From: web2py@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of mdipierro Sent: Sunday, October 24, 2010 5:15 PM To: web2py-users Subject: [web2py] Re: confused about services and authorization Can you also tell us more about the production server? What web server? Os? On Oct 24, 3:52 pm, David Waldrop david.wald...@gmail.com wrote: Massimo, Thanks. This is absolutely maddening. Attached is simple app. It exposes 1 service getmeetings located in the mm_services model. The db.py file includes the statement: auth.settings.allow_basic_login = True and the default/call function is decorated to require login. The app behaves correctly when running on my local machine, but always returns 303 when invoked on the production server. -Original Message- From: web2py@googlegroups.com [mailto:web...@googlegroups.com] On Behalf Of mdipierro Sent: Sunday, October 24, 2010 4:17 PM To: web2py-users Subject: [web2py] Re: confused about services and authorization please email me a minimalist program to reproduce the problem and I will debug it. On Oct 24, 2:32 pm, David Waldrop david.wald...@gmail.com wrote: Even more confusion. I can get it to work on dev environment by reverting to the original decorator on call #...http://groups.google.com/groups/unlock?_done=/group/web2py/brow se _thr... @auth.requires(auth.user) @auth.requires_login() def call(): exposes services. for example: http:///http://www.google.com/url?sa=Dq=http:///usg=AFQjCN H TjjhgMOeO9jl... [app]/default/call/jsonrpc decorate with @services.jsonrpc the functions to expose supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv session.forget() return service() This works on the local/dev machine. By work I meant i get the expected result when valid credentials are passed, and a 303 when invalid is passed!!! I cannot get it to work on the production system. If I comment out the authorization decorator all together the service is invoked thereby isolating the problem to the way the credentials are passed/handled. The code is Identical so it must be something in the environmental setup. Any ideas? On Sun, Oct 24, 2010 at 2:57 PM, david.waldrop david.wald...@gmail.comwrote: Cancel that it DOES NOT work on local either. In the previous post it worked I believe because I still had the old controller. Now that I have deleted the controller puttilng the call function back in the default controller, and moving the getmeeting function to a model file, i am not able to access in the dev server or the productiontion server. I am 100% sure the credentials are correct, but cannot figure out why the authentication is not happening. On Oct 24, 2:13 pm, David Waldrop david.wald...@gmail.com wrote: Massimo, moving the function out of the controller enabled me to successfully invoke the function via xmlrpc on my development machine, but not on the production version. In the forum I see that this (303) supposedly indicates invalid authorization, but the testing credentials are valid on both sites. I did so by issuing the following at the python console: Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import xmlrpclib server = xmlrpclib.Server(http://david.wald...@gmail.com:x...@www.meetin gm on key.net/init/default/call/xmlrpc) server2 = xmlrpclib.Server(http://david.wald...@gmail.com:x...@127.0.0.1: 80 0 0/mm_beta_1/default/call/xmlrpc) server.getmeetings() Traceback
Re: [web2py] Re: Request for a logo - PluginCentral
It should be easy enough to add a service for a listing of plugins. Would come up with a design specification for the API you want? Your even welcome to make a checkout and just add an API to the plugincentral codebase if you get to it before I do. I don't see any reason why this would need to be two separate apps. I'm willing to give commit access to anyone who wants to help. At least for right now, I don't know of any plugins that have dependencies, and that part of the plugin spec still is not fleshed out. This is why I removed storing separate versions for each plugin and just have it store the latest version. I would love to have this work on GAE, but to be able to provide proper demonstration of plugins it requires being able to install an app into web2py. -- Thadeus On Mon, Oct 25, 2010 at 10:33 AM, mdipierro mdipie...@cs.depaul.edu wrote: yway, our projects may be compleme
Re: [web2py] Re: Error tickets by number of occurrence
I think this should be default for the ticket view. -- Thadeus On Mon, Oct 25, 2010 at 8:54 AM, mdipierro mdipie...@cs.depaul.edu wrote: If I have time, I would like to. On Oct 25, 7:03 am, selecta gr...@delarue-berlin.de wrote: so will you integrate it into the current issue tracker? like a tab or button with sort by number of occurrence On Oct 25, 1:59 pm, mdipierro mdipie...@cs.depaul.edu wrote: Good idea! On Oct 25, 6:37 am, selecta gr...@delarue-berlin.de wrote: Quite a while ago I wrote some code for my issue tracker to show error tickets by their number of occurrence. The Idea behind this is that you will see the error that appears most frequently and that needs fixing immediately. Since I am too busy to finish the issue tracker I will just share the relevant code screenshothttp:// jaguar.biologie.hu-berlin.de/~fkrause/screenshot_error_frequec.http://jaguar.biologie.hu-berlin.de/%7Efkrause/screenshot_error_frequec. .. the controller error_files_base = os.path.join(request.env.web2py_path,'applications',request.application,'errors') def errors(): import operator import os.path import hashlib import os import pickle #-- if request.vars.has_key('del'): for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() if request.vars['del'] == hash: os.remove( os.path.join(error_files_base,fn) ) #-- hash2error = dict() for fn in os.listdir(error_files_base): try: error = pickle.load(open(os.path.join(error_files_base,fn),'r')) except IOError: continue hash = hashlib.md5(error['traceback']).hexdigest() try: hash2error[hash]['count'] += 1 except KeyError: error_lines = error['traceback'].split(\n) last_line = error_lines[-2] error_causer = os.path.split(error['layer'])[1] hash2error[hash] = dict(count = 1, pickel = error, causer = error_causer, last_line = last_line, hash = hash) decorated = [(x['count'],x) for x in hash2error.values()] decorated.sort(key=operator.itemgetter(0), reverse=True) return dict(errors = [x[1] for x in decorated]) the view table id='trck_errors' {{=THEAD(TR(TH('Delete'), TH('Count'), TH('File'), TH('Error')))}} tbody {{for e in errors:}} {{=TR(TD(BUTTON_DELETE(e['hash'])), TH(e['count']),TD(e['causer']),TD(e['last_line']), _onclick=collapse('%s');%e['hash'])}}{{=TR(TD(DIV(CODE(e['pickel'] ['traceback']), _id=e['hash']),_colspan=4 ))}} {{pass}} /tbody /table script $(document).ready(function(){ $('{{for e in errors:}}#{{=e['hash']}}, {{pass}}').hide(); }); /script feel free to use and improve
[web2py] True or False in Mail
Hello, When trying to figure out how to make mailing functionality work on GAE I came across a couple of posts where I found this line: mail.settings.tls=True or False I can't understand what it means. I found it here (in a comment by Massimo): http://stackoverflow.com/questions/2656068/sending-email-from-an-web2py-on-gae and here: http://faisal.altlimit.com/2010/08/sending-email-with-web2py-in-google-app.html -- Alexei Vinidiktov
[web2py] String 'Welcome %s' is not translated when user is logged-in
Problem detailed in http://code.google.com/p/web2py/issues/detail?id=117 Guys, where is the better place to report and suggest fixes? -- Vinicius Assef.
[web2py] doesn't send user verification email with colon in password
Problem detailed in http://code.google.com/p/web2py/issues/detail?id=118 -- Vinicius Assef.
[web2py] Re: True or False in Mail
Do not use it on GAE. It means if you require encryption when authenticating to the SMTP server. On Oct 25, 12:13 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Hello, When trying to figure out how to make mailing functionality work on GAE I came across a couple of posts where I found this line: mail.settings.tls=True or False I can't understand what it means. I found it here (in a comment by Massimo):http://stackoverflow.com/questions/2656068/sending-email-from-an-web2... and here:http://faisal.altlimit.com/2010/08/sending-email-with-web2py-in-googl... -- Alexei Vinidiktov
[web2py] Re: String 'Welcome %s' is not translated when user is logged-in
perfect. fixed On Oct 25, 12:20 pm, Vinicius Assef vinicius...@gmail.com wrote: Problem detailed inhttp://code.google.com/p/web2py/issues/detail?id=117 Guys, where is the better place to report and suggest fixes? -- Vinicius Assef.
[web2py] Re: doesn't send user verification email with colon in password
perfect. fixed this too. On Oct 25, 12:21 pm, Vinicius Assef vinicius...@gmail.com wrote: Problem detailed inhttp://code.google.com/p/web2py/issues/detail?id=118 -- Vinicius Assef.
Re: [web2py] Re: True or False in Mail
Thanks, Massimo. But why does the line include both True and False? Why isn't it simply mail.settings.tls=True or mail.settings.tls=False depending on the needs? On Tue, Oct 26, 2010 at 12:27 AM, mdipierro mdipie...@cs.depaul.edu wrote: Do not use it on GAE. It means if you require encryption when authenticating to the SMTP server. On Oct 25, 12:13 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Hello, When trying to figure out how to make mailing functionality work on GAE I came across a couple of posts where I found this line: mail.settings.tls=True or False I can't understand what it means. I found it here (in a comment by Massimo): http://stackoverflow.com/questions/2656068/sending-email-from-an-web2... and here: http://faisal.altlimit.com/2010/08/sending-email-with-web2py-in-googl... -- Alexei Vinidiktov -- Alexei Vinidiktov
[web2py] auth issue in Firefox 3.6.10+ on Mac
Hi all, I've got some users facing this peculiar problem in Radbox. Faced in: Mac OS X 10.6.4, Firefox 3.6.10 and newer Even when they're logged into Radbox, there's this small piece of code which returns -1. if auth.user: return auth.user.id else: return -1 - The worst part is I'm not able to reproduce the problem at my own end, in the same OS and browser version where users are facing this issue. Now auth.user is None when it is expected to be something. The question is, what information can I log or dump to debug this problem? For all we know it could possibly be a Firefox bug, but not being able to debug it is really frustrating.
[web2py] Re: better mercurial integration
sounds good, thanks for the tip :) On Oct 25, 10:01 am, mdipierro mdipie...@cs.depaul.edu wrote: This may be useful: http://www.ke-cai.net/2010/05/tracking-change-with-google-diff-matchhttp://neil.fraser.name/software/diff_match_patch/svn/trunk/demos/dem... look at the page source. It uses: http://neil.fraser.name/software/diff_match_patch/svn/trunk/javascrip... On Oct 24, 11:15 pm, mart msenecal...@gmail.com wrote: k, items 1 and 2 should be simple enough item 3, that is a different story, but ok, sure. I think merging outside of the mercurial context is best though, then simply update the remote repository with the merged file (and include good notes describing both source files and capturing the diffs of the merge is best). I will be under the gun at work for the next few days, but after that will be able to have something for you - by end of week is a good buffer. 1 question: how large of added disk space usage would you is acceptable - I have an idea that I will look into. (I always favor having less network IO, and more disk IO when possible). Let me know if end of week is good for you. Mart On Oct 24, 11:26 pm, mdipierro mdipie...@cs.depaul.edu wrote: I would be happier with much less... 1) a button in the /admin/mercurial/revision/n page that says [diff] and provides a text output with a diff between the revision and the current code 2) a few more fields in the /admin/mercurial/commit page that say changelog: write something here repository: https://.googlecode.com/hg/ push: yes/[no] (if yes code is pushed in googlecode) pop: yes/[no] (if yes, current code is cloned from googlecode and overwritten) I think of [merge] as a third order approximation and it is difficult to get it right. Massimo On Oct 24, 10:16 pm, mart msenecal...@gmail.com wrote: K, good stuff! I'll use what you and Boris came up with and integrate to mine (will help speed things up) the other project :) and for the other thing, great idea (i think). what do you mean by web repository? do you mean reproduce from the code behind a live web2py server instance? which would be a grand idea! if that's what you mean. I would doable if a well kept manifest (generated through automation on pull) describing in xml format file names (path) and rev # be installed long with web2py. then a simple xmlrpc meg over https should get you a nice xml file wich can be used to resolve the variables used in a hg pull cmd. (at least that's what I'd do to start) - I do something like that to get build automation to talk to the bug tracking system (keeps QA happy with reports like build X contains THIS list of bug fixes as described in THIS list of changelist description, which contains THIS list of affected files, which was checked in by THIS user, and reviewd by etc But, please let me know if I got the requirement all wrong, and I'll be happy to suggest another approach. For the diff requirement: I would definitely start fro the bottom up. This is what I do currently do with Perforce (logic should be similar). 1) I generate an XML representation of a directory structure (where I need to be able to specify any folder within my dir structure as the root folder (the starting point), and need to be able to exclude files and/folders as params to the function call. 2) once I have my xml object (I like a well structured Element Tree for this type of thing), I will simply pass the elements (in a loop) to a function that will have the know-how to return a correct mapping between repository and workspace (i think Mercurial calls this the Working Directory). 3) diff the file, capture the diff (if any) store it (keeping the the return strings in order is important, so I keep each return values as a dictionary within warm brackets of a collection that respects order (like a deque()). once done and have gone through the the complete fileset, then it just depends on how fancy we want to be (color, special indentation, format to 2 pages, etc..._) or the complete returned values can be formatted and handed to araxis (or something like that)... in the .hg word, its a little more convoluted in that I believe another repository needs to be created and changes pulled from the from the revision you are interested in (can be any revision or latest but it does need to be specified. Would look something like this: mkdir myTempDir cd myTempDir hg init hg pull myTempDir hg update -r N then do that recursive diff as discussed above is this what you were looking for? Mart :) connect to app admin through script: On Oct 24, 9:14 pm, mdipierro mdipie...@cs.depaul.edu wrote: Actually I just did this with some help from Boris from the mercurial mailing
[web2py] Re: True or False in Mail
That is what it is mail.settings.tls=True or False is just an example. The right hand site evaluates to True. On Oct 25, 12:52 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Thanks, Massimo. But why does the line include both True and False? Why isn't it simply mail.settings.tls=True or mail.settings.tls=False depending on the needs? On Tue, Oct 26, 2010 at 12:27 AM, mdipierro mdipie...@cs.depaul.edu wrote: Do not use it on GAE. It means if you require encryption when authenticating to the SMTP server. On Oct 25, 12:13 pm, Alexei Vinidiktov alexei.vinidik...@gmail.com wrote: Hello, When trying to figure out how to make mailing functionality work on GAE I came across a couple of posts where I found this line: mail.settings.tls=True or False I can't understand what it means. I found it here (in a comment by Massimo): http://stackoverflow.com/questions/2656068/sending-email-from-an-web2... and here: http://faisal.altlimit.com/2010/08/sending-email-with-web2py-in-googl... -- Alexei Vinidiktov -- Alexei Vinidiktov
[web2py] Re: auth issue in Firefox 3.6.10+ on Mac
Could it be their session expired? On Oct 25, 1:05 pm, Adi aditya.sa...@gmail.com wrote: Hi all, I've got some users facing this peculiar problem in Radbox. Faced in: Mac OS X 10.6.4, Firefox 3.6.10 and newer Even when they're logged into Radbox, there's this small piece of code which returns -1. if auth.user: return auth.user.id else: return -1 - The worst part is I'm not able to reproduce the problem at my own end, in the same OS and browser version where users are facing this issue. Now auth.user is None when it is expected to be something. The question is, what information can I log or dump to debug this problem? For all we know it could possibly be a Firefox bug, but not being able to debug it is really frustrating.
[web2py] Re: forms2pdf: new free web2py appliance
forgot to say... requires trunk. On Oct 25, 1:55 pm, mdipierro mdipie...@cs.depaul.edu wrote: http://web2py.com/appliances/default/show/69
[web2py] Suggestion to include a tip in the components documentation of web2py book
I have a small suggestion that will be very helpful to n00bs like me regarding http://web2py.com/book/default/chapter/13#Components The following is the correct code snippet from the correct code snippet @auth.requires_login() def post(): return dict(form=crud.create(db.comment), comments=db(db.comment.id0).select()) However, in the context of my code, I did @auth.requires_login() def post(): comments=db(db.comment.id0).select() return dict(form=crud.create(db.comment), comments=comments) What happens here is that the component that is acquired by LOAD upon form submission is still the old set of rows. I spent quite some time figuring it out unfortunately. Perhaps this point could be highlighted in the book.
[web2py] Re: Request for a logo - PluginCentral
Should we also have a section for appliances? Anthony On Oct 25, 4:54 am, Thadeus Burgess thade...@thadeusb.com wrote: No, I do not have a server that can run web2py currently. (due to a conflict with simplejson. I require the version from pypi, which coincidentally is incompatible with web2py (and I do not feel like reconfiguring my server to use virtualenv)). The code is athttp://code.google.com/p/plugincentral/You are welcome to make a checkout and run it locally. Most of it is working actually... There are a few tweaks to be made security wise for the demo, but I think its almost done. Register account. Upload a plugin, provide name, descriptions, categories, license, the packed plugin file, a version, a screenshot, a packed demo application to showcase the plugin. There will also be featured plugins that the site admin can choose to display at the top of the index page. The admin can also download all demo applications and review them. If approved, it uses app_install to install the application into web2py and generates a link to it. So if you have a plugin named Comments it will make an app named plugin_central_Comments and for the demo you just get redirected there. I do need to go over the rules of a demo app 1) Must use sqlite 2) Cannot contain appadmin 3) Cannot be harmful to the filesystem 4) Cannot have functions that require minutes to complete. 5) Cannot have tons of data in the database. 6) Cannot contain external links 7) Must work. -- Thadeus On Sun, Oct 24, 2010 at 8:14 PM, mdipierro mdipie...@cs.depaul.edu wrote: Do you have a site up and running? On Oct 24, 6:09 pm, Thadeus Burgess thade...@thadeusb.com wrote: I am working on plugin central, finally have some free time to devote to the project. However I am a horrible artist, and wonder if anyone would like to help me with designing a logo? This is my color scheme White - body content #5E99E7 - Links main color (a light blue) #F5F4EF - Grey, page background I would like to use the new Ubuntu font since it is open source. -- Thadeus- Hide quoted text - - Show quoted text -
Re: [web2py] Re: Request for a logo - PluginCentral
Consider adding code-reivew and rating features, so the community can mark stuff as safe to include in a project or not safe. On Mon, Oct 25, 2010 at 6:53 PM, Thadeus Burgess thade...@thadeusb.com wrote: It should be easy enough to add a service for a listing of plugins. Would come up with a design specification for the API you want? Your even welcome to make a checkout and just add an API to the plugincentral codebase if you get to it before I do. I don't see any reason why this would need to be two separate apps. I'm willing to give commit access to anyone who wants to help. At least for right now, I don't know of any plugins that have dependencies, and that part of the plugin spec still is not fleshed out. This is why I removed storing separate versions for each plugin and just have it store the latest version. I would love to have this work on GAE, but to be able to provide proper demonstration of plugins it requires being able to install an app into web2py. -- Thadeus On Mon, Oct 25, 2010 at 10:33 AM, mdipierro mdipie...@cs.depaul.edu wrote: yway, our projects may be compleme -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Pythonn and Yahoo Pipes on Google App Engine
The amazing Yahoo Pipes now runs on Google App Engine with Python! This is a great tool to create webcrawlers and create scrappers for webpages http://www.wordloosed.com/running-yahoo-pipes-on-google-app-engine
[web2py] Python Tip - Ypu can execute .zip files with Python
*sharing a tip that came from Facundo Batista on PyConBrasil * This is a way to pack a Python module as a .jar in Java Fisrt we need to create a directory called foo, and create a __init__ file to became a Python module $mkdir foo $touch foo/__init__.py Then create/edit a file $vi foo/bar.py Something inside the file: def foobar(): print Executing foobar function After that we create a new file called __main__.py in the same level as foo directory from foo.bar import foobar foobar() The tree $ tree . . ├── foo │ ├── bar.py │ └── __init__.py └── __main__.py Until here, nothing new, but now we have to create a .zip file and pack it all $zip blablabla.zip __main__.py foo The magic is here: $python blablabla.zip Executing foobar function *YES! You can call a .zip file with Python! * More on this..* (the real magic is here)* Create a file called xpto with no extension $vi xpto Inside xpto write a python call and a write line: #!/usr/bin/python # blank line here Now, we have to include the whole content of blablabla.zip into this file and give it execute permission. $cat blablabla.zip xpto $chmod +x xpto DONE! Lets run $ ./xpto Executing foobar function -- I saw the tip here http://codando.com.br/2010/10/25/o-melhor-hack-para-python/
[web2py] Re: list:string thoughts
It seems that this widget does not work when there is more than one list:string field in a page. On Oct 25, 2:01 am, mdipierro mdipie...@cs.depaul.edu wrote: The list:string is not an alternative to using a tag table and tag_link many-to-many (an example of which is provided by plugin_tagging). Yet you should not have the problem you experience. With recent versions of web2py, Field('keywords', 'list:string') should be rendered by a new widget that takes one keyword per line and adds new lines when yo press enter. You should not be using '|' to separate keywords. If you do all keywords will be interpreted as one long keyword containing the '|'s. Massimo On Oct 24, 10:35 pm, rick ricon...@gmail.com wrote: I'm getting frustrated with the list:string field type. I store products, each product has keywords that describe the product. db.define_table('products', Field('keywords', 'list:string')) I don't know what the keywords will be, so I can't use IS_IN_SET() It seems to stores the keywords fine, as long as (I'm using Crud) I separate the keywords like this: green|blue|red But when I make this call rows = db(db.products.keywords.contains(keyword)).select() I don't get all the products back that I should! In fact, it seems that I need to do an update on the product (again using Crud, and any sort of update) before the product's keywords will be picked up. Is this a problem with using Crud? In all honesty, I'd be more comfortable not using list:string, and having a separate table keywords that linked (many-to-one) to the products table, but I really don't know how I would even begin to do that in web2py.. Thanks for reading! - rick
[web2py] Re: Request for a logo - PluginCentral
Nice!!! On Oct 25, 9:49 am, Branko Vukelic bg.bra...@gmail.com wrote: I've missed this part of the convo when I was replying to Thadeus off-list. Anyway, since I've already done something, and the current plugins site doesn't seem to have it's own logo either, I'll attach the thing I've done, so you can take a look. On Mon, Oct 25, 2010 at 1:58 PM, mdipierro mdipie...@cs.depaul.edu wrote: This has some overlap with what I am doing... anyway... we can merge later. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group PluginCentral_logo.png 52KViewDownload
[web2py] Re: list:string thoughts
h. that is possible. Will look into it. On Oct 25, 3:59 pm, yamandu yamandu.co...@gmail.com wrote: It seems that this widget does not work when there is more than one list:string field in a page. On Oct 25, 2:01 am, mdipierro mdipie...@cs.depaul.edu wrote: The list:string is not an alternative to using a tag table and tag_link many-to-many (an example of which is provided by plugin_tagging). Yet you should not have the problem you experience. With recent versions of web2py, Field('keywords', 'list:string') should be rendered by a new widget that takes one keyword per line and adds new lines when yo press enter. You should not be using '|' to separate keywords. If you do all keywords will be interpreted as one long keyword containing the '|'s. Massimo On Oct 24, 10:35 pm, rick ricon...@gmail.com wrote: I'm getting frustrated with the list:string field type. I store products, each product has keywords that describe the product. db.define_table('products', Field('keywords', 'list:string')) I don't know what the keywords will be, so I can't use IS_IN_SET() It seems to stores the keywords fine, as long as (I'm using Crud) I separate the keywords like this: green|blue|red But when I make this call rows = db(db.products.keywords.contains(keyword)).select() I don't get all the products back that I should! In fact, it seems that I need to do an update on the product (again using Crud, and any sort of update) before the product's keywords will be picked up. Is this a problem with using Crud? In all honesty, I'd be more comfortable not using list:string, and having a separate table keywords that linked (many-to-one) to the products table, but I really don't know how I would even begin to do that in web2py.. Thanks for reading! - rick
Re: [web2py] Re: Request for a logo - PluginCentral
Branko, Did you proposed a logo for web2py main site too ? You did an excelent work with this one, if we have a second round to submit and vote for logos, you would send your ideas. Well, no I haven't proposed a logo for web2py. I wasn't aware of web2py until very recently, and then I just noted a change in the main website design. :) If a new logo is needed at any time, I will be delighted to propose one. Branko, I dont know if people are thinking about a Second round on logo votation http://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app.
Re: [web2py] Re: Request for a logo - PluginCentral
+1 to Bruno and Branko On Mon, Oct 25, 2010 at 11:17 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, Did you proposed a logo for web2py main site too ? You did an excelent work with this one, if we have a second round to submit and vote for logos, you would send your ideas. Well, no I haven't proposed a logo for web2py. I wasn't aware of web2py until very recently, and then I just noted a change in the main website design. :) If a new logo is needed at any time, I will be delighted to propose one. Branko, I dont know if people are thinking about a Second round on logo votation http://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app.
[web2py] [OFF] Python Bug Weekend Announced
Python Bug Weekend Announced Sharing -- Forwarded message -- From: Antoine Pitrou sol...@...u.net Date: 25 October 2010 19:03 Subject: [Python-Dev] Python bug week-end : 20-21 November To: python-...@python.org Cc: python-l...@python.org Hello, The development team of the Python interpreter (a.k.a python-dev) is organizing a bug week-end on Saturday 20th and Sunday 21st of November. We would like to encourage anyone who feels interested in participating to give it a try. Contributing to Python is much less intimidating than it sounds. You don't need to have previous experience with modifying the Python source; in fact bug days offer a good opportunity to learn the basics by asking questions and working on relatively simple bugs (see how to get prepared below). And most core developers are actual human beings! How it happens -- The bug week-end will happen on the #python-dev IRC channel on the Freenode network, where several core developers routinely hang out. No physical meeting is scheduled as far as I know, but anyone is encouraged to organize one and announce it on the official Python channels such as this one. Participants (you!) join #python-dev and collaboratively go through the Python issue tracker at http://bugs.python.org . From there, you can provide patches and/or review existing patches. Also, you can help us assess issues on any specific topic you have expertise in (the range of topics touched in the stdlib is quite broad and it is more than likely that the core developers' expertise is lacking in some of them). Or, if you feel shy, you can simply watch other people work and slowly get more confident about participating yourself. Development is public and lurkers are welcome. What you can work on - Our expectation is that Python 3.2 beta 1 will have been released a couple of days before the bug week-end and, therefore, one primary goal is to polish the 3.2 branch for the following betas and the final release. There are many issues to choose from on the bug tracker; any bug fixes or documentation improvements will do. New features are discouraged: they can't be checked in before the official 3.2 release. How to get prepared --- If you are a beginner with the Python codebase, you may want to read the development guide available here (courtesy of Brian Curtin): http://docs.pythonsprints.com/core_development/beginners.html There's a small practical guide to bug days/week-ends on the wiki: http://wiki.python.org/moin/PythonBugDay And the development FAQ holds answers to generic development questions: http://www.python.org/dev/faq/ You can also do all of the above during the bug week-end, of course. Please, don't hesitate to ask us questions on the #python-dev channel. Regards Antoine. ___ Python-Dev mailing list python-...@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/rbp%40isnomore.net -- http://rochacbruno.com.br
Re: [web2py] Re: Request for a logo - PluginCentral
On Mon, Oct 25, 2010 at 11:17 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, I dont know if people are thinking about a Second round on logo votation http://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app. Oh sure. I will do that. Thanks. ;) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] model across multiple file order resolution
Hi , I was looking at the db.py file and in the section regarding the table definition , there is a note advertising the possibility to split the model accross multiple model files. It sounds interesting but i was wondering how can we enforce the order these files will be loaded/executed into the web2py environment .
Re: [web2py] Re: Request for a logo - PluginCentral
Very nice logo! could explain the concept of the ship? All sailing together with web2py! 2010/10/25 Branko Vukelic bg.bra...@gmail.com It says no more uploads, so I'll attach the first proposal here. In the following days, I will probably do more. On Mon, Oct 25, 2010 at 11:32 PM, Branko Vukelic bg.bra...@gmail.com wrote: On Mon, Oct 25, 2010 at 11:17 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, I dont know if people are thinking about a Second round on logo votation http://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app. Oh sure. I will do that. Thanks. ;) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- http://rochacbruno.com.br
[web2py] Re: model across multiple file order resolution
Models are executed alphabetically. I typically prepend digits to the file name for more granular control: 0_somestuff.py On Oct 25, 6:12 pm, Manu swel...@gmail.com wrote: Hi , I was looking at the db.py file and in the section regarding the table definition , there is a note advertising the possibility to split the model accross multiple model files. It sounds interesting but i was wondering how can we enforce the order these files will be loaded/executed into the web2py environment .
Re: [web2py] Re: Request for a logo - PluginCentral
I Like more the white one! What people and Massimo think about reopen logo contest for a second round keeping just which has more than 5 votes, and new submissions ? 2010/10/25 Branko Vukelic bg.bra...@gmail.com It says no more uploads, so I'll attach the first proposal here. In the following days, I will probably do more. On Mon, Oct 25, 2010 at 11:32 PM, Branko Vukelic bg.bra...@gmail.com wrote: On Mon, Oct 25, 2010 at 11:17 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, I dont know if people are thinking about a Second round on logo votation http://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app. Oh sure. I will do that. Thanks. ;) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- http://rochacbruno.com.br
[web2py] problem with double input on safari and chrome
hi, i'm running across a problem and want to alert the community about it. i don't yet have a solution but am working on it. maybe one of you has done it before. what's happening the javascript that prevents you from putting bad characters in the double input fields is also acting strangely in safari and chrome. the javascript in question is this (included in web2py code): jQuery('input.double,input.decimal').keyup(function() {this.value=this.value.reverse().replace(/[^0-9\-\.]|[\-](?=.)|[\.](? =[0-9]*[\.])/g,'').reverse();}); and the issue is that when you call: this.value=this.value.replace(/anything/,'anything') it automatically puts the cursor at the end of the line. so if you put your cursor at the end of the line and hit delete, everything looks great. you go from 12.34| to 12.3| to 12.|, etc. but in my case, where i'm using currency, people are likely to put their cursor to the left of the decimal point to make a change. so when they're at 25|.00 and they hit delete, it erases the proper number but throws the cursor to the right so it looks like 2.00| and causes problems. same if you use the arrow keys -- you get the cursor at the end. this is not a web2py issue, it's how safari and chrome use the replace function. firefox, for example, leaves your cursor where it was unless it successfully replaces. but it becomes a web2py issue because inputs of type double have this javascript setting on their keyup(). the only solution i can think of for now is to have my input fields select all upon entry, so that the user isn't tempted to use the arrow keys in the middle. but i wanted to see if anyone else has had to deal with this. thanks, matt
[web2py] Re: Request for a logo - PluginCentral
I have no strong opinion one way or another. On Oct 25, 6:18 pm, Bruno Rocha rochacbr...@gmail.com wrote: I Like more the white one! What people and Massimo think about reopen logo contest for a second round keeping just which has more than 5 votes, and new submissions ? 2010/10/25 Branko Vukelic bg.bra...@gmail.com It says no more uploads, so I'll attach the first proposal here. In the following days, I will probably do more. On Mon, Oct 25, 2010 at 11:32 PM, Branko Vukelic bg.bra...@gmail.com wrote: On Mon, Oct 25, 2010 at 11:17 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, I dont know if people are thinking about a Second round on logo votationhttp://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app. Oh sure. I will do that. Thanks. ;) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group -- http://rochacbruno.com.br
[web2py] Re: Supporters of the current logo concept
Agreed, lowercase is more appropriate. I suspect that logo was most popular because web2py.com uses it. On Oct 22, 1:52 pm, weheh richard_gor...@verizon.net wrote: Bruno, thanks for the link. Massimo, please consider that we live in a case sensitive world. All your branding to date has been lower case web2py. web2py is curvaceous and cool. WEB2PY is blocky and square. My dad, who is 85 EMAILS ALL IN CAPITAL LETTERS. IT'S ANNOYING even though I tell him to stop shouting. Please don't even consider a logo that is all upper case. Peace. On Oct 21, 9:11 pm, Bruno Rocha rochacbr...@gmail.com wrote: About Logos! http://www.smashingbuzz.com/2010/10/dons-and-donts-of-logo-communicat...
[web2py] Re: Pythonn and Yahoo Pipes on Google App Engine
My understanding was Yahoo Pipes is good for people with little programming experience, who couldn't scrape the data otherwise. What does it offer to programmers? On Oct 26, 7:35 am, Bruno Rocha rochacbr...@gmail.com wrote: The amazing Yahoo Pipes now runs on Google App Engine with Python! This is a great tool to create webcrawlers and create scrappers for webpages http://www.wordloosed.com/running-yahoo-pipes-on-google-app-engine
[web2py] Re: uWSGI examples page updated for web2py
I read the example with great interest, but I don't understand why 3 Web2Py instances, one XML configuration is better than multiple configuration files. I'm not saying it's not better, I just really don't understand it. It would seem that either way, one still has 3 uwsgi instances and 3 web2py instances. Could you please explain why this is useful? On Aug 26, 11:32 pm, Roberto De Ioris robe...@unbit.it wrote: Hi all, we have added a section in our examples wiki page for web2py: http://projects.unbit.it/uwsgi/wiki/Example I hope this can be useful -- Roberto De Iorishttp://unbit.it JID: robe...@jabber.unbit.it
[web2py] Re: AWS Free Tier
GAE is to me a true cloud compute environment - you have 0 control over the hardware, and magic happens to scale your services. This does mean that you are restricted in what you can do - no file writes, only have the option of bigtable for database storage inside GAE, and some other restrictions. AWS is just glorified virtual private hosting. you create a machine image, you have to manage it (software updates, installs etc), but you get to do anything you want with it. on AWS you still have to monitor load on your devices and request additional servers to be started. (they do have tools that begin to automate that process, but it's not fully automated). The freedom does allow you to do pretty much anything you can do with a physical server. is that helpful? cfh On Oct 24, 1:14 am, Luis Díaz diazluis2...@gmail.com wrote: cuales serian los a favor y los contras en comparación a Google app engine? what would be the pros and cons compared to Google App Engine? 2010/10/22 glimmung phil.kil...@gmail.com Hi All, For anyone looking for hosting, Amazon's recent announcement of the AWS Free Tier may be of interest: - http://aws.amazon.com/free/ HTH -- Cheers, PhilK -- Díaz Luis TSU Analisis de Sistemas Universidad de Carabobo http://web2pyfacil.blogspot.com/ Facultad de Odontologíahttp://www.odontologia.uc.edu.ve/index.php?option=com_contentview=ar...
[web2py] Re: AWS Free Tier
The reason I like VPS.net is that I can do everything I want (like amazon and any other vps) but up to a point I can scale it but moving a slider on the screen (and they will move everything to a bigger/ faster instance) and it takes about one minute. On Amazon any operation takes 20-30 minutes to complete. On Oct 25, 8:25 pm, howesc how...@umich.edu wrote: GAE is to me a true cloud compute environment - you have 0 control over the hardware, and magic happens to scale your services. This does mean that you are restricted in what you can do - no file writes, only have the option of bigtable for database storage inside GAE, and some other restrictions. AWS is just glorified virtual private hosting. you create a machine image, you have to manage it (software updates, installs etc), but you get to do anything you want with it. on AWS you still have to monitor load on your devices and request additional servers to be started. (they do have tools that begin to automate that process, but it's not fully automated). The freedom does allow you to do pretty much anything you can do with a physical server. is that helpful? cfh On Oct 24, 1:14 am, Luis Díaz diazluis2...@gmail.com wrote: cuales serian los a favor y los contras en comparación a Google app engine? what would be the pros and cons compared to Google App Engine? 2010/10/22 glimmung phil.kil...@gmail.com Hi All, For anyone looking for hosting, Amazon's recent announcement of the AWS Free Tier may be of interest: - http://aws.amazon.com/free/ HTH -- Cheers, PhilK -- Díaz Luis TSU Analisis de Sistemas Universidad de Carabobo http://web2pyfacil.blogspot.com/ Facultad de Odontologíahttp://www.odontologia.uc.edu.ve/index.php?option=com_contentview=ar...
[web2py] new ticket reporting system
Thanks to Thadeus and Selecta we have a new ticket reporting system in trunk. Tickets are listed grouped by error traceback. So if there are multiple tickets caused by the same problem, you see only one of them with a number indicated how many occurrences. This allows you to easily identify recurrent problems. Please check it out. Massimo
[web2py] celery queue?
Has anyone tried integrating celery with web2py? If not, is there a recommended task queue (beyond the lightweight option mentioned in the Core chapter of the web2py book)?
Re: [web2py] Re: Request for a logo - PluginCentral
I like the white one! Very nice! Nothing wrong with the ship. Does it mean we are a flasg ship product with new ideas?! :D On Tue, 2010-10-26 at 00:46 +0200, Branko Vukelic wrote: It says no more uploads, so I'll attach the first proposal here. In the following days, I will probably do more. On Mon, Oct 25, 2010 at 11:32 PM, Branko Vukelic bg.bra...@gmail.com wrote: On Mon, Oct 25, 2010 at 11:17 PM, Bruno Rocha rochacbr...@gmail.com wrote: Branko, I dont know if people are thinking about a Second round on logo votation http://www.blouweb.com/logovote/default/index?order=id , but even without tha votation, I think it is a good idea for you to propose a new logo. - Logo should have no snakes - Logo should not be childish/fun - Better more letters than images - Should blend with the website color scheme - Should be good on every background or printing If you propose a nice logo, I think it can be considered, even if not for mainsite, but for ther related projects or welcome app. Oh sure. I will do that. Thanks. ;) -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group attachment: face-smile-big.png
Re: [web2py] Unable to open web2py using ip address
I tried it but does not work. What I want to do is simple. I have to open the webapplication from my mobile browser. Thanks, rAm i Think, i Wait, i Fast -- Siddhartha http://sodidi.ramjeeganti.com On Mon, Oct 25, 2010 at 8:05 PM, Branko Vukelic bg.bra...@gmail.com wrote: Have you tried serving off 0.0.0.0 instead of 127.0.0.1? 127.0.0.1 is only visible locally. On Mon, Oct 25, 2010 at 3:32 PM, Ramjee Ganti gant...@gmail.com wrote: Hi, The problem is Works: http://127.0.0.1:8000//welcome/default/index Does not Work on both mobile and Dev machine: http://ipaddress:port//welcome/default/index Works on Dev machine: http://machinename:port//welcome/default/index Does not work on mobile in the same network: http://machinename:port//welcome/default/index I am trying to develop a mobile application using web2py. Now how do I proceed? rAm i Think, i Wait, i Fast -- Siddhartha http://sodidi.ramjeeganti.com -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: Hidden form fields not accepted by form.accept()?
On Oct 25, 7:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: On Oct 25, 1:17 am, Ruiwen Chua rwc...@gmail.com wrote: I see. So form.accept() will not parse any field unless explicitly defined in SQLFORM? (Ok I'm not sure if I should start another thread for this, but a few issues I found with using SQLFORM.. so perhaps I'm still doing something wrong.) a) I have multiple forms (for the same model) on a page, now generated using SQLFORM However, each generated SQLFORM gives identical id attributes in the divs it generates, and that breaks validation http://www.web2py.com/book/default/chapter/07#Multiple-forms-per-page Thanks for the pointer. I just tried the example on that page and got: in the_view.html div id=example form action= enctype=multipart/form-data method=post div id=answer_response__row !-- snip -- /div div id=submit_record__row !-- snip -- /div div class=hidden input name=_formname type=hidden value=form_one / /div /form form action= enctype=multipart/form-data method=post div id=answer_response__row !-- snip -- /div div id=submit_record__row !-- snip -- /div div class=hidden input name=_formname type=hidden value=form_two / /div /form /div and in thecontroller.py f1 = SQLFORM(db.answer, formstyle='divs') f2 = SQLFORM(db.answer, formstyle='divs') if f1.accepts(request.vars, formname='form_one'): response.flash = 'form one accepted' if f2.accepts(request.vars, formname='form_two'): response.flash = 'form two accepted' The issue with duplicate HTML id attributes I'm referring to is such: Note that div id=answer_response__row and div id=submit_record__row both appear twice, once for each form. As far as I know, HTML id attributes shouldn't repeat in the same HTML document. So I'm not too sure if this behaviour is intentional? b) I need these forms to post to a different controller from the one that generated them (via normal post or AJAX) What's the best way to get the receiving controller to recognise the incoming form with the hidden fields, seeing as it was generated in a different controller? If you have the form object: accpets(request.post_vars,None,formname=None) If you do not just use request.vars and do an db io manually. Using a different controller function breaks validation. Unfortunately, I don't have the original form object, since it was generated in another controller, say A, while I'm posting to controller B. I got around this issue by instantiating a new SQLFORM in the receiving controller, then calling form.accepts(...) on it. Seems to work that way. Thanks for the help so far though. On Oct 25, 1:15 pm, mdipierro mdipie...@cs.depaul.edu wrote: Say you have: db.define_table('user',Field('name'),Field('manager',writable=False,default ='no') and a registration form: def register(): form=SQLFORM(db.user) form.accepts(request.vars) If attackers were allowed to do http://.../register?name=memanager=yes they would be able to change the manager status even if it does not appears in the form. Only fields that are declared as writable and visible to SQLFORM can be inserted in the db. web2py has lots of security mechanisms and we are working on even more! Massimo On Oct 25, 12:07 am, Ruiwen Chua rwc...@gmail.com wrote: Thanks for the clarification. Though, in what way is this a security mechanism? On Oct 25, 1:03 pm, mdipierro mdipie...@cs.depaul.edu wrote: I understand. That is intended. That is a security mechanism. You must use SQLFORM(...,hidden=...) On Oct 24, 11:46 pm, Ruiwen Chua rwc...@gmail.com wrote: Yes, the hidden input values do seem to appear in request.post_vars. I call form.accepts(), like so: form.accepts(request.post_vars, formname=None) And even so, only the non-hidden field is saved to the database. On Oct 25, 12:43 pm, mdipierro mdipie...@cs.depaul.edu wrote: The hidden fields will be in request.vars but not in form.vars because accepts does not know they are supposed to be there and protects you from injection attacks. You can also try use this: form=SQLFORM(,hidden=dict(key='value')) Massimo On Oct 24, 11:39 pm, Ruiwen Chua rwc...@gmail.com wrote: Apologies, I wasn't clear. I meant that the form in the view is static HTML and not generated by SQLFORM. However, in the action that receives the POST, I instantiate a new SQLFORM for that model and pass request.post_vars to it. On Oct 25, 12:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: if you use form.accepts() what is form if you do not use
Re: [web2py] Re: uWSGI examples page updated for web2py
I read the example with great interest, but I don't understand why 3 Web2Py instances, one XML configuration is better than multiple configuration files. I'm not saying it's not better, I just really don't understand it. It would seem that either way, one still has 3 uwsgi instances and 3 web2py instances. Could you please explain why this is useful? Imagine a sysadmin of a web2py-only company that has to deploy hundreds of apps. Every time its the same task. Having one config file that inherit common options could be a huge commodity (he add only 2 lines instead of defining a new file). It is matter of taste, for example i prefer to have a file for every app :) -- Roberto De Ioris http://unbit.it
[web2py] hey I like this idea
http://miksovsky.blogs.com/flowstate/2010/10/squeeze-wide-page-content-into-narrow-windows-let-the-content-overlap-the-left-navigation-pane.html
Re: [web2py] Re: auth issue in Firefox 3.6.10+ on Mac
No. This is seconds after logging in. On Tue, Oct 26, 2010 at 12:28 AM, mdipierro mdipie...@cs.depaul.edu wrote: Could it be their session expired? On Oct 25, 1:05 pm, Adi aditya.sa...@gmail.com wrote: Hi all, I've got some users facing this peculiar problem in Radbox. Faced in: Mac OS X 10.6.4, Firefox 3.6.10 and newer Even when they're logged into Radbox, there's this small piece of code which returns -1. if auth.user: return auth.user.id else: return -1 - The worst part is I'm not able to reproduce the problem at my own end, in the same OS and browser version where users are facing this issue. Now auth.user is None when it is expected to be something. The question is, what information can I log or dump to debug this problem? For all we know it could possibly be a Firefox bug, but not being able to debug it is really frustrating.
[web2py] why do we populate the auth_user table?
Hi, I may have missed this, so apologies if a repeat... but would like to know. Why do we have this happen when using the wizard? There must be a good reason, just cant figure it out... from gluon.contrib.populate import populate if not db(db.auth_user).count(): populate(db.auth_user,100) Thanks, Mart :)