[web2py] Error trying to use PolyModel

2011-04-08 Thread RipRyness
Dug up some code I did last summer. Thought I'd dust it off and upgrade it's web2py libraries. It is a GAE app. I am getting an error on the following code: db.define_table('regform', Field('form_type'), Field('url_id', requires=[IS_NOT_IN_DB(db, 'account.org_id', error_message=T('id ta

[web2py] Re: Bug in Dal: import for csv

2011-04-08 Thread DJ
Same issues here - I installed the latest version for a project and I am not able to import csv files from web2py command line. Does import_from_csv work in the older versions? -Seb

[web2py] Re: Quick Admin Suggestion

2011-04-08 Thread Anthony
If you're on the "site" page that lists all the applications, clicking an application name takes you to the /default/index page for the app. If you're on the "edit" page for a given app, clicking on the app name at the top (next to the words "EDIT APPLICATION") takes you to the /default/index pa

[web2py] Re: Running web2py source on Mac

2011-04-08 Thread pbreit
Do I feel like an idiot! Not the first time...and not the last.

[web2py] Re: Running web2py source on Mac

2011-04-08 Thread pbreit
Wow, I guess I totally missed this in the documentation. For some reason I only thought it came with the Mac binary download. I don't know why I've been using the web2py.app all this time!

[web2py] Quick Admin Suggestion

2011-04-08 Thread ra3don
Is there any way we can have a "View" button added on the Header of the Admin site? The button could take the user to the index in a new tab. I personally would find this very useful because It is sometimes A pain to navigate to a page where you can click and get to the site home page. I find myse

[web2py] IS_UPLOAD_FILENAME validator

2011-04-08 Thread 黄祥
hi, i have a problem using validator IS_UPLOAD_FILENAME() to check upload file neither avi or flv extension, is it support to check multiple extension like on IS_IMAGE() e.g. IS_IMAGE(extensions = ('jpeg', 'png')) is it support to use IS_UPLOAD_FILENAME(extensions = ('avi', 'flv')) thank you

[web2py] Re: How to create custom 404 and other error pages

2011-04-08 Thread Anthony
Have you tried routes_onerror -- http://web2py.com/book/default/chapter/04#Routes-on-Error On Friday, April 8, 2011 7:03:53 PM UTC-4, Pystar wrote: > Hi, > I would like to know how to design custom 404 and other error pages. > Thanks

[web2py] Re: Running web2py source on Mac

2011-04-08 Thread Anthony
On Friday, April 8, 2011 8:05:07 PM UTC-4, Anthony wrote: > > Rocket is already included in the source package -- why did you have to > download it separately? As long as you've got Python installed, I think you > should simply be able to download and unzip source, and then do 'python > web2py.

[web2py] Re: Running web2py source on Mac

2011-04-08 Thread Anthony
Rocket is already included in the source package -- why did you have to download it separately? As long as you've got Python installed, I think you should simply be able to download and unzip source, and then do 'python web2py.py' to run Python (it will start the Rocket server). At least, that's

Re: [web2py] Re: Running web2py source on Mac

2011-04-08 Thread Jonathan Lundell
On Apr 8, 2011, at 4:32 PM, pbreit wrote: > That was...how shall I say it...ridiculously easy! > > 1. Download Rocket > 2. python setup.py install > 3. set up an admin password (i copied an existing parameters_###.py file) > 4. python anyserver.py -s rocket -p 8080 > > No more binaries! No need

[web2py] Re: Running web2py source on Mac

2011-04-08 Thread pbreit
That was...how shall I say it...ridiculously easy! 1. Download Rocket 2. python setup.py install 3. set up an admin password (i copied an existing parameters_###.py file) 4. python anyserver.py -s rocket -p 8080 No more binaries!

[web2py] Running web2py source on Mac

2011-04-08 Thread pbreit
How hard would it be to set up my Mac to run web2py from source? Would Rocket be the simplest to set up? And sqlite3 is already available in MacOS, right? Any tips appreciated.

[web2py] How to create custom 404 and other error pages

2011-04-08 Thread Pystar
Hi, I would like to know how to design custom 404 and other error pages. Thanks

[web2py] Re: Web2py and the Elements of Style

2011-04-08 Thread mikech
Ooops...

[web2py] Re: Web2py and the Elements of Style

2011-04-08 Thread Anthony
It's actually simply taken from the book: http://web2py.com/book/default/chapter/01#Elements-of-Style On Friday, April 8, 2011 4:41:19 PM UTC-4, mikech wrote: > Initially I thought this was another blog bashing web2py, but instead its > just the opposite. Nice article. > > http://www.pythonpro

[web2py] Web2py and the Elements of Style

2011-04-08 Thread mikech
Initially I thought this was another blog bashing web2py, but instead its just the opposite. Nice article. http://www.pythonprogramming.info/web2py/elements-of-style.html

[web2py] Re: Migrations Problem: two fields added, two not added

2011-04-08 Thread Lennon
Editing DAL() like that gets me this error: Traceback (most recent call last): File "C:\Users\Lennon\workspace\web2py_source\gluon\restricted.py", line 188, in restricted exec ccode in environment File "C:/Users/Lennon/workspace/web2py_source/applications/sos_test/ models/a_db.py", line 55

[web2py] Re: Migrations Problem: two fields added, two not added

2011-04-08 Thread Massimo Di Pierro
1) get trunk 2) comment the missing fields 3) run with DAL(...,fake_migrate_all=True) 4) visit appadmin 5) uncomment the missing fields 6) remove fake_migrate_all=True from DAL(...) 7) visit appadmin did it fix it? On Apr 8, 2:21 pm, Lennon wrote: > I added the follow fields to my table: > > F

[web2py] Migrations Problem: two fields added, two not added

2011-04-08 Thread Lennon
I added the follow fields to my table: Field('rooming_requests','string', length=500, label='Do you have any rooming requests?', widget=SQLFORM.widgets.text.widget, requires=[IS_LENGTH(500)]), Field('misc_info','string', length=500, label='Anything else you would like us to know?', widget=SQLFORM

[web2py] Re: Tables refrencing each other

2011-04-08 Thread Anthony
On Friday, April 8, 2011 3:01:31 PM UTC-4, guruyaya wrote: > > I don't like this option, because I'll have to make sure I have only > one of this group manually. I thought of a validator that will do the > job for me, but it got very complicted. > I acctually had an idea of using IS_IN_DB, but

[web2py] Re: Tables refrencing each other

2011-04-08 Thread guruyaya
I don't like this option, because I'll have to make sure I have only one of this group manually. I thought of a validator that will do the job for me, but it got very complicted. I acctually had an idea of using IS_IN_DB, but leave the field as an integer, instead of a reference. Yet, I'm too tierd

[web2py] Re: Tables refrencing each other

2011-04-08 Thread Anthony
You might find this thread of interest: https://groups.google.com/d/topic/web2py/vXETf06TfwI/discussion

Re: [web2py] Re: is web2py support html 5 and css 3?

2011-04-08 Thread Anthony
On Friday, April 8, 2011 1:04:36 PM UTC-4, 黄祥 wrote: > > actually, my intention is to embed audio or video file into web2py apps, > i've tried embed and object but it's not going to work, so that i tried to > use html 5 tags audio and video, but got the same result, i ever posted to > this foru

Re: [web2py] Re: Change IPython to BPython in shell mode

2011-04-08 Thread Jason Brower
+1 BPython kicks some seriouls python console! BR, Jason On 04/08/2011 08:50 PM, Bruno Rocha wrote: I Dont know if I am talking about the same thing. When using web2py shell form console, if IPython is installed web2py shell runs in IPython interactive console. I wqas wondering about change i

Re: [web2py] Re: Change IPython to BPython in shell mode

2011-04-08 Thread Bruno Rocha
I Dont know if I am talking about the same thing. When using web2py shell form console, if IPython is installed web2py shell runs in IPython interactive console. I wqas wondering about change it to BPython by command line. $python web2py.py -S appname -M >>> IPython shell running $python web2p

[web2py] MARKMIN() not working...

2011-04-08 Thread Jason Brower
It seems when I do the following: {{=MARKMIN(page.content)}} It ignores it and simply prints the text. Is there something I am doing wrong? Best Regards, Jason Brower

Re: [web2py] Re: is web2py support html 5 and css 3?

2011-04-08 Thread Jonathan Lundell
On Apr 8, 2011, at 10:04 AM, Stifan Kristi wrote: > actually, my intention is to embed audio or video file into web2py apps, i've > tried embed and object but it's not going to work, so that i tried to use > html 5 tags audio and video, but got the same result, i ever posted to this > forum too

Re: [web2py] Re: is web2py support html 5 and css 3?

2011-04-08 Thread pbreit
Don't forget you can always just use regular HTML tags in your views as well (which is what many prefer to do anyway). Example: your browser does not support the video tag

Re: [web2py] Re: is web2py support html 5 and css 3?

2011-04-08 Thread Stifan Kristi
actually, my intention is to embed audio or video file into web2py apps, i've tried embed and object but it's not going to work, so that i tried to use html 5 tags audio and video, but got the same result, i ever posted to this forum too about my detail error using embed tag. pardon me, what do u m

[web2py] speaking of css3

2011-04-08 Thread Jonathan Lundell
...here's a very pretty css3 menu: http://www.webdesignerwall.com/demo/css3-dropdown-menu/css-gradient-dropdown.html

[web2py] Re: Change IPython to BPython in shell mode

2011-04-08 Thread Massimo Di Pierro
talking about this? http://wiki.blender.org/index.php/Dev_talk:Source/BPython/API/bpy_api It should be easy.. open the shell and type: from gluon.globals import Request, Response, Session from gluon.compileapp import build_environment( request=Request() response=Response() session=Session() requ

[web2py] Re: Change IPython to BPython in shell mode

2011-04-08 Thread Bruno Rocha
No idea? Em 07/04/2011 11:13, "Bruno Rocha" escreveu: > hi, > > does anybody knows how to run the web2py shell using BPython instead of > IPython? > > I saw a line in gluon/shell.py but I did not find argument to pass in > console. > > Would be great a way to run: > > $python web2py.py - S appname

[web2py] Re: proposal - extend auth_membership with

2011-04-08 Thread Will Stevens
Has anything become of this? I am also looking for this functionality. Has any work been done on this? Thanks, Will

[web2py] Re: is web2py support html 5 and css 3?

2011-04-08 Thread Massimo Di Pierro
We have no plan to add more tags since you can generate any tag you need as Jonathan suggests. If we need to change the behavior of some tags, please let me know with a concrete example. Massimo On Apr 8, 9:57 am, Jonathan Lundell wrote: > On Apr 8, 2011, at 7:37 AM, Stifan Kristi wrote: > > > n

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Jonathan Lundell
On Apr 8, 2011, at 7:37 AM, Stifan Kristi wrote: > no, i mean html 5 tag is it support to be converted by python format, > actually, i've tried to convert audio and video tag using html 5 (references > from w3schools), but it's not goin to work (audio n video), any solution for > this problem?

[web2py] Re: Bug in SQLFORM.accepts with onvalidate?

2011-04-08 Thread Massimo Di Pierro
This may be a bug. Will look into it... On Apr 8, 2:31 am, Jens Örtenholm wrote: > Hello everyone, > > I believe I've found a bug in SQLFORM.accepts. > > When calling with an onvalidation function as: > > form = SQLFORM(db.table) > if form.accepts(request.vars, session, onvalidation=function): >

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Stifan Kristi
no, i mean html 5 tag is it support to be converted by python format, actually, i've tried to convert audio and video tag using html 5 (references from w3schools), but it's not goin to work (audio n video), any solution for this problem? thanks very much On Fri, Apr 8, 2011 at 9:27 PM, Jonathan

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Jonathan Lundell
On Apr 8, 2011, at 7:02 AM, Stifan Kristi wrote: > a, i c, i mean is it support the python format for html 5 and css 3 tags, > like : > e.g. > {{=BR()}} web2py always generates for BR(), which is OK for html5 (though not really great for html4...). Just be sure to generate an html5 doctype: >

Re: [web2py] IS_EMPTY_OR(IS_NOT_IN_DB(db, 'person.name'))?

2011-04-08 Thread Richard Vézina
Zero option!! Or Read this thread : http://groups.google.com/group/web2py/browse_thread/thread/974cb71a3eb297f6/fe9299eb54ad032a#fe9299eb54ad032a Richard On Fri, Apr 8, 2011 at 3:51

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Stifan Kristi
a, i c, i mean is it support the python format for html 5 and css 3 tags, like : e.g. {{=BR()}} thank you On Fri, Apr 8, 2011 at 8:46 PM, Vasile Ermicioi wrote: > web2py is a server side framework, html5 and css3 are client side > technologies, and they should be supported by browsers not by s

[web2py] Re: Unit test and request object

2011-04-08 Thread Jérémie
Some more points. I finally succeeded to reset request thanks to matclab's comments and code on the slice (http://www.web2pyslices.com/main/slices/take_slice/ 67) : >> "note that without pickling at init and unpickling at setup, the session and >> request was not cleaned up before each test." cl

[web2py] Re: Bug in SQLFORM.accepts with onvalidate?

2011-04-08 Thread VP
On Apr 8, 5:49 am, DenesL wrote: > Hello Jens, > > onvalidation is called *after* the validation, so setting form.errors > does not have any effect. > Wait Then what is the purpose of onvalidation? I have thought all along by reading the book that onvalidation is to provide additional

[web2py] embed not work in web2py

2011-04-08 Thread 黄祥
hi, i try to embed avi video file into web2py (tested in chrome n firefox), in my model : db.define_table('video', Field('video', 'upload', requires = IS_NOT_EMPTY()

Re: [web2py] is web2py support html 5 and css 3?

2011-04-08 Thread Vasile Ermicioi
web2py is a server side framework, html5 and css3 are client side technologies, and they should be supported by browsers not by servers

Re: [web2py] change default controller into another controller

2011-04-08 Thread Stifan Kristi
it's clear for me now, thank you so much for your detail explaination.

[web2py] Re: change default controller into another controller

2011-04-08 Thread Anthony
On Friday, April 8, 2011 7:45:40 AM UTC-4, 黄祥 wrote: > > hi, > > is it possible to change default controller into another controller, i > mean, when i click my application on > http://127.0.0.1:8000/admin/default/site, > is it possible to redirect to another controller? The links to the app

[web2py] change default controller into another controller

2011-04-08 Thread 黄祥
hi, is it possible to change default controller into another controller, i mean, when i click my application on http://127.0.0.1:8000/admin/default/site, is it possible to redirect to another controller? thanks

Re: [web2py] Re: crud.create and SQLFORM: different behaviour

2011-04-08 Thread Johann Spies
On 8 April 2011 12:56, DenesL wrote: > > What do you have in the form.accepts?. Nothing. I have tried: if form.accepts(request .vars, session ): session

[web2py] is web2py support html 5 and css 3?

2011-04-08 Thread 黄祥
Hi, i want to create audio n video controller like on web2py applicances, n try to using html 5 for audio n video, but it can't run, is web2py support html 5 and css 3? thanks

[web2py] Re: web2py shell error?

2011-04-08 Thread Massimo Di Pierro
This is a known error with the web shell. Notice that we use this: http://shell.appspot.com/ and it has the same problem. On Apr 8, 5:06 am, puercoespin wrote: > web2py Shell Version 1.94.6 (2011-03-27 18:20:38) > In [1] : stack=[2,3,4] > > In [2] : stack.append(5) > > In [3] : stack > [2, 3, 4

[web2py] Re: IS_EMPTY_OR(IS_NOT_IN_DB(db, 'person.name'))?

2011-04-08 Thread DenesL
It works fine in 1.94.5 On Apr 8, 3:51 am, pbreit wrote: > Should this work or is there some other equivalent? I want the field to be > optional but if filled in, unique in the DB. > > IS_EMPTY_OR(IS_NOT_IN_DB(db, 'person.name')) > > I got an error stack that I can't really understand and assume

[web2py] Re: crud.create and SQLFORM: different behaviour

2011-04-08 Thread DenesL
What do you have in the form.accepts?. On Apr 8, 5:05 am, Johann Spies wrote: > I have two controllers using the same table.  One for the logged in user to > register for a course and the  other for the administrator to register a > user for a course overriding the 'writable=False in the model:

[web2py] Re: Bug in SQLFORM.accepts with onvalidate?

2011-04-08 Thread DenesL
Hello Jens, onvalidation is called *after* the validation, so setting form.errors does not have any effect. On Apr 8, 3:31 am, Jens Örtenholm wrote: > Hello everyone, > > I believe I've found a bug in SQLFORM.accepts. > > When calling with an onvalidation function as: > > form = SQLFORM(db.tab

Re: [web2py] Re: My First Application on Web2py is Now Live.... www.beunick.com

2011-04-08 Thread Martín Mulone
Congrats! +1. And the invitation key? 2011/4/8 cjrh > On Apr 8, 4:14 am, Yannick wrote: > > Cheers and thanks in advance for your feedback > > Works in Opera 11 :) -- My blog: http://martin.tecnodoc.com.ar Expert4Solution: http://www.experts4solutions.com/e4s/default/expert/6 http://www.cv

[web2py] web2py shell error?

2011-04-08 Thread puercoespin
web2py Shell Version 1.94.6 (2011-03-27 18:20:38) In [1] : stack=[2,3,4] In [2] : stack.append(5) In [3] : stack [2, 3, 4] In the python2.5 shell: ActivePython 2.5.5.7 (ActiveState Software Inc.) based on Python 2.5.5 (r255:77872, Jan 31 2010, 15:49:35) [MSC v.1310 32 bit (Intel)] on win32 Type

[web2py] crud.create and SQLFORM: different behaviour

2011-04-08 Thread Johann Spies
I have two controllers using the same table. One for the logged in user to register for a course and the other for the administrator to register a user for a course overriding the 'writable=False in the model: The model has: db.define_table('t_registration_form', Field('f_attendee', db.a

[web2py] Re: datetime, DAL and JSON serialization

2011-04-08 Thread Omri Har-Shemesh
Sorry for the long reply time (I am working at two jobs and didn't have time to get to it yet). I can supply the following simple example: the data model is: db.define_table("timestamps", Field("by", db.auth_user), Field("at", "datetime", default=request.now)) and the controller function is:

[web2py] IS_EMPTY_OR(IS_NOT_IN_DB(db, 'person.name'))?

2011-04-08 Thread pbreit
Should this work or is there some other equivalent? I want the field to be optional but if filled in, unique in the DB. IS_EMPTY_OR(IS_NOT_IN_DB(db, 'person.name')) I got an error stack that I can't really understand and assume it's related. Traceback (most recent call last): File "gluon/rest

[web2py] Bug in SQLFORM.accepts with onvalidate?

2011-04-08 Thread Jens Örtenholm
Hello everyone, I believe I've found a bug in SQLFORM.accepts. When calling with an onvalidation function as: form = SQLFORM(db.table) if form.accepts(request.vars, session, onvalidation=function): And the function sets an error: def function(form): form.errors.myfield = 'This is an error'

[web2py] Re: Tables refrencing each other

2011-04-08 Thread Seeker
Perhaps just add a boolean field in the chapter table: is_first ... or something to that effect?? On saving an un-flagged chapter you can always check whether any other chapters for the story have been flagged as first; if not auto flag the one being saved. If a subsequent chapter (marked as first)