[web2py] Re: class nav-collapse in layout.html

2012-12-07 Thread Paolo Caruccio
Nav-collapse is a bootstrap class. Are you using default web2py configuration or have you modified something? I'm on windows7 and all works fine with last trunk. Il giorno venerdì 17 agosto 2012 00:05:09 UTC+2, mweissen ha scritto: > > I have a program with a menu and I tried Firefox and Google

Re: [web2py] Re: raw web2py

2012-12-07 Thread Martin Weissenboeck
About performance: Is it better (1) to have only few controllers with a lot of functions in it or (2) to have a lot of controllers with only few functions or (3) is there - from the point of view of performance - no difference? 2012/12/7 Massimo Di Pierro > Hello dbv, > > about nginx we will ad

[web2py] Re: SQLFORM.grid: search and links

2012-12-07 Thread tomt
After some more investigation I found out that the latest trunk has the added options: buttons_placement = 'right', ): links_placement = 'right' With this option I can set links_placement ='l

[web2py] Re: Basic access control

2012-12-07 Thread Massimo Di Pierro
auth.settings.create_user_groups = None On Friday, 7 December 2012 12:59:36 UTC-6, dbv wrote: > > Is it possible to support user authorization and authentication at the > user level only ie. we don't need a role to be defined? --

[web2py] Re: crud.update returning 404 NOT FOUND ??

