[web2py:35474] Re: Date default now()

2009-11-17 Thread David
Yes it works as expected. Again thanks Massimo! On Nov 17, 12:59 am, mdipierro wrote: > Wait. The appadmin interface ignores writable and readable. > > When you make your own form it will work as you expect. > > Massimo > > On Nov 17, 12:17 am, David wrote: > > > Ok I've added those entries an

[web2py:35476] Re: scaling web2py (web2pyslice)

2009-11-17 Thread Mengu
massimo, while in production mod, is it possible to stop web2py checking if the tables and fields are in database? if it's not possible, can you make this an option for the next version? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[web2py:35477] Re: Retrieve Images From Database

2009-11-17 Thread desfrenes
Storing images in db is a bad idea imo. You should probably only store url/path in db and serve images from a static web server. On 17 nov, 10:49, David wrote: > I used the GAE example in the book to create a thumbnail image that is > stored in the database for my model.  The image displays fin

[web2py:35478] Re: scaling web2py (web2pyslice)

2009-11-17 Thread mdipierro
db.define_table(...,migrate=False) On Nov 17, 4:35 am, Mengu wrote: > massimo, > > while in production mod, is it possible to stop web2py checking if the > tables and fields are in database? if it's not possible, can you make > this an option for the next version? --~--~-~--~~---

[web2py:35479] Re: plugin_tagging

2009-11-17 Thread Benigno
I am using the second version posted of the Tagging_plugin. However, to me, it gets stuck on the "Loading..." message, and I dont seem to be able to find the cause for this. I have a routes.py active and two different applications, each with their db implemented (I hope it only sees in globals th

[web2py:35480] Re: plugin_tagging

2009-11-17 Thread Benigno
If I remove the ajax=True, it is giving me a 404 not found error... yet, I cannot find where. On Nov 17, 4:51 pm, Benigno wrote: > I am using the second version posted of the Tagging_plugin. > > However, to me, it gets stuck on the "Loading..." message, and I dont > seem to be able to find the c

[web2py:35481] plugins

2009-11-17 Thread leone
I try to understand and build a plugin. I have a silly question: how can I compress the code in a package?? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send ema

[web2py:35482] Re: plugin_tagging

2009-11-17 Thread Thadeus Burgess
do you have the latest version of web2py_ajax.html? -Thadeus On Tue, Nov 17, 2009 at 10:00 AM, Benigno wrote: > > If I remove the ajax=True, it is giving me a 404 not found error... > yet, I cannot find where. > > On Nov 17, 4:51 pm, Benigno wrote: > > I am using the second version posted of

[web2py:35483] Re: plugins

2009-11-17 Thread Thadeus Burgess
If you go to your admin, and then click the plug-in name (located at the bottom) it will bring you to a new page, which will have those options at the top. -Thadeus On Tue, Nov 17, 2009 at 10:04 AM, leone wrote: > > I try to understand and build a plugin. > I have a silly question: how can I

[web2py:35484] routes problems

2009-11-17 Thread Carlos Aboim
Hi folks, I want to change my default page from welcome page to my app page. When I change the routes_in in routes.examples.py my default page doesn't change. Appearing the welcome page. If on the other hand I copy that file or make a new one "routes.py" it gives me the feedback: Traceback (most

[web2py:35485] Re: plugin_tagging

2009-11-17 Thread Benigno
Yes, I just updated it to be on the safe side. Still the same issue. On Nov 17, 5:25 pm, Thadeus Burgess wrote: > do you have the latest version of web2py_ajax.html? > -Thadeus > > On Tue, Nov 17, 2009 at 10:00 AM, Benigno wrote: > > > If I remove the ajax=True, it is giving me a 404 not found

[web2py:35486] Re: Retrieve Images From Database

2009-11-17 Thread David
I changed the format to serve the files from the system disk. On Nov 17, 7:49 am, desfrenes wrote: > Storing images in db is a bad idea imo. You should probably only store > url/path in db and serve images from a static web server. > > On 17 nov, 10:49, David wrote: > > > I used the GAE exampl

[web2py:35487] Re: plugin_tagging

2009-11-17 Thread mdipierro
the plugin requires a logged in user. Do you have an acount with the app and are you logged in? On Nov 17, 10:25 am, Thadeus Burgess wrote: > do you have the latest version of web2py_ajax.html? > -Thadeus > > On Tue, Nov 17, 2009 at 10:00 AM, Benigno wrote: > > > If I remove the ajax=True, it i

[web2py:35488] Re: scaling web2py (web2pyslice)

2009-11-17 Thread David
I've noticed that the frontend is running WSGI but in order to use admin I have to start it manually on the shell with port forwarding in order to do any work on the backend. I added an entry from the script to /etc/rc.local to handle the admin side of things so I don't have to login to my dev bo

[web2py:35489] redirect on page that requires login

2009-11-17 Thread Wes James
in t2 you could do: @t2.requires_login(next='login') in auth there is: @auth.requires_login() How do I redirect to a certain page after someone tries to access a page that requires being logged in? thx, -wes --~--~-~--~~~---~--~~ You received this message bec

[web2py:35490] internationalization

2009-11-17 Thread jensmun
I'm sorry about that - please delete previous post. I was using it & es instead of it-it and es-es... Works now thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, s

[web2py:35491] Image Uploading

2009-11-17 Thread NuclearDragon
How can I specify my own filename and upload location for images? I can't find in the code where it is doing the upload/save/rename processes. I have a vague idea that it uses shutil somehow, but I just can't see where it is being used, or how to interrupt and redirect the process. Thanks! --~-

[web2py:35492] Internationalization

2009-11-17 Thread jensmun
Hi, Thanks for this everybody. Looks really cool. I've been playing with this tonight for the first time and everything was fine until I got to internationalization. It doesn't seem to respond at all or randomly to me changing language on FF3.5.5 and OSX 10.5. Nothing changes - and I've checked

[web2py:35493] Re: redirect on page that requires login

2009-11-17 Thread mdipierro
You do not. After login you go back to the page that required login. On Nov 17, 5:49 pm, Wes James wrote: > in t2 you could do: > > @t2.requires_login(next='login') > > in auth there is: > > @auth.requires_login() > > How do I redirect to a certain page after someone tries to access a > page tha

[web2py:35494] Re: Image Uploading

2009-11-17 Thread mdipierro
you can specify the location Field('name','upload',uploadfolder='...') You should not specify your own filename. The filename is generated so that: 1) is unique 2) is safe 3) upon download web2py can efficiently find the table, record and field the file belongs to and figure out a) where the fi

