[webpy] db question

2011-04-23 Thread geekbuntu
installed pymongo used the very plain skeleton as an example (http://webpy.org/skeleton/ 0.3) - modified the config.py to: import web from pymongo import Connection c = Connection() DB = c.test collection = DB.items #DB = web.database(dbn='mongodb', db='test', user='admin', pw='fooknose') cache

[webpy] web.config.smtp_ setting?

2011-02-02 Thread geekbuntu
re: http://webpy.org/cookbook/sendmail_using_gmail from the receivers perspective, is there a way to have the received email only show the domain name rather than the gmail address that it was sent from? current settings in my script are: i = web.input() web.config.smtp_server =

[webpy] select reporting errors in log

2011-01-16 Thread geekbuntu
just noticed a lot of errors in my log from doing selects - is this normal? the select code is: db.select('blog', what='id, title', order='id DESC', limit=1) errors are: [Sun Jan 16 12:02:50 2011] [error] [client 67.246.108.253] , referer: http://www.holyarmor.org/ [Sun Jan 16 12:05:50 2011] [er

[webpy] cannot get sessions to write

2010-09-14 Thread geekbuntu
cannot get my sessions trace back, env description/etc and errors here: http://paste.feedtheguru.com/view/?id=224 Entry in sites-available/default: LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias /quotes /var/www/python/quotes/code_quotes.py/ Alias /quotes/stat

[webpy] mongo like db?

2010-08-23 Thread geekbuntu
(forgive the blazing saddles reference - couldn't resist) has anyone tested or used mongodb? http://api.mongodb.org/python/1.8.1%2B/index.html http://www.mongodb.org/ i hear that it is amazing... would like to know if anyone in webpy world has tested it or had any advice. tia -- You received this

[webpy] web.sendmail format reply-to address question

2010-07-27 Thread geekbuntu
i have this web.sendmail config (to gmail) & it works, but it doesn't set the reply to address. msg = """ From: %s Email: %s Message:%s """ % (i.name, i.email, i.msg) web.sendmail(i.email,'gregmi...@gmail.com','Message From HolyArmor.org',

[webpy] Re: Can you draw and then re-draw pages in web.py?

2010-07-05 Thread geekbuntu
i was playing with this idea - here's what i came up with: #found this snippet via google in my javascript (included into the base.html): function refreshResults(){ var xhr = new XMLHttpRequest(); xhr.open("GET", "/list/); xhr.onreadystatechange = function(){

[webpy] Re: charts, bars & graphs in webpy?

2010-06-03 Thread geekbuntu
thank you Branko On Jun 3, 9:50 am, Branko Vukelic wrote: > http://pypi.python.org/pypi/svg.charts > > > > > > On Thu, Jun 3, 2010 at 2:34 PM, geekbuntu wrote: > > one idea Branko had for my code paste was to show how many pastes were > > posted from each lan

[webpy] charts, bars & graphs in webpy?

2010-06-03 Thread geekbuntu
one idea Branko had for my code paste was to show how many pastes were posted from each language - i am looking for a way to make a pie chart or bars graph to show the percentages of pastes that are in the library. the only thing i've seen close to this was gae oriented, and i do not want to be rel

[webpy] Re: how to get the id # from a query?

2010-06-03 Thread geekbuntu
@Anand - no, that did not work On Jun 3, 7:46 am, Anand Chitipothu wrote: > 2010/6/3 geekbuntu : > > > here's how i tried to use it / and the code around it: > > >http://www.feedtheguru.com:8080/view/?id=34 > > > i tried web.inserts and web.insert - do i need

[webpy] Re: how to get the id # from a query?

2010-06-03 Thread geekbuntu
here's how i tried to use it / and the code around it: http://www.feedtheguru.com:8080/view/?id=34 i tried web.inserts and web.insert - do i need to do something special to get the id value out of it? On Jun 2, 10:53 pm, Anand Chitipothu wrote: > 2010/6/3 geekbuntu : > > > how

[webpy] how to get the id # from a query?

2010-06-02 Thread geekbuntu
how can i get the id from an inserted row that i just inserted in webpy to mysqldb? wondering if there is something more bulletproof than using insert_val = max(id) - 1 in mysql - doesn't seem reliable. thanks in advance -- You received this message because you are subscribed to the Google Grou

[webpy] Re: what is the best way to parse xml into templator via webpy?

2010-05-20 Thread geekbuntu
Thanks Leandro. i followed the trail down the rabbit hole - the lxml/ epat/etree seemed to do the trick. Thank you for the help! On May 19, 3:06 pm, ProfessionalIT wrote: > Friend Greg, > >    I think that this can be helpful for you: >    http://developer.yahoo.com/python/python-xml.html > > be

[webpy] Re: what is the best way to parse xml into templator via webpy?

2010-05-19 Thread geekbuntu
this is as close as i've found, but it's the reverse of what i need - i already have the xml doc - just need it to parse in to an iterable var so i can print out the nodes into a webpage-esque (normal looking) page. http://webpy.org/cookbook/xmlfiles On May 19, 8:46 am, geekbu

[webpy] Re: [Off-Topic] Free Host to web.py apps

2010-05-19 Thread geekbuntu
was it hard to setup for webpy? did you have to manually install everything (flup/etc)>? On May 18, 12:00 pm, ProfessionalIT wrote: > Hello Friends, > >    http://www.alwaysdata.com/ > >    Features:http://www.alwaysdata.com/features/ > > -- Leandro. > > -- > You received this message because you

[webpy] Re: Excessive amounts of logging by session code

2010-05-19 Thread geekbuntu
are you still getting the chatter logged even after setting the debug to false? (if possible, you may want to backup the log and replace with a blank - so you can verify) On May 19, 12:06 am, dave wrote: > > How are you deploying your app? cgi/fastcgi/wsgi? > > I've set web.config.debug to False,

[webpy] what is the best way to parse xml into templator via webpy?

2010-05-19 Thread geekbuntu
anyone know of a clever/practical/reliable way to parse xml into a template? hopefully something proven. thanks in advance, greg -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to we...@googlegroups.com. To unsubscrib

[webpy] Re: is there a way to undo addslashes?

2010-05-18 Thread geekbuntu
13, 3:33 pm, Aydın ŞEN wrote: > 2010/5/13 geekbuntu > > > > > now if i write this to a table, how can i make it to the original > > string again? > > if you wont have any "\" character in your string this may work otherwise it > looks difficu

[webpy] Re: How to configure a FastCGI in a host ?

2010-05-17 Thread geekbuntu
i see what is happening... i do not know how to get around it, but on forms.py - you are populating categories from your model.categories(), but the problem is when you first import the module, it's populating from the original list - it does not see the updated list. it may be a modelling problem.

[webpy] is there a way to undo addslashes?

2010-05-13 Thread geekbuntu
goal is a webpy based code paste: so as code is pasted, i need to addslashes per the javscript framework that is highlighting the code. (re imported): >>> string = >>> 'http://ayaz.wordpress.com/2007/04/22/reescape-pythons-equivalent-of-phps-addslashes/><><><' >>> print re.escape(string) http\:\/

[webpy] Re: web.py 0.34 is ready for release

2010-03-19 Thread geekbuntu
i swear i saw .034 download link when i first read this - where'd it go? i was going to download it and test Anand's benchmarking results for templator :) anyone have the link? bueller? bueller? On Mar 11, 4:11 pm, kevin wrote: > thanks for the release! > > On Wed, Mar 10, 2010 at 10:41 PM, Anan

[webpy] webpy.org wiki suggestion

2010-03-10 Thread geekbuntu
the suggestion is to put a 'grayed-out' date to the side of the link with the date last modified (& by whom?) http://webpy.org/cookbook everytime i look at the cookbook - i wonder how current the advice is going to be. e.g. *Reading raw data from post [10 March 2010 | Frankenstein] if there's a

[webpy] sqlite set path to db?

2010-03-05 Thread geekbuntu
is there, or how could i, designate the path to the sqlite db? if the db is in the webroot chmod to 777 it works great - i put below the webroot to protect, and i get an error the file is not accessible (even though it's chmod'd to 777 again) AND the absolute path is in the db="/path/to/db" any h

[webpy] Re: lighttpd - how to setup virtual servers

2010-02-24 Thread geekbuntu
ith a generic setup On Feb 24, 7:34 am, geekbuntu wrote: > i want to host more than one domain in my vps > > everything is mapped directly to the original domain > > i copied the information for the original domain and made a duplicate > set of entries pointing to the new folder/d

[webpy] lighttpd - how to setup virtual servers

2010-02-24 Thread geekbuntu
i want to host more than one domain in my vps everything is mapped directly to the original domain i copied the information for the original domain and made a duplicate set of entries pointing to the new folder/domian name the fast-cgi - is mapped to the original domain to. i'll gladly dbase/pa

[webpy] how to hide passwords with webpy forms?

2010-02-20 Thread geekbuntu
i tried using 'type' but it is still revealing the chacters in the input field - any ideas? login_form = form.Form( form.Textbox("username", size=10, type="text",description="Username"), form.Textbox("password", size=10, type="password", description="Password"), form.Button("Login", ht

[webpy] Re: Templator question

2010-01-27 Thread geekbuntu
e, Jan 26, 2010 at 2:51 PM, Branko Vukelic wrote: > > > On Tue, Jan 26, 2010 at 8:10 PM, geekbuntu wrote: > > > > actually i just moved the $count back a level so it just says zero > > > > results found... easier than trying to find an answer to this.. > > > >

[webpy] Re: Templator question

2010-01-26 Thread geekbuntu
26, 2:06 pm, Greg Milby wrote: > Still returns a 500 internal server error, i'm pretty sure i'm not > evaluating results properly :) > > --- > Visit My Sites!www.syrbot.com| My Sitewww.attackr.com| Latest Blog Posts > > 2010/1/26 Aydın ŞEN > >

[webpy] Re: Templator question

2010-01-26 Thread geekbuntu
Didn't work, but thanks for trying to help. On Jan 26, 1:49 pm, Aydın ŞEN wrote: > 2010/1/26 geekbuntu > > > can anyone advise me how to properly construct an 'if' inside a > > template? > > > $def with (title, name, results, count) > >    $var

[webpy] Re: Templator question

2010-01-26 Thread geekbuntu
26, 1:36 pm, geekbuntu wrote: > can anyone advise me how to properly construct an 'if' inside a > template? > > $def with (title, name, results, count) >     $var title:$title >     $var name:$name >     $var count:$count > >     if $result != &#x

[webpy] Templator question

2010-01-26 Thread geekbuntu
can anyone advise me how to properly construct an 'if' inside a template? $def with (title, name, results, count) $var title:$title $var name:$name $var count:$count if $result != '': $for result in results: $result $count

[webpy] Re: render from dict results gets 500 error

2010-01-24 Thread geekbuntu
it DOES NOT work from the hosts built in lighttpd server... On Jan 24, 10:34 am, geekbuntu wrote: > 2010-01-24 15:32:54: (mod_fastcgi.c.2610) FastCGI-stderr: Traceback > (most recent call last): > File "/usr/local/lib/python2.6/dist-packages/web.py-0.33-py2.6.egg/ > web/appl

[webpy] Re: render from dict results gets 500 error

2010-01-24 Thread geekbuntu
2010-01-24 15:32:54: (mod_fastcgi.c.2610) FastCGI-stderr: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/web.py-0.33-py2.6.egg/ web/application.py", line 242, in process return self.handle() File "/usr/local/lib/python2.6/dist-packages/web.py-0.33-py2.6.egg/

[webpy] Re: render from dict results gets 500 error

2010-01-24 Thread geekbuntu
2010-01-24 15:32:54: (mod_fastcgi.c.2610) FastCGI-stderr: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/web.py-0.33-py2.6.egg/ web/application.py", line 242, in process return self.handle() File "/usr/local/lib/python2.6/dist-packages/web.py-0.33-py2.6.egg/

[webpy] render from dict results gets 500 error

2010-01-24 Thread geekbuntu
i have a dictionary file that has the id and title for books the search goes against the dict then i will implement a sub query to limit the database. right now it just returns a 500 error using this url http://206.251.38.98/search?s=Home class search: def GET(self): web.header('Co

[webpy] Re: Need a way to use LIKE in MySQL query o.0

2010-01-21 Thread geekbuntu
d to read like this. > > > >> BTW, is web.config.debug set to True? Please try that. Also, try to do > > >> it all in console on your test machine: > > > >>http://dpaste.com/147910/ > > > >> Note that the last argument to select is _test=True, whi

[webpy] Re: encoding error writing to file from mysqldb

2010-01-21 Thread geekbuntu
have tried: removing cgi escape setting to variable before passing in to the .write using str.encode-decode everything i could find on google about converting/encoding encoding classes inside python any advice welcome :) On Jan 21, 10:16 am, geekbuntu wrote: > http://paste.pocoo.org/s

[webpy] encoding error writing to file from mysqldb

2010-01-21 Thread geekbuntu
http://paste.pocoo.org/show/168012/ complete script on paste. Traceback (most recent call last): File "booksxml.py", line 29, in ? a = '\t'*2 + str(row['author_last']) + '\n' UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128) -- You receive

[webpy] Re: where is the xml file declared?

2010-01-20 Thread geekbuntu
, Branko Vukelic wrote: > If you mean where it should live, it's in the template directory > specified as an argument to render(). > > You can familiarize yourself with Templetor template engine here: > > http://webpy.org/docs/0.3/templetor > > On Wed, Jan 20, 2010 at 3:00

[webpy] where is the xml file declared?

2010-01-20 Thread geekbuntu
was looking at this tutorial - very thankful there was one, but the referred to "response.xml" is never referred to? http://webpy.org/cookbok/xmlfiles -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to we...@googlegro

[webpy] Re: Need a way to use LIKE in MySQL query o.0

2010-01-20 Thread geekbuntu
Page crashed: http://www.syrbotwebdesign.com/search?search=red no readable errors. Branko - thank you very much for suggesting something - it's nice to get replies to try to fix a problem. Thank you very much, greg On Jan 20, 8:44 am, Branko V

[webpy] Re: Need a way to use LIKE in MySQL query o.0

2010-01-20 Thread geekbuntu
pe', 'text/html') i = web.input() db = web.database(host='127.0.0.1', port=3307, dbn='mysql', user='gmilby', pw='56j6j56jGGEGEG56j', db='gmilby_geekbuntu') results = db.query('books', where="title LIK

[webpy] Need a way to use LIKE in MySQL query o.0

2010-01-19 Thread geekbuntu
does anyone have a good sql statement for webpy to query results by "LIKE" (e.g. results = db.select('books', where='title LIKE $search_var', vars=locals()) )? (this suggestion was from Justin but doesn't work) i just found something on github/webpy repository it offered another way to do the 'li

[webpy] dead link to current tutorial

2009-11-13 Thread geekbuntu
anyone know where this tutorial may be located now? http://domimob.infogami.com/wiki/tidy page it is referred from: http://webpy.org/src the todo list for version 3 engine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gr

[webpy] Re: edit form?

2009-11-13 Thread geekbuntu
os) def POST(self): #i = web.input() #n = db.update('todo', id='id', title='title') n = db.update('todo', where='id=id', title='title') raise web.seeother('/') On Nov 13, 7:41 am, geekbuntu wrote:

[webpy] Re: edit form?

2009-11-13 Thread geekbuntu
return render.index(todos) #updated render object after edit page is created 32 33 def POST(self): 34 i = web.input() 35 n - db.update('todo', title=i.title) 36 raise web.seeother('/') 37 38 if __name__ == "__main__": app.run() On Nov

[webpy] edit form?

2009-11-13 Thread geekbuntu
http://webpy.org/cookbook/forms i've been looking at all the form examples on webpy.org - it shows how to make them, but not how to update/edit data or delete. here's the last example i followed - how would i edit the form? 1 import web 2 3 render = web.template.render('templates/') 4

[webpy] Re: webpy tut error

2009-11-12 Thread geekbuntu
;integrated" > into v0.3 already? Because I don't need that and my modification > mostly are automatically reloaded. > > On 11月9日, 下午10时36分, geekbuntu wrote: > > > i was following along withhttp://webpy.org/tutorial3 > > > on hello.py - it has a line that

[webpy] Re: creating links

2009-11-12 Thread geekbuntu
| test| +--+--+---+-+ 1 row in set (0.00 sec) mysql> On Nov 11, 12:43 pm, adelevie wrote: > This looks like more of a Python issue than a web.py issue. > > On Nov 10, 8:30 am, geekbuntu wrote: > > > i have a loop that pulls the url variable and then p

[webpy] Re: creating links

2009-11-12 Thread geekbuntu
is looks like more of a Python issue than a web.py issue. > > On Nov 10, 8:30 am, geekbuntu wrote: > > > i have a loop that pulls the url variable and then passes it into the > > template layer, but it's literally printing the whole string. > > >http://milby.no-i

[webpy] creating links

2009-11-10 Thread geekbuntu
i have a loop that pulls the url variable and then passes it into the template layer, but it's literally printing the whole string. http://milby.no-ip.org:8080/ here's my previous attempts to parse the tuple: @ the app page: 15 class index2: 16 def GET(self): 17 welcome = 'Welco

[webpy] webpy tut error

2009-11-09 Thread geekbuntu
i was following along with http://webpy.org/tutorial3 on hello.py - it has a line that asks for web.reloader i get an error saying this is module is not available. i looked and it's not there (in web) is there a substitute? >>> dir(web) ['Accepted', 'AppBrowser', 'AppHandler', 'BadRequest', '

[webpy] can results page be split up?

2009-11-07 Thread geekbuntu
i have a wicked long list of used books - wondering if i can sort them with links? http://pairadice.no-ip.org:8080/books (around 4500) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this

[webpy] Re: CherryPy and web.py

2009-11-07 Thread geekbuntu
so there is no spoon - i mean POST? there is only GET(?) On Oct 31, 9:27 am, Chris Brannon wrote: > xrfang wrote: > > But one small issue on webpy side: while it is clear to use a GET and > > a POST method, what if I would like to use one method to handle either > > POST or GET? > > class foo_h

[webpy] can webpy server run by itself?

2009-11-07 Thread geekbuntu
right now i have a terminal window running my webpy app - is there a way to make it run by itself - not dependent on it being executed manually? (like a standard webserver) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro