Re: [web2py] Help requested with jquery, bootstrap.modal and grid

2012-05-31 Thread Johann Spies
On Wednesday, 30 May 2012 16:56:16 UTC+2, R. Osinga wrote: > > The click event you receive contains a target-menber. > This is the actual object that is clicked. You can use jQuery to find the > row with the following statement: > > var TR = $(evt.target).closest('TR'); > The row (and TD) conta

[web2py] openID in InstantPress

2012-05-31 Thread netcode
i read the discussion on openID using Janrain (janrain.com) and i tried implementing it on my blog built with InstantPressit . it worked just well but i discovered it disabled my registration page(for new users) and also my default sign in page was disabled from gluon.contrib.login_methods.rpx

[web2py] Generalising web2py templates for use in widgets

2012-05-31 Thread Alec Taylor
*Would it be possible to generalise web2py templates in order to allow for the following use-cases?* - PhoneGap built mobile-app (JavaScript, HTML and CSS) using JSONRPC - Main website (this use-case is catered for) - JavaScript "widget" code for pasting onto y

[web2py] Re: form.insert slow when inserting many elements

2012-05-31 Thread DanielB
Ok this is the form.insert way: form = SQLFORM(DAL(None).define_table('empty'), table_name = 'userEditNetAccess') form.custom.widget.nets = [ ] form.custom.label.nets = [ ] for net in nets: element = INPUT(_name=net.name + str(net.id), value=net.checked, _type='checkbox')

Re: [web2py] Help requested with jquery, bootstrap.modal and grid

2012-05-31 Thread Johann Spies
> > > $("a[data-toggle=modal]").click(function(event) { > event.preventDefault(); > target = $(this).attr('data-target'); > url = $(this).attr('href'); > $(target).load(url); > return false; > }); > > I have also removed "return false" from the above cod

[web2py] Re: Validator for self reference field not referring to itself

2012-05-31 Thread lcamara
Quarta-feira, 30 de Maio de 2012 13:22:32 UTC+1, lcamara escreveu: > > Hey, > > I'm trying to validate some things on a self reference field, among them > that a reference field on a table does not refer to the record where it is. > > For instance, > > db.define_table('person', > Field('name

[web2py] auth.register() with SQLFORM.factory

2012-05-31 Thread frasse
Hi I try to use SQLFORM.factory to add a row to other table when my user do the register form . I am doing this db.define_table( 'Player', Field('hash') ) register_form = SQLFORM.factory( auth.register(),db.player) but it not working . the error is here SyntaxError: define_ta

[web2py] Re: auth.register() with SQLFORM.factory

2012-05-31 Thread Anthony
SQLFORM.factory takes a Field or Table object, but auth.register() returns a FORM object, so this won't work. You might consider simply adding the extra field to the db.auth_user table, or you could add a field to the form after it has been created ( http://web2py.com/books/default/chapter/29/7#

Re: [web2py] Re: try: for-loop

2012-05-31 Thread Doug Philips
BTW: Take a look at the Style Guide for Python Code (PEP-8) for lots of really helpful tips. The empty collections (of which list is one) can be found under Programming Recommendations of PEP-8: http://www.python.org/dev/peps/pep-0008/#programming-recommendations --Doug On Wed, May 30, 20

[web2py] Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread Saifuddin Rangwala
Hi, I am new to web2py. I have created a simple table like below: db.define_table('Test', Field('name', 'string', required=True, unique=True), Field('Description', 'text'), ) db.Test..name.represent=lambda r, v: A(v, _href=URL('default', 'download', args=v)) I am using SQLTABLE to rend

[web2py] Re: Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread villas
Try this: db.Test.name.represent = lambda name, row: A(name, _href=URL('default', 'download', args=name)) On Thursday, 31 May 2012 13:34:01 UTC+1, Saifuddin Rangwala wrote: > > Hi, > > I am new to web2py. > > I have created a simple table like below: > > db.define_table('Test', > Field('na

[web2py] Thinking of building a bug tracker...

2012-05-31 Thread Jason Brower
I have noticed one other tracker in web2py, but I couldn't demo it. Besides that it is cloning, and I wonder if I could just start from scratch with a few features. One in particular is integrating with web2py a bit. For example, seeing tickets for a particular app and binding the ticket to a n

Re: [web2py] Thinking of building a bug tracker...

2012-05-31 Thread Bruce Wade
I second this idea and would be interested in helping. However I want to get git integration more then HG :D Thinking we should also have a feature request built into this, because the CEO constantly asks for new features without realizing we already have 100 open features we are still coding. On

Re: [web2py] cool new wysiwyg editor

2012-05-31 Thread Jason Brower
He just changed it. I have the one with the other license so I guess I will use that for now. I worry he changed it cause I twitted about it. :( And no it's not too expensive. BR, Jason Brower On 05/31/2012 05:57 AM, Anthony wrote: On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi

Re: [web2py] cool new wysiwyg editor

2012-05-31 Thread Jason Brower
Interesting that I didn't see it somehow. Actually, I say the gpl, mit license. On 05/31/2012 05:57 AM, Anthony wrote: On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi wrote: about redactorjs http://redactorjs.com/download/ You are *f

Re: [web2py] cool new wysiwyg editor

2012-05-31 Thread Jason Brower
Oh, and it's compatible with refrigerators. :P Says it right in the front page. :O On 05/31/2012 05:57 AM, Anthony wrote: On Wednesday, May 30, 2012 5:16:56 PM UTC-4, Vasile Ermicioi wrote: about redactorjs http://redactorjs.com/download/ You are *

Re: [web2py] Re: Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread Saifuddin Rangwala
Doesnt work. I tried doing this with the users table of examples application that comes with web2py also. Is there some setting to enable this? I do not get any error also. -Saif. On Thu, May 31, 2012 at 7:16 PM, villas wrote: > Try this: > > db.Test.name.represent = lambda name, row: A(name

Re: [web2py] Thinking of building a bug tracker...

2012-05-31 Thread Jason Brower
I agree. To me an bug and a feature are sent through the same channels, especially an application that has matured for some time. Hg integration would be nice. I just wonder if there is a standard in what to right for those commits. And I rarely use the hg interface in web2py, so I would like

Re: [web2py] Re: Not able to get db.table.field.represent to output urls in SQLTABLE

2012-05-31 Thread Saifuddin Rangwala
db.define_table( 'users', Field('name'), Field('email') ) db.users.name.represent = lambda name, row: A(name, _href=URL('default', 'download', args=name)) On Thu, May 31, 2012 at 8:22 PM, Saifuddin Rangwala < saifuddin.rangw...@gmail.com> wrote: > Doesnt work. I tried doing thi

[web2py] Re: anonymous login / temporary user login / non-user authentication

2012-05-31 Thread howesc
2 thoughts: - generate a username and password to give to the reviewer. that way they are just logging in. multiple reviewers can use the same "account" - if you prefer to just give the reviews a code, create an account with username like "reviewer_for_bob" and password is the code. when the

[web2py] Re: form.insert slow when inserting many elements

2012-05-31 Thread howesc
is it faster to create a list of Field objects and use SQLFORM.factory()? On Thursday, May 31, 2012 1:38:58 AM UTC-7, DanielB wrote: > > Ok this is the form.insert way: > > form = SQLFORM(DAL(None).define_table('empty'), table_name > = 'userEditNetAccess') > > form.custom.widget.nets = [ ] > form

[web2py] Re: form.insert slow when inserting many elements

2012-05-31 Thread Anthony
> > form[0].insert(-1,element) > I see, you're not inserting into the form object but into the form[0] object, which is a TABLE object. The components of a TABLE must be a TR, TBODY, THEAD, etc. When you call the insert() method, it calls the _fixup() method, which then calls the _wrap

[web2py] Re: form.insert slow when inserting many elements

2012-05-31 Thread Anthony
On Thursday, May 31, 2012 11:05:15 AM UTC-4, howesc wrote: > > is it faster to create a list of Field objects and use SQLFORM.factory()? > That's probably a better approach, for speed and elegance. Anthony

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

2012-05-31 Thread howesc
i don't know anything about the PSSE system, but i'm confused. is there a PSSE server that you communicate with over a socket to make the API calls? the traditional API model is that there is a long running "server" process, and the client (in this case the web2py server) connects to some sock

[web2py] What do you think of this service? Pagodabox

2012-05-31 Thread Jason Brower
They do php deployments, but in a very unique way. They pull from your git repository to deploy an application. Do you see a demand for something like this in Web2py? Would it be a feature you would want to use? Personally I would be giddy as a school girl if I could pull an svn/hg/git/foo ve

[web2py] Re: What do you think of this service? Pagodabox

2012-05-31 Thread Niphlod
I had the idea while developing the last app, but using github's tarballs and not git directly. Do you see any potential problem in that ? Il giorno giovedì 31 maggio 2012 17:25:42 UTC+2, encompass ha scritto: > > They do php deployments, but in a very unique way. > They pull from your git repos

Re: [web2py] menu and drop down menu

2012-05-31 Thread Richard Vézina
I think there is one {{pass}} missing for the else: Richard On Thu, May 31, 2012 at 2:57 AM, Annet wrote: > In a view site/menu.html I have the following code to generate a menu with > drop down menus. > > > > {{for _name,_active,_link in session.site_menu:}} > {{if session['%sDro

Re: [web2py] Suggestions for multiple files upload in form

2012-05-31 Thread Richard Vézina
Hello Paolo, Here some fresher code : def trip_update(): # only SQLFORM.factory tested form=SQLFORM.factory(db.t_trip, db.t_photos) for row in db(db.t_trip.id == request.args(0)).select(db.t_trip.ALL): for f in db.t_trip.fields: form.vars[f]=row[f] photos_files

Re: [web2py] Suggestions for multiple files upload in form

2012-05-31 Thread Richard Vézina
response.js will not works, it only works on response and for component as says the book. Putting the js code into the view seems to work if I pass the photos_files var to the view... Now I think I just have to find the way to expose the HTML, XML() not seems to work. Richard On Thu, May 31, 20

[web2py] Re: form.insert slow when inserting many elements

2012-05-31 Thread DanielB
Ok cool, I will try the SQLFORM.factory thing for this form. But for other forms where there actually is a real table in use I don't want to modify the model like that when I just need to add some extra checkboxes. I don't usually care for the wrapping of table, tr and tds, so is it correct th

Re: [web2py] Suggestions for multiple files upload in form

2012-05-31 Thread Richard Vézina
Here where I get as now : Controler : def trip_update(): # only SQLFORM.factory tested form=SQLFORM.factory(db.t_trip, db.t_photos) for row in db(db.t_trip.id == request.args(0)).select(db.t_trip.ALL): for f in db.t_trip.fields: form.vars[f]=row[f] photos_files

[web2py] Re: form.insert slow when inserting many elements

2012-05-31 Thread Anthony
> > I don't usually care for the wrapping of table, tr and tds, so is it > correct that I can just use > > form[0].components.insert(-1, element) (or even better if just > "form.insert(-1, element)" works, it seems that it does not call > wrap_components?) > > and then in the view: > > {{=form

[web2py] pyfilesystem support (store uploads in S3)

2012-05-31 Thread Massimo Di Pierro
Here is an example: easy_install pyfilesystem >>> import fs.s3fs >>> myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_ke, aws_secret_key) >>> db.define_table('test',Field('file','upload',uploadfs = myfs)) Now all your uploaded files will go on S3. Here is a list of supported filesystems: http://p

[web2py] Future of Web2py in India/Asia

2012-05-31 Thread RKumar Its mee
I am from India, I have been part of functional work: business role from quite a long time. Basically I am an Engineer by qualification. But I wanted to learn one or the other webframework. I did few Internet search and found few. Many are well establish and few are upcoming and some are really

[web2py] Validator for sqlform combo list

2012-05-31 Thread José L .
Hi, I'm using a referenced table with IS_IN_DB validator, but I'd like to filter the fields to be shown in the combo list. As an example: db.define_table('person', Field('name'), Field('surname), Field(age,'integer') ) db.define_table('class_attendant', Fiel

[web2py] Re: Validator for sqlform combo list

2012-05-31 Thread Anthony
db.class_attendant.person_id.requires = IS_IN_DB(db(db.person.age >= 18), 'person.id', '%(name)s %(surname)s') The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather than an entire db connection. See http://web2py.com/books/default/chapter/29/7#Database-validators. Antho

[web2py] Re: Future of Web2py in India/Asia

2012-05-31 Thread Massimo Di Pierro
You ask a very good question. I do not know the answer so I dodge it. In my view we have seen a large proliferation of tools recently (databases, languages, etc.). As a developer there are a number of things you should be concerned about: - are you familiar with the latest tools? - are you capa

[web2py] Re: Future of Web2py in India/Asia

2012-05-31 Thread Massimo Di Pierro
I should add something to the previous post. There are Fiat cars and there are Ferraris. Most people in Italy drive a Fiat. That does not make it a better car. Most mechanics know how to fix a Fiat. That's because there are many of them and they break more. If an investor wants to open a repai

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Omi Chiba
+1 I don't like the buttons for navbar. On Wednesday, May 30, 2012 5:36:51 PM UTC-5, Andrew wrote: > > Thanks LightDot, > I thought it may have been a feature, so just my opinion, I think the non > button look was better. It looks more consistent with the other links in > the navbar, and othe

[web2py] Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Osman Masood
Hi, I have a custom table, and I'm trying to use a 'username' field instead of an 'email' field (since the book says if there's a username field, it will be used instead of the email field). However, whenever I try the 'forgot my username' function, it gives me an error, saying: 'email' (Looks

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Osman Masood
Note: I added in an 'email' virtual field, but still no luck. This is right before auth.define_tables(username=True, signature=False, migrate=False) class MyVirtualFields(object): def email(self): return self.user.username db.user.virtualfields.append(MyVirtualFields()) On Thursday,

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Omi Chiba
Comment out the jquery code will also disable the sub-menus somehow. The sub-menus doesn't appear after the change. On Wednesday, May 30, 2012 3:05:46 PM UTC-5, Paolo Caruccio wrote: > > Andrew, > > it's simple go back to old auth_navbar. > > In views/layout.html comment this jquery code: > >

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Massimo Di Pierro
The email field is required. If you omit it there is nowhere to send lost-password messages. Anyway. You just need: auth.define_tables(username=True, signature=False, migrate=False) You do not need all the code before that line. On Thursday, 31 May 2012 15:09:39 UTC-5, Osman Masood wrote: > >

[web2py] Re: What do you think of this service? Pagodabox

2012-05-31 Thread Cliff Kachinske
I'm way too paranoid to allow some third party to read data from my computer. On Thursday, May 31, 2012 11:25:42 AM UTC-4, encompass wrote: > > They do php deployments, but in a very unique way. > They pull from your git repository to deploy an application. Do you see > a demand for something

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Osman Masood
Thanks for the prompt response. Looks like according to the book, using 'username' should be allowed though: By default, web2py uses email for login. If instead you want to log in using username set auth.define_tables(username=True) Also: If you add a field called "username", it will be used in p

[web2py] Re: deploy into GAE with python27

2012-05-31 Thread howesc
deploy is still the same. Read GAE docs for how to update app.yaml to work with 2.7 (there might even be comments in the web2py shipped version of app.yaml, i'm not sure). i've never seen the too many tables error. that's not during app upload is it? On Wednesday, May 30, 2012 11:13:06 PM UT

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Derek
I don't get why Javascript would be needed for nested menus. http://www.grc.com/menudemo.htm GRC's pure CSS menus work great without javascripts. On Friday, May 25, 2012 1:06:38 PM UTC-7, Massimo Di Pierro wrote: > > I managed to fix it. Now the carets and class are added automatically via > JS

[web2py] Re: recognizing web2py restart

2012-05-31 Thread Derek
If you're blowing away your database, why don't you clear memcached when you blow away your database? I don't see how this is a web2py issue. On Wednesday, May 30, 2012 7:10:13 PM UTC-7, Jonathan Lundell wrote: > > I've got an application that uses memcached. I'd like to recognize when > web2py

Re: [web2py] Re: recognizing web2py restart

2012-05-31 Thread Jonathan Lundell
On May 31, 2012, at 2:32 PM, Derek wrote: > If you're blowing away your database, why don't you clear memcached when you > blow away your database? I don't see how this is a web2py issue. One possible reason: web2py (and in particular my application) aren't necessarily the only memcached clients

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Anthony
The username field is used in case you don't want users to log in with their email address. If you want the username field to store the user's email address, then just stick with the standard email field and forget about the username field. Anthony On Thursday, May 31, 2012 4:09:39 PM UTC-4, O

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Anthony
> > Thanks for the prompt response. Looks like according to the book, using > 'username' should be allowed though: > By default, web2py uses email for login. If instead you want to log in > using username set auth.define_tables(username=True) > Also: > If you add a field called "username", it wi

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Anthony
> > I don't get why Javascript would be needed for nested menus. > http://www.grc.com/menudemo.htm > > GRC's pure CSS menus work great without javascripts. > Javascript isn't required but can be used to improve the user experience. For example, Superfish

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Massimo Di Pierro
Not sure I understand. If auth.define_tables(username=True) web2py defined this db.auth_user.username.requires = \ [IS_MATCH('[\w\.\-]+'), IS_NOT_IN_DB(db, db.auth_user.username)] On Thursday, 31 May 2012 15:36:59 UTC-5, Osman Masood wrote: > > Thanks for

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Paolo Caruccio
Morover, in this case javascript is necessary to make the menu compatible with the css rules of bootstrap. Il giorno venerdì 1 giugno 2012 00:11:23 UTC+2, Anthony ha scritto: > > I don't get why Javascript would be needed for nested menus. >> http://www.grc.com/menudemo.htm >> >> GRC's pure CSS

[web2py] Re: What do you think of this service? Pagodabox

2012-05-31 Thread pbreit
I could see how that might be appealing. I manipulate HG updates on my remote servers using Fabric which is pretty easy and works well. On Thursday, May 31, 2012 8:25:42 AM UTC-7, encompass wrote: > > They do php deployments, but in a very unique way. > They pull from your git repository to dep

[web2py] Re: Thinking of building a bug tracker...

2012-05-31 Thread pbreit
If you really want to save time, building a bug tracker is not the way to do it. But if you want to build one as an exercise, it's probably not a bad idea. It's hard to say how valuable the integration points would be. I'm usually pretty skeptical of stuff like that. There are probably ways to

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Paolo Caruccio
Omi, please try attached files and let me know if you have the same problem. Il giorno giovedì 31 maggio 2012 22:23:16 UTC+2, Omi Chiba ha scritto: > > Comment out the jquery code will also disable the sub-menus somehow. The > sub-menus doesn't appear after the change. > > On Wednesday, May 30,

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Omi Chiba
Tested. It's perfect ! On Thursday, May 31, 2012 5:39:12 PM UTC-5, Paolo Caruccio wrote: > > Omi, > > please try attached files and let me know if you have the same problem. > > Il giorno giovedì 31 maggio 2012 22:23:16 UTC+2, Omi Chiba ha scritto: >> >> Comment out the jquery code will also disab

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Andrew
Paolo, I agree, Perfect ! Great work.

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

2012-05-31 Thread Janath
Thank you for the reply. I am on doing last method of your list. “just need to run web2py using the version of python that the PSSE lib requires (i use web2py on python2.5 This api needs it to be run in python 2.5 ( It doesn’t work for other versions of python I have tested for 2

[web2py] Re: Get and Post the value from Chrome extension in our database

2012-05-31 Thread Derek
Is there a question? On Tuesday, May 29, 2012 2:06:52 AM UTC-7, Sanjeet Roy wrote: > > I created the one chrome extension by using manifest.json which is used to > pop-up the html page where i want the value in drop-down from our database > when the user will be login and they can also submit so

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

2012-05-31 Thread Christian Foster Howes
i start we2py with: python2.5 web2py.py -a note that i have python2.5 on my path. i'm also running the source distribution. is that what you needed to get the python version for web2py? cfh On 5/31/12 16:23 , Janath wrote: Thank you for the reply. I am on doing last method of your

[web2py] Re: Anyone using BootSwatch with new web2py layout

2012-05-31 Thread Andrew
Just noticed that layout.html has: response.files.append(URL('static','css/bootstrap-responsive.css')) but the file is not in static/css in the welcome app. On Friday, June 1, 2012 11:01:08 AM UTC+12, Andrew wrote: > > Paolo, > I agree, Perfect ! > > Great work. >

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Osman Masood
All right. I guess I was just confused by the wording. I guess what I was really asking for was the ability to rename the required field names. For example instead of 'email' I wanted to use 'username'. The reason I didn't use 'email' from the start is that I am trying to integrate web2py with an

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Anthony
> > But shouldn't people who already have tables and want to use web2py be > able to rename the default required field names? This would help people > with existing user tables but different field names for email, password, > etc. For example, if the 'user' table has 'password_field' instead of

Re: [web2py] Re: How to does post in RESTful

2012-05-31 Thread Anthony
Did you enable basic authentication, as described here: http://web2py.com/books/default/chapter/29/9#Access-Control-and-Basic-Authentication, and send a valid username and password with your curl or wget request? Anthony On Thursday, May 31, 2012 1:52:19 AM UTC-4, Sanjeet Roy wrote: > > Anthon

[web2py] Re: Web2Py + library.zip

2012-05-31 Thread Horus
I think I got this from the website where is the source located? On Wednesday, May 30, 2012 10:12:22 PM UTC-4, Massimo Di Pierro wrote: > > You must be using the binary distribution. If you use the source > distribution there is a web2py/gluon/ folder. > > On Wednesday, 30 May 2012 20:00:32 UTC-5

[web2py] really dumb question

2012-05-31 Thread david.waldrop
I just downloaded and installed the nightly build on a mac laptop. Web2py runs fine. I am able to see the welcome app and create new apps. However I cannot find the directory structure where the apps are located. I have searched in spotlight and finder for a variety of files db.py, my new a

[web2py] Re: Web2Py + library.zip

2012-05-31 Thread Horus
OK, I saw my error. Thank You! On Wednesday, May 30, 2012 10:12:22 PM UTC-4, Massimo Di Pierro wrote: > > You must be using the binary distribution. If you use the source > distribution there is a web2py/gluon/ folder. > > On Wednesday, 30 May 2012 20:00:32 UTC-5, Horus wrote: >> >> I have been g

Re: [web2py] Re: Future of Web2py in India/Asia

2012-05-31 Thread Alec Taylor
Very good points Professor Di Pierro, Found your reasoning very interesting. Quick question, your final line in the aforementioned email has "I talk to many employers and entrepreneurs. There is a perception that Java programmers are the " but the paragraph is unfinished. What were you planning t

[web2py] Problem with basic_login actually logging in (maybe not a bug)

2012-05-31 Thread G. Clifford Williams
Given the following code snippet in a controller (default or any other): auth.settings.allow_basic_login = True def howdy(): auth.settings.allow_basic_login = True response.view = 'generic.json' if auth.user: this_user = auth.user.id else: this_user = "unset" r

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Osman Masood
In our case, the app we were migrating had PHP and Python scripts accessing the database, so changing a column name would require lots of code changes everywhere else. I'm going to try forking and making the changes to support auth.settings.email_field . On Thursday, May 31, 2012 5:21:18 PM UT

[web2py] Re: really dumb question

2012-05-31 Thread Massimo Di Pierro
Hello David, you probably got the mac binary distribution. If you open terminal you can cd into /Applications/web2py.app/Contents/Resources and you will find applications in there. The *.pyc files are into a compressed zipped folder (I think site-packages.zip or Library.zip). On Thursday, 31 M

[web2py] Hebrew encoding

2012-05-31 Thread Udi Milo
part of my product receives user text, saves it and shows it later. one of my users added a hebrew text attached below and I do not know how to translate it into letter instead of hex. simple text.encode('UTF-8') doesn't work, and I am far from being an expert in the subject. can someone help me

Re: [web2py] Re: Future of Web2py in India/Asia

2012-05-31 Thread Massimo Di Pierro
oops. cut and paste problem. Sorry. That line was not supposed to be there. On Thursday, 31 May 2012 20:29:44 UTC-5, Alec Taylor wrote: > > Very good points Professor Di Pierro, > > Found your reasoning very interesting. > > Quick question, your final line in the aforementioned email has "I > t

[web2py] Re: Problem with basic_login actually logging in (maybe not a bug)

2012-05-31 Thread Anthony
Looks like you can do: auth.settings.allow_basic_login = True auth.user = auth.basic()[2] if auth.user: etc. But this doesn't appear to be documented. Perhaps auth.basic() should automatically populate auth.user rather than simply returning it as part of a tuple. Anthony On Thursday, May

[web2py] Re: Problem with basic_login actually logging in (maybe not a bug)

2012-05-31 Thread Anthony
If you can confirm that this works, I'll add it to the book. On Thursday, May 31, 2012 10:48:21 PM UTC-4, Anthony wrote: > > Looks like you can do: > > auth.settings.allow_basic_login = True > auth.user = auth.basic()[2] > if auth.user: > etc. > > But this doesn't appear to be documented. Perh

[web2py] Re: Problem with basic_login actually logging in (maybe not a bug)

2012-05-31 Thread Anthony
Sorry, forgot login_bare adds the user to auth, so it's simpler: auth.settings.allow_basic_login = True auth.basic() if auth.user: etc. Anthony On Thursday, May 31, 2012 10:49:04 PM UTC-4, Anthony wrote: > > If you can confirm that this works, I'll add it to the book. > > On Thursday, May 31

Re: [web2py] Thinking of building a bug tracker...

2012-05-31 Thread Cliff Kachinske
Disagree. A bug and a feature are not the same. Fixing a bug means making your code live up to its specifications. Adding a feature may affect modules outside your control and require collaboration with others. Sometimes very close collaboration and changes to many modules. The design change

Re: [web2py] Thinking of building a bug tracker...

2012-05-31 Thread Cliff Kachinske
+1 for git. It seems so much simpler. On Thursday, May 31, 2012 10:32:14 AM UTC-4, Bruce Wade wrote: > > I second this idea and would be interested in helping. However I want to > get git integration more then HG :D > > Thinking we should also have a feature request built into this, because >

Re: [web2py] Re: How to does post in RESTful

2012-05-31 Thread Sanjeet Roy
Yes i am able to do this thanks Anthony for late reply sorry On Fri, Jun 1, 2012 at 5:53 AM, Anthony wrote: > Did you enable basic authentication, as described here: > http://web2py.com/books/default/chapter/29/9#Access-Control-and-Basic-Authentication, > and send a valid username and password w

[web2py] Re: Problem with basic_login actually logging in (maybe not a bug)

2012-05-31 Thread Anthony
Just updated the book: http://web2py.com/books/default/chapter/29/9#Access-Control-and-Basic-Authentication Anthony On Thursday, May 31, 2012 10:54:50 PM UTC-4, Anthony wrote: > > Sorry, forgot login_bare adds the user to auth, so it's simpler: > > auth.settings.allow_basic_login = True > auth.b

[web2py] Re: Using 'username' field instead of 'email' doesn't work?

2012-05-31 Thread Anthony
On Thursday, May 31, 2012 10:35:30 PM UTC-4, Osman Masood wrote: > > In our case, the app we were migrating had PHP and Python scripts > accessing the database, so changing a column name would require lots of > code changes everywhere else. I'm going to try forking and making the > changes to su

Re: [web2py] Re: Future of Web2py in India/Asia

2012-05-31 Thread RKumar Its mee
Hi Professor and all the developers with this group, So feel great getting response from the you who developed Web2py. I read you article. And it good to know your thoughts. As you mentioned of the analogy of Fiat and Ferrari cars. I was thinking of what exactly are we developers moving ahead and

Re: [web2py] menu and drop down menu

2012-05-31 Thread Annet
Hi Richard, Thanks for your reply. I think there is one {{pass}} missing for the else: That's what I thought, however, it was the dropdown-menu ul I messed up, it missed a closing tag. Kind regards, Annet

[web2py] Re: Deploy issue - Apache on Windows - Unable to import driver

2012-05-31 Thread Andrew
I'll say. Thanks for posting the file, but it doesn't work either. I've obviously got some other issues. I'll keep digging. On Friday, June 1, 2012 2:38:50 AM UTC+12, Omi Chiba wrote: > > Weird.. I attached mod_wsgi.so I'm using for production. > > > On Wednesday, May 30, 2012 5:40:33 PM UT

Re: [web2py] Hebrew encoding

2012-05-31 Thread Martin Weissenboeck
I have found at http://wiki.python.org/moin/EscapingXml: import xml.parsers.expat def unescape(s): want_unicode = False if isinstance(s, unicode): s = s.encode("utf-8") want_unicode = True # the rest of this assumes that `s` is UTF-8 list = [] # create and in

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

2012-05-31 Thread Janath
Excellent! it works... When web2py is started in python shell, PSSE sees the initialisation commands from the python shell and it accepts it! On Thursday, May 31, 2012 6:55:39 PM UTC-5, howesc wrote: > > i start we2py with: > > python2.5 web2py.py -a > > note that i have python2.5 on my path

Re: [web2py] Re: Validator for sqlform combo list

2012-05-31 Thread José Luis Redrejo Rodríguez
Thanks very much Anthony, I didn't know this feature. 2012/5/31 Anthony : > db.class_attendant.person_id.requires = IS_IN_DB(db(db.person.age >= 18), > >     'person.id', '%(name)s %(surname)s') > > The first argument to IS_IN_DB and IS_NOT_IN_DB can be a Set object rather > than an entire db conn