[web2py] uuid - Postgresql-type

2011-08-23 Thread Johann Spies
At the moment a uuid-field in a Web2py-models generates a definition like this in a Postgresql table: uuid character varying(64) NOT NULL Postgresql has got a UUID-type. Is there a way that DAL can be adapted to utilise that in stead? Regards Johann -- May grace and peace be yours in abunda

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Henri Heinonen
On Aug 23, 2:03 am, Rufus wrote: > What have you tried? I have tried to load that gif file but it hasn't worked out yet... > Have you ever gotten *any* graphic image onto a web page with web2py? > I'd start with a known image at a known location. Yes, I have gotten PNG images what were generate

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Henri Heinonen
On Aug 23, 2:17 am, pbreit wrote: > Are you able to save the image files to /static/images? Yes, it seems so. > If so, then you should be able to display them on a web page with this HTML > in your view: > Thanks. I need some time for testing, because my server has some issues.

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Henri Heinonen
Ok. This is the default/index.html: {{extend 'layout.html'}} cavityflow {{=form}} {{if image:}} Constants These are the constants that were used during the simulations. {{=BEAUTIFY(request.vars)}} Figure {{pass}} This is the default.py: http://pastebin.com/VGE69RG1 Does this work for you? On

[web2py] Re: fluxflex

2011-08-23 Thread Ross Peoples
That would be a great idea Massimo!

[web2py] Re: fluxflex

2011-08-23 Thread Yota Ichino
nic, Plugin_wiki is a large file size. You can not upload large file. You need to paste "http://web2py.com/examples/static/ web2py.plugin.wiki.w2p" to "Use a url". On 8月23日, 午前11:00, nic wrote: > This looks fantastic. > Got web2py up and running in 2 mins as advertised. > However when I tried to

[web2py] Re: fluxflex

2011-08-23 Thread Yota Ichino
David Marko. I'm Ichino. I created web2py-for-fluxflex. Your problem was reproduced my environment. Upload file size is limited about 100KB. So, I setting upload file size more by using "LimitRequestBody" in .htaccess file. But it did not work. Please tell me config .htaccess for setting upload

[web2py] User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread ryo1kato
Hi, I'm frustrated that I can't check/select the checkboxes / radio- buttons by clicking on their labels rather than the box/buttons. So, here's my own solution for web2py, because I couldn't find any by quick googling. * http://bit.ly/nsNAmq (deep link in http://code.google.com/) * Demo is avai

[web2py] Re: get rid of 'verify password' in register?

2011-08-23 Thread Massimo Di Pierro
oops. my mistake. On Aug 22, 11:04 pm, Anthony wrote: > Well, you had to wait a whole 20 minutes, but Massimo is on the > case:http://code.google.com/p/web2py/source/detail?r=2c1f4c7f4f8e7e286d561... > . > > Maybe it should be called settings.register_verify_password, since it's on > the registr

Re: [web2py] Re: Sample code for new scheduler

2011-08-23 Thread Martín Mulone
Please advice if you change db definition of the scheduler. I'm in the middle of some work using this. 2011/8/22 Massimo Di Pierro > Thanks. Will fix it. I also have a pending patch to fix a concurrency > issue. > > On Aug 22, 1:26 am, Adi wrote: > > Hi Massimo, > > > > Is there some sample cod

Re: [web2py] User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread Martín Mulone
Good idea, I'm also have a bad pointing aiming. 2011/8/23 ryo1kato > Hi, > > I'm frustrated that I can't check/select the checkboxes / radio- > buttons > by clicking on their labels rather than the box/buttons. > So, here's my own solution for web2py, > because I couldn't find any by quick googl

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Anthony
In index(), the value of 'image' ends up being the URL '/cavityflow/default/cavityflow_plot', which is not the URL of the image you want to load. Instead, that URL itself ultimately just returns another URL, '/cavityflow/static/images/cavityflow.gif'. So, your img src attribute is pointing to a

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Henri Heinonen
Thank you! It works. :) On Aug 23, 3:40 pm, Anthony wrote: > In index(), the value of 'image' ends up being the URL > '/cavityflow/default/cavityflow_plot', which is not the URL of the image you > want to load. Instead, that URL itself ultimately just returns another URL, > '/cavityflow/static/im

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Henri Heinonen
Give it a shot, if you will: http://fsi.it.jyu.fi/animation On Aug 23, 3:45 pm, Henri Heinonen wrote: > Thank you! It works. :) > > On Aug 23, 3:40 pm, Anthony wrote: > > > In index(), the value of 'image' ends up being the URL > > '/cavityflow/default/cavityflow_plot', which is not the URL of t

