[web2py] Re: web2py default layout.html

2012-09-12 Thread Andrew W
missing some /div s for the first span12s ? On Wednesday, September 12, 2012 5:42:29 PM UTC+12, Annet wrote: Anthony is right, it's the span12 that's causing the problem. I had the same problem, and solved it by following the bootstrap pattern more strictly. header class=header mastheader

Re: [web2py] Modelless app no longer works with web2py 2.0.x ???

2012-09-12 Thread Andrew W
Perfect ! Thanks for the quick response. I saw your solution above, but assumed that you had added it to github. All's Good. One more question please (which I asked on web2py slices): How to use auth.wiki with movuca. There was a web2pyslices post in relation to plugin_wiki, and I was

[web2py] web2py 2.0.8 login_next, register_next ignored

2012-09-12 Thread Alexei Vinidiktov
Hello, I have auth.settings.login_next and auth.settings.register_next defined in db.py. Both appear to be ignored. I need the user to go to a specific page after he logs in or registers. In web2py 1.99.7 auth.settings.login_next defined in db.py was respected, auth.settings.register_next

[web2py] Pynes notify

2012-09-12 Thread Bruno Rocha
This plugin for Bootstrap looks very nice for response.flash http://pinesframework.org/pnotify/ --

[web2py] Re: web2py 2.0.8 login_next, register_next ignored

2012-09-12 Thread Anthony
That is by design. The _next variable in the URL takes precedence over those settings, which are intended to be defaults. If you don't want the navbar to include the _next variable, you can do: auth.navbar(..., referrer_actions=['list', 'of', 'actions']) Just make sure 'login' and 'register'

[web2py] Re: web2py default layout.html

2012-09-12 Thread Annet
missing some /div s for the first span12s ? You're right, it should be: header class=header mastheader div class=row div class=span12 /div !--/.span12 -- /div !-- /.row -- /header Kind regards, Annet. --

[web2py] Re: response.stream and web2py_component

2012-09-12 Thread maverick
Anthony, Thanks for the explanation. I tried cacheable=True in my select(), like: rows = db().select(db.vmt_weekly.ALL, cacheable=True) but it is met with internal error: type 'exceptions.SyntaxError' invalid select attribute: cacheable Is there something I'm missing? mave On Tuesday,

[web2py] Error: DAL object has no attribute custom_auth_table

