Re: [web2py] Re: import_from_csv_file looses reference, if it references the record it belongs to

2010-09-26 Thread Thadeus Burgess
Write a custom csv importer. use the code in gluon as an example for parsing. During the initial import, set the reference to None. While importing, keep a dictionary in memory that can hold all needed references to a record. After import, commit, and then go through your dictionary fixing all of

[web2py] Re: import_from_csv_file looses reference, if it references the record it belongs to

2010-09-26 Thread mdipierro
This is a good idea. This could also be used to fix 'list:reference' On Sep 26, 1:26 am, Thadeus Burgess thade...@thadeusb.com wrote: Write a custom csv importer. use the code in gluon as an example for parsing. During the initial import, set the reference to None. While importing, keep a

[web2py] Re: compute=lambda function

2010-09-26 Thread annet
Thanks for your reply. I tried: def mycompute(r):     print 'In mycompute(r), r = ' + r     return str(r['selector']) + ' ' + str(r['property']) db.define_table('css_selectorproperty',     Field('selector',length=48,default='',notnull=True),    

[web2py] sqlite running really slow

2010-09-26 Thread weheh
I'm running sqlite. I have a query with 5 left clauses and 3 orderby fields that is running slow. This is the first time I'm running into a db speed issue. Any thoughts about how to speed up?

[web2py] Re: incorrect link path in GAE devserver terminal output

2010-09-26 Thread Jurgis Pralgauskis
not sure if this is web2py or gae dev_appserver 1.3.6, but I see this in terminal where I started dev_appserver after each request. On Sep 26, 2:41 am, mdipierro mdipie...@cs.depaul.edu wrote: where? that is what it is in web2py. On Sep 25, 2:22 pm, Jurgis Pralgauskis

[web2py] Re: sqlite running really slow [Closed]

2010-09-26 Thread weheh
Found the problem in the left clause. On Sep 26, 3:45 am, weheh richard_gor...@verizon.net wrote: I'm running sqlite. I have a query with 5 left clauses and 3 orderby fields that is running slow. This is the first time I'm running into a db speed issue. Any thoughts about how to speed up?

[web2py] What does this mean?

2010-09-26 Thread weheh
File C:\web2py\gluon\sql.py, line 1501, in __allocate raise RuntimeError, Using a recursive select but encountered a broken reference RuntimeError: Using a recursive select but encountered a broken reference I encountered this problem trying to do a select and display in the browser,

Re: [web2py] Re: Problem with rss feed from wiki application in book

2010-09-26 Thread Tom Atkins
Thanks for the replies. I worked out what the problem is. The code in the book is incorrect. The line: link = URL('show', args=row.id) does not produce a full URL. The RSS service does not like this and fails. If I replace it with: link = http://127.0.0.1:8000; + URL('show', args=row.id)

[web2py] still need some help with how to redirect after register

2010-09-26 Thread david.waldrop
I have an application that enables users to invite others by capturing their email address and sending an email invite. The invite includes a link to a specific 'community'. When the user clicks the link they are taken to the application. If they are already registered (which is not the case on

[web2py] how can control auth expiration when put session in to memcache

2010-09-26 Thread hywang
I set auth.settings.expiration=3600*24*7 everything is ok when I put session into disk But , when I put session to memcached, it expired after several minutes. How can I solve this ? thank you .

[web2py] adding spaces between span in plugin_wiki_tag cloud.

2010-09-26 Thread b vivek
Hi , I am using the plugin_wiki to generate a tag cloud . The cloud actions return looks something like this:- return DIV(_class='plugin_wiki_tag_cloud',*[SPAN(A(tag.name ,_href=URL(r=request,c='default',f='taglist',args=('tag',tag.id))),_style='font-size:%sem' %

[web2py] Re: Problem with rss feed from wiki application in book

2010-09-26 Thread Martin.Mulone
better way: link = 'http://' + str(request.env.http_host) + URL('show', args=row.id) On 26 sep, 06:30, Tom Atkins minkto...@gmail.com wrote: Thanks for the replies. I worked out what the problem is.  The code in the book is incorrect.  The line: link = URL('show', args=row.id) does not

[web2py] Re: adding spaces between span in plugin_wiki_tag cloud.

2010-09-26 Thread b vivek
Solved without it.. thanks! On Sun, Sep 26, 2010 at 4:26 PM, b vivek bvivek1...@gmail.com wrote: Hi , I am using the plugin_wiki to generate a tag cloud . The cloud actions return looks something like this:- return DIV(_class='plugin_wiki_tag_cloud',*[SPAN(A(tag.name

[web2py] using appstats: can't understand where .RunQuery occurs

2010-09-26 Thread Jurgis Pralgauskis
Hello, 1) let's say, I want to know, where tese 72 ms are spent. but the last path line shows to the nonexisting line default.py:topic_examples:1659 module() as default.py has only 1658 lines. how could I understand what it means? @459ms datastore_v3.RunQuery real=72ms api=0ms Request:

[web2py] Re: tables/selects caching in Storage (for GAE)

2010-09-26 Thread Jurgis Pralgauskis
GAE caching recipies -- would be a nice thing to have :) main ideas are batch'ing and cach'ing :) I found proposal to do batch gets at minute 33:30 http://www.youtube.com/watch?v=bvp7CuBWVgA one more recipy I stumbled upon

[web2py] Re: What does this mean?

2010-09-26 Thread mdipierro
somehow you are doing something like this a=db.mytable.insert(myfield='xxx') del db.mytable[a] print a.xxx ### your error The problem should only exist if the three statements happen in the same process because of transactions. On Sep 26, 3:38 am, weheh richard_gor...@verizon.net wrote:  

[web2py] Re: still need some help with how to redirect after register

2010-09-26 Thread mdipierro
store the url is session.next and after login if session.next redirect there and clear the variable. On Sep 26, 4:48 am, david.waldrop david.wald...@gmail.com wrote: I have an application that enables users to invite others by capturing their email address and sending an email invite.  The

[web2py] Re: how can control auth expiration when put session in to memcache

2010-09-26 Thread mdipierro
I do not know if there is a way to control expiration. Even if you could, cache expiration is never reliable. On Sep 26, 5:12 am, hywang why00...@163.com wrote: I set auth.settings.expiration=3600*24*7 everything is ok when I put session into disk But , when I put session to memcached, it

[web2py] website with hierarchical pages, what's the best approach ?

2010-09-26 Thread Stef Mientki
hello, I'm thinking of using web2py for a site that will be used for internet therapy. The main content will be a hierachical set of pages, something like this chapters paragraphs sub paragraphs Most of the pages contain plain text, and further a next and previous button. Some

[web2py] Re: Store and retrieve blob

2010-09-26 Thread winti
I found the solution: http://groups.google.com/group/web2py/browse_thread/thread/451b3a8614aaf76c/bf16c51375dc1e72?lnk=gstq=manual+upload#bf16c51375dc1e72 I am able to up/download files retrieved with the suds library. if i insert like:

[web2py] using web2py for Intranet application + windows auth

2010-09-26 Thread Mac
Whether we can use windows authentication in web2py application? For an intranet application, need to retrieve windows user name in the controller. Any suggestion will be very helpful. Thanks, Mac

[web2py] Re: using web2py for Intranet application + windows auth

2010-09-26 Thread mr.freeze
You can use LDAP auth in web2py. I would look in the pdf book on page 363. On Sep 26, 12:07 pm, Mac c.mahapra...@gmail.com wrote: Whether we can use windows authentication in web2py application? For an intranet application, need to retrieve windows user name in the controller. Any

[web2py] Re: What does this mean?

2010-09-26 Thread weheh
Massimo, as I said, there are 2 processes. The background process is a queueing engine. The queue is doing stuff like you describe: creating and deleting records and writing out to a log file. However, the queue is running just fine and doesn't have the print a.xxx statement that you flag as the

[web2py] Re: new version of plugin_wiki is out!

2010-09-26 Thread mart
Ok, sounds good. Thanks for the clarification :) One question, what does happen behind the scene when upgrading web2py to the next version and would it be worth it to add a feature to revert an upgrade? maybe by copying the core web2py fileset (and anything else it updates) to a temp dir,

[web2py] Pycon 2011

2010-09-26 Thread Massimo Di Pierro
Dear members of the the web2py mailing list. The call for proposals for talks and tutorials at PyCon 2011 is out http://us.pycon.org/2011/home/ I strongly encourage you to apply. It is a good conference and organized by smart people. Facts you may or may not know: I have personally

[web2py] Re: website with hierarchical pages, what's the best approach ?

2010-09-26 Thread stefaan
It's not entirely clear what you are after... I would think in the direction of a wiki? Or alternatively you probably could generate HTML from some markup language like reStructured text.

Re: [web2py] Re: import_from_csv_file looses reference, if it references the record it belongs to

2010-09-26 Thread Thadeus Burgess
A little something like this I use a much more complex version of this for migration. open csv records = dict() for line in csv: parse if new table if yes continue parse table field names if yes continue if tablename == 'asdf': asdf = line but [delete id, set reference records

[web2py] use of stdin and stdout within an web2py applicaton

2010-09-26 Thread mart
Hi, I am embedding an an application within web2py, which is all working great, except that when I pass commands to it, It wants to redirect a form through stdout (can go to a text editor or a terminal), then I edit the form and save (which gets back to the app on save). Has anybody done this

[web2py] plugin_wiki using jqgrid widget: bottom of grid (controls) is cut off - easy to fix?

2010-09-26 Thread mart
hi, How do we fix the grid's container size so that it doesn't get cut off? Thanks, Mart :)

[web2py] small bug (typo really) in plugin_wiki

2010-09-26 Thread mart
there is a typo in models/plugin_wiki.py when using widget_builder to configure a search widget, I get this error: models/plugin_wiki.py, line 228, in search fields=['%s.%s' % (table,f.spritp()) for f in fields.split(',')] AttributeError: 'str' object has no attribute 'spritp' so easy enough,

[web2py] Updating user account while user is still logged in

2010-09-26 Thread Tyler Laing
I ran into an interesting issue in testing my site ( http://www.novelite.ca ). If the user buys tokens while logged in, via paypal, paypal then sends a notification to the server via IPN. Processing this adds the tokens to the user's account. My problem is that the auth.user object isn't updated

[web2py] Re: use of stdin and stdout within an web2py applicaton

2010-09-26 Thread mdipierro
I know there is a firefox plugin that lets you edit textarea with your favorite editor. I do not recall its name. On Sep 26, 2:16 pm, mart msenecal...@gmail.com wrote: Hi, I am embedding an an application within web2py, which is all working great, except that when I pass commands to it, It

[web2py] Re: plugin_wiki using jqgrid widget: bottom of grid (controls) is cut off - easy to fix?

2010-09-26 Thread mdipierro
I'd like to know that too. ;-) On Sep 26, 2:45 pm, mart msenecal...@gmail.com wrote: hi, How do we fix the grid's container size so that it doesn't get cut off? Thanks, Mart :)

[web2py] Re: small bug (typo really) in plugin_wiki

2010-09-26 Thread mdipierro
oops.fixed in trunk now. On Sep 26, 2:48 pm, mart msenecal...@gmail.com wrote: there is a typo in models/plugin_wiki.py when using widget_builder to configure a search widget, I get this error: models/plugin_wiki.py, line 228, in search fields=['%s.%s' % (table,f.spritp()) for f in

[web2py] Re: Updating user account while user is still logged in

2010-09-26 Thread mdipierro
I assume you do db().update(field=value) similarly you can do auth.user.update(field=value) On Sep 26, 3:44 pm, Tyler Laing trinio...@gmail.com wrote: I ran into an interesting issue in testing my site (http://www.novelite.ca ). If the user buys tokens while logged in, via paypal, paypal

[web2py] Re: plugin_wiki using jqgrid widget: bottom of grid (controls) is cut off - easy to fix?

2010-09-26 Thread mart
LOL:) what version are we using? are we on 3.8? On Sep 26, 5:07 pm, mdipierro mdipie...@cs.depaul.edu wrote: I'd like to know that too. ;-) On Sep 26, 2:45 pm, mart msenecal...@gmail.com wrote: hi, How do we fix the grid's container size so that it doesn't get cut off? Thanks,

[web2py] web2py book as model for documentation

2010-09-26 Thread mart
Hi, Trying to use the web2py book (the application) as a model (because the layout is great and has that I'm the editor feature :) So, no sure what I am doing wrong... everytime I update the text, it section's content disapears... but the heading in the side bar remains ... If I remove the

[web2py] Re: plugin_wiki using jqgrid widget: bottom of grid (controls) is cut off - easy to fix?

2010-09-26 Thread mart
there is an undefined var in /plugin_wiki.py, line 144 the var 'error' is undefined causing an exception. @auth.requires_login() def jqgrid(): jqgrid callback retrieves records

[web2py] Re: web2py book as model for documentation

2010-09-26 Thread mart
itneresting... when you check a section's history, the db will point to the section above it, which is why we get linked to the following section instead of viewing the the edited section... On Sep 26, 6:00 pm, mart msenecal...@gmail.com wrote: Hi, Trying to use the web2py book (the

[web2py] Re: use of stdin and stdout within an web2py applicaton

2010-09-26 Thread Oleg
https://addons.mozilla.org/en-US/firefox/addon/4125/ On Sep 26, 11:06 pm, mdipierro mdipie...@cs.depaul.edu wrote: I know there is a firefox plugin that lets you edit textarea with your favorite editor. I do not recall its name. On Sep 26, 2:16 pm, mart msenecal...@gmail.com wrote: Hi,

[web2py] Code for multilingual string options Widget without the aggravating when a default is specified

2010-09-26 Thread Magnitus
Meant to do this for a while as it was irritating me (both the lack of multilingual support and the option when a default is specified). Pretty much a copy-paste from sqlhtml.OptionsWidget.widget method with 2 improvements (as per the title): 1) The options get translated using the facility

[web2py] Re: Updating user account while user is still logged in

2010-09-26 Thread Tyler Laing
Well, no, the user row gets updated in a separate context. Paypal has a service called IPN, which is Instant Payment Notification. It sends data via post at a URL you specify when the transaction is complete. This necessarily has to happen in a separate context(ie, a new unlogged in auth). On Sep

Re: [web2py] Re: website with hierarchical pages, what's the best approach ?

2010-09-26 Thread Stef Mientki
On 26-09-2010 20:58, stefaan wrote: It's not entirely clear what you are after... I would think in the direction of a wiki? As most of the content / text is fixed, I'm not sure if a wiki is the solution. But I just saw a question about the web2py book as an application, that comes into the

Re: [web2py] web2py book as model for documentation

2010-09-26 Thread Stef Mientki
On 27-09-2010 00:00, mart wrote: Hi, Trying to use the web2py book (the application) as a model (because the layout is great and has that I'm the editor feature :) That might be the first part I'm looking for, where can I find that application (google gives me only the content of the book

[web2py] Re: web2py book as model for documentation

2010-09-26 Thread mdipierro
working on that... just committe to trunk gluon/contrib/markmin2latex.py gluon/contrib/markmin2pdf.py (via latex) On Sep 26, 5:00 pm, mart msenecal...@gmail.com wrote: Hi, Trying to use the web2py book (the application) as a model (because the layout is great and has that I'm the editor

[web2py] Re: web2py book as model for documentation

2010-09-26 Thread mart
Just downloaded the latest book app, still pointing to following page (or maybe I misunderstood the message? I saw that the app had been updated). @ stef - the book app is part of the free applications section in the books index (i think the title the Web2py Book). Or you can use the following

[web2py] Re: use of stdin and stdout within an web2py applicaton

2010-09-26 Thread mart
Interesting... but I need it to be part of the app and not the browser (specially if browser specific)...I have a few other ideas Thanks, Mart :) On Sep 26, 6:14 pm, Oleg obutov...@googlemail.com wrote: https://addons.mozilla.org/en-US/firefox/addon/4125/ On Sep 26, 11:06 pm, mdipierro

[web2py] load slider using ajax

2010-09-26 Thread Jose
Hello, I have a beautiful slider. In my layout.html define the following to activate it. function active_slider(){ $('#slider').nivoSlider({ ... }); } $(window).load(function() { active_slider(); }); If the images show the slider the get from the database by

[web2py] Re: Updating user account while user is still logged in

2010-09-26 Thread Richard
hi Massimo, I don't think those examples will work as expected. This updates the state of auth but not the database: auth.user.update(field=value) And this updates the database but not the state of auth: db(db.auth_user.id == auth.user.id).update(field=value) Is there a single operation to do

[web2py] Re: web2py online book

2010-09-26 Thread weiertzw
1$ == 8¥ ;( On 9月24日, 上午1时00分, bally boy ballybo...@gmail.com wrote: You can buy it from Lulu.. Believe me it would be worth buying, though I have not bought it yethttp://www.lulu.com/product/paperback/web2py-(3rd-edition)/12199578 On Thu, Sep 23, 2010 at 9:46 PM, weiertzw

[web2py] Help please on plugin_wiki on http://www.vimeo.com/13485916

2010-09-26 Thread tom_tren...@yahoo.com
Hi, I have been following the video at http://www.vimeo.com/13485916 I'm impressed by the possibilities of this plugin and I was able to successfully run the examples localy, but I ran into a problem when trying to duplicate the tutorial's example of creating a new widget. I believe I copied the

[web2py] Re: GAE appstats problem in app.yaml

2010-09-26 Thread mdmcginn
release: 1.3.7 timestamp: 1282688496 api_versions: ['1'] On Sep 25, 10:05 pm, Scott blueseas...@gmail.com wrote: What version of the GAE development server are you using? On Sep 24, 5:55 am, mdmcginn michael.d.mcgin...@gmail.com wrote: GAE appstats no longer works in app.yaml for

[web2py] Re: load slider using ajax

2010-09-26 Thread mdipierro
ajax calls do not execute js in views but you can return any js code from a web2py controller as in response.js=activate_slider(); and it should do it. On Sep 26, 8:46 pm, Jose jjac...@gmail.com wrote: Hello, I have a beautiful slider. In my layout.html define the following to activate it.

[web2py] Re: Deploying web2py on linux (Redhat or others) on cpanel or other ways

2010-09-26 Thread Rahul
Hi All, This solution is far from normal. Its just that I am using it on internet with nohup command, I'll try to get this fixed and try my permutations and combinations for it. For now flockbird is up on http://www.flockbird.com:9090/web2py/Flockbird this port being served by Rocket. I

[web2py] Re: Deploying web2py on linux (Redhat or others) on cpanel or other ways

2010-09-26 Thread Rahul
By the way, Just curious if anyone was able to access the site and the application contained using this url. http://www.flockbird.com:9090/web2py/Flockbird Please let me know your opinions.. BugBuster is an application and technology demo of web2py I made. This is free for personal use - Login