[web2py:35495] Re: Internationalization

2009-11-17 Thread mdipierro
Perhaps this can help. http://www.vimeo.com/7520812 Massimo On Nov 17, 4:20 pm, jensmun wrote: > Hi, > > Thanks for this everybody. Looks really cool. > > I've been playing with this tonight for the first time and everything > was fine until I got to internationalization. It doesn't seem to >

[web2py:35496] Re: Image Uploading

2009-11-17 Thread Richard
you can use the new "uploadfolder='you/path'" argument to set the location. Or if you want full control use "uploadfield=False" with something like: db.define_table('image' Field('filename', 'upload', uploadfield=False, requires=IS_NOT_EMPTY()), ) form = SQLFORM(db.image) if form.accept

[web2py:35497] Re: Image Uploading

2009-11-17 Thread Richard
For my app I explicitly assign user friendly filenames, because my client also wants to browse the backend upload folder manually. Is this going to break web2py anywhere? On Nov 18, 11:27 am, mdipierro wrote: > you can specify the location > > Field('name','upload',uploadfolder='...') > > You s

[web2py:35498] Re: Image Uploading

2009-11-17 Thread mdipierro
You will need your own download action, you cannot use response.download and access control on uplodaded files will not work. Also it will not work if the file is stored on DB, for example on GAE. It is a logical problem. If web2py cannot figure out from the name which table/record references the

[web2py:35499] Re: Retrieve Images From Database

2009-11-17 Thread Beerc
Storing images in database is a bad idea GENERALLY. But on GAE you can't write the file system, so you have no other choice for persistent storage. And you will see garbage instead of image if MIME type incorrect or unsetted. In general case the web server (e.g. Apache) will set it for you automa

[web2py:35500] Re: Retrieve Images From Database

2009-11-17 Thread mdipierro
This is all automatic in web2py is you do not rename the uploaded files. On Nov 17, 7:18 pm, Beerc wrote: > Storing images in database is a bad idea GENERALLY. > But on GAE you can't write the file system, so you have no other > choice for persistent storage. > > And you will see garbage instead

[web2py:35501] break label in sqlfield

2009-11-17 Thread Wes James
is there a way to do (add a brake in the label text): SQLField(. label='texttext') in the SQLField? thx, -wes --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send

[web2py:35502] Re: break label in sqlfield

2009-11-17 Thread mdipierro
label=XML('texttext') or label=SPAN('text',BR(),'text') On Nov 17, 9:31 pm, Wes James wrote: > is there a way to do (add a brake in the label text): > > SQLField(. label='texttext') > > in the SQLField? > > thx, > > -wes --~--~-~--~~~---~--~~ You received t

[web2py:35503] RSS encoding

2009-11-17 Thread Alexey Nezhdanov
Hello. I noticed that generic.rss produces non utf-8 text. Even worse - it produces iso-8859-1 text WITHOUT AN OPTION TO CHANGE THAT! So I made the following change to gluon/contrib/rss2.py : def dumps(rss, encoding='utf-8'): s = cStringIO.StringIO() rss.write_xml(s, encoding) return

[web2py:35504] Re: break label in sqlfield

2009-11-17 Thread Wes James
On Tue, Nov 17, 2009 at 9:56 PM, mdipierro wrote: > > label=XML('texttext') this is what I did (above) - is just has it as if there were no XML() > > or > > label=SPAN('text',BR(),'text') > > > On Nov 17, 9:31 pm, Wes James wrote: >> is there a way to do (add a brake in the label text): >> >>

[web2py:35505] update - see values only after forcing browser to refresh

2009-11-17 Thread Wes James
I have this: student=db(db.student.sid==user_id).select() if (student): form=crud.update(db.student,student[0]) else: form=crud.create(db.student) But when I do a submit to the form it comes back with the data, before the submit. If I refresh the browser window the c

[web2py:35506] Re: Retrieve Images From Database

2009-11-17 Thread David
I was storing the images in postgres. When I tried calling the image by the filename it returned the coded filename. When I tried calling the image blob it returned garbage. I was just wondering if there was an example on how to call the images from the database as it isn't mentioned in the man

[web2py:35507] KeyError: 'auth_table'

2009-11-17 Thread annet
I my model I defined my own auth_user table: from gluon.tools import * auth=Auth(globals(),db) auth_table=db.define_table(auth.settings.table_user_name, Field('bedrijf', db.bedrijf, default='', notnull=True,ondelete='CASCADE'), Field('first_name', length=128, default='', notnull=True),