2012-12-07 Thread Massimo Di Pierro
I suspect the problem is somewhere else. Are you sure crud.update(...) is being called? On Friday, 7 December 2012 21:52:25 UTC-6, Luca wrote: > > I have the following simple code, which is meant to let a user do a new > submission, or update a submission if one exists: > > sub = db(db.submis

[web2py] Basic access control

2012-12-07 Thread dbv
Is it possible to support user authorization and authentication at the user level only ie. we don't need a role to be defined? --

[web2py] Re: SQLFORM.grid: search and links

2012-12-07 Thread tomt
I would also like to be able to change the position of the 'links' column. I see that your post didn't receive any answers. Did you figure out how to do this? If you did, I would appreciate if you could tell me how. - Tom On Sunday, January 29, 2012 4:33:21 PM UTC-6, backseat wrote: > > I've a c

[web2py] crud.update returning 404 NOT FOUND ??

2012-12-07 Thread Luca
I have the following simple code, which is meant to let a user do a new submission, or update a submission if one exists: sub = db(db.submission.author == auth.user_id).select().first() form = crud.update(db, record=sub, deletable=True, next=URL('default', 'index

Re: [web2py] Can I have field comments while editing, but not in view?

2012-12-07 Thread Luca
Thanks... what I really don't know is, if you do that, is it a permanent change to the db.table.field definition, or is it for the processing of the current request only? I think my confusion is due to the fact that in other formalisms (e.g. Django), these settings are permanent, as not everyth

Re: [web2py] Can I have field comments while editing, but not in view?

2012-12-07 Thread Bruno Rocha
> if request.args[0] in ['edit']: > db.table.field.comment = 'yadayada' > --

[web2py] How to define a database "deserialiation" function to decide the editable form of a field?

2012-12-07 Thread Luca
Suppose I want to store some data in the database, defining my own translation from user-defined strings to db representation, and vice versa. Obviously this may not work for search, but leave search aside. To translate from user input to db representation, I can use the compute= attribute of

[web2py] Can I have field comments while editing, but not in view?

2012-12-07 Thread Luca
I am using SQLFORM.grid, and if I set: db.table.field.comment = 'yadayada' I would like 'yadayada' to appear while editing the field (to help users to understand what to put in), but not while displaying the field in view mode (because there, I can use db.table.field.represent = my_smart_repr

[web2py] Re: Unable to update database

2012-12-07 Thread Daniele
Worked!!! Thanks s much this has been bugging me for a while. On Saturday, December 8, 2012 12:15:49 AM UTC, Anthony wrote: > > db.define_table('tutor', > > Field('user', 'reference auth.user.id'), >> ...) >> > > This is not correct. It should be 'reference [table name]', so in thi

[web2py] Re: Unable to update database

2012-12-07 Thread Anthony
> > db.define_table('tutor', Field('user', 'reference auth.user.id'), > ...) > This is not correct. It should be 'reference [table name]', so in this case, 'reference auth_user'. Perhaps you are attempting to set the default to be auth.user.id (same as auth.user_id) -- to do that, do:

[web2py] Re: Unable to update database

2012-12-07 Thread Daniele
Alright I think I got it to work although I don't know if it's correct. Basically, I added a user variable to the update_or_insert() function, as follows: db.tutor.update_or_insert(db.tutor.user==auth.user_id, user = auth.user_id, t_Hourly_Rate = tform.vars.t_Hour

[web2py] Re: Unable to update database

2012-12-07 Thread Daniele
Ok that seems to have done the trick. However, it's creating a new record every time which means that the logged in user does not refer to the tutor table. Does the id field have to be the same as auth.user_id? The id field seems to be generated automatically. In my tutor table I have a line tha

[web2py] Re: web2py and rendering geometries (from postgresql)

2012-12-07 Thread howesc
not exactly what you are looking for, but i'm storing geo points for shapes on google app engine, and then rendering delivery zones on a google map for http://www.diginn.com/order/ (enter an address in New York, NY USAduring "business hours" in the EST and it will bring up the locations map

[web2py] Re: Unable to update database

2012-12-07 Thread Anthony
You can try update_or_insert() . Anthony On Friday, December 7, 2012 5:54:58 PM UTC-5, Daniele wrote: > > I am unable to update entries in my database. I think I have an idea of > why this may be, but I'm not sure how to go about f

[web2py] Unable to update database

2012-12-07 Thread Daniele
I am unable to update entries in my database. I think I have an idea of why this may be, but I'm not sure how to go about fixing this. In my controller, I have: tform = SQLFORM.factory( Field('is_tutor', 'boolean'), *[f for f in db.tutor if f.name.startswith('t_')], table

[web2py] How to customize when the top menu navigation collapses?

2012-12-07 Thread Luca
I would like to use a minimal top bar for my site, where there are items from response.menu on the left, and the login information on the right. However, I notice that the menu items are collapsed when there is still a lot of space on the top bar -- I need to use a VERY wide browser window in

[web2py] Re: class nav-collapse in layout.html

2012-12-07 Thread Luca
I have the problem that the menus are collapsed even when there is ample space on the navbar for the items. Removing nav-collapse and replacing with nav solves this, but the menu button still appears before it is actually needed. Does anyone know how to fine tune the behavior of menu collapse?

Re: [web2py] Re: ('web2py' in pycon.us.talks) == False

2012-12-07 Thread Derek
> > > web2py is not the issue here. > > The issue is that in 2013 somebody can attend PyCon and not will not be > exposed to any other web framework but Django (12 talks + tutorials) and > Pyramid (2 talks). > >> >> Exactly, Even if web2py is not in the talks, the fact that there is only two w

[web2py] Re: janrain logs in but stuck on login screen

2012-12-07 Thread Massimo Di Pierro
I think the problem is that you need this: from gluon.contrib.login_methods.rpx_account import RPXAccount auth.settings.actions_disabled=['register','change_password','request_reset_password'] auth.settings.login_form = RPXAccount(request, api_key='...',

[web2py] Re: raw web2py

2012-12-07 Thread Massimo Di Pierro
Hello dbv, about nginx we will add something to the book but meanwhile we provide two setup scrpts: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-on-centos.sh About gevent you

[web2py] raw web2py

2012-12-07 Thread dbv
We are considering using web2py because it offers strong access control and user session management. Our first application is not database-heavy and so db issues are not an issue. Performance is important but should be fine with Nginx: a. Why isn't Nginx configuration included in the web2py

[web2py] Re: janrain logs in but stuck on login screen

2012-12-07 Thread Jeff Kusi
Could somebody address this issue please? Mine is also doing the same thing. here's how my config looks: --- from gluon.tools import Auth, Crud, Service, PluginManager, prettydate auth = Auth(db) from gluon.contrib.login_methods.rpx_account import RPXAccount auth.settings.acti

[web2py] Re: web2py and auto-generated RESTful views?

2012-12-07 Thread Niphlod
I don't understand: using js frameworks like angularjs requires to move the "logic" much more towards the View than the Controller... anyway, what do you mean by "generating decoupled views" ? response.render() ? On Friday, December 7, 2012 7:43:31 AM UTC+1, Alec Taylor wrote: > > AngularJS is a

Re: [web2py] Re: need help: No space left on device

2012-12-07 Thread Vasile Ermicioi
yes, it is because of tickets, after removing all of them it works(login) thank you --

Re: [web2py] what are groups, membership, and permissions?

2012-12-07 Thread Vinicius Assef
The basics is users and groups. Users are people registered in your app. Groups are their roles: manager, secretary, financial, and so on. Each user has at least one role, ie, belongs to at least one group. This is a membership. Each group defines a profile, ie, a set of permissions users that be

[web2py] what are groups, membership, and permissions?

2012-12-07 Thread sasogeek
I don't understand very well from the documentation what groups, membership and permissions are. I'm creating an app where i want to allow user to tag posts, and other users can see those posts if they are "subscribed" to any of those tags. if they're not, then they don't have permission to see

[web2py] Re: need help: No space left on device

2012-12-07 Thread Massimo Di Pierro
Probably have lots of sessions/ticket files. Mind this can cause corruption of sqlite database. On Friday, 7 December 2012 03:30:34 UTC-6, Vasile Ermicioi wrote: > > hi, > > > I know that this is not because of web2py, but I am getting an error which > says "No space left on device" > Is it beca

[web2py] Re: Allowing external access to web2py server ?

2012-12-07 Thread Massimo Di Pierro
python web2py.py -a passwd -i 0.0.0.0 -p 80 On Friday, 7 December 2012 03:21:55 UTC-6, Richard Shea wrote: > > I want to start a web2py server so that it can be accessed externally > to the hosting server. > > I've read this http://web2py.com/books/default/chapter/29/03 > > By default, web2py runs

[web2py] Re: onaccept in CRUD

2012-12-07 Thread Massimo Di Pierro
The error you are getting is a database error, not a web2py error, it says you are trying to insert a record with a duplicate id. Perhaps the data is already corrupted in db. On Friday, 7 December 2012 00:06:43 UTC-6, Kenneth wrote: > > Hi, > > this is a legacy table and asset_id is the id for t

Re: [web2py] Re: ('web2py' in pycon.us.talks) == False

2012-12-07 Thread Marco Mansilla
Well, to me it seems that DjangoCon has moved to PyCon... so, whatever, we must have our Web2pyCon and stop trying to be heard by deft people... PS: i still remember this and is awesome http://www.youtube.com/watch?v=i6Fr65PFqfk > Hi folks -- > > I'm the program chair for PyCon 2013. I can see y

[web2py] need help with groupby in grid

2012-12-07 Thread Mark
Hello, I have following records in a table for example: id, key, value 10, AA, 838 11, BB, 135 12, BB, 147 13, AA, 400 14, AA, 999 15, AA, 625 db.define_table('test', Field('key'), Field('value')) I want to display the max value in each key group in the grid, such as: 12, BB, 147 14, AA, 999 q

Re: [web2py] Re: REF: Adding a field to SQLFORM() from another table

2012-12-07 Thread Teddy Nyambe
Ok great, I have noted: my_extra_element = TR(LABEL('Test:'), INPUT(_name='test',value='Some text',_type='text')) form[0].insert(-1,my_extra_element) Now, in view how do I show the field "test" using custom display as in using {{=form}} its appearing: {{=form.custom.widget.test}} Kind regards

[web2py] Re: I do not use cache, but the system cache throws me errors .. : S

2012-12-07 Thread Anthony
I don't think the cache system is causing the problem. In this line: plugin_inscripcion_temp = db.plugin_inscripcion_temp(id= plugin_inscripcion_temp_id, user=id_user) the value of either plugin_inscripcion_temp or id_user is 'cache' (i.e., a string literal, not the web2py cache object) rather t

[web2py] I do not use cache, but the system cache throws me errors .. : S

2012-12-07 Thread www.diazluis.com
greetings to all. Thanks for your time. lately I've been spending have my app cache error but I do not use the cache my app using sqlite database, and run on your own server. I use debian 6 web2py v. 2.2.1 the error I have is: 19 plugin_inscripcion_temp.py ValueError: invalid literal for int()

[web2py] Re: IS_IN_SET problem.

2012-12-07 Thread Annet
Hi Alan, Thanks for making it an "issue" and providing a possible patch. Kind regards, Annet --

[web2py] Re: auth.wiki() writes apsolute links for wiki pages. Can I change it to write only relative url?

2012-12-07 Thread Alan Etkin
> On Friday, December 7, 2012 8:46:12 AM UTC-3, Dragan Matic wrote:Currently if I write markmin link in auth.wiki() like this: [[Some > link text @some-wiki-page]] - link is written as absolute URL. If I move my database to another site all the links in wiki pages > break. Can I change this

[web2py] Allowing external access to web2py server ?

2012-12-07 Thread Richard Shea
I want to start a web2py server so that it can be accessed externally to the hosting server. I've read this http://web2py.com/books/default/chapter/29/03 By default, web2py runs its web server on 127.0.0.1:8000 (port 8000 > on localhost), but you can run it on any available IP address and > port.

[web2py] auth.wiki() writes apsolute links for wiki pages. Can I change it to write only relative url?

2012-12-07 Thread Dragan Matic
Currently if I write markmin link in auth.wiki() like this: [[Some link text @some-wiki-page]] - link is written as absolute URL. If I move my database to another site all the links in wiki pages break. Can I change this behavior or is this a feature? Dragan --

[web2py] Re: need help: No space left on device

2012-12-07 Thread Alan Etkin
> I know that this is not because of web2py, but I am getting an error which says "No space left on device" > Is it because of no space on disk or can be also something else? Perhaps this can help: http://stackoverflow.com/questions/6998083/python-causing-ioerror-errno-28-no-space-left-on-device-

[web2py] Re: IS_IN_SET problem.

2012-12-07 Thread Alan Etkin
> > default=0,requires=IS_IN_SET([0,1,2,3,4,5,6,7,8,9,10])), > > When rating is 0 the drop down field is empty and the drop down list shows > the set of ints. > When rating is greater than 0 the drop down field does display the int. > I think this this should be fixed: http://code.google.com/p/

[web2py] need help: No space left on device

2012-12-07 Thread Vasile Ermicioi
hi, I know that this is not because of web2py, but I am getting an error which says "No space left on device" Is it because of no space on disk or can be also something else? Traceback (most recent call last): File "/home/myuser/web2py/gluon/main.py", line 447, in wsgibase parse_get_post_

Re: [web2py] Re: controller that don't returns a view?

2012-12-07 Thread Jonas Fredriksson
Thanks. Actually the call comes from a button: It has to provide the right result.id so the like addition relates to the right post. I will try using callbacks from the button call to see if it works. On Thu, Dec 6, 2012 at 11:17 PM, Niphlod wrote: > Learned something also today! Nice one Anth