Re: [web2py] Apostrophe's disapperaing

2013-12-13 Thread peter
Thank you Jonathon for taking the time to make two good suggestions. The first did not get the apostrophes to appear. WRT the second, one can only control the encoding of Word when outputting txt files. I have now created a work around, a bit ugly but the best I can achieve for the moment.

[web2py] Re: Can't edit default.py after upgrade to 2.8.2

2013-12-13 Thread Paolo Valleri
Please, let us know what you have changed in the last days, if today nothing work and in the early days only default.py. @devs we should try to update response.static_version for each new major release at least. Paolo On Friday, December 13, 2013 10:27:04 AM UTC+1, Richard Brown wrote:

[web2py] count amount of times a field is present in selection and fetch a record for each

2013-12-13 Thread Ivo
I have a list containing record id's and need to select those records from a table. then I need to count how many different values are contained in the fields and for each select the first record of an other table. ids = session.people.keys() persons = {} for id in ids:

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Kevin Bethke
thanks but to be honest now I'm even more confused. why do you need a piece of jquery code in a javascript variable. I sopose you included the entire jquery library. Why do you do the ordering with javascript and not with python is there a special reason for this? I think I just explained the last

[web2py] Customization of the SQLFORM in html

2013-12-13 Thread curly
Hello! I'm new to web2py and have just started running web2py 2.8.1 in ubuntu 12.04. I am trying to customize the style of SQLFORM in web2py views. Tried to do this using SQLFORM in HTML. What I have is:- model: db.define_table( register, Field('pi_id',db.pi),

[web2py] Re: Dropdown list in form

2013-12-13 Thread Warrick
Thanks guys, Both worked! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups

[web2py] Re: REF: Ajax Authentication

2013-12-13 Thread Leonel Câmara
That's a horrible idea Derek. You could however have the controller check auth.is_logged_in() instead of using the decorator. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Customization of the SQLFORM in html

2013-12-13 Thread Massimo Di Pierro
Yes. Replace form action=# enctype=multipart/form-data method=post ul liYour name is input name=name //li liYour group is input name=grp_name //li liYour request date is input name=req_date //li liYour email is input name=email //li /ul input type=submit / input type=hidden

Re: [web2py] Apostrophe's disapperaing

