Re: [web2py] examples database

2012-05-22 Thread alazar baharu
hi Ivica Kralj your posts are help full to me and now i have fixed my problem with your great full help thanks and again let me ask you one question is there any application developed for an attendance system in one organization using web2py what can you will recommend me. 10ks ok man On Mon,

[web2py] how to redirect after impersonate?

2012-05-22 Thread weheh
.

[web2py] Limiting search fields in grid

2012-05-22 Thread Johann Spies
Previously I could do: search_options = {'string':['contains']} fields = [db.wbmaster.parent_organisation, db.wbmaster.name_of_initiative] links = [lambda row: A('View' , _href = URL('wbank', 'viewmaster', args = [ row.id]))]form = SQLFORM.grid(db.wbmaster, deletable = False,

[web2py] Re: How to create a user account programmatically?

2012-05-22 Thread Alan Etkin
1 Have you used something like this? user = auth.login_bare(em...@example.com, password) You can examine the user value to check if the function logged the user in. 2 Massimo provided a solution for the auto user creation here: https://groups.google.com/d/msg/web2py/QlsqK1xhoD4/uUbDnbDNw9YJ

[web2py] Re: How to use web2py DAL with sybase? Can we modify the adapter to use pyodbc?

2012-05-22 Thread dlypka
Our corporate standard OS is 32 bit Windows Vista. The Sybase driver list at sourceforge.net is only for Windows XP which will not work. I searched internet and it looks like the only good sybase driver is one that has to be purchased. There is also one with source which has to be built but that

[web2py] Re: How to create a user account programmatically?

2012-05-22 Thread villas
Hi Luca, Not sure whether it is the best way, but I have this code to auto-create my first user: if not dbauth(dbauth.auth_user.id0).count(): dbauth.auth_user.insert(first_name=Admin,last_name=Username,email= myem...@address.com,

Re: [web2py] Re: Help me prepare a talk on Web2py for the June Meetup of the Atlanta Python User Group (PyATL).

2012-05-22 Thread Cliff Kachinske
Thank you. I think I will use this. On Mon, May 21, 2012 at 9:44 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Perhaps this can be useful. Sample: http://dl.dropbox.com/u/18065445/MarkminSlides/test.html Source: https://github.com/mdipierro/markmin-reveal-slides It turns a

Re: [web2py] examples database

2012-05-22 Thread Ivica Kralj
No problem :) I haven't came across any specific attendance system, and this topic being very broad on how it can be implemented and used, I'm not sure if you will find ready made app which fulfils all your requirements. My suggestion is to start with web2py example appliances page (

[web2py] Re: auth.has_membership(None) == True # is this correct?

2012-05-22 Thread Massimo Di Pierro
I never thought of that. Does the set of groups I am part of include the empty set? On Monday, 21 May 2012 23:40:21 UTC-5, weheh wrote: I'm seeing auth.has_membership(None) == True. How can this be a good thing?

[web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Massimo Di Pierro
If knew we would have released it. ;-) do you think it should? On Tuesday, 22 May 2012 00:15:49 UTC-5, Matt wrote: Hi Massimo, Quick question if I may, Will the upcoming 2.0 bootstrap code support the html style forms that bootstrap uses? Thanks in advance, Matt On Sunday, 20 May

[web2py] Re: how to redirect after impersonate?

2012-05-22 Thread Massimo Di Pierro
def impresonate(): r = auth.impersonate() if not isinstance(r,SQLFORM): redirect() return dict(form=r) On Tuesday, 22 May 2012 02:05:32 UTC-5, weheh wrote: .

[web2py] Re: Is there anyone who running web2py application on Redhat openshift?

2012-05-22 Thread Changju
Hi JungHyun. Yes, I'm rookiecj. Nice to meet you :) Pythonanywhere, as you can see from the name, they provide a good tools for people who like python and web2py. They provide - a shell through Web(through port 80) that you can login from anywhere. - quick setup for web2py already. -

[web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Ross Peoples
There may even be an experimental workflow engine in there if I can finish it in time.

[web2py] Re: Support for MS Access?

2012-05-22 Thread Larry Wapnitsky
Has anyone tested this further? I have an Access database that I'd like to parse for a web2py project. It's a live database that's too big to export to MySQL right now. Thanks, Larry On Thursday, March 17, 2011 9:07:03 AM UTC-4, DenesL wrote: It depends on how you want to connect. The

[web2py] Re: How to create a user account programmatically?

2012-05-22 Thread Anthony
To validate a user-password pair, I can use auth.login_bare. Two questions: 1. Auth.login_bare does not cause the user to be logged in: for instance, auth.user_id is not set afterwards. Is there a way to also log in a user, not only validate the username/password pair? It

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-22 Thread Ashraf Mansour
Thank you, Bruce. h3a id='url_with_params'/a/h3 document.getElementById('url_with_params').href = {{=URL('action')}} + / + param1 ; is working fine.

Re: [web2py] Re: Pass multiple arguments to URL through javascript

2012-05-22 Thread Ashraf Mansour
Thank you, Anthony. h3a id='url_with_params'/a/h3 document.getElementById('url_with_params').href = {{=URL('action')}} + / + param1 ; is working fine.

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread António Ramos
Yes , please add the workflow... I need it badly :) 2012/5/22 Ross Peoples ross.peop...@gmail.com There may even be an experimental workflow engine in there if I can finish it in time.

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread António Ramos
I have about 44 apps that i can convert to web2py if workflow engine available. :P 2012/5/22 António Ramos ramstei...@gmail.com Yes , please add the workflow... I need it badly :) 2012/5/22 Ross Peoples ross.peop...@gmail.com There may even be an experimental workflow engine in there if

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Richard Vézina
Ross, If you need help just ask! Richard On Tue, May 22, 2012 at 8:35 AM, Ross Peoples ross.peop...@gmail.comwrote: There may even be an experimental workflow engine in there if I can finish it in time.

[web2py] Re: Conditional represent

2012-05-22 Thread Annet
Hi Paolo, Thanks for your reply, problem solved. Best regards, Annet. please try: db.Register.repliedOn.represent = lambda v, row: v.strftime('%d/%m/%Y %H:%M:%S') if v else

[web2py] bootstrap-pagination.js an ul/ul

2012-05-22 Thread Annet
I have a unordered list on which I want to plugin bootstrap-pagination.js. https://github.com/limodou/plugs/blob/master/plugs/ui/bootstrap/static/bootstrap/2.0.3/js/bootstrap-pagination.js According to Limodou this is the way it should work: The common usage is like this: function

[web2py] Easy question, inserting user input fields into an email message

2012-05-22 Thread RKS
So I got the mail function working correctly but now I can't get it to send me the fields from the form. The form is standard HTML with ids on all the inputs. In the controller I have: def new_post_two(): form = SQLFORM(db.post) if form.accepts(request, formname=None):

Re: [web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Ross Peoples
Richard, Thanks for the offer. I *think* I'm nearly done. I'm writing some tests for it now and so far so good. If I run into any problems, I'll let you know. Ross On Tuesday, May 22, 2012 11:09:31 AM UTC-4, Richard wrote: Ross, If you need help just ask! Richard

[web2py] Reference Field, validation and representation

2012-05-22 Thread Mike
Hello, I am running into a representation issue whenever I try to put a validator on a reference field. For example, I have the following table: db.define_table('t_port_to_jack', Field('switch', db.switches), Field('switch_port_string', type='integer', notnull=True,required=

Re: [web2py] Re: Unable to connect to mssql database

2012-05-22 Thread Ross Peoples
I have been using MSSQL from Linux for quite some time. I use FreeTDS for my driver. This is my connection string: db = DAL('mssql://user:password@server/db_name?DRIVER={FreeTDS}') If you need help setting up FreeTDS / unixODBC, let me know. I have some notes on how to set this up using a

[web2py] Re: Reference Field, validation and representation

2012-05-22 Thread Mike
Nevermind. Just read about the represent functionality for fields and that addressed this issue. For anyone else searching for this problem, this is what I ended up doing: Field('jack_id_string',db.jack_listings,requires=[IS_NOT_IN_DB(db,'t_port_to_jack.jack_id_string')], represent=

Re: [web2py] Re: Reference Field, validation and representation

2012-05-22 Thread Richard Vézina
Rather than : represent= lambda jack,row: db(db.jack_listings.id == row.jack_id_string).select()[0].jack_and_bldg), You can do : represent= lambda jack,row: db.jack_listings(row.jack_id_string).jack_and_bldg), Richard On Tue, May 22, 2012 at 2:48 PM, Mike m.she...@gmail.com wrote: Nevermind.

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread Anthony
if form.accepts(request, formname=None): message=%(request.vars.distributor,request.vars.dba,request.vars.contactnum,request.vars.fax,request.vars.location,request.vars.locationtwo,request.vars.city,request.vars.state,request.vars.zip,

[web2py] Form field deactivate

2012-05-22 Thread max
I have a table with two fields. EN | SP Hello | Hola I | Yo Both the fields A and B represent the same vale in two languages. I want in a drop-down field , the Spanish value automatically selected, when english value is set to a specific word. It should also work , if I set the spanish

[web2py] Life science computing and Bioinformatics

2012-05-22 Thread DJ
Dear Web2py Users, I would like to reach out to all bioinformatics/chem-informatics/life science informatics people using web2py. I have been using web2py since 2009 to implement life science applications and databases in biotechs and universities. I am sure there are a number of you doing

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread RKS
That was my latest and yes, it does result in an error. The original was: def new_post(): form = SQLFORM(db.post) if form.accepts(request, formname=None): mail.send(to=['s...@distrobeef.com'],subject='DistroBeef Retailer Contact',message='Test') return DIV(Thank you for

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread Anthony
mail.send(to=['s...@distrobeef.com'],subject='DistroBeef Retailer Contact',message='request.vars. distributor,request.vars.dba,request.vars.contactnum,request.vars.fax,request.vars.location,request.vars.locationtwo,request.vars.city,request.vars.state,request.vars.zip,

[web2py] Re: Life science computing and Bioinformatics

2012-05-22 Thread Anthony
You may already be aware of these (from the web2py Powered By list): http://semanticsbml.org http://rxncon.org/ Anthony On Tuesday, May 22, 2012 3:22:17 PM UTC-4, DJ wrote: Dear Web2py Users, I would like to reach out to all bioinformatics/chem-informatics/life science informatics people

Re: [web2py] Re: Life science computing and Bioinformatics

2012-05-22 Thread Sebastian Jayaraj
No, I didn't. Thank you for sharing these. -Sebastian On Tue, May 22, 2012 at 4:25 PM, Anthony abasta...@gmail.com wrote: You may already be aware of these (from the web2py Powered By list): http://semanticsbml.org http://rxncon.org/ Anthony On Tuesday, May 22, 2012 3:22:17 PM UTC-4, DJ

Re: [web2py] Re: TABLIB - Would be a nice tool to integrate with DAL

2012-05-22 Thread Richard Vézina
Is Tablib, been include in web2py?? Seems pretty nice! I was developping my on lxml custom excel export, so I will be happy if it now available... Richard On Fri, May 13, 2011 at 7:50 AM, selecta gr...@delarue-berlin.de wrote: very nice, just what i need, does it import xls too? xlsx even?

[web2py] json2excel

2012-05-22 Thread Richard Vézina
Hello, Export to excel from json could make simpler the exportation of a excel file from web2py ?? http://json2excel.sourceforge.net/ Richard

[web2py] Re: I keep getting the error: home.yearstring can't be null.

2012-05-22 Thread Brandon Reynolds
Thanks for all the help. Application seems to be working correctly now. This community is great and I am so glad i decided to start learning web2py. -Brandon On Monday, May 21, 2012 5:53:05 PM UTC-6, Anthony wrote: Field('park_fax', 'string', requires=IS_EMPTY_OR(IS_MATCH('[\d\-\(\) ]+'))),

[Solved] [web2py] How to prevent delete of a row with SQLFORM.grid -

2012-05-22 Thread François Delpierre
Excellent idea Johann, You're totally right, I was not looking into this approach. Here is the working code : def manage_parameters(): # Make sure user cannot delete the last parameter set. (row) if

[web2py] bug with authenticated email

2012-05-22 Thread Carlos
Hi, Using latest web2py trunk, there's a bug with authenticated email in Mail.send (line # 649) @ tools.py. if *not *self.settings.login: Must remove not. Thanks, Carlos

[web2py] Re: Help me prepare a talk on Web2py for the June Meetup of the Atlanta Python User Group (PyATL).

2012-05-22 Thread Stefaan Himpe
Looks pretty impressive! Perhaps this can be useful.

[web2py] Re: Help me prepare a talk on Web2py for the June Meetup of the Atlanta Python User Group (PyATL).

2012-05-22 Thread Massimo Di Pierro
Most of the work is done by reveal.js and mathjax.js. On Tuesday, 22 May 2012 17:11:38 UTC-5, stefaan wrote: Looks pretty impressive! Perhaps this can be useful.

[web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread Matt
Yes. Most definitely.If possible that would be fantastic! I've got to say that out of all of the amazing components provided in web2py I end up using the FORM / SQLFORM / SQLFORM.factory etc probably the most. So making it simple to output HTML in different ways would be a major bonus for me.

[web2py] Error in web2py book for auth.login_bare

2012-05-22 Thread Luca
In http://web2py.com/books/default/chapter/29/9 it is stated that auth.login_bare returns None if the username/password pair is invalid. auth.login_bare actually returns False, not None. I guess most people do: user = auth.login_bare(u, p) if not user: raise HTTP(403, Authorization

[web2py] Google Translate

2012-05-22 Thread Bruce Wade
Has anyone tried this before? http://translate.google.com/translate_tools -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.fittraineronline.com - Fitness Personal Trainers Online http://www.warplydesigned.com

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread RKS
Thanks a lot. This solved my problem.

Re: [web2py] Re: Nginx-uwsgi problem.

2012-05-22 Thread Bruce Wade
OK so here is a little bit before and after I still have a lot of work to do: Before: / Sat May 12 15:39:07 2012profiler.log.tmp 85845 function calls (84497

[web2py] Re: Error in web2py book for auth.login_bare

2012-05-22 Thread pbreit
Certainly the book should be fixed (or the code if that's a bug) but good reminder to almost always use truth-i-ness and false-i-ness (ie, if user, if not user, etc.).

[web2py] Re: What to expect in web2py 2.0

2012-05-22 Thread pbreit
Shouldn't something like workflow be an add-on?

[web2py] Re: DesignPatterns

2012-05-22 Thread pbreit
Interesting. Maybe put it up on Github?

[web2py] Re: Issues with running GAE and web2py with python2.5

2012-05-22 Thread howesc
never seen this error is there any output before the traceback? can you put some logging in gaehandler.py to see if you get to there? i wonder if there is a mis-configuration in app.yaml? On Monday, May 21, 2012 5:55:41 PM UTC-7, Pystar wrote: I tried running web2py with the latest GAE

Re: [web2py] Where is the path for sqlite db storage defined?

2012-05-22 Thread Andrew
Thanks Jonathan! If I can set it when defining the DAL that's perfect. On Monday, May 21, 2012 6:18:06 PM UTC-5, Jonathan Lundell wrote: On May 21, 2012, at 3:40 PM, Andrew wrote: I've put together a web2py skeleton for OpenShift PaaS ( https://github.com/prelegalwonder/openshift_web2py)

Re: [web2py] Re: DesignPatterns

2012-05-22 Thread Ovidio Marinho
I think it already exists Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ovidiomari...@itjp.net.br ITJP - itjp.net.br 83 8826 9088 - Oi 83 9334 0266 - Claro

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread Cindy Michalowski
Thanks to both of you for this information. I was just about to post a very similar question, but I'm glad I checked the mailing list first! I do have one other question though. I built a contact form and from a functionality standpoint there are no problems with it. I used the following to

[web2py] Re: Error in web2py book for auth.login_bare

2012-05-22 Thread Anthony
Fixed in the book. Anthony On Tuesday, May 22, 2012 6:45:35 PM UTC-4, Luca wrote: In http://web2py.com/books/default/chapter/29/9 it is stated that auth.login_bare returns None if the username/password pair is invalid. auth.login_bare actually returns False, not None. I guess most people

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread Anthony
Sender's name: Cindy Sender's e-mail: *xx...@gmail.com* Hello world! This is where my message text will be. For a text-based email, you could do: message=Sender's name: %s\nSender's e-mail: %s\n\nHello World!... % ( request.vars.your_name, request.vars.your_email) The \n represents

[web2py] Re: auth.has_membership(None) == True # is this correct?

2012-05-22 Thread weheh
LOL. I mean, we could get quantum and say everybody is a member of None (nothing), which is what web2py appears to say. I'm OK with that, but most people bump into a wall when they try to go thru 2 doors at once. So, since we experience classical reality, I think nobody belongs to nothing is

[web2py] Error on importing twisted

2012-05-22 Thread Hugh Barker
Hi, I need to run some code that uses the Twisted library from within web2py (listening to multicast events on the network, parsing the data and then inserting it into the web2pt DB for integration into a webapp). I get the following error upon importing Twisted. In the interests of

[web2py] Re: Help me prepare a talk on Web2py for the June Meetup of the Atlanta Python User Group (PyATL).

2012-05-22 Thread Cliff
I haven't looked at the source yet, but the results are cool. On Tuesday, May 22, 2012 6:37:48 PM UTC-4, Massimo Di Pierro wrote: Most of the work is done by reveal.js and mathjax.js. On Tuesday, 22 May 2012 17:11:38 UTC-5, stefaan wrote: Looks pretty impressive! Perhaps this can be

[web2py] hot to Run Python 2.5 scripts from python (for automating PSSE)

2012-05-22 Thread Janath
I have written python scripts to automate PSSE (Siemens power system simulation tool) using the pythonAPI provided. I can run them using the gui I have made for python 2.5. Psse 32 needs the exact version of python (2.5) to run the API. I am trying to convert my application to a web based

[web2py] Re: Error on importing twisted

2012-05-22 Thread Hugh Barker
Just tried an upgrade to web2py 1.99.7, same issue. On Wednesday, May 23, 2012 1:07:16 PM UTC+10, Hugh Barker wrote: Hi, I need to run some code that uses the Twisted library from within web2py (listening to multicast events on the network, parsing the data and then inserting it into the

[web2py] Cron problems

2012-05-22 Thread Michael Toomim
I'm finding multiple problems getting cron to start the scheduler. Here's the cron line: @reboot dummyuser python web2py.py -K utility ...but it does not work without modifying web2py source. First, let's get an easy bug out of the way. The web2py book gives this example for @reboot:

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread Cindy Michalowski
This is great. Thanks so much for your help, Anthony! On Tuesday, May 22, 2012 9:55:04 PM UTC-5, Anthony wrote: Sender's name: Cindy Sender's e-mail: *xx...@gmail.com* Hello world! This is where my message text will be. For a text-based email, you could do: message=Sender's name:

Re: [web2py] Error on importing twisted

2012-05-22 Thread Jason Brower
I wonder if reactor is a reserved word in web2py. Could you try giving it a different namespace? from twisted import reactor as another_reactor On 05/23/2012 06:07 AM, Hugh Barker wrote: Hi, I need to run some code that uses the Twisted library from within web2py (listening to multicast

Re: [web2py] Error on importing twisted

2012-05-22 Thread Anthony
On Wednesday, May 23, 2012 12:19:36 AM UTC-4, encompass wrote: I wonder if reactor is a reserved word in web2py. Nope. Anthony

[web2py] workflow manager design issues - comments invited

2012-05-22 Thread Cliff
A workflow is really a network of tasks. Here are some general observations about workflow networks. If it helps to clarify, mentally substitute 'node' for task. 1. A workflow consists of tasks. 2. Workflow tasks need to be linked together in predecessor-successor relationships.

Re: [web2py] Re: Issues with running GAE and web2py with python2.5

2012-05-22 Thread Ehigie Aito
I solved it. I actually made a mistake by putting the app.yaml file inside my application instead of the root of the web2py folder. I have it running now. thanks On Wed, May 23, 2012 at 1:38 AM, howesc how...@umich.edu wrote: never seen this error is there any output before the traceback?

[web2py] Re: Form field deactivate

2012-05-22 Thread Cédric Mayer
SQLFORM.factory( Field('EN','string',requires=IS_IN_DB(db, 'language.id', '%(EN)s', zero= T('choose one')), Field('SP','string',requires=IS_IN_DB(db, 'language.id', '%(SP)s', zero= T('choose one')), table_name=language_link) (replace language by your won table name) Then in your

[web2py] form.custom('table')

2012-05-22 Thread Annet
I have the following custom form: div class=form-header {{=response.function}} /div div class=form-body {{=form.custom.begin}} {{#!-- Add header here --}} {{=form.element('table')}} /div div class=form-footer {{#!-- Add footer here --}} {{=DIV(form.custom.end[1])}} {{#!-- Add submit/cancel