Re: [web2py] Re: Web2py execution blocking

2012-06-05 Thread Michele Comitini
@Jan Just a doubt. There are two mutexes when using sqlite - session opening (normal) - db access (only with sqlite) You should see what happens using another db (RDBMS like postgresql, mysql). If that solves the problem, you found a bug. Then post an issue on web2py.googlecode.com mic 2012

[web2py] Re: HTML in context_dict for sending mails

2012-06-05 Thread Sushant Taneja
This does not work. Still facing the same issue. On Monday, June 4, 2012 8:57:34 PM UTC+5:30, Anthony wrote: > > By default, the template engine escapes everything -- to avoid that, do: > > links = XML("user_a") > > See http://web2py.com/books/default/chapter/29/5#XML. > > Anthony > > On Monday, J

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-06-05 Thread Andrew
Hi Paolo, I can leave it for now. Are your changes in trunk yet? Also, I tried updating an existing app with the latest CSS and layout updates (so that I could apply bootstrap / bootswatch). I can't get the drop down menus little "down triangle" to appear. I've updated evrything in the stat

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-06-05 Thread Paolo Caruccio
The CSS rules for the drop down menus little "down triangle" are in bootstrap.min.css itself. Please search this row .navbar .nav .dropdown-toggle .caret,.navbar .nav .open.dropdown .caret{border-top-color:#ff;border-bottom-color:#ff;} and more in general ".caret" class in bootstrap.mi

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-06-05 Thread LightDot
Just a heads up to everybody, Bootstrap 2.0.4 has been released a few days ago.

[web2py] How to get out of a component?

2012-06-05 Thread Johann Spies
I am bit embarrassed by this question but the subject reflects my real problem: I have a screen with a grid in the lower halve (a component) and the grid is filled by data that results from a form in the top halve. This form can be filled in repeatedly. I also make callbacks to the component's co

[web2py] translation from php to python

2012-06-05 Thread Hassan Alnatour
Dear ALL , i need help in translating this php code to python , i dont understand the last line : best regards,

Re: [web2py] translation from php to python

2012-06-05 Thread Jason Brower
Try using this... http://docs.python.org/library/md5.html What that like is doing is making an md5 sum of all those strings together to make a special unique key. Where that is used I have no idea. BR, Jason Brower On 06/05/2012 03:46 PM, Hassan Alnatour wrote: Dear ALL , i need help in tran

Re: [web2py] translation from php to python

2012-06-05 Thread hasan alnator
So do you think this is the same : import md5 key = appid + orderid + ordercurr + orderamt + app_secrect_key msignature = md5.new(key);

Re: [web2py] translation from php to python

2012-06-05 Thread Martin Weissenboeck
. concatanates strings, like + in python. Try: import md5 msignature=md5.new(appid+orderid+ordercurr+orderamt+app_secret_key).hexdigest() Regards, Martin Am 05.06.2012 14:46 schrieb "Hassan Alnatour" : > Dear ALL , > > i need help in translating this php code to python , i dont understand > the

Re: [web2py] translation from php to python

2012-06-05 Thread hasan alnator
Dear Martin , what is the hexdigest() and why did you use it

Re: [web2py] translation from php to python

2012-06-05 Thread Niphlod
we're falling a little bit offtopic, this is more a "how to do that in python" than "how to do that in web2py". if you can read english docs . - http://php.net/manual/en/function.md5.php [image: reject note] Return Values Returns the ha

Re: [web2py] translation from php to python

2012-06-05 Thread hasan alnator
Sure python ! is there another way , am sorry i dont understand php and i dont know what md5 is , am trying to use a payment gateway but all examples are in php , anyone can help me with this two ?? create a page in my website that receives some variables that are fetched in the URL , the* fi

Re: [web2py] Re: best practices for displaying a a subset of a tables columns?

2012-06-05 Thread bob
Thanks Richard, I am coding up the set example, it should do what I need without having to build views. On Monday, June 4, 2012 1:04:14 PM UTC-7, Richard wrote: > > Yes it works, but I think lambda: has_membership is much better approach > as pointed by Anthony as more fast since the lambda

[web2py] Send push notifications to IOS devices?

2012-06-05 Thread bob
I can send an email from within web2py but am wondering if anyone has attempted to send an IOS notification and if so any pointers would be very helpful. What the Apple Push Notification service is: https://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNo

[web2py] Re: How to get out of a component?

2012-06-05 Thread Anthony
If you want to redirect the whole page via an Ajax call, you have to do the redirect on the client side via Javascript: window.location = '/your/url' (Actually, I think you can drop the "window", as it is implied.) So, instead of redirecting on the server, your Ajax call should return a respon

[web2py] Re: HTML in context_dict for sending mails

2012-06-05 Thread Anthony
Here's your original method: >>> links = "user_a" >>> print response.render('invite_friend.html', dict(links=links)) Hello there,
  • user_a
  • As you can see, the HTML tags in links are getting escaped in the call to response.render(), so the HTML

    [web2py] niphlod tvseries error

    2012-06-05 Thread blye
    I am trying ver 2.00 dev The package tv-series by Niphlod brings up this error return UL(*lis, _class='nav') ^ SyntaxError: invalid syntax line 385 /models/helpers.py any ideas? PS will try with latest stable version as well. web2py is great and its community!

    [web2py] Re: Connecting to Firebird

    2012-06-05 Thread pjag
    Massimo, Got it working by running from source - thanks! On Monday, June 4, 2012 4:40:43 PM UTC-4, Massimo Di Pierro wrote: > > Sorry I misunderstood. My guess is that you have different python version. > make sure you run web2py from source and you use the python version where > you installed

    Re: [web2py] niphlod tvseries error

    2012-06-05 Thread Bruno Rocha
    whats the Python version? this is a python issue you can solve with this (if not running 2.7) return UL(*lis, **{"_class": 'nav'}) On Tue, Jun 5, 2012 at 12:05 PM, blye wrote: > return UL(*lis, _class='nav') -- Bruno Rocha [http://rochacbruno.com.br]

    [web2py] Re: translation from php to python

    2012-06-05 Thread anonymouse
    This really isn't the place for discussing PHP shopping carts, we'd love to help you, but I think you need to help yourself a little bit first. Do some PHP tutorials on File IO (that's what "fputs" is about) and basic web stuff (using REQUEST, POST, GET vars, learn about the web environment).

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Jan Rozhon
    I did some more testing and the problem still occures, not so frequently, but it does meaning the single json call didnt solve the issue. Now I am about to give it a try with MySQL, however I doubt it will help, because I put a comment as the first action in the mentioned controller and not even

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Jan Rozhon
    One more thing, I am running a background job as well, can it block the web2py's execution?

    [web2py] Re: Error when inserting SQLCustomType

    2012-06-05 Thread Massimo Di Pierro
    Good catch. This is a minor change of backward compatibility (the '%' was supposed to be in encoder) but we agreed this is an experimental feature and you are suggesting a good improvement compatible with the example in the manual. I implemented it in trunk with some minor changes: if isinstan

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Massimo Di Pierro
    Yes. The background process will lock the db every time you write until you explicitely commit. On Tuesday, 5 June 2012 10:29:00 UTC-5, Jan Rozhon wrote: > > One more thing, I am running a background job as well, can it block the > web2py's execution? >

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Jan Rozhon
    I understand this, but this would cause web2py to hang on the db select in the controller or not to enter the controller at all? I am still confused, that nothing from the controller is run not even the simple print "something" clause. Dne úterý, 5. června 2012 18:03:32 UTC+2 Massimo Di Pierro

    Re: [web2py] niphlod tvseries error

    2012-06-05 Thread Niphlod
    yeah, forgot to mention in the main page that w2p_tvseries won't work with python 2.5 (the scheduler part needs the multiprocessing module) BTW, the function this line is in is not used for the moment, but a one-line fix will avoid the error, so as soon as possible I'll release an update. @all

    [web2py] How to add Row object to Rows

    2012-06-05 Thread Umpei Kurokawa
    Is it possible to insert or append Row objects to Rows?

    [web2py] Re: How to add Row object to Rows

    2012-06-05 Thread Anthony
    I think you can do: myrows.records.append(myrow) Note, I don't think this is part of the documented API, so probably not guaranteed to remain backward compatible (though I doubt it will change). You can also join two Rows objects: newrows = rows1 & rows2 newrows = rows1 | rows2 # this one rem

    [web2py] Re: How to add Row object to Rows

    2012-06-05 Thread Umpei Kurokawa
    Oh k, the joins worked. Thanks. On Tuesday, June 5, 2012 1:22:11 PM UTC-4, Anthony wrote: > > I think you can do: > > myrows.records.append(myrow) > > Note, I don't think this is part of the documented API, so probably not > guaranteed to remain backward compatible (though I doubt it will chang

    Re: [web2py] Re: best practices for displaying a a subset of a tables columns?

    2012-06-05 Thread Richard Vézina
    Yes, to me the set is like the where clause in a select sentence in SQL : db(db.table.field == something).select(db.table.field1, db.table.field2, db.table.field_etc) set select Set : where table.field = something Select : SELECT field1, field2, field_etc

    Re: [web2py] Re: Instant press 2.1.0 holiday edition (?)

    2012-06-05 Thread vince
    i am using 1.99.7 with the similar errors, appsettings.py does exist in modules so is it web2py or instantpress's problem? 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. Traceback (most recent call last): File "/home/web2py/gluon/restricted.py", line 205, in restricted exec ccode in environment File

    Re: [web2py] translation from php to python

    2012-06-05 Thread pbreit
    If you are doing Authorize.net, you might have a look at Web2py's built-in functionality: http://web2py.com/books/default/chapter/29/14#Authorize.Net I think the fputs is just logging and is not strictly necessary. The fopen() would probably be urllib.urlopen() in Python: http://docs.python.org/

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Michele Comitini
    Jan, Yes a subprocess will block when the DAL tries to open the db file; i.e. in the model file before entering executing the controller code. If you use a RDBMS, assigning a dedicated db connection to the process, you will not incur in the problem so frequently. Anyway if the subprocess never

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Jan Rozhon
    Ok, thank you both, I will recheck my code for commits and try tomorrow again and write the conclusion. Jan Dne úterý, 5. června 2012 21:02:44 UTC+2 mcm napsal(a): > > Jan, > > Yes a subprocess will block when the DAL tries to open the db file; > i.e. in the model file before entering executi

    Re: [web2py] Re: what do you think about waitress webserver

    2012-06-05 Thread Michele Comitini
    IIRC Tim is busy with is little (real) baby. I am sure he did not forget rocket... mic 2012/6/5 Massimo Di Pierro : > I still think rocket is the best (speed and design compromise) but I am not > sure Tim is till maintaining it. If rocket is no longer maintained we should > revert to cherrypy. I

    Re: [web2py] Re: Instant press 2.1.0 holiday edition (?)

    2012-06-05 Thread Andrew
    Good news Martin. Great to see it's stil alive.

    [web2py] commit 2799e09d6bb4 broke backward compatibility

    2012-06-05 Thread Niphlod
    Hi, I'm all for supporting international flash messages, but for applications relying on the old web2py.js (or even web2py_ajax.js) the message appear urlencoded. That's because *var flash=**decodeURIComponent(**xhr.getResponseHeader('web2py-component-flash'**)**); *expects an encoded flash

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Niphlod
    are you by any chance on windows ? I'm testing my app on that and for sure something is going on like you described. I have a page full of loaded ajax components that on linux load semi-concurrently while on windows they are fully serialized (i.e. the browser fires ajax "all in one time" and o

    Re: [web2py] Re: what do you think about waitress webserver

    2012-06-05 Thread Massimo Di Pierro
    Good reason to be busy. Anyway, if can assemble a team a people who can reproduce the problem, I can help fix it over IRC chat. Next week. On Tuesday, 5 June 2012 14:10:22 UTC-5, mcm wrote: > > IIRC Tim is busy with is little (real) baby. I am sure he did not > forget rocket... > > mic > > 20

    Re: [web2py] Twitter OAuth lib

    2012-06-05 Thread Michele Comitini
    See here: http://goo.gl/qQpHX mic 2012/6/4 Udi Milo : > can you point me to an example or where can I find the code? > > > On Sunday, June 3, 2012 4:35:57 AM UTC-4, mcm wrote: >> >> Twitter oauth is supported by web2py natively. >> >> mic >> >> Il giorno 03/giu/2012 02:37, "Udi Milo" ha scritto

    Re: [web2py] Re: Instant press 2.1.0 holiday edition (?)

    2012-06-05 Thread Massimo Di Pierro
    +1 On Tuesday, 5 June 2012 14:14:13 UTC-5, Andrew wrote: > > Good news Martin. Great to see it's stil alive.

    [web2py] Re: commit 2799e09d6bb4 broke backward compatibility

    2012-06-05 Thread Massimo Di Pierro
    We cannot do that. Yet I agree that this improvement broke backward compatibility and needs to be reverted until we find a way to deal with intrnationalization of flash and in a backward compatible way. On Tuesday, 5 June 2012 15:02:07 UTC-5, Niphlod wrote: > > Hi, I'm all for supporting inte

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Jan Rozhon
    Nope, purely linux. Dne úterý, 5. června 2012 22:11:08 UTC+2 Niphlod napsal(a): > > are you by any chance on windows ? > > I'm testing my app on that and for sure something is going on like you > described. > > I have a page full of loaded ajax components that on linux load > semi-concurrently w

    [web2py] Re: commit 2799e09d6bb4 broke backward compatibility

    2012-06-05 Thread Niphlod
    The only thing coming to mind is "add" a web2py-component-flash-international header in "new trunk" and check only that in new web2py.js, leaving web2py-component-flash header the way it was before. Il giorno martedì 5 giugno 2012 22:17:36 UTC+2, Massimo Di Pierro ha scritto: > > We cannot do

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Jan Rozhon
    No need to apologize, I welcome all suggestions, moreover this is always good to know. Dne úterý, 5. června 2012 22:25:06 UTC+2 Niphlod napsal(a): > > sorry for that.. just to showcase the behaviour, same app, same db, > same web2py version, same python version, same libraries, only windows

    Re: [web2py] Re: DAL list:integer and postgresql integer array type

    2012-06-05 Thread Michele Comitini
    Wouldn't that make it non portable to other db's? mic 2012/6/5 Bruno Rocha : > Cant we have a custom field for this? > > Field.PostgresIntegerList("name") > > http://zerp.ly/rochacbruno > > Em 02/06/2012 00:26, "Massimo Di Pierro" > escreveu: > >> The search by content should be faster using na

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Michele Comitini
    Just out of curiosity. It is the same kind of hardware? i.e. same number of cores? using a different server? 2012/6/5 Niphlod : > sorry for that.. just to showcase the behaviour, same app, same db, same > web2py version, same python version, same libraries, only windows vs linux > >

    Re: [web2py] Re: DAL list:integer and postgresql integer array type

    2012-06-05 Thread Massimo Di Pierro
    I think list:integer should take advantage of postgres list feature if available. The issue is how to make it backward compatible to current implementation. On Tuesday, 5 June 2012 15:33:37 UTC-5, mcm wrote: > > Wouldn't that make it non portable to other db's? > > mic > > > 2012/6/5 Bruno

    [web2py] Re: Error when inserting SQLCustomType

    2012-06-05 Thread Alexander Shashkevych
    Thank you for updating the code. Since manual did not specified that quotes should be a part of encoder, so I was bit confused with unexpected behavior. =) One remark about your updated code: as I understood from web2py documentation, "native type" is a type that natively supported by database?

    Re: [web2py] Re: Web2py execution blocking

    2012-06-05 Thread Niphlod
    Just tried, two VM's, same no of cores assigned. (BTW multi/mono core and web2py should not change performances, as long as one is using rocket...) Il giorno martedì 5 giugno 2012 22:37:20 UTC+2, mcm ha scritto: > > Just out of curiosity. It is the same kind of hardware? i.e. same > number of co

    [web2py] Re: Forms in multiple windows

    2012-06-05 Thread Jim Karsten
    On Monday, June 4, 2012 4:36:34 PM UTC-4, Anthony wrote: > > Massimo pointed out a flaw in my solution in that it would create an >> ever-growing number of session variables and would be vulnerable to a DoS >> attack. >> > > Maybe by default it could cycle through a small number of formnames (e.g

    [web2py] When using @request.restful(), request arguments is dict() type instead of Storage() type.

    2012-06-05 Thread Rafiq Rahim
    Consider the following example, @request.restful() def api(): def PUT(table, **fields): if not table == 'person': raise HTTP(400) fields.picture = db.person.picture.store(fields.picture.file, filename=fields.picture.filename) #ERROR:dict() object has no attribute picture

    [web2py] Innovation under Austerity

    2012-06-05 Thread Michele Comitini
    F2C2012: Eben Moglen keynote - "Innovation under Austerity" http://youtu.be/G2VHf5vpBy8 A great speech about freedom and the impact of free software on it. Watch and share. mic

    [web2py] Re: Send push notifications to IOS devices?

    2012-06-05 Thread howesc
    i coworker wrote a stand-alone (not web2py) push server for a project - but that's cause we are running our web2py on GAE and you can't create persistent connects to the APNS. i'm not sure how to keep the connection open between requests in a web2py instance. i suspect you'd have to have a lon

    Re: [web2py] Re: Send push notifications to IOS devices?

    2012-06-05 Thread Jonathan Lundell
    On Jun 5, 2012, at 4:06 PM, howesc wrote: > i coworker wrote a stand-alone (not web2py) push server for a project - but > that's cause we are running our web2py on GAE and you can't create persistent > connects to the APNS. > > i'm not sure how to keep the connection open between requests in a w

    Re: [web2py] Re: Send push notifications to IOS devices?

    2012-06-05 Thread Christian Foster Howes
    as long as your list is small urban airship provides a decent service. we were spending too much on them so we wrote our own. :) On 6/5/12 16:11 , Jonathan Lundell wrote: On Jun 5, 2012, at 4:06 PM, howesc wrote: i coworker wrote a stand-alone (not web2py) push server for a project - but that

    [web2py] Re: Error when inserting SQLCustomType

    2012-06-05 Thread Massimo Di Pierro
    You are right. I corrected as you originally suggested. On Tuesday, 5 June 2012 15:54:17 UTC-5, Alexander Shashkevych wrote: > > Thank you for updating the code. Since manual did not specified that > quotes should be a part of encoder, so I was bit confused with unexpected > behavior. =) > > One

    [web2py] Re: Innovation under Austerity

    2012-06-05 Thread Massimo Di Pierro
    I agree with the first commenter "this is not only one of the best speeches I have ever heard, but also one of the most important". What he says if very relevant to who we are and what we do on this mailing list. Massimo On Tuesday, 5 June 2012 18:02:25 UTC-5, mcm wrote: > > F2C2012: Eben Mogl

    [web2py] Re: Anyone using BootSwatch with new web2py layout

    2012-06-05 Thread Andrew
    And here, in layout.html where it gets the class. jQuery(function(){ jQuery('.nav>li>a').each(function(){ if(jQuery(this).parent().find('ul').length) jQuery(this).attr({'class':'dropdown-toggle','data-toggle':'dropdown'}).append(''

    [web2py] Re: access an uploaded but not stored file?

    2012-06-05 Thread Charles Tang
    Thanks for the quick reply. I am trying the temporary file in the $TMPDIR instead. On Tuesday, June 5, 2012 1:26:55 PM UTC+8, Massimo Di Pierro wrote: > > In gluon main there is this code: > > request.body = copystream_progress(request) ### stores request body > > if (request.body a

    [web2py] how to groupby date on a datetime field?

    2012-06-05 Thread weheh
    I have db.define_table('mytable', ..., Field('notified', 'datetime') ...) I want to count the number of notifications that have been sent out on any given day using a 1 day resolution, but I can't make "notified" a date because I need 1 second resolution as to when the notification was sent for

    [web2py] Typo bug in DAL

    2012-06-05 Thread pbreit
    Traceback (most recent call last): File "web2py.py", line 16, in import gluon.widget File "/Users/pbreit/web2py/gluon/__init__.py", line 19, in from dal import DAL, Field File "/Users/pbreit/web2py/gluon/dal.py", line 4130 rows = [[(t=='id' and item.key().id_or_name()) or \

    Re: [web2py] Re: How to get out of a component?

    2012-06-05 Thread Johann Spies
    On 5 June 2012 16:07, Anthony wrote: > If you want to redirect the whole page via an Ajax call, you have to do > the redirect on the client side via Javascript: > > window.location = '/your/url' > > (Actually, I think you can drop the "window", as it is implied.) > > So, instead of redirecting on