2012-09-12 Thread Annet
I defined a custom auth_user table: db.define_table( auth.settings.table_user_name, Field('title',length=8,requires=IS_IN_SET(['de heer','mevrouw'],zero=T('Select a value')),label='Aanheft * '), Field('firstName',length=32,requires=IS_LENGTH(32,error_message=T('length exceeds 32

[web2py] Re: denormalizing a list:reference -- need a bit of help

2012-09-12 Thread Pepe Araya
Hi, a question: how do you display the entities related to a user in a View which displays a list of users with their related entities?? for example: Name: user 1 Entities: one, two -- Name: user 2 Entities: one -- ... Thanks. On Friday, May 11, 2012 12:16:32 PM UTC-4, Niphlod wrote: If

[web2py] Re: denormalizing a list:reference -- need a bit of help

2012-09-12 Thread Niphlod
more or less {{for user in db(db.auth_user).select():}} Name : {{=user.name}} {{entities = db(db.entity.id.belongs(user.entity)).select(db.entity. name)}} Entities : {{', '.join(ent.name for ent in entities)}} {{pass}} -- of course you should probably fetch the result in the

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-12 Thread LightDot
I'd just rebuild the source RPM if I was you. Way simpler... besides you'll need to take care of the updates all by yourself now, same as for your postgres. Just taking Red Hat (or CentOS) updates and rebuilding them (couple of seconds of work) really simplifies things. Your postges RPMs are

[web2py] Re: denormalizing a list:reference -- need a bit of help

2012-09-12 Thread Pepe Araya
Thanks very much! it works! if I have the user query in the controller like this: def user_list(): users = db(db.auth_user).select() entities = db(db.entity.id.belongs(user.entity)).select(db.entity.name) return dict(users = users, entities = entities ) will work? --- Another related

[web2py] Re: denormalizing a list:reference -- need a bit of help

2012-09-12 Thread Niphlod
no, it wont. users is a list of users. you need to fetch the list of entities separately for every item of the list of the users. Il giorno mercoledì 12 settembre 2012 11:46:32 UTC+2, Pepe Araya ha scritto: Thanks very much! it works! if I have the user query in the controller like this:

[web2py] Receiving error when exporting to TSV with SQLFORM.grid (V2.0.8)

2012-09-12 Thread Gerd
Hi! First: This is my first try to build a real application in web2py and python, i'm new to both but like it very much (i'm coming from bash/awk/sed) I receive following error when trying to export a SQLFORM.grid to TSV (Excel compatible), but CSV works Traceback (most recent call last):

Re: [web2py] Somewhere between 1.97 and 2.0.8 I lost translations.

2012-09-12 Thread Marin Pranjić
Hi Jason, I just tried few things... It is working in nightly build but not in 2.0.8. Marin On Wed, Sep 12, 2012 at 7:54 AM, Jason Brower encomp...@gmail.com wrote: It seems that our production system stoped serving translated versions of our website. Even when our browsers are on the

[web2py] Re: HTML truncate

2012-09-12 Thread villas
oops yes, there was a typo with the tipo! :) On Tuesday, September 11, 2012 3:33:18 PM UTC+1, Massimo Di Pierro wrote: {{=db.publicaciones.descripcion.represent(tipo_3.descripcion,tipo_3}} I do not think you want the extra =. On Tuesday, 11 September 2012 08:47:00 UTC-5, villas wrote: I

[web2py] Re: When/how is 'format' used?

2012-09-12 Thread MichaelF
Thanks. I didn't realize that SQLFORM was used by default to display a Row object; that makes sense. And the presence/invocation of those 'format' expressions is what's causing the various 'additional' SELECT statements I see in the db stats display, yes. By 'additional' I mean they're SELECT

[web2py] Re: MENU helper and Server-side DOM work together?

2012-09-12 Thread amphisia pui
Hi Antony, I followed your suggestion and it works. I paste the code snippet in case someone else needs it. {{ smenu = mmenu.serialize(mmenu.data) mmenu = MENU(response.menu, _class='nav' ) lis =

[web2py] creating breadcrumbs in the application

2012-09-12 Thread Mandar Vaze
I found a discussion on this group and this http://www.web2pyslices.com/slice/show/1374/full-breadcrumbs But both of them seem to be from 2009 - almost 2.5-3 yrs old. web2py has changed a lot since 2009. I also found gluon.tools.Expose.breadcrumbs() - But there are no examples or documentation

Re: [web2py] Re: web2py 2.0.8 login_next, register_next ignored

2012-09-12 Thread Alexei Vinidiktov
Thanks, Anthony. I've tried it and it worked. I just passed an empty referrer_actions list. The bahavior has changed for navbar since 1.99.7 though. In 1.99.7 login_next defined in db.py was not ignored. On Wed, Sep 12, 2012 at 2:03 PM, Anthony abasta...@gmail.com wrote: That is by design.

[web2py] How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Remco K
Hello everyone, I'm not a big fan of asking questions rather than find solutions by myself but i need a little help on this one so i hope someone can help me a bit. What i need is 'very simple'. I have a Web2Py application running and i need other applications (PHP or something) to be able to

[web2py] Re: response.stream and web2py_component

2012-09-12 Thread Anthony
Are you using the latest version of web2py? That's a new option. On Wednesday, September 12, 2012 4:43:50 AM UTC-4, maverick wrote: Anthony, Thanks for the explanation. I tried cacheable=True in my select(), like: rows = db().select(db.vmt_weekly.ALL, cacheable=True) but it is met with

[web2py] Re: modified_by and modified_on not updating

2012-09-12 Thread Joel Carrier
I was calling auth.define_tables() after defining auth_user manually. My mistake. On Saturday, September 8, 2012 1:56:37 PM UTC-4, Joel Carrier wrote: Hmmm... i never call auth.define_tables I guess because I wanted to customize the auth_user table. And yet the following tables all get

[web2py] Re: You don't have permission to access /admin/default/index on this server.

2012-09-12 Thread Vladimir Drobnjak
Thank you very much. Now I can access the admin pages. Dne ponedeljek, 10. september 2012 14:45:19 UTC+2 je oseba Massimo Di Pierro napisala: For security reasons you cannot access admin remotely using port 80. You either setup https, or a ssh tunnel, or access it from localhost. On

Re: [web2py] Pynes notify

2012-09-12 Thread David Sorrentino
Impressive. On 12 September 2012 08:40, Bruno Rocha rochacbr...@gmail.com wrote: This plugin for Bootstrap looks very nice for response.flash http://pinesframework.org/pnotify/ -- --

[web2py] Re: denormalizing a list:reference -- need a bit of help

2012-09-12 Thread Pepe Araya
Thanks you! On Wednesday, September 12, 2012 6:51:56 AM UTC-3, Niphlod wrote: no, it wont. users is a list of users. you need to fetch the list of entities separately for every item of the list of the users. Il giorno mercoledì 12 settembre 2012 11:46:32 UTC+2, Pepe Araya ha scritto:

[web2py] web2py 2.0.8 Firebird driver fdb error

2012-09-12 Thread Alexei Vinidiktov
I'm trying to use the new fdb driver for Firebird with web2py 2.0.8 but I'm getting this error when I load a page: class 'fdb.fbcore.ProgrammingError'(Transaction object is not active) TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Traceback (most recent call last): File

[web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread villas
Security is clearly not at the top of your agenda :) Something like this might work: def logmein(): # minimal, insecure login function auth.login_bare(request.vars['username'],request.vars['password']) yoursite.com/yourapp/default/logmein?username=abcpassword=xyz On Wednesday,

[web2py] Re: HTML truncate

2012-09-12 Thread Pepe Araya
Thanks you both! One more help request: I have a represent related question in this topic https://groups.google.com/d/topic/web2py/9R9iQT_BVyU/discussion please, can you help me to understand what I'm doing wrong? On Tuesday, September 11, 2012 11:33:18 AM UTC-3, Massimo Di Pierro wrote:

Re: [web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread David Sorrentino
Security is clearly not at the top of your agenda :) LoL On 12 September 2012 14:09, villas villa...@gmail.com wrote: Security is clearly not at the top of your agenda :) Something like this might work: def logmein(): # minimal, insecure login function

[web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Remco K
Thanks villas! This function isn't for the 'whole wide world' but for an other internal application which needs to connect to my web2py application, so for me this isn't a insecure solution. If you or someone else knows how this can be achieved in 'the' secure way, please let me know! My

[web2py] Not authorized! ??

2012-09-12 Thread Johann Spies
This is old code - it worked without a problem before. I suspect recent upgrades broke it. I have a SQLDFORM.grid using the following links: links = [lambda row: A(B(T('View')), _target = _blank, _href = URL(r = request, c = 'articles',

[web2py] Re: web2py DAL one-to-one relation

2012-09-12 Thread martzi
Thanks to all members that shared their ideas with me: I was able to the solve my problem after setting foreign_keys attribute to on : sqlite PRAGMA foreign_keys; 0 sqlite PRAGMA foreign_keys = ON; sqlite PRAGMA foreign_keys; 1 On Monday, September 10, 2012 12:45:28 PM UTC+2, martzi wrote:

[web2py] Re: custom auth clarification

2012-09-12 Thread Massimo Di Pierro
yes. On Tuesday, 11 September 2012 18:49:29 UTC-5, Dave wrote: I am working on my own external authentication. From reading the source of gluon.tools and gluon.contrib.login_methods it appears I need a class that implements the following methods to do my own authentication: get_user()

[web2py] Re: bug in 2.0.8

2012-09-12 Thread Massimo Di Pierro
On Tuesday, 11 September 2012 21:43:10 UTC-5, Matt wrote: Hi Massimo, I've switched to trunk and yes the fields are now being created as expected. As a suggestion could the auto migration have an extra check added to ensure that upload columns - if on non filesystem environments like

[web2py] Re: Not authorized! ??

2012-09-12 Thread Niphlod
I think the problem you are facing is that all links pointing to a grid should include the user signature, that's a default requirement for grids (asuming that your show_akb_artcle and edit_akb_article are using grids as well). You can switch them off with user_signature=False in grid but

[web2py] Re: Receiving error when exporting to TSV with SQLFORM.grid (V2.0.8)

2012-09-12 Thread Massimo Di Pierro
represent takes always two values. You have represent=lambda row: row.strftime('%H:%M')), but you should have represent=lambda value,row: value.strftime('%H:%M')), On Wednesday, 12 September 2012 05:02:28 UTC-5, Gerd wrote: Hi! First: This is my first try to build a real application in

[web2py] Re: web2py 2.0.8 Firebird driver fdb error

2012-09-12 Thread Massimo Di Pierro
Please open a ticket about this. On Wednesday, 12 September 2012 07:06:33 UTC-5, Alexei Vinidiktov wrote: I'm trying to use the new fdb driver for Firebird with web2py 2.0.8 but I'm getting this error when I load a page: class 'fdb.fbcore.ProgrammingError'(Transaction object is not active)

[web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Massimo Di Pierro
Nope. auth.settings.allow_basic_login = True https://username:passw...@yoursite.com/yourapp/default/index http://en.wikipedia.org/wiki/Basic_access_authentication On Wednesday, 12 September 2012 07:09:23 UTC-5, villas wrote: Security is clearly not at the top of your agenda :) Something

Re: [web2py] Pynes notify

2012-09-12 Thread António Ramos
Also http://www.jeasyui.com/demo/index.php has some flash message also 2012/9/12 David Sorrentino sorrentino...@gmail.com Impressive. On 12 September 2012 08:40, Bruno Rocha rochacbr...@gmail.com wrote: This plugin for Bootstrap looks very nice for response.flash

[web2py] How to select only 10 last rows in a table?

2012-09-12 Thread Vladimir Makarov
So, I need to select data from the table but the only ten last rows (with highest id). I have already tried with select all records and then use while statement but I think there is another way. Any ideas? Thanks! --

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Massimo Di Pierro
if you have a SQL db then you can order them by reverse id db().select(orderby=~db.tablename.id,limitby=(0,10)) otherwise you should have some timestamp field (as created_on in auth.signature) and use that field. On Wednesday, 12 September 2012 08:09:07 UTC-5, Vladimir Makarov wrote: So,

[web2py] Re: Error: DAL object has no attribute custom_auth_table

2012-09-12 Thread Massimo Di Pierro
You cannot do: IS_NOT_IN_DB(db,'custom_auth_table.shortname',... custom_auth_table is not the table name, it is a variable. Try IS_NOT_IN_DB(db,'auth_user.shortname', You have the same problem in many places. On Wednesday, 12 September 2012 03:46:06 UTC-5, Annet wrote: I defined a

Re: [web2py] Re: Not authorized! ??

2012-09-12 Thread Johann Spies
On 12 September 2012 14:36, Niphlod niph...@gmail.com wrote: I think the problem you are facing is that all links pointing to a grid should include the user signature, that's a default requirement for grids (asuming that your show_akb_artcle and edit_akb_article are using grids as well).

[web2py] Re: Error: DAL object has no attribute custom_auth_table

2012-09-12 Thread Niphlod
PS: this auth_table (and others) is giving nightmares both to Annet and everyone reading this forum when the app is finished I want to see the code behind! :P Il giorno mercoledì 12 settembre 2012 15:17:14 UTC+2, Massimo Di Pierro ha scritto: You cannot do:

[web2py] Re: Centos 5 script for Nginx with Uwsgi and Web2py

2012-09-12 Thread Alan Etkin
I'm trying step to step now...and only was needed an little changes Answered in web2py-usuarios --

[web2py] Re: Upload from git repro - GitCommandError

2012-09-12 Thread Nico Zanferrari
Well, I think that you mean *gitpython *and not python-git, isn't it? Can you kindly correct the warning message? Thank you, Nico --

Re: [web2py] Re: web2py default layout.html

2012-09-12 Thread Kevin Miller
Yes definitely that span12 is causing the problem. Thanks guys. Now I have to add some extra padding now. On Wed, Sep 12, 2012 at 2:35 AM, Annet anneve...@googlemail.com wrote: missing some /div s for the first span12s ? You're right, it should be: header class=header mastheader div

[web2py] Re: Upload from git repro - GitCommandError

2012-09-12 Thread dhmorgan
the pypi package is 'gitpython' -- http://pypi.python.org/pypi/GitPython sudo pip install gitpython worked for me note: there is a 'gitpython' on github but that is different and useless in this case I originally tried sudo apt-get install python-git and this did not work for my Ubuntu

[web2py] Timezone

2012-09-12 Thread Rod Watkins
I have a question about timezones. What is the best way to handle datetimes entered by users. Since they will enter a datetime in their local timezone, what is the best way to transform that to a UTC datetime value before inserting it into the database? Thanks Rod --

[web2py] Re: Receiving error when exporting to TSV with SQLFORM.grid (V2.0.8)

2012-09-12 Thread Gerd
Thank you Massimo, it worked Am Mittwoch, 12. September 2012 14:38:43 UTC+2 schrieb Massimo Di Pierro: represent takes always two values. You have represent=lambda row: row.strftime('%H:%M')), but you should have represent=lambda value,row: value.strftime('%H:%M')), On Wednesday, 12

[web2py] [FYI] Pyodel is now a plugin

2012-09-12 Thread Alan Etkin
Pyodel demo is now available on Google appspot with new features: - Mode plugin (all functionalities can be deployed in web2py apps by individual components) - Course admission/attendees with CRUD - Course and lecture managing and presentation for students and teachers - Gradebooks with ajax

[web2py] Re: Upload from git repro - GitCommandError

2012-09-12 Thread Andrew
Also just fyi, I haven't had much time to work on the Git support to make it more friendly. If you're using a smart http url for a r/w repo, you won't be able to push unless you modify the url as https://user:passw...@github.com/user/project.git Right now if you don't do that it prompts you

Re: [web2py] [FYI] Pyodel is now a plugin

2012-09-12 Thread Tito Garrido
Hey Alan, I was about to test it but it requested access to my google account, is it expected? On Wed, Sep 12, 2012 at 12:00 PM, Alan Etkin spame...@gmail.com wrote: Pyodel demo is now available on Google appspot with new features: - Mode plugin (all functionalities can be deployed in web2py

Re: [web2py] [FYI] Pyodel is now a plugin

2012-09-12 Thread Alan Etkin
Oops, I's not. Let me see how do I get rid of that 2012/9/12 Tito Garrido titogarr...@gmail.com: Hey Alan, I was about to test it but it requested access to my google account, is it expected? On Wed, Sep 12, 2012 at 12:00 PM, Alan Etkin spame...@gmail.com wrote: Pyodel demo is now

[web2py] Re: Appadmin not showing default widgets for plugin tables

2012-09-12 Thread scausten
I'm having the same trouble with the following table definition (version 2.0.8) db.define_table('clients', Field('name')) db.define_table('promotions', Field('client', 'reference clients'), Field('name'),

[web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Remco K
I've tried this but i cant get this to work. in db.py i have auth.settings.allow_basic_login = True And in the controller: @auth.requires_login() When i use: http://username:password@127.0.0.1:8000/app/controller/function I get redirected to the login page. My app uses email as username

[web2py] Re: web2py default layout.html

2012-09-12 Thread Massimo Di Pierro
aha! Thanks Annet, this fixes a long standing problem. massimo On Wednesday, 12 September 2012 00:42:29 UTC-5, Annet wrote: Anthony is right, it's the span12 that's causing the problem. I had the same problem, and solved it by following the bootstrap pattern more strictly. header

Re: [web2py] [ANN] Started development on web2admin

2012-09-12 Thread rif
Added plugin configuration options (inspired by sramana's instant-admin): - items per page - extra links in sidebar Every day when I get some free time I am adding some new features. If you have requests or bug reports please don't hesitate :) Thanks, -rif --

Re: [web2py] [ANN] Started development on web2admin

2012-09-12 Thread rif
There was a problem with the installation from master tip tar gz. Created plugin archive for download herehttps://github.com/downloads/rif/web2admin/web2py.plugin.web2admin.w2p . miercuri, 12 septembrie 2012, 18:50:20 UTC+3, rif a scris: Added plugin configuration options (inspired by

[web2py] Re: Appadmin not showing default widgets for plugin tables

2012-09-12 Thread Niphlod
format is missing for the clients table . how should web2py show the clients records in the dropdown of the newly/currently editing record of promotions ? Il giorno mercoledì 12 settembre 2012 17:28:50 UTC+2, scausten ha scritto: I'm having the same trouble with the following table

[web2py] Re: web2py default layout.html

2012-09-12 Thread Annet
@Massimo, aha! Thanks Annet, this fixes a long standing problem. Well, Anthony already mentioned the span12, I just provided my solution to the problem. @Dundee In an external style sheet I defined: .pad {padding: 18px;} .pad-hor {padding: 0px 18px;} .pad-vert {padding: 18px 0px;} I use

[web2py] Re: problem adding members to group

2012-09-12 Thread greaneym
I think most of what I need is in ch. 3 about the DAL, but using this, I don't think there are any records with manager in them, so I am puzzled why I am locked out. python web2py.py -a 'your password' -i 127.0.0.1 -p 8000 gets in without gui myrecord =

[web2py] virtual fields book example

2012-09-12 Thread KMax
Hello, I was looking the book http://www.web2py.com/books/default/chapter/29/06 And intrested with: New style virtual fields (experimental) Create model.db with: db.define_table('item', Field('unit_price','double'), Field('quantity','integer')) db.item.total_price =

[web2py] Happy Programmers' Day

2012-09-12 Thread Massimo Di Pierro
https://en.wikipedia.org/wiki/Programmers'_Day --

[web2py] Re: virtual fields book example

2012-09-12 Thread Massimo Di Pierro
I think it should be db.item.total_price = Field.Virtual(lambda row: row.item.unit_price*row .item.quantity) This was an experimental feature and it may be wrong in the book. On Wednesday, 12 September 2012 11:21:10 UTC-5, KMax wrote: Hello, I was looking the book

Re: [web2py] virtual fields book example

2012-09-12 Thread Marin Pranjić
Should be: Row.item.unit_price Row.item.quantity On Sep 12, 2012 6:21 PM, KMax mkostri...@gmail.com wrote: Hello, I was looking the book http://www.web2py.com/books/default/chapter/29/06 And intrested with: New style virtual fields (experimental) Create model.db with:

[web2py] Re: Error: DAL object has no attribute custom_auth_table

2012-09-12 Thread Annet
Massimo, Thanks for your reply. I used to define a custom auth_user table the following way: auth.settings.table_user=db.define_table('auth_user', Field()) Are there any disadvantages to doing it this way? You cannot do: IS_NOT_IN_DB(db,'custom_auth_table.shortname',...

[web2py] Re: virtual fields book example

2012-09-12 Thread KMax
Thanks, That works! среда, 12 сентября 2012 г., 23:24:01 UTC+7 пользователь Massimo Di Pierro написал: I think it should be db.item.total_price = Field.Virtual(lambda row: row.item.unit_price*row .item.quantity) This was an experimental feature and it may be wrong in the book. On

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Annet
Hi Vladimir, Some time ago Anthony provided me with the following solution: maxID=db(db.node).select(db.node.id.max()).first()['MAX(node.id)'] rows=db(db.node.id=maxID-10).select(db.node.id,db.node.computedName,orderby=~db.node.id) Kind regards, Annet --

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Massimo Di Pierro
Instead of this maxID=db(db.node).select(db.node.id.max()).first()['MAX(node.id)'] I would do maxID=db(db.node).select(db.node.id.max()).first()[db.node.id.max()] to make sure it will continue work in the future. The former is implementation dependent. On Wednesday, 12 September 2012

Re: [web2py] Pynes notify

2012-09-12 Thread lyn2py
Very very nice. :D On Wednesday, September 12, 2012 3:22:02 PM UTC+8, David Sorrentino wrote: Impressive. On 12 September 2012 08:40, Bruno Rocha rocha...@gmail.com javascript:wrote: This plugin for Bootstrap looks very nice for response.flash http://pinesframework.org/pnotify/ --

Re: [web2py] [FYI] Pyodel is now a plugin

2012-09-12 Thread Alan Etkin
El miércoles, 12 de septiembre de 2012 12:19:02 UTC-3, Tito Garrido escribió: Hey Alan, I was about to test it but it requested access to my google account, is it expected? The Google account login activates if you register with an active google user session. For now you can avoid the

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Anthony
On Wednesday, September 12, 2012 12:35:41 PM UTC-4, Massimo Di Pierro wrote: Instead of this maxID=db(db.node).select(db.node.id.max()).first()['MAX(node.id)'] I would do maxID=db(db.node).select(db.node.id.max()).first()[db.node.id.max()] Well, that's what I really recommended:

Re: [web2py] Happy Programmers' Day

2012-09-12 Thread Martín Mulone
+1 2012/9/12 Massimo Di Pierro massimo.dipie...@gmail.com https://en.wikipedia.org/wiki/Programmers'_Day -- -- http://martinmulone.com.ar --

Re: [web2py] Removing labels from forms

2012-09-12 Thread Richard Vézina
I will try, but Bruno's code was : for input in form.elements(input[type='text']): input[_placeholder] = placeholders.get(input[_name], ) And it didn't catch anything... input[] return all the input... Anyway, I try and I report. Richard On Wed, Sep 12, 2012 at 1:11 AM, Anthony

Re: [web2py] Happy Programmers' Day

2012-09-12 Thread Richard Vézina
+1 On Wed, Sep 12, 2012 at 1:10 PM, Martín Mulone mulone.mar...@gmail.comwrote: +1 2012/9/12 Massimo Di Pierro massimo.dipie...@gmail.com https://en.wikipedia.org/wiki/Programmers'_Day -- -- http://martinmulone.com.ar -- --

Re: [web2py] Removing labels from forms

2012-09-12 Thread Anthony
It should be 'input[type=text]' instead of input[type='text'] (i.e., no quotes around text when using that syntax). Anthony On Wednesday, September 12, 2012 1:59:57 PM UTC-4, Richard wrote: I will try, but Bruno's code was : for input in form.elements(input[type='text']):

[web2py] How to modify the Multi Select Form in SQLFORM

2012-09-12 Thread A E
I have defined three tables db.define_table('category_cat', Field('userinfo',db.auth_user,default=auth.user_id, writable=False,readable=False), Field('name', requires=IS_NOT_EMPTY())) db.define_table('category', Field('userinfo',db.auth_user,default=auth.user_id,

[web2py] Re: How to display Users who are not admins

2012-09-12 Thread Frederick Yankowski
I haven't noticed the _select() nested-select method before. Interesting. On Tuesday, September 11, 2012 4:45:04 PM UTC-5, Massimo Di Pierro wrote: rows =

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Niphlod
ps: methods are NOT equivalent. They are if you have continous ids. But, e.g., you remove some rows. You end up with 1,2,3,4,5,6,7,8,9,10,11,13,15,17,20. Second method (i.e. calc max and go back by ten) leaves you with 20,17,15,13,11,10 (and takes two queries) First method (i.e. orderby +

[web2py] Re: Remember to delete examples application or become a spam farm

2012-09-12 Thread Frederick Yankowski
I had been removing the welcome and examples apps. They returned when I updated web2py to a new release so I created a routes.py that stubs off those apps. routes_in = ( ('/welcome/?$anything', '/nothing'), ('/examples/?$anything', '/nothing'), ) I don't have a nothing app. :) --

Re: [web2py] Re: web2py default layout.html

2012-09-12 Thread Kevin Miller
Thanks again Annet and all the others who took the time to respond to my question. On Wed, Sep 12, 2012 at 11:11 AM, Annet anneve...@googlemail.com wrote: @Massimo, aha! Thanks Annet, this fixes a long standing problem. Well, Anthony already mentioned the span12, I just provided my

[web2py] Re: How to modify the Multi Select Form in SQLFORM

2012-09-12 Thread A E
I did this which should suffice If only I could display the name of the category_cat though :-? Any ideas Field('category', db.category, requires=IS_IN_DB(db,db.category.id,'%(name)s - %(category_cat)s',multiple=True)), On Wed, Sep 12, 2012 at 11:29 AM, A E hiweb...@gmail.com wrote: I

[web2py] DAL format and represent outside of SQLFORM

2012-09-12 Thread Jim S
Given the following tables: formulaImport = db.define_table('formulaImport', Field('formulaImportId', 'id', readable=False), Field('fileName', length=256, required=True, label='File'), Field('sweptOn', 'date', required=True, label='Swept', default=datetime.datetime.today()),

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Anthony
Yes, the max solution was originally for a different problem that only needed the single max value and involved only one query. In this case, the orderby/limitby solution is the way to go. Anthony On Wednesday, September 12, 2012 2:36:37 PM UTC-4, Niphlod wrote: ps: methods are NOT

[web2py] Re: How to display Users who are not admins

2012-09-12 Thread Anthony
On Wednesday, September 12, 2012 2:34:28 PM UTC-4, Frederick Yankowski wrote: I haven't noticed the _select() nested-select method before. Interesting. http://web2py.com/books/default/chapter/29/06#belongs --

[web2py] Re: DAL format and represent outside of SQLFORM

2012-09-12 Thread Massimo Di Pierro
Given your model you can do: for x in db(db.formulaImportLine.formulaImportLineId==63901).select(): print db.formulaImportLine.formulaImportId.represent(x.formulaImportLineId) or more simply for x in db(db.formulaImportLine.formulaImportLineId==63901).select(): print x.productNumber On

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Massimo Di Pierro
On a second look this assumes that no record was deleted. It does not always select the last 10 records. On Wednesday, 12 September 2012 11:29:04 UTC-5, Annet wrote: Hi Vladimir, Some time ago Anthony provided me with the following solution:

[web2py] Re: DAL format and represent outside of SQLFORM

2012-09-12 Thread Jim S
Massimo Thanks for the reply. Yes, I know I can do it the second way, I'm trying to a generic function working that will work with any field with the represent value set. When I try the first suggestion I get the following: Traceback (most recent call last): File

[web2py] Re: DAL format and represent outside of SQLFORM

2012-09-12 Thread Massimo Di Pierro
My bad. print db.formulaImportLine.formulaImportId.represent(x.formulaImportLineId,x ) because you have: ... represent = lambda p, r: ... Here p is the value of the db.formulaImportLine.formulaImportId and r is the row. On Wednesday, 12 September 2012 15:59:02 UTC-5, Jim S wrote: Massimo

[web2py] comprehensive cheetsheet

2012-09-12 Thread Massimo Di Pierro
Assembled this for myself perhaps can be useful to others: https://dl.dropbox.com/u/18065445/Tmp/cheetsheets.pdf --

Re: [web2py] Modelless app no longer works with web2py 2.0.x ???

2012-09-12 Thread BlueShadow
So if I understand you correctly you lighten the server load and get quicker sites when you add change db=DAL(...) to db=DAL(...,lazy_tables=True) I like the everything gets better option :) On Monday, September 10, 2012 3:15:32 AM UTC+2, rochacbruno wrote: On Sun, Sep 9, 2012 at 9:27 PM,

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Niphlod
@anthony, massimo: I surely trust that you know what are you doing. My reply was only a specification for future references as the title of the post could be found by some users and may come handy. --

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Anthony
Yes, I'm glad you pointed it out. On Wednesday, September 12, 2012 5:44:58 PM UTC-4, Niphlod wrote: @anthony, massimo: I surely trust that you know what are you doing. My reply was only a specification for future references as the title of the post could be found by some users and may come

[web2py] Bug? crud.settings.auth NOT set. Forces login and all crud urls yield insuficient priveleges message

2012-09-12 Thread JoeCodeswell
Dear web2py Group, I am running 2.0.8 on win xp. I created a new simple app named forms. I added some tables to models/db.py I added the following lines to controllers/default.py from gluon.tools import Crud crud = Crud(db) def data(): return dict(form=crud()) When I navigate to

[web2py] Re: comprehensive cheetsheet

2012-09-12 Thread Andrew W
Thankyou, an excellent resource. If I could suggest one more, and I'd be happy to attempt this. I don't know about others, but before I can make any sense of a page's layout and what other people are saying about css ids and classes (this happened with the menu bar), is that I have to draw a

[web2py] Redis: RedisCache error

2012-09-12 Thread devrunner
Any idea guys what's the problem in this error: from gluon.contrib.redis_cache import RedisCache cache.redis = RedisCache('localhost:6379', db=None, debug=True) Traceback (most recent call last): File stdin, line 1, in module File gluon/contrib/redis_cache.py, line 39, in RedisCache

[web2py] Howto? Host 2 or more applications in a single web2py folder to google app engine

2012-09-12 Thread Pystar
I have one web2py installation on my system containing 2 applications. I want to upload both to google app engine. How do I specify that in the app.yaml file? is it even legal? or are there some pitfalls I have to look out for? --

[web2py] Re: How to select only 10 last rows in a table?

2012-09-12 Thread Vladimir Makarov
Thank you all for your hints!!! The easiest way, of course, is to use *orderby *and *limitby*. It works fine. But the MAX method is usefull too. I'll use it in my projects. On Wednesday, September 12, 2012 5:09:07 PM UTC+4, Vladimir Makarov wrote: So, I need to select data from the table but

  1   2   >