[web2py] Question about routes

2011-02-26 Thread walter
I use web2py with GAE. This is a snippet of my index.html {{ =response.title }} When I don't use a routes.py I have got a page but without pics and css marking. My URL in this case is localhost:8080/lyc/default/index/ news.

Re: [web2py] Re: Best method for creating sortable lists that are css theme-able, ajax updateable, and pagination??

2011-02-26 Thread Martín Mulone
Powertables https://bitbucket.org/rochacbruno/powertable/overview If you only want to print fancy a very basic table https://bitbucket.org/mulonemartin/plugin_simpletable/wiki/Home 2011/2/26 pbreit > DataTables is probably a good option since Bruno has done a lot of work > getting it into Web2p

[web2py] extract_mysql_models.py

2011-02-26 Thread stargate
how would I use extract_mysql_models.py to extract a existing mysql database

Re: [web2py] extract_mysql_models.py

2011-02-26 Thread Vasile Ermicioi
This plugin needs: mysql mysqldump installed and globally available. usage extract_mysql_models.py username:password@data_basename

[web2py] New Web2Py Webhoster

2011-02-26 Thread Budgetbytes
Budgetbytes Hosting Solutions now offers Web2Py support. The website is still in Dutch, but will be released in english around march. For only € 1,50 per month (inc BTW/V.A.T) you get 500MB webspace. Technical support will be offered by Budgetbytes, but no Functional Support. Python version 2.6.4

[web2py] Re: newb - a postgres database view

2011-02-26 Thread DenesL
> Hi All- making some progress here in week 1 with web2py... > I wrote my postgres database first, and generated the model from it.. > and that is working well .. 1) build your models in Web2py and let it create your DB schema > But I have one *postgres* view, which is about 5 joins.. I dont ye

[web2py] Re: The two halves of cache management - what's the recommended method of flushing?

2011-02-26 Thread Carl
a thought... would anyone recommend that one avoids passing a cache parameter into .select() and instead handle the cache keys oneself? that would enable smarter clearing of cache keys when the database is updated and so rely on less internal Web2py detail On Feb 25, 5:18 pm, Carl wrote: > Web2p

Re: [web2py] extract_mysql_models.py

2011-02-26 Thread Rupesh Pradhan
Why am I getting this error when using the "extract_mysql_models.py" script? Given below is the traceback. C:\Documents and Settings\rupeshpradhan\Desktop\scripts>python extract_mysql_models.py rupesh:password@rockvale Traceback (most recent call last): File "extract_mysql_models.py", line 106

[web2py] Re: New Web2Py Webhoster

2011-02-26 Thread Massimo Di Pierro
+1 On Feb 26, 6:17 am, Budgetbytes wrote: > Budgetbytes Hosting Solutions now offers Web2Py support. The website > is still in Dutch, but will be released in english around march. > > For only € 1,50 per month (inc BTW/V.A.T) you get 500MB webspace. > Technical support will be offered by Budgetby

[web2py] Extracting data from a list having data in the format of a key, data

2011-02-26 Thread Rupesh Pradhan
Method I c = [(1, 'NURSERY'), (2, 'LKG'), (3, 'UKG'), (4, '1')] key=3 >>> for i, j in c: ... if i==key: print j UKG Method II - c = [(1, 'NURSERY'), (2, 'LKG'), (3, 'UKG'), (4, '1')] r = dict((x[0],x[1]) for x in c) print r[3] UKG Method III -- Anything better than

Re: [web2py] extract_mysql_models.py

2011-02-26 Thread Vasile Ermicioi
please read the comments from the script Under Windows you will probably need to add the mysql executable directory > to the PATH variable, > you will also need to modify mysql to mysql.exe and mysqldump to > mysqldump.exe below. > Just guessing here :)

Re: [web2py] Question about routes

2011-02-26 Thread Jonathan Lundell
On Feb 26, 2011, at 3:29 AM, walter wrote: > > When my URL is localhost:8080/news or localhost:8080/credits etc. all > OK, but when URL is localhost:8080/news/97 for example I've got > expected page without any pics and css. You might try making your css references absolute paths. Instead of

Re: [web2py] New Web2Py Webhoster

2011-02-26 Thread Marin Pranjic
This is great. Very affordable.500Mb is enough for most of users. Added into bookmarks :) On Sat, Feb 26, 2011 at 1:17 PM, Budgetbytes wrote: > Budgetbytes Hosting Solutions now offers Web2Py support. The website > is still in Dutch, but will be released in english around march. > > For only € 1

[web2py] Small bug in gluon/widget.py and something more

2011-02-26 Thread José L .
Hello, I'm finishing the Debian packages for web2py (I hope to finish them this weekend), and as the tk graphic interface in widget.py is really ugly on a linux machine, I've done a gtk clone of this same interface. Doing it , I've seen a bug in line 411 of http://code.google.com/p/web2py/source

[web2py] Re: The two halves of cache management - what's the recommended method of flushing?

2011-02-26 Thread Massimo Di Pierro
I cannot think of a better way but, if you use cache.ram, you can find the actual cached data in cache.ram.meta_storage[request.application] which is a python dict. It if not thread safe to write in there unless you do: cache.ram.locker.lock() cache.ram.meta_storage[request.application][key]=va

[web2py] Re: Extracting data from a list having data in the format of a key, data

2011-02-26 Thread Massimo Di Pierro
c = [(1, 'NURSERY'), (2, 'LKG'), (3, 'UKG'), (4, '1')] r = dict(c) print r[3] or print [x[1] for x in c if x[0]==3][0] On Feb 26, 9:04 am, Rupesh Pradhan wrote: > Method I > > c = [(1, 'NURSERY'), (2, 'LKG'), (3, 'UKG'), (4, '1')] > key=3 > > >>> for i, j in c: > > ... if i==key: prin

[web2py] Re: Extracting data from a list having data in the format of a key, data