2013-12-13 Thread Jonathan Lundell
On 13 Dec 2013, at 2:29 AM, peter peterchutchin...@gmail.com wrote: Thank you Jonathon for taking the time to make two good suggestions. The first did not get the apostrophes to appear. WRT the second, one can only control the encoding of Word when outputting txt files. I have now created

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Richard Vézina
I am sorry about that... Web2py default behavior for list:reference or reference is a HTML Select and option... This is ordered by the navigator base on the spelling of the element... So when you edit your form if you want to maintain the preexisting order (the one that were there when you select

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Kevin Bethke
Thanks it explains a lot. I will try to work on it as soon as I got the time. Unfortunatly we got a deadline at work which is Christmas. So I will probably not work on it till than. On Fri, Dec 13, 2013 at 3:53 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: I am sorry about that...

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Kevin Bethke
Well actually I got one more question: How do you change the standard form from web2py, to use the bsmselect form? On Fri, Dec 13, 2013 at 4:18 PM, Kevin Bethke kevin.bet...@gmail.comwrote: Thanks it explains a lot. I will try to work on it as soon as I got the time. Unfortunatly we got a

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Richard Vézina
You init the js on the field!! Richard On Fri, Dec 13, 2013 at 10:20 AM, Kevin Bethke kevin.bet...@gmail.comwrote: Well actually I got one more question: How do you change the standard form from web2py, to use the bsmselect form? On Fri, Dec 13, 2013 at 4:18 PM, Kevin Bethke

[web2py] Re: help-block in Bootstrap forms

2013-12-13 Thread Niphlod
is the endgame really let response.menu generate a structure than is converted every time server-side ? Shouldn't we avoid server-side dom at all costs ? On Friday, December 13, 2013 3:21:28 PM UTC+1, Paolo Caruccio wrote: Thank you LightDot. In the next few days I'll send to your private

[web2py] SQLForm Grid

2013-12-13 Thread LaDarrius Stewart
Is there to only give the add(create) functionality of the sqlform.grid Example: db.define_table('Participant', Field('FirstName' , 'text'), Field('LastName' , 'text') fields = [ db.Participant.FirstName ] headers = {'Participant.FirstName': 'FirstName'}

[web2py] Re: help-block in Bootstrap forms

2013-12-13 Thread Paolo Caruccio
Well we could convert the menu on client side but I found several ugly rendering issues. And why we should avoid server-side dom? I think that it is an interesting web2py feature. However since your opinion is important for me, do you think the following function might have a bad impact

[web2py] Re: count amount of times a field is present in selection and fetch a record for each

2013-12-13 Thread Leonel Câmara
You need to be more clear with what you're trying to do, I also don't know what the hell is in db.parking table or in db.person. This makes it very difficult to help you. BTW you could just do this to get a list of persons: persons = db(db.person.id.belongs(session.people.keys())).select()

[web2py] Re: SQLForm Grid

2013-12-13 Thread LaDarrius Stewart
Also in my model I have db.Participant.Member_Local.widget = SQLFORM.widgets.autocomplete(request, db.Locals.LocalName, id_field=db.Locals.Id) Is there a way to pass a given list of ids instead of the available Ids in the entire db. i.e. allowed=(1,2,3) db.Participant.Member_Local.widget =

[web2py] Re: Import error for requests

2013-12-13 Thread John Zumsteg
I can answer my own question here, kind of. I was able to make this work by copying the requests folder from /Library/Python/2.7/site-packages/*requests-2.1.0-py2.7.egg* to the application's modules folder. This makes it work for this application, but it seems to me that having it in the

[web2py] Re: The procedure entry point wcspy_s could not be located in the dynamic link library msvcrt.dll

2013-12-13 Thread mikech
I am also getting the the procedure entry point wcspy_s could not be located in the dynamic link library msvcrt.dll on WinXP and this is a clean install with no pre-existing projects of databases. On Thursday, December 5, 2013 1:12:53 PM UTC-8, Niphlod wrote: recent web2py version enforce FK

[web2py] Re: help-block in Bootstrap forms

2013-12-13 Thread Niphlod
IMHO there's no point on having web2py serializing by default a structure (response.menu) to a string (the html markup) and then reparse it back to a structure (elements) to move a few pieces back and forth and then reserializing those pieces back to html markup. It's just a waste of cpu. The

[web2py] Re: The procedure entry point wcspy_s could not be located in the dynamic link library msvcrt.dll

2013-12-13 Thread Niphlod
jump on the bandwagon yourself! http://code.google.com/p/web2py/issues/detail?id=1809 On Friday, December 13, 2013 8:30:29 PM UTC+1, mikech wrote: I am also getting the the procedure entry point wcspy_s could not be located in the dynamic link library msvcrt.dll on WinXP and this is a

[web2py] Error with session when user tries to login

2013-12-13 Thread Marin Pranjić
This happens when customer tries to login. I have no idea why it happens and it works when I try it on localhost. web2py™Version 2.8.2-stable+timestamp.2013.11.28.07.51.37PythonPython 2.7.3: /usr/bin/python (prefix: /usr) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most

[web2py] routes.py URL rewriting

2013-12-13 Thread Gael Princivalle
Hello all. I've read a lot of literature about routes.py, it's amazing how it can be powerful and complex. However for my simple needs I don't reach to find the solution. In my web2py root folder I have this routes.py, using the parameter-based system: routers = dict( BASE = dict(

[web2py] Re: Error with session when user tries to login

2013-12-13 Thread Leonel Câmara
Yes, Lucas and I are having the same problem. https://groups.google.com/forum/#!topic/web2py/CSuT_CknD20 Restarting the webserver temporarily solves the problem for me. Saving sessions in db also seems to make the problem take longer to appear. For me, it's happening with apache in windows,

[web2py] Re: count amount of times a field is present in selection and fetch a record for each

2013-12-13 Thread Ivo
sorry for being unclear. I want to assign a parkingspot_code for each user_name in either a form or a grid and populate it with some other data from the people db The db.parking table contains: db.define_table('parking', Field('parkingspot_code', 'string', unique=True), Field('used',

[web2py] Re: Show / Hide buttons

2013-12-13 Thread Michel Hayek
Thanks Steve awesome. On Thursday, December 12, 2013 12:24:21 PM UTC-6, Michel Hayek wrote: Hey guys, *I have this in the db.py* *db.define_table('t_usertypes',* *Field('f_usertype',label='User Type :', required=True, notnull=True),* *

[web2py] Drop down not showing

2013-12-13 Thread Michel Hayek
Hi guys, I have 2 tables defined Auth_User(PK=id) and Companies(PK=ID) I also defined User_Has_Companies which has 2 columns USER_ID and COMP_ID together should form a PK. *db.py:* *db.define_table('t_user_has_companies',* *Field('first_name', 'reference auth_user', label='User',

[web2py] cannot figure out class 'cPickle.UnpicklingError' invalid load key, ''.

2013-12-13 Thread Evan Caldwell
I got this error today after doing a git pull from my repo (there is one other person working on this code as well). I'm sure I'm missing something small but I don't know what. I also cannot get into database administration due to the same error. Thanks in advance for the help. class

Re: [web2py] Re: Error with session when user tries to login

2013-12-13 Thread Marin Pranjić
Ok, let's continue discussion there. Marin On Fri, Dec 13, 2013 at 9:16 PM, Leonel Câmara leonelcam...@gmail.comwrote: Yes, Lucas and I are having the same problem. https://groups.google.com/forum/#!topic/web2py/CSuT_CknD20 Restarting the webserver temporarily solves the problem for me.

Re: [web2py] routes.py URL rewriting

2013-12-13 Thread Jonathan Lundell
On 13 Dec 2013, at 12:01 PM, Gael Princivalle gaelprinciva...@gmail.com wrote: I've read a lot of literature about routes.py, it's amazing how it can be powerful and complex. However for my simple needs I don't reach to find the solution. In my web2py root folder I have this routes.py,

[web2py] Re: login crash under 2.8.2

2013-12-13 Thread Marin Pranjić
I just found this: https://groups.google.com/forum/#!searchin/web2py/weird$20auth$20error/web2py/jkqyPM5_zaE/Ve5gy7greuoJ This is version 2.4.5 so it is NOT something introduced in recent version. I am also privileged to feel the pain that this issue causes in production. Marin -- Resources:

[web2py] Re: SQLForm Grid

2013-12-13 Thread 黄祥
i think you can achieve it with : not tested create = True editable = False deletable = False searchable = False details = False csv = False sortable = False links_in_grid = False showbuttontext = False def participant(): grid=SQLFORM.grid(*db.*Participant, create = create, editable =

[web2py] Re: The procedure entry point wcspy_s could not be located in the dynamic link library msvcrt.dll

2013-12-13 Thread mikech
Done :) On Friday, December 13, 2013 11:34:33 AM UTC-8, Niphlod wrote: jump on the bandwagon yourself! http://code.google.com/p/web2py/issues/detail?id=1809 On Friday, December 13, 2013 8:30:29 PM UTC+1, mikech wrote: I am also getting the the procedure entry point wcspy_s could not be

[web2py] Re: Drop down not showing

2013-12-13 Thread 黄祥
*db.define_table('t_user_has_companies',* *Field('first_name', 'reference auth_user', label='User', writable=True, readable=True, notnull=True, required=True, ondelete='NO ACTION', requires=IS_IN_DB(db, db.auth_user, '%(id)s %(first_name)s %(last_name)s')),* *

[web2py] Scheduler - observation

2013-12-13 Thread Marin Pranjić
So I have a task queued at 00:02:07. I have a worker for that group with last_heartbeat 00:07:55. Task is still QUEUED. Worker is ACTIVE. I have TWO is_ticker workers (usually it's one). Scheduler is up for days, it usually works. Two days ago I was resetting databases so I dropped most of the

[web2py] Re: Drop down not showing

2013-12-13 Thread Cliff Kachinske
What is this line all about? db.t_user_has_companies.first_name.requires=IS_NOT_IN_DB(db(db.t_user_has_companies.f_coname==request.vars.f_coname),db.t_user_has_companies.first_name) Also, these lines in your t_user_has_companies table def don't match what you say about them.

[web2py] Re: Error with session when user tries to login

2013-12-13 Thread Massimo Di Pierro
have you deleted all sessions or are you using sessions created with a previous version? On Friday, 13 December 2013 13:40:18 UTC-6, Marin Pranjić wrote: This happens when customer tries to login. I have no idea why it happens and it works when I try it on localhost. web2py™Version

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Jesse Ferguson
sorry to hop in and ask a silly question but, when you say init the js on the field how is that supposed to be done in web2py? Is it done in the view? would it be ideal to put the js in the template and then pass params? any named optional attribute is passed to the form tag for

[web2py] Re: help-block in Bootstrap forms

2013-12-13 Thread Paolo Caruccio
Thank you Niphlod. I see what you mean. I'll try to convert my code in order to build a custom formstyle. However, I'll share my code with the web2py users group: maybe it could be useful to someone. About the menu, I have in my mind a simple change to the MENU helper that should semplify its

[web2py] Re: Drop down not showing

2013-12-13 Thread Michel Hayek
Ok here is the new table def. db.define_table('t_user_has_companies1', Field('USER_ID', 'reference auth_user', label='User', writable=True, readable=True, notnull=True, requires=IS_IN_DB(db, db.auth_user, '%(id)s %(first_name)s %(last_name)s')), Field('COMP_ID', 'reference

[web2py] Re: Drop down not showing

2013-12-13 Thread 黄祥
just a suggestion, why not start your code from simple, like the python philosophy 'simple is better than complex, complex is better than complicated'? after start your code from simple than add the DAL field constructor one by one. e.g. *step 1 : for starting i comment the on_define (for dal

[web2py] dal store data in more than 1 database

2013-12-13 Thread 黄祥
hi, is it possible for dal store data in more than 1 database? let say i use database 'production1' with mysql backend, while during the daily usage i want to make a copy of that database also in sqlite backend or maybe another database name 'testing1' with mysql backend. i know i can do it

Re: [web2py] Re: Multiple submit buttons using selectable in SQLFORM.grid

2013-12-13 Thread Tim Richardson
multiple action buttons via passing a list to selectable is now documented in the book (github) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You

[web2py] Field (..update=auth.id..) does not seem to work for me.

2013-12-13 Thread TSmith
There exists a table. I added the modified_by field as shown below. I also tried the second version which is what I really want. db.define_table('DOCUMENTATION', Field('documentation_type','string'), Field('modified_by', 'reference auth_user', default=auth.user_id,

[web2py] Reddit Clone Week 3 video jQuery error

2013-12-13 Thread Doug Hauenstein
I am following the week 3 video and trying to learn by doing so I am trying to duplicate the application as presented in the video. Do I have to initialize jQuery or do I have a syntax error??? firebug ooutput: === ReferenceError: JQuery is not defined

[web2py] Re: help-block in Bootstrap forms

2013-12-13 Thread LightDot
Most of the work already done on bootstrap 3, foundation 5, etc. can be reused. The DOM manipulating parts are also bound to be useful - as an example of what can be done, if nothing else. I'm using the plugin_layout_cssfw functionality to keep bootstrap 2 3, bootswatch 2 3 and foundation 5

[web2py] Re: Field (..update=auth.id..) does not seem to work for me.

2013-12-13 Thread Massimo Di Pierro
Should not be default=auth.user but default=auth.user_id (same for update=...) Anyway you will get Null when user_id is None. On Friday, 13 December 2013 12:23:49 UTC-6, TSmith wrote: There exists a table. I added the modified_by field as shown below. I also tried the second version which

[web2py] Re: Reddit Clone Week 3 video jQuery error

2013-12-13 Thread Massimo Di Pierro
JQuery should be jQuery On Friday, 13 December 2013 15:30:06 UTC-6, Doug Hauenstein wrote: I am following the week 3 video and trying to learn by doing so I am trying to duplicate the application as presented in the video. Do I have to initialize jQuery or do I have a syntax error???

[web2py] Re: Reddit Clone Week 3 video jQuery error

2013-12-13 Thread Doug Hauenstein
Syntax! Thank you! On Friday, December 13, 2013 8:38:24 PM UTC-5, Massimo Di Pierro wrote: JQuery should be jQuery On Friday, 13 December 2013 15:30:06 UTC-6, Doug Hauenstein wrote: I am following the week 3 video and trying to learn by doing so I am trying to duplicate the application as