Re: [web2py] Re: IS_IN_DB orderby natural sort?

2013-05-13 Thread Johann Spies
In such cases I would use Type01, Type02 in stead of Type1, Type2 Regards Johann On 13 May 2013 02:07, rppowell wrote: > Here is example code to show what I am doing. > > The following is in model/db.py: > > db.define_table('item_type', > Field('name'), > Field('description'), > fo

[web2py] Re: IS_IN_DB orderby natural sort?

2013-05-13 Thread Calvin
How about doing your own widget: import re def natural_key(string_): return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_)] items = db(db.item_type.id > 0).select() sorted_items= items.sort(key=natural_key(items.name)) db.item.item_type.widget = lambda f, v: SELECT([OPTION(

Re: [web2py] SQLFORM.RID Selectable

2013-05-13 Thread Johann Spies
On 11 May 2013 09:34, Pawan Jha wrote: > > > > def clubCall(ids): > # in this function i want to get all the Checked value of grid > return "Working " > > > You have them there: a list of id's. Do something with it :) Regards Johann -- Because experiencing your loyal love is better t

[web2py] Jquery Model Pop up

2013-05-13 Thread Pawan Jha
Hi all How to open a model pop up in Web2py . please provide me the code because i am using a fancy box but it is not working . -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails

Re: [web2py] Jquery Model Pop up

2013-05-13 Thread Johann Spies
Web2py is using Bootstrap. Look at the tutorial at http://www.w3resource.com/twitter-bootstrap/modals-tutorial.php Regards Johann On 13 May 2013 10:31, Pawan Jha wrote: > Hi all > > >How to open a model pop up in Web2py . please provide me the code > because i am using a fancy box but it i

Re: [web2py] Re: (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-13 Thread Michele Comitini
Hi José, Please open an issue about this on https://code.google.com/p/web2py/ tnx mic 2013/5/10 Jose > > > El jueves, 9 de mayo de 2013 19:52:47 UTC-3, Jose escribió: > >> Hello, >> >> The normal behavior is: The user presses the Test button, then > id="sql"> show "ABCD". (The code is shown b

[web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Thomas Wimmer
Instead of buttons or links, the row itself should be the link. The link area contains all fields. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py

Re: [web2py] Jquery Model Pop up

2013-05-13 Thread Pawan Jha
Thanks a lot johann .. On 5/13/13, Johann Spies wrote: > Web2py is using Bootstrap. Look at the tutorial at > http://www.w3resource.com/twitter-bootstrap/modals-tutorial.php > > Regards > Johann > > > On 13 May 2013 10:31, Pawan Jha wrote: > >> Hi all >> >> >>How to open a model pop up in We

[web2py] CMS functionality

2013-05-13 Thread leon
Hello, I use DITA Open Toolkit for generating xhtml content (short HOWTO documents). I wonder if it would be possible to use web2py to create CMS which main functionality would be to* list and browse through* the xhtml content (static content). Furthermore, it would be desirable to perform sear

Re: [web2py] Jquery Model Pop up

2013-05-13 Thread Pawan Jha
is it possible to use pop up inside the SQLFORM.GRID On 5/13/13, Pawan Jha wrote: > Thanks a lot johann .. > > On 5/13/13, Johann Spies wrote: >> Web2py is using Bootstrap. Look at the tutorial at >> http://www.w3resource.com/twitter-bootstrap/modals-tutorial.php >> >> Regards >> Johann >> >> >>

[web2py] Howto web2py on Amazon EC2

2013-05-13 Thread António Ramos
hello, i want to test amazon ec2 with my web2py apps. Is there some tricks and tips about amazon ec2? Thank you António -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, sen

[web2py] show pop up dialog FROM CONTROLLER

2013-05-13 Thread Pawan Jha
Is any way to show pop up dialog by controller function .. Please provide me .. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@google

[web2py] Re: Want to add Confirmation on link in sqlform.grid

2013-05-13 Thread Massimo Di Pierro
links = [lambda row: A('Club call',_onclick="if(confirm('Do you want to club this call')) document.location='%s'; return false;' % URL("","Incident",args=[row.id])] On Monday, 13 May 2013 00:56:27 UTC-5, Pawan Jha wrote: > > Hi all > > I am using this in SQLFORM.grid > > here is confirm messag

Re: [web2py] Jquery Model Pop up

2013-05-13 Thread Massimo Di Pierro
yes. I will post an example. On Monday, 13 May 2013 04:54:05 UTC-5, Pawan Jha wrote: > > is it possible to use pop up inside the SQLFORM.GRID > > On 5/13/13, Pawan Jha > wrote: > > Thanks a lot johann .. > > > > On 5/13/13, Johann Spies > wrote: > >> Web2py is using Bootstrap. Look at the tut

[web2py] Re: Howto web2py on Amazon EC2

2013-05-13 Thread Massimo Di Pierro
Not really.It runs there as any other VM. On Monday, 13 May 2013 06:00:49 UTC-5, Ramos wrote: > > hello, i want to test amazon ec2 with my web2py apps. > > Is there some tricks and tips about amazon ec2? > > Thank you > António > -- --- You received this message because you are subscribed to t

Re: [web2py] Re: Want to add Confirmation on link in sqlform.grid

2013-05-13 Thread Pawan Jha
not working frnd i have done changes as per you are given me its not working On Mon, May 13, 2013 at 5:18 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > links = [lambda row: A('Club call',_onclick="if(confirm('Do you want to > club this call')) document.location='%s'; return false;

Re: [web2py] Jquery Model Pop up

2013-05-13 Thread Pawan Jha
#query = (db.call_log.id > 0) & (db.call_log.incident_Id != 0) query = (db.call_log.id > 0) #& (db.call_log.incident_Id !="") field = [db.call_log.call_lat,db.call_log.call_lng,db.call_log.call_status ,db.call_log.call_vip_prank_flag,db.call_log.incident_house_no,db.call_log.incident_stre

Re: [web2py] Re: (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-13 Thread Jose
El lunes, 13 de mayo de 2013 06:13:38 UTC-3, Michele Comitini escribió: > > Hi José, > > Please open an issue about this on https://code.google.com/p/web2py/ > tnx > mic > > Hi Michele This is a problem of web2py or documentation [1] or deployment? ajax(url, [name1, name2, ...], target) Url i

Re: [web2py] Re: (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-13 Thread Michele Comitini
the url argument of the ajax function is a uri. If one uses partial form, then following rules apply: http://www.w3.org/Addressing/URL/4_3_Partial.html The complete URI is generated by the browser own logic before doing any call to web2py. mic 2013/5/13 Jose > > > El lunes, 13 de mayo de 2

Re: [web2py] Re: (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-13 Thread Niphlod
url needs to be a valid url. Documentation is ok, but if you "hardcode" fixed values you need to be sure that the routes are always exactly as in your development server. If you're not messing with default applications and/or redirection, the same code that ran on lighttpd needs to run on nginx

Re: [web2py] Re: Smartgrid layout question

2013-05-13 Thread Ovidio Marinho
I know this discursão here for large dogs, but speaking station where I want to move. I have a field to upload and would not want him to show me to my table a default name "file", does anyone know how to replace this with an icon? thanks! Ovidio Marinho Falcao Neto We

Re: [web2py] Re: Smartgrid layout question

2013-05-13 Thread Ovidio Marinho
Know to discussion here is for large dogs, but speaking station where I want to move. I have a field to upload and would not want him to show me to my table a default name "file", does anyone know how to replace this with an icon? Ovidio Marinho Falcao Neto Web Develop

Re: [web2py] Re: (1/2 OT) Bug in production? [nginx + uwsgi]

2013-05-13 Thread Jose
El lunes, 13 de mayo de 2013 09:42:34 UTC-3, Niphlod escribió: > > url needs to be a valid url. > Documentation is ok, but if you "hardcode" fixed values you need to be > sure that the routes are always exactly as in your development server. > > If you're not messing with default applications a

Re: [web2py] Re: Howto web2py on Amazon EC2

2013-05-13 Thread António Ramos
Its running locally in a ubuntu machine in amazon ec2 python web2py -p 8001 -a 123 remotely using putty to tunnel i get the error http://127.0.0.1:8001 Not Found -- HTTP Error 404. The requested resource is not found. 2013/5/13 Massimo Di Pierro > Not really.It r

Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
2013/5/12 Ovidio Marinho > How to replace icons link inside the sqlform.grid??? > > > > Ovidio Marinho Falcao Neto > Web Developer > ovidio...@gmail.com >83 8826 9088 - Oi >83 9336 3782 - Claro > Br

Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
If you like change the icons I recomend rewrite the links with the links parameter of the grid, something like: links = [lambda row: A(TAG[''](SPAN(_class="icon icon-list"),SPAN('List', _class="buttontext button", _title="list")), _class="w2p_trap button btn", _href=URL('see_list', args=[row.id]))

[web2py] python diary

2013-05-13 Thread António Ramos
http://www.pythondiary.com/reviews/web2pyV2.0.html -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, v

[web2py] Re: extra_fields not created

2013-05-13 Thread Robin Manoli
Ah ok, I had put it right after. Den söndagen den 12:e maj 2013 kl. 16:32:06 UTC+2 skrev Niphlod: > > where did you put this snippet ? make sure it's before > > auth.define_tables() > > On Sunday, May 12, 2013 4:05:27 PM UTC+2, Robin Manoli wrote: >> >> I was trying on a pretty much empty copy of

[web2py] Re: IS_IN_DB orderby natural sort?

2013-05-13 Thread rppowell
Thank you Calvin; I had to do the following changes, changing 'items.sort(...)' to 'sorted(items,...)', but the drop down displays the item_typess in natural sort order: import re def natural_key(string_): return [int(s) if s.isdigit() else s for s in re.split(r'(\d+)', string_)] db.define_t

Re: [web2py] Need help : Errors when running web2py app using uWSGI on Webfaction

2013-05-13 Thread Roberto De Ioris
> Hi, > > I'm trying to setup web2py to use uWSGI using the instructions from > https://groups.google.com/d/msg/web2py/DOKMzOsppFk/91BZtU2cCQkJ > > The only difference being - I used "pip install uwsgi" rather than compile > it, as mentioned in the above link. > uWSGI version that got installed is

[web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Mandar Vaze
On Monday, May 13, 2013 2:52:20 PM UTC+5:30, Thomas Wimmer wrote: > > Instead of buttons or links, the row itself should be the link. > > The link area contains all fields. > Yes, this will be useful. We also need this functionality -Mandar -- --- You received this message because you are s

[web2py] Re: CMS functionality

2013-05-13 Thread Derek
I don't see a question here. If you are asking if it would be possible, then yes. You wouldn't want to put your content in 'static' unless you want to bypass the web2py authentication and access control for it. On Monday, May 13, 2013 2:40:34 AM UTC-7, leon wrote: > > Hello, > I use DITA Open T

SOLVED : Re: [web2py] Need help : Errors when running web2py app using uWSGI on Webfaction

2013-05-13 Thread Mandar Vaze
> You get memory errors, just remove limits (64 MB address space are not > enough for sure). As I mentioned later in my question - removing --limit-as 64 did not help either. If anything - it may have made things worse - I got SegFault (See my original post) Anyway, it seems like as you m

Re: SOLVED : Re: [web2py] Need help : Errors when running web2py app using uWSGI on Webfaction

2013-05-13 Thread Roberto De Ioris
> > >> You get memory errors, just remove limits (64 MB address space are not >> enough for sure). > > > As I mentioned later in my question - removing --limit-as 64 did not help > either. > If anything - it may have made things worse - I got SegFault (See my > original post) You said you reduc

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Richard Vézina
You will need a little touch of jquery I gues... Something like this : $('#myTable tr').click(function() { var url = "{{=URL(f='YOURCONTROLLERFUNC', args=$(this).(':first').val()}}"* // If the first column of your table containt the id of your record* window.location.assign(url) }); C

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Anthony
Yes, and keep in mind that that kind of solution breaks some of the browser functionality (e.g., ability to right-click and open in new tab). Anthony On Monday, May 13, 2013 1:56:19 PM UTC-4, Richard wrote: > > You will need a little touch of jquery I gues... > > Something like this : > > > $('

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Thomas Wimmer
i found a similar jquery script here: http://www.electrictoolbox.com/jquey-make-entire-table-row-clickable/ but i dont use jquery in my app und would prefer another way... Am Montag, 13. Mai 2013 19:56:19 UTC+2 schrieb Richard: > > You will need a little touch of jquery I gues... > > Something li

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Richard Vézina
Hmm... Maybe you could just move the button to the left?? buttons_placement = 'right', links_placement = 'right' These are SQLFORM.grid() switch... Richard On Mon, May 13, 2013 at 2:18 PM, Thomas Wimmer wrote: > i found a similar jquery script here: > http://www.electrictoolbox.com/jquey-m

[web2py] Re: Howto web2py on Amazon EC2

2013-05-13 Thread samuel bonilla
web2py in amazon ec2 is a good opcion. my app (www.foxter.co) run in a amazon instance with mysql El lunes, 13 de mayo de 2013 06:00:49 UTC-5, Ramos escribió: > > hello, i want to test amazon ec2 with my web2py apps. > > Is there some tricks and tips about amazon ec2? > > Thank you > António

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Thomas Wimmer
until i find the solution, this is my workaround: i create a link with the first columns title and then i copy that link to first col, origin content is deleted: for i in range(1,len(grid.elements('tr'))): # all grid.elements('tr')[i][0] = TD(grid.elements('tr')[i][6][0]) # copy 6.1 to 1. colum

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Anthony
I'm not quite sure what you're doing here or how that makes the row a link, but as a side note, in Python you can (and should) do: for row in grid.elements('tr'): row[0] = TD(row[6][0]) row[6][0] = '' Not only is the code simpler, but it calls grid.elements('tr') only once instead of n+1 ti

[web2py] anyserver.py gevent to socket.io/sockjs

2013-05-13 Thread HittingSmoke
I know chat has been beaten to death around here but IMO there hasn't been any quality implementations or answers yet. There are dozens of blogs and posts about it, most of which are solutions that no longer work or are ridiculously overcomplicated solutions with duplicated code between python

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Thomas Wimmer
Thank you Anthony! i allready thought about that, but it is meant as workaround... you missed one small detail: for row in grid.elements('tr')[1:]: row[0] = TD(row[6][0]) row[6][0] = ''" the table header is not changed ;-) Can you help me in making a entire grid row to a link? Am Montag, 13.

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Niphlod
I may be missing something but without javascript there's no way to turn a TR into a "clickable something". jQuery or not, it's easier to handle a click on a tr and make it working as a uber-button with javascript (at most 5 lines of code with a framework like jquery) than turning all the marku

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Thomas Wimmer
I wrote, not to use jquery, not js at all! The reason for my thread here was: what is the web2py way of getting this row-link. Am Montag, 13. Mai 2013 22:56:48 UTC+2 schrieb Niphlod: > > I may be missing something but without javascript there's no way to turn a > TR into a "clickable something"

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Anthony
> > Thank you Anthony! i allready thought about that, but it is meant as workaround... > Perhaps I'm missing something -- what exactly is it that you "thought about"? > Can you help me in making a entire grid row to a link? > As a couple others have mentioned, I think the only option is to

Re: [web2py] anyserver.py gevent to socket.io/sockjs

2013-05-13 Thread Ricardo Pedroso
On Mon, May 13, 2013 at 9:18 PM, HittingSmoke wrote: > I know chat has been beaten to death around here but IMO there hasn't been > any quality implementations or answers yet. There are dozens of blogs and > posts about it, most of which are solutions that no longer work or are > ridiculously over

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Thomas Wimmer
The detail was: "[1:]" for the range starting at 1. I thought about, how my code is performing, cause of the repeating lib calls. You cleared that perfectly! ;-) I wonder, that no one except Mandar Vaze is interrested in this feature, as i missed it some times! Or maybe everybody could solve th

[web2py] Re: python diary

2013-05-13 Thread samuel bonilla
+1 how about web3py ??? El lunes, 13 de mayo de 2013 09:54:05 UTC-5, Ramos escribió: > > http://www.pythondiary.com/reviews/web2pyV2.0.html > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop rece

[web2py] Specify python version for web2py

2013-05-13 Thread HittingSmoke
I thought this would be simple but I can't seem to find the answer. I run web2py on Webfaction via uWSGI and a shared Nginx instance. Web2py runs on the default 2.6.6 python install which I have no control over. I would like it to run on python 2.7 where I install my modules. I'm having issues

Re: [web2py] anyserver.py gevent to socket.io/sockjs

2013-05-13 Thread HittingSmoke
I glanced at it but I didn't give it much thought because it's not websocket based so it's not truly real-time chat. My aim here is to get a truly web-based replacement for the much aged and horrible embedded IRC clients. I hope to expand on that with a full notification system build around the

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Anthony
> > The reason for my thread here was: what is the web2py way of getting this > row-link. > The web2py way is the same way you would do it in any framework -- use Javascript or use some structure other than an HTML table. Anthony -- --- You received this message because you are subscribed

[web2py] Re: CMS functionality

2013-05-13 Thread dhmorgan
by "static," it's not necessary that it be a treated as a typical static file--served up directly and without regard for access permissions; the xhtml content can be file- or db-based, with access being permission-based regardless to the poster's original question, I'd like to see such an imple

[web2py] Binding SQLFORM grid By query string value giving error

2013-05-13 Thread Pawan Jha
Hi all Please let me know why this is giving error as i need to query the table as the value comes with the query string field = [db.call_log.call_datetime_from,db.call_log.incident_street_no,db.call_log.incident_house_no] page = request.args(0) query = db.call_log.incident_Id =

[web2py] What is the problem with this code is not running its givning error 'Query' object has no attribute

2013-05-13 Thread Pawan Jha
*What is the problem with this code is not running its givning error **'Query' object has no attribute '_tablename'* def opencall(): from gluon.tools import Crud from datetime import datetime from time import strftime #page = request.args(0) query = db.call_log.

Re: [web2py] Re: SQLFORM.grid how to link a entire row?

2013-05-13 Thread Mandar Vaze / मंदार वझे
> I wonder, that no one except Mandar Vaze is interrested in this feature, > as i missed it some times! > Or maybe everybody could solve that himself?! > Actually, even I "Voted" for this feature, since I will also need this "feature", and happen to see your email (Coincidence ?) But if I had not