2011-02-26 Thread DenesL
On Feb 26, 10:04 am, Rupesh Pradhan wrote: > Method I > > c = [(1, 'NURSERY'), (2, 'LKG'), (3, 'UKG'), (4, '1')] > key=3 > > >>> for i, j in c: > > ... if i==key: print j > > UKG > > Method II > - > c = [(1, 'NURSERY'), (2, 'LKG'), (3, 'UKG'), (4, '1')] > r = dict((x[0],x[1]) fo

Re: [web2py] Re: The two halves of cache management - what's the recommended method of flushing?

2011-02-26 Thread Carl Roach
thanks Massimo. I'm using memcache on dev_appserver & GAE and just cache.ram locally; so I think "wrapping" database access and managing cache keys myself are probably the best route forward. On 26 February 2011 16:31, Massimo Di Pierro wrote: > I cannot think of a better way but, if you use ca

[web2py] Re: Small bug in gluon/widget.py and something more

2011-02-26 Thread Massimo Di Pierro
Thanks, your fix is in trunk. I'd like to see the gtk version and I am ok to you adding it to trunk but Ido not think we should add a new dependence. Massimo On Feb 26, 10:13 am, José L. wrote: > Hello, > I'm finishing the Debian packages for web2py (I hope to finish them this > weekend), and a

[web2py] bug with type

2011-02-26 Thread LightOfMooN
if type('asd') == str: pass Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 188, in restricted exec ccode in environment File "/home/www-data/web2py/applications/rushops/controllers/ shop.py", line 376, in File "/home/www-data/web2py/gluon/g

[web2py] Re: bug with type

2011-02-26 Thread LightOfMooN
So I make little function, that's work def makelist(items): if type(items) != list: items = [items] return items but don't understand, why previous not working On 26 фев, 23:53, LightOfMooN wrote: > if type('asd') == str: >     pass > > Traceback (most recent call last): >   Fil

[web2py] plugin_wiki printing code

2011-02-26 Thread Sebastian E. Ovide
Hi All, I'm testing the widget of the plugin_wiki in a view. I added {{=plugin_wiki.widget('map',key='yrtable',table='auth_user',width=400, height=200)}} after installing the plugin but instead of getting a map I'm getting the JS code printed in the page ! If I see the page generated code, I can

Re: [web2py] bug with type

2011-02-26 Thread Jonathan Lundell
On Feb 26, 2011, at 10:53 AM, LightOfMooN wrote: > > if type('asd') == str: >pass Could you post the whole function? It sounds like you might be rebinding type. > > Traceback (most recent call last): > File "/home/www-data/web2py/gluon/restricted.py", line 188, in > restricted >exec cc

[web2py] Re: bug with type

2011-02-26 Thread Massimo Di Pierro
It does not work in a function that later defines type as a local variable, that overrides the type() function. On Feb 26, 1:02 pm, LightOfMooN wrote: > So I make little function, that's work > > def makelist(items): >     if type(items) != list: >         items = [items] >     return items > > b

[web2py] Re: plugin_wiki printing code

2011-02-26 Thread Sebastian E. Ovide
actually it happens only with "map"... (it doesn't happen with youtube) On Sat, Feb 26, 2011 at 7:10 PM, Sebastian E. Ovide < sebastian.ov...@gmail.com> wrote: > Hi All, > > I'm testing the widget of the plugin_wiki in a view. > > I added > {{=plugin_wiki.widget('map',key='yrtable',table='auth_u

[web2py] Re: Small bug in gluon/widget.py and something more

2011-02-26 Thread José L .
On Saturday, February 26, 2011 7:29:09 PM UTC+1, Massimo Di Pierro wrote: > > Thanks, > your fix is in trunk. > > I'd like to see the gtk version and I am ok to you adding it to trunk > but Ido not think we should add a new dependence. > > I've uploaded the module widget.py and its diff with

[web2py] Re: Displaying br instead new line in views

2011-02-26 Thread blackthorne
guys, if you have the same trouble I just did, this should work. Try it: {{=XML(note.content.replace('\\n',''),sanitize=True)}} Best regards On Feb 20, 9:35 pm, DenesL wrote: > {{=XML(note.content.replace('\n',''),sanitize=True)}} > > On Feb 20, 12:10 pm, Alexandre Strzelewicz > > > > wrote: >

[web2py] Re: bug with type

2011-02-26 Thread LightOfMooN
function is too big (150+strings) but I find some peace of code in it: props = get_props_by_section_id_list([section_id,]) gsp_ids = {} for type in props.keys(): gsp_ids[type] = {} for prop in props[type]: gsp_ids[type] [prop.id]=db((prop.id==db.sections_propert

Re: [web2py] Re: bug with type

2011-02-26 Thread Jonathan Lundell
On Feb 26, 2011, at 11:50 AM, LightOfMooN wrote: > > function is too big (150+strings) > but I find some peace of code in it: > > props = get_props_by_section_id_list([section_id,]) >gsp_ids = {} >for type in props.keys(): >gsp_ids[type] = {} >for prop in props[type]: >

[web2py] Re: bug with type

2011-02-26 Thread LightOfMooN
Yes, it's so. I should be more careful with variable names :) On 27 фев, 00:54, Jonathan Lundell wrote: > On Feb 26, 2011, at 11:50 AM, LightOfMooN wrote: > > > > > function is too big (150+strings) > > but I find some peace of code in it: > > > props = get_props_by_section_id_list([section_id,])

[web2py] Re: Multiple Column Unique Fields

2011-02-26 Thread Chris
Hey Ross, Had this same problem and found this: http://stackoverflow.com/questions/2671913/sql-how-can-i-apply-a-semi-unique-constraint Chris On Feb 19, 6:07 pm, Ross Peoples wrote: > Ok, removing unique=True and using the line that Massimo gave me seems to do > the trick. The validation is onl

[web2py] what's the average learning curve?

2011-02-26 Thread Sean
for a basic shopping recommendation site, can a single newbie make a reasonably good one in 3 month (starting from scratch)? Any suggestion?

[web2py] Python fourth on the list

2011-02-26 Thread Ovidio Marinho
http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html -- Ovidio Marinho Falcao Neto ovidio...@gmail.com Tecnologia da Informaçao Casa Civil do Governador 83 3214 7885 - 88269088 Paraiba

[web2py] Re: what's the average learning curve?

2011-02-26 Thread villas
Much depends on your starting point. If you have already accomplished some web apps, then 3 months should do the server side OK, but then how sophisticated will the client-side be? If you really are a newbie to web development, there are probably too many skills to learn in 3 months - but then

[web2py] Re: newb - a postgres database view

2011-02-26 Thread darkblue_b
hi- thanks for this continuing thread.. I thought about it a bit, and yes, I see there is a great fundamental divide between people new to web2py jumping in and trying to make things work with executesql() and such, and on the other hand using the framework to do what it does.. that's true for me,

[web2py] Re: what's the average learning curve?

2011-02-26 Thread Sean
"how sophisticated will the client-side be?" Are you talking about the JS, templates, css stuff? On Feb 26, 5:15 pm, villas wrote: > Much depends on your starting point.  If you have already accomplished > some web apps, then 3 months should do the server side OK,  but then > how sophisticated w

[web2py] Re: plugin_wiki printing code

2011-02-26 Thread Massimo Di Pierro
hmmm... could be a bug. I will check this asap. I was planning to post a revised plugin_wiki tomoromow anyway. On Feb 26, 1:10 pm, "Sebastian E. Ovide" wrote: > Hi All, > > I'm testing the widget of the plugin_wiki in a view. > > I added > {{=plugin_wiki.widget('map',key='yrtable',table='auth_use

[web2py] Re: Small bug in gluon/widget.py and something more

2011-02-26 Thread darkblue_b
a quick try with the new widget.py on Debian 6, works well for me.. On Feb 26, 11:34 am, José L. wrote: > On Saturday, February 26, 2011 7:29:09 PM UTC+1, Massimo Di Pierro wrote: > > > Thanks, > > your fix is in trunk. > > > I'd like to see the gtk version and I am ok to you adding it to trunk >

[web2py] Re: Small bug in gluon/widget.py and something more

2011-02-26 Thread Massimo Di Pierro
OK. I only have one request. Can you define gtk_presentation in its own module in contrib and try import it from widget? I am not sure how this plays out with py2exe and py2app On Feb 26, 1:34 pm, José L. wrote: > On Saturday, February 26, 2011 7:29:09 PM UTC+1, Massimo Di Pierro wrote: > > >

[web2py] Re: newb - a postgres database view

2011-02-26 Thread darkblue_b
in case I wasnt clear, I used "extract_pgsql_models.py" to create the model.. you have to re-arrange the output, from alpha by method to leaf tables first but it appears to work well.. On Feb 26, 5:39 am, DenesL wrote: > > Hi All-  making some progress here in week 1 with web2py... > > I wrote my

[web2py] Re: Displaying br instead new line in views

2011-02-26 Thread Massimo Di Pierro
Actually I think Denes is right. If you have to use '\\n' instead of '\n' something is wrong with the data you have (it is escaped twice?) Massimo On Feb 26, 1:50 pm, blackthorne wrote: > guys, > if you have the same trouble I just did, this should work. Try it: > {{=XML(note.content.replace('\\

[web2py] Re: bug with type

2011-02-26 Thread Massimo Di Pierro
yes On Feb 26, 1:50 pm, LightOfMooN wrote: > function is too big (150+strings) > but I find some peace of code in it: > > props = get_props_by_section_id_list([section_id,]) >     gsp_ids = {} >     for type in props.keys(): >         gsp_ids[type] = {} >         for prop in props[type]: >      

[web2py] powertable question about get_category_name

2011-02-26 Thread tomt
Hi, I was trying to learn more from the powertable example, specifically how the represent options in the field definitions work. db.define_table('products', Field('category',db.category,label=T('CategoryW'),represent=lambda c:get_category_name(c)), I deleted the get_category_name function def

Re: [web2py] powertable question about get_category_name

2011-02-26 Thread rochacbruno
That function was used in the example just because there was a bug with represent for referenced fields, I guess that bug is fixed and this function is now useless. The case is that a SQLTable (which is the base of powerTable) was not showing format or representation, instead it was showing No

[web2py] Re: what's the average learning curve?

2011-02-26 Thread pbreit
Are you new to programming? Python? Or just new to Web2py? I had a very modest amount of prior programming experience, none of it on Python, and I was able to make very good progress on a storefront application in a matter of days and weeks. I suspect adding the final 20% of polish will take 80%

[web2py] sending password and username emails fail

2011-02-26 Thread Ed Greenberg
When I click password and username recovery in my app, the app flashes "Mail Sent" but it isn't. Reviewing the mail server logs I find... Feb 27 03:45:10 admin01 sendmail[13140]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256

[web2py] Re: plugin_wiki printing code

2011-02-26 Thread mart
This reminds me, (and I could wrong - or could have been the editor playing tricks), but now that I think if it, i noticed that some code looked strange in some parts where I remember thinking probably quote or a tic may be off... Seems that a couple of bits if code looked commented out while nea

[web2py] Re: plugin_wiki printing code

2011-02-26 Thread mart
Apologies. Was a trick. the default editor is displaying incorrectly. Mart :) On Feb 27, 1:55 am, mart wrote: > This reminds me, (and I could wrong - or could have been the editor > playing tricks), but now that I think if it, i noticed that some code > looked strange in some parts where I reme