[web2py] Re: How to return a gif image onto the webpage?

2011-08-23 Thread Anthony
It works. On Tuesday, August 23, 2011 8:46:39 AM UTC-4, Henri Heinonen wrote: > Give it a shot, if you will: http://fsi.it.jyu.fi/animation > > On Aug 23, 3:45 pm, Henri Heinonen wrote: > > Thank you! It works. :) > > > > On Aug 23, 3:40 pm, Anthony wrote: > > > > > In index(), the value

[web2py] request.vars, request.args, next (redirecting)

2011-08-23 Thread Johann Spies
The following scenario illustrated to me that I do not understand enough of what web2py is doing in the background. I want a crud.read form and a link to edit the same form (see the two functions below). At first I wanted to use the link like this: link = A('Edit', _href=URL(c='default', f='edit

[web2py] Re: User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread Anthony
I like the idea, but can't we just use: label text See http://www.w3schools.com/tags/tag_label.asp. Anthony On Tuesday, August 23, 2011 7:34:50 AM UTC-4, ryo1kato wrote: > Hi, > > I'm frustrated that I can't check/select the checkboxes / radio- > buttons > by clicking on their labels r

[web2py] Re: User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread Massimo Di Pierro
Thank you Kato, here there is substantial JS to add to web2py_ajax and perhaps we can make it more compact. What is more specifically the problem that you want to solve? Be able to check/uncheck clicking on option value instead of checkbox/radio button? On Aug 23, 6:34 am, ryo1kato wrote: > Hi

[web2py] Re: request.vars, request.args, next (redirecting)

2011-08-23 Thread Massimo Di Pierro
I thnk in some places you use request.vars.id and in other places you use request.args(0) and that is the confusion. Try this: def edit_journal(): opskrif = T('Editing journal record no. %d') % int(request.vars.id) vorm = crud.update(db.akb_journal, request.args(0),

[web2py] Re: built-in lazy virtual fields

2011-08-23 Thread Carlos
Hi Massimo, Just revisiting this topic, have you given any thought about my above proposal?. Thanks, Carlos

[web2py] Re: Free web2py Shared Host How-To

2011-08-23 Thread Mirek Zvolský
Anybody successfully finished Massimo's instructions? Could you help me what I made bad? At http://testxxx.alwaysdata.net/ I receive 404 Not found, The requested URL / was not found on this server. >From instructions I'm not sure if I made properly following: wget+unzip I made from inside /www di

Re: [web2py] Re: User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread KATO Ryoichi
Well, actually I'm embarrassed that I didn't know about And yes, I'm pretty sure that the change can be more simple. Primarily what I want is clickable option value(label) for radio/checkboxes. Besides, * Preferably, more large clickable area (*1) * Dynamic style change (as shown on the d

[web2py] validators.py > IS_IN_DB.__call__ > elif self.theset > must compare with str instead?

2011-08-23 Thread Carlos
Hi, With respect to [ validators.py > IS_IN_DB.__call__ > elif self.theset ], should this: if *value *in self.theset: be replaced with the following instead?: if *str(value)* in self.theset: This considering that theset is assigned in build_set as str values, otherwise the value will

Re: [web2py] Re: request.vars, request.args, next (redirecting)

2011-08-23 Thread Johann Spies
On 23 August 2011 15:31, Massimo Di Pierro wrote: > I thnk in some places you use request.vars.id and in other places you > use request.args(0) and that is the confusion. Try this: > > Thanks. Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of J

[web2py] Re: Free web2py Shared Host How-To

2011-08-23 Thread Mirek Zvolský
OK, now I understand where was mistake. I made wget+unzip in ~/www folder (which was current folder after ssh login). But wget+unzip should be done in ~ folder. /www folder can be removed completly.

Re: [web2py] Re: Help to understand Roles?

2011-08-23 Thread Richard Vézina
Yes group ou role = same thing. Web2py by default create a group for each new user and asign this user to that group. Richard On Mon, Aug 22, 2011 at 8:54 PM, Anaconda wrote: > Thanks Richard, i didnt quite understand your explanation but i think > i understand what role is based on this snipp

Re: [web2py] Re: User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread Anthony
I think using input text would be a good start (certainly a lot simpler). web2py already uses that to label fields in SQLFORMs and for the "Remember me" checkbox on login forms. The base.css even sets the cursor to 'pointer' for all label elements, so you get a pointer whenever you hover over a

[web2py] ajax-generated form: problem with submit

2011-08-23 Thread Martin Weissenboeck
Hi, I want do create a "dynamic form": (1) On the top of a page there are several questions and (2) at the end of the page a form should appear. The content of the form depends on the answers of step (1). Therefore I tried to insert this new form using ajax. Result: the form appears, the submit-b

[web2py] migrate=True not creating table ?

2011-08-23 Thread TomPliss
Hey (noob here again), I needed to change the type of a field in my DB (the Date one of a table was a string, i'm changing its require to IS_DATE). but the values for existing entries were "wrong" (string has no attribute year), so went on "oh, only tests are in this table, let's drop it", and dr

Re: [web2py] migrate=True not creating table ?

2011-08-23 Thread Richard Vézina
set it : migrate=False,fake_migrate=True http://www.web2py.com/book/default/chapter/06?search=fake#Fixing-Broken-Migrations Then it F5 to refresh your page... It should correct your database schema... You can potentially lost data you have entered so, make sure you backup everything if impor

[web2py] Re: ajax-generated form: problem with submit

2011-08-23 Thread Anthony
I don't think you are using jQuery.ajax correctly. The url should be the url to which the submitted form data should be sent. Also, the jQuery.ajax call does not appear to actually send any data (it takes a 'data' argument). See http://code.google.com/p/web2py/source/browse/applications/welcome/

[web2py] Time intervals with MySQL and DAL

2011-08-23 Thread G
Hello, I've noticed that the cleanup task in scheduler.py is not working for me. Looking into it, it appears that the handling of time intervals in MySQL through DAL is not being done properly. This code db(db.task_scheduled.status.belongs(statuses)) \ (db.task_scheduled.last_run_time+60

[web2py] URL inside .load component

2011-08-23 Thread Álvaro J . Iradier
Hi, I've created a component mycomponent.load to be used with the LOAD() method. But inside the mycomponent.load I want to have a link to another function in the same controller. When I do: {{=URL(r=request, f='otherfunction')}}, the .load extension is automatically added, so I end up being linke

[web2py] Bug in user_agent_parser.py

2011-08-23 Thread Angelo Compagnucci
Hi list, I'm using user_agent_parser.py from the latest stable version. I have this user agent: "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0" I cannot understand why the code looks for the Opera user agent (I have not read carefully the code) but it fails with this er

[web2py] Re: URL inside .load component

2011-08-23 Thread Anthony
On Tuesday, August 23, 2011 12:14:43 PM UTC-4, Álvaro J. Iradier wrote: > > Hi, > > I've created a component mycomponent.load to be used with the LOAD() > method. But inside the mycomponent.load I want to have a link to > another function in the same controller. > > When I do: {{=URL(r=request,

[web2py] field inheritance

2011-08-23 Thread DenesL
Maybe I dreamt it but it seems to me that there was a way to define a field like another field except for the name and label but I can't recall how it was done. It would be similar to table inheritance: http://web2py.com/book/default/chapter/06#Self-Reference-and-Aliases but at a field level. Us

[web2py] Re: Bug in user_agent_parser.py

2011-08-23 Thread Ross Peoples
I am looking in to this. Thank you for taking the time to provide the needed information. I'll let you know what I find.

Re: [web2py] field inheritance

2011-08-23 Thread Richard Vézina
Alias?? http://www.web2py.com/book/default/chapter/06?search=fake#Self-Reference-and-Aliases Richard On Tue, Aug 23, 2011 at 12:58 PM, DenesL wrote: > > Maybe I dreamt it but it seems to me that there was a way to define a > field like another field except for the name and label but I can't >

Re: [web2py] Re: ajax-generated form: problem with submit

2011-08-23 Thread Martin Weissenboeck
The whole demo program works fine: the form appears. If I add an "action=..." in "FORM(INPUT(_type="submit"), *checkboxes,_name='myform')" another page is called (as expected). The problem is that there is no value in request.vars. I don't know whether it is possible to add a form, which can be

[web2py] Re: Bug in user_agent_parser.py

2011-08-23 Thread Angelo Compagnucci
OK, I think I found the problem. It's located in these two functions. def detect(self, agent, result): if agent and self.checkWords(agent): result[self.info_type] = Storage(name=self.name) version = self.getVersion(agent) if version:

[web2py] Re: Bug in user_agent_parser.py

2011-08-23 Thread Ross Peoples
I just submitted a patch for inclusion into the trunk. It includes the change you mention, and includes a few other fixes, including a fix to the simple_detect() method that would throw a different set of IndexErrors. I have attached it here as well so that you can test while waiting for inclus

Re: [web2py] Re: Mobile detector

2011-08-23 Thread Angelo Compagnucci
Hi Ross, I'm looking into your user_agent_parser.py but I cannot find something like the mobile detector. I'll explain better. With user_agent_parser.py you can look for browser version and os version, but there isn't an easy way to dectect if a browser is mobile or not, or I'm missing something?

Re: [web2py] Re: Bug in user_agent_parser.py

2011-08-23 Thread Angelo Compagnucci
Thank you! It works like a charm! I'll keep you informed if I find anything! Thank you! 2011/8/23 Ross Peoples : > I just submitted a patch for inclusion into the trunk. It includes the > change you mention, and includes a few other fixes, including a fix to the > simple_detect() method that wo

[web2py] Allowing provisional login with email only

2011-08-23 Thread peter
I have been thinking about keeping registering and ‘logging in’ to a minimum on websites. We all hate registering with websites unless absolutely necessary, right? I am building an online store for music downloads. If the user does an 'add to cart', it would be nice if they did not have to registe

Re: [web2py] Re: Mobile detector

2011-08-23 Thread Ross Peoples
We could always modify the simple_detect() method to include a third item in the returned tuple that is a string (i.e. 'desktop', ,'mobile', etc) based on the outcome of the detect. That shouldn't be too difficult to do if you want to give it a try.

[web2py] embedded graphics

2011-08-23 Thread Richard
Hello, I want to create a scientific website with embedded graphics on Mac OS. Plots are created through Rpy2 and Matplotlib. All the modules run corretly on my Mac but what graphics type will give me the embedded plots and where should I place relevant code within the Web2py framework? Thank yo

Re: [web2py] Re: User-friendly checkbox/radio-button widget in gluon/sqlhtml.py

2011-08-23 Thread Bruno Rocha
I have a patch for adding for attr in labels for checkbox, radio and upload. I sent the demo code to Massimo, now I will submit a patch. I also think this widgets needs to follow the formstyle and not always be hander as a table. http://zerp.ly/rochacbruno Em 23/08/2011 11:35, "Anthony" escreve

Re: [web2py] Re: Mobile detector

2011-08-23 Thread Angelo Compagnucci
Hi Ross, Thank you for the info, it's really a good suggestion. I'll try to add a variable like is_mobile, becase all informations about browser and versions are already present in your code. I think however that the Bruno's approach is really awesome. It's really simple using the decorator, and

Re: [web2py] Re: Mobile detector

2011-08-23 Thread Anthony
Also, note that you can access user_agent_parser.py by calling request.user_agent(). The nice thing about the latter is that it will store the result in the session (as session._user_agent), so it only needs to parse the user agent once per session. Anthony On Tuesday, August 23, 2011 1:30:36

[web2py] left join as set to be use in a IS_IN_DB requires or represent

2011-08-23 Thread Richard
Hello, I am trying to make proper set to be use as a IS_IN_DB, but for building the set I need to join on 2 tables... IS_IN_DB() doesn't seems to like my set... Here my query that works and that I try to pass as a set... I know that it is not a set but a select... But how to make a left join in a

Re: [web2py] Re: fluxflex

2011-08-23 Thread Yota Ichino
Iceberg, Massimo Di Pierro, Your idea is great. These influence me and I rewrite .flx file. It is created on same github project with branch "get_new_stable". https://github.com/nus/web2py-for-fluxflex/tree/get_new_stable We can import this branch by using "Github import" menu. The branch doing:

Re: [web2py] Re: ajax-generated form: problem with submit

2011-08-23 Thread Anthony
I see. I saw you were making an Ajax post request and assumed that was supposed to be the form submission. If you're just using Ajax to pull the form html, you can do a get request (the default if you don't specify a method). I think the problem is that when you first call form.accepts when su

[web2py] Memory problems on Webfaction

2011-08-23 Thread Johann Spies
I experience memory usage problems on Webfaction from time to time. Even after doubling the initial configuration from 80Mb to 160Mb I get messages like intermittently this from Webfaction: Your total allowed memory is 160MB and your current memory usage is 223MB. ... zenex - 3MB - 14 days, 22:1

[web2py] Re: field inheritance

2011-08-23 Thread DenesL
Thanks Richard, but not quite what I have in mind. On Aug 23, 1:06 pm, Richard Vézina wrote: > Alias?? > > http://www.web2py.com/book/default/chapter/06?search=fake#Self-Refere... > > Richard

[web2py] Re: Memory problems on Webfaction

2011-08-23 Thread Gour-Gadadhara Dasa
On Tue, 23 Aug 2011 21:21:50 +0200 Johann Spies wrote: > I experience memory usage problems on Webfaction from time to time. > Even after doubling the initial configuration from 80Mb to 160Mb I > get messages like intermittently this from Webfaction: Install your own instance of nginx, Cherokee.

Re: [web2py] Re: Memory problems on Webfaction

2011-08-23 Thread Johann Spies
On 23 August 2011 21:36, Gour-Gadadhara Dasa wrote > On Tue, 23 Aug 2011 21:21:50 +0200 > Johann Spies > wrote: > > > I experience memory usage problems on Webfaction from time to time. > > Even after doubling the initial configuration from 80Mb to 160Mb I > > get messages like intermittently th

Re: [web2py] embedded graphics

2011-08-23 Thread Richard Vézina
Hello Richard, I think if I had to do what you want to do (I will have to do something similar soon) that I would use compute type field to generate my graph with lambda function base on orther field input data for processing and output from my lambda a graph under PNG image type and store the res

Re: [web2py] left join as set to be use in a IS_IN_DB requires or represent

2011-08-23 Thread Richard Vézina
I would prefer use "sql join on" syntax, but this way it finally works as expected : role1_test_set = db((db.auth_group.role=='role1_test') & (db.auth_user.id==db.auth_membership.user_id) & (db.auth_membership.group_id==db.auth_group.id)) db.test_test1.role.requires=\ IS_EMPTY_OR(IS_IN_DB(rol

[web2py] Re: Memory problems on Webfaction

2011-08-23 Thread Gour-Gadadhara Dasa
On Tue, 23 Aug 2011 21:42:39 +0200 Johann Spies wrote: > I have read mentions of nginx on this list but know about nothing > about it. Can this be done on Webfaction? How? Check forums...I'm not on Webafcation since quite some time, but, iirc, there was thread in the forums how to install it. P

Re: [web2py] Re: ajax-generated form: problem with submit

2011-08-23 Thread Martin Weissenboeck
Hi Anthony, it works! Thank you very much! And I think I can a little bit more understand what form.accepts does. By the way - "*There's probably a more elegant way to handle this," * Could you give me a hint about another way?* * 2011/8/23 Anthony > I see. I saw you were making an Ajax post r

Re: [web2py] Re: Calender / datetime picker - localization

2011-08-23 Thread Martin Weissenboeck
Hi Ray, yes, I have read it. My problem is to change the language "on the fly", depending on the language the visitor excepts. Regards, Martin 2011/8/22 Iceberg > Hi Martin, > > About the translation, have you checked out its official package? > http://www.dynarch.com/projects/calendar/old/ > >

Re: [web2py] Re: Calender / datetime picker - localization

2011-08-23 Thread Martin Weissenboeck
Ok, this is the documentation I have been looking for. Now I have found the direct link on the website. Thanks again. The timepicker seems not be very useful for me because I could not find a way to change it from AM/PM to 24 hours 2011/8/17 Anthony > Here's the documentation on the JS widget: >

[web2py] Multiprocessing in a controller woithout user interaction

2011-08-23 Thread Tkey
Hi, im new to web2py and i want to port some of my python scripts to a webserver-enviroment, while some of them nee user interaction (f.e. aceesing results in a database) and some of them should simply run server-side in the background (f.e. collecting data every hour). I´m using the multiproce

[web2py] Re: Please help re: form submission

2011-08-23 Thread TheSweetlink
Anthony you are the man. That is precisely what I needed to get on my way. This post in particular was roughly what I followed to accomplish what I wanted to do. http://forum.jquery.com/topic/submit-event-serialize-and-submit-buttons-get-the-button-name For anyone else reading this it is worth

Re: [web2py] Re: ajax-generated form: problem with submit

2011-08-23 Thread Anthony
On Tuesday, August 23, 2011 4:52:26 PM UTC-4, mweissen wrote: > > Hi Anthony, > it works! Thank you very much! And I think I can a little bit more > understand what form.accepts does. > > By the way - "*There's probably a more elegant way to handle this," * > Could you give me a hint about anothe

Re: [web2py] Re: Mobile detector

2011-08-23 Thread Angelo Compagnucci
Hi Ross, I produced a patch that adds the is_mobile boolean flag to a dist if the useragent belongs to a mobile device. Ptch is made on the last dev revision pulled from mercurial. It's actually a simple patch that modifies no more than ten lines of code, hope this helps! Now you could make: fro

[web2py] list:reference stop working with IS_IN_DB(set...)

2011-08-23 Thread Richard
Hello, I do something like this : Field('role1','list:reference auth_user') db.table1.role1.requires = IS_IN_DB(role1_set,'auth_user.id',db.auth_user._format,multiple=True,cache=(cache.ram, 3600)) That works fine for the form side of the thing... But I lost the list:reference auto representatio

Re: [web2py] list:reference stop working with IS_IN_DB(set...)

2011-08-23 Thread Richard Vézina
This will do the tricks : from operator import add represent=lambda values: reduce(add, [(id, ", ") for id in ['%(first_name)s %(last_name)s (%(id)s)' %db.auth_user[id] for id in values]])[:-1] Richard On Tue, Aug 23, 2011 at 6:10 PM, Richard wrote: > Hello, > > I do something like this : > > F

[web2py] update=request.now not working

2011-08-23 Thread JimK
I have the following table: Model db.define_table('queries', Field('my_db', 'string', required=True), Field('title', 'text', required=True), Field('query', 'text', required=True),

[web2py] Re: update=request.now not working

2011-08-23 Thread pbreit
Hmm...I just checked one of my apps and it was not updating either.

[web2py] Re: update=request.now not working

2011-08-23 Thread pbreit
I believe this change is responsible: http://code.google.com/p/web2py/source/detail?r=8b75dd7c4554c3fd1e5f78e13466163dedf2d07a

[web2py] Re: field inheritance

2011-08-23 Thread pbreit
Virtual Fields? http://www.web2py.com/book/default/chapter/06#Virtual-Fields

[web2py] Re: Allowing provisional login with email only

2011-08-23 Thread pbreit
Hard to say if it's better. Accounts and logins are som common that it might be alarming to not have such. But I think you might run into problems using auth_user for this. And I don't see what you gain out of using auth_user. I would just attach an email address to the order and then code any

[web2py] Re: Allowing provisional login with email only

2011-08-23 Thread Anthony
Maybe just keep the email address in the session for this purpose. You could still use Auth decorators if desired: @auth.requires(session.email!=None) As for accessing the shopping cart on a return visit, you might enable that via a long session expiration, but I'm not sure it's a good idea t

[web2py] Re: uuid - Postgresql-type

2011-08-23 Thread pbreit
That would probably require a new DAL field type which I'm guessing would require some consideration. What advantages are you looking for?

[web2py] Re: field inheritance

2011-08-23 Thread DenesL
Thanks pbreit, but they are not virtual fields, they are just based on another field definition. Maybe with a function: def like(field, name): import copy f = copy.copy(field) f.name = name f.label = ' '.join(x..capitalize() for x in name.split('_')) return f name = Field('name','stri

[web2py] Re: Calender / datetime picker - localization

2011-08-23 Thread Ray (a.k.a. Iceberg)
Then I think you need a dynamic include in your controller. Something like this: def index(): return {'foo': DIV( SCRIPT(_src=URL(..., 'calendar-%s-utf8.js'%language)), DIV(...all_cool_stuff...), )} Regards, Ray On Aug 24, 4:54 am, Martin Weissenboeck wrote: > Hi Ray

[web2py] Re: table, grid, smartgrid, getting better

2011-08-23 Thread DenesL
Question: how do you use the search?. I tried query like statements but it did not work Also, there is a typo in the source, sqlhtml.py line 1099 self.accpted = ret should be self.accepted = ret Denes.

[web2py] Re: PyCon Finland 2011

2011-08-23 Thread encompass
I should go! Didn't even know it was happening! MASSIMO SHOULD GO TOO!! Let's see if I can convince the family budget or my boss. :) On Aug 23, 1:24 am, Kenneth Lundström wrote: > Anyone planing to visit the European Capital of Culture a.k.a. Turku on > 17-18.10 and maybe visiting PyCon Turku at

[web2py] Re: Multiprocessing in a controller woithout user interaction

2011-08-23 Thread Massimo Di Pierro
You should use the scheduler. When you run web2py in production you may run into problems because the web server controls wich processes to kill. On Aug 23, 3:50 pm, Tkey wrote: > Hi, im new to web2py and i want to port some of my python scripts to a > webserver-enviroment, while some of them nee

[web2py] Problem with Oracle access and web2py database administration

2011-08-23 Thread tomt
I recently tried to access some legacy tables in an Oracle database with web2py. The connection string and model I generated in db.py allows successful connection and queries from the command line are successful, when I try to use the web2py database administration function I get the following erro

[web2py] Re: update=request.now not working

2011-08-23 Thread Massimo Di Pierro
oops...fixed in trunk. Please check it. On Aug 23, 7:31 pm, pbreit wrote: > I believe this change is > responsible:http://code.google.com/p/web2py/source/detail?r=8b75dd7c4554c3fd1e5f7...

[web2py] Re: field inheritance

2011-08-23 Thread Andrew
Hi Denes, Sounds like you are trying to define Domains, which are a good idea. Many modelling tools will allow you to define an attribute's properties by referencing a particular Domain. EG. a description domain might be VARCHAR(100), NULL, etc so all description fields linked to the Domain would

[web2py] Re: table, grid, smartgrid, getting better

2011-08-23 Thread Massimo Di Pierro
By default the search performs looks that every keyword that you type appears in any of the fields (string and text only). BUT SQLFORM.grid(,searchable=True) SQLFORM.smartgrid(,searchable=True) take an argument searchable which can be replaced by your own search function which will do:

[web2py] Re: PyCon Finland 2011

2011-08-23 Thread Massimo Di Pierro
I wish I could. I have never been in Finland. It is hard for me to travel during quarter time. Massimo On Aug 23, 10:08 pm, encompass wrote: > I should go! Didn't even know it was happening! > MASSIMO SHOULD GO TOO!! > Let's see if I can convince the family budget or my boss. :) > > On Aug 23, 1

[web2py] Re: Problem with Oracle access and web2py database administration

2011-08-23 Thread Massimo Di Pierro
I do not think primarykey is supported on Oracle. We can do this quickly but we will need your help with tests. @Denes, can you help with this as well? On Aug 23, 10:14 pm, tomt wrote: > I recently tried to access some legacy tables in an Oracle database > with web2py. The connection string and m

[web2py] Re: table, grid, smartgrid, getting better

2011-08-23 Thread Anthony
By default (with searchable=True), it looks like you just enter keywords, and it finds records that contain the keywords in any of the table fields. The 'searchable' argument can also be a callable that takes a keyword and a list of fields and returns a subquery. Anthony On Tuesday, August 23

Re: [web2py] Re: field inheritance

2011-08-23 Thread Bruno Rocha
On Tue, Aug 23, 2011 at 11:18 PM, DenesL wrote: > > Thanks pbreit, but they are not virtual fields, they are just based on > another field definition. > > Maybe with a function: > > def like(field, name): > import copy > f = copy.copy(field) > f.name = name > f.label = ' '.join(x..capitalize(

Re: [web2py] Re: field inheritance

2011-08-23 Thread Bruno Rocha
Of course or you pass desired template explicit to Field.template or set globally in DAL # define field templates DAL.field_templates = dict( text = Field('name','text',requires=IS_NOT_EMPTY(), represent=...), integer = Field('name','integer',.) ) Field.template(integer,'') and ta

[web2py] iconset

2011-08-23 Thread Massimo Di Pierro
In welcome there is a image showing a triangle, used for the menu. I would like to replace that with an iconset showing the triangle but also a few more action icons (on, off, edit, delete, etc.). Should be small, color neutral, free. Can you suggest one?

[web2py] Re: field inheritance

2011-08-23 Thread Massimo Di Pierro
I think we should be able to do: db.define_table('thing', Field(), Field.from_template(...), #1 Field.virtual(...), #2 Field.lazy(...), #2 other_table1, other_table2, ... singular = 'thing', #1 plural = 'things', #1 format = '', migrate = True) #1 are easy

Re: [web2py] Re: ajax-generated form: problem with submit

2011-08-23 Thread Martin Weissenboeck
Thank you, I will try it. Martin 2011/8/24 Anthony > On Tuesday, August 23, 2011 4:52:26 PM UTC-4, mweissen wrote: >> >> Hi Anthony, >> it works! Thank you very much! And I think I can a little bit more >> understand what form.accepts does. >> >> By the way - "*There's probably a more elegant wa

Re: [web2py] iconset

2011-08-23 Thread Bruno Rocha
JQuery UI ThemeRoller IMages: Image http://jqueryui.com/themeroller/images/?new=454545&w=256&h=240&f=png&fltr[]=rcd|256&fltr[]=mask|icons/icons.png In Action http://jqueryui.com/themeroller/ Note that changing the theme, the image file also changes to the new color set. and it is very nice if we

[web2py] Re: update=request.now not working

2011-08-23 Thread pbreit
Yes, that fixed it. Should we be expecting a release anytime soon?

[web2py] Re: fluxflex

2011-08-23 Thread David Marko
My packed application (web2py.app.twister.w2p) has 1.4MB

Re: [web2py] embedded graphics

2011-08-23 Thread Richard Dijkstra
Richard, Thanks. I have to figure out what this exact means because I am new to Web2py. Important is the graphics device you use, which one is that Agg, Cairo or something else? Richard Op 23-8-2011 21:53, Richard Vézina schreef: Hello Richard, I think if I had to do what you want to do

[web2py] Re: migrate=True not creating table ?

2011-08-23 Thread TomPliss
Already tried it, did not worked (and just did, still not working). Isn't it for modifying the table only, and not when creating a new one ? I mean, after deleting the table I wanted to change, I thought it's normal for the "migrate=False,fake_migrate=True" not to work, isn't it ? On Aug 23, 5:22

[web2py] Re: migrate=True not creating table ?

2011-08-23 Thread ron_m
In this situation look in the application/databases directory for a file with the table name as part of the file name. Remove or move the file somewhere else and then restart the web2py server. The table should now reappear and will be empty.

[web2py] Re: migrate=True not creating table ?

2011-08-23 Thread annet
Hi Tom, Did you remove the table's .table file from the databases folder? The way I proceed this problem is: In the database's management tool delete/drop the table; Trash the table's .table file in the databases folder; In db.py set migrate to migrate='tablename.table' Save db.py Return to admi