[web2py] Re: Controller Hierarchy

2010-06-09 Thread Binh
Awesome! Thank you for all your help. On Jun 9, 11:16 pm, mdipierro wrote: > > And if you want to enforce a facebook login before using the app, you > > would have to call require_facebook_login(request,facebook_settings) > > in every action you write. > > That is not very DRY. > > Not necessaril

[web2py] Re: Controller Hierarchy

2010-06-09 Thread mdipierro
> And if you want to enforce a facebook login before using the app, you > would have to call require_facebook_login(request,facebook_settings) > in every action you write. > That is not very DRY. Not necessarily. In web2py, you can put the logic in a controller file outside any action and it will

[web2py] Re: Controller Hierarchy

2010-06-09 Thread Binh
Example: before_filter in rails or class ApplicationController < ActionController::Base before_filter :require_facebook_login end class MyController < ApplicationController def index end end # all controllers inherit from ApplicationController and the before_filter in ApplicationController el

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread szimszon
Patch sent with /./ in use where self.uploadseparate == 2 :) On jún. 9, 22:11, mdipierro wrote: > I suggest a subfolder for every table.field and one for every > combinations of the first 2 chars? > The simpler the better. > > On Jun 9, 3:01 pm, szimszon wrote: > > > Good question :) > > > Or

[web2py] Re: electronic signature

2010-06-09 Thread mdipierro
errata. form=crud.update(db.table,onaccept=crud.archive) info is here: http://web2py.com/examples/static/epydoc/web2py.gluon.tools.Crud-class.html#archive On Jun 9, 11:58 pm, mdipierro wrote: > Mind that you can also do > > form=crud.update(db.table,onaccept=auth.archive) > > It will create a

[web2py] Re: electronic signature

2010-06-09 Thread mdipierro
Mind that you can also do form=crud.update(db.table,onaccept=auth.archive) It will create a secret table (which can be exposed) will all revisions for the edited records. Look into examples in the docstring or in the web based shell type help(auth.archive) On Jun 9, 11:53 pm, Christopher Steel

[web2py] Re: electronic signature

2010-06-09 Thread Christopher Steel
Hi Jean Guy, Are you talking about record auditing??? You could do that with something like this: # This sets a variable for user_id which is used frequently # it must be set after db.py or in db.py but after auth tables have been defined # and before the table referring to it. user_id = auth.u

[web2py] Re: Minimal Install on Embedded Arm System

2010-06-09 Thread mdipierro
I know it runs on stackless but what would be the benfit? Or does stackless provide a wsgi server with lightweight threads? On Jun 9, 5:46 pm, GoldenTiger wrote: > Perhaps for embedded system, it could be good using Stackless > python . > Anyway, I didn't investigate about, so I'm not sure of bei

[web2py] Re: Controller Hierarchy

2010-06-09 Thread mdipierro
I do not undersand. can you rpovide an example? On Jun 9, 11:28 pm, Binh wrote: > Controller would be useful for a facebook canvas app where all > requests are delegated to all the other controllers. > The example facebook app shows the use of pyfacebook to handle > requests on the index action i

[web2py] Re: Separating models into their own files

2010-06-09 Thread mdipierro
They both make a lot of sense. The former would be much easier to implement and would result in faster code. What do other people think? On Jun 9, 11:32 pm, Salvor Hardin wrote: > I'm new to python and web2py, so this might sound crazy but...here > goes. > > Noob idea #1 > Why not provide an opti

[web2py] Re: Key query support in Google App Engine

2010-06-09 Thread mdipierro
As long as this works the same if the old queries: id==value and id>0 yes. If you could also avoid the trunk of changing the name='__key__' and restoring name='id' it would be better. You could add a new attrbute to the field object and use that for the check: _iskey=True, On Jun 9, 11:25 pm, h

[web2py] Re: Separating models into their own files

2010-06-09 Thread Salvor Hardin
I'm new to python and web2py, so this might sound crazy but...here goes. Noob idea #1 Why not provide an optional "exec_models.cfg" file? If it doesn't exist, execute *.py files in alphabetical order found in the models folder. This will maintain backward compatibility and give web2py more flexi

[web2py] Re: Minimal Install on Embedded Arm System

2010-06-09 Thread Christopher Steel
it work on my old iphone as well. Never thought of deleting admin, I will try that. C On Jun 9, 12:50 pm, Álvaro Justen wrote: > On Mon, Jun 7, 2010 at 15:55, ed wrote: > > I would like to install web2py with the minimal footprint on an embedded > > Arm system.  The embedded Arm system alread

[web2py] Controller Hierarchy

2010-06-09 Thread Binh
Controller would be useful for a facebook canvas app where all requests are delegated to all the other controllers. The example facebook app shows the use of pyfacebook to handle requests on the index action in the default controller. Is it possible to hookup pyfacebook in a DRY way that all contr

[web2py] Re: Key query support in Google App Engine

2010-06-09 Thread howesc
1) i don't mind removing __key__ from extra. it was just something i was using while figuring it out. (though i don't understand what it changes in how Rows is accessed). 2) The Key on GAE is a base64 encoded string of "table_name: id=" (for the simple no-ancestor case). My understanding of how

Re: [web2py] Re: Weird error when trying to change my avatar image in my profiles... (Using Auth())

2010-06-09 Thread Jason Brower
Thanks, thought I was installing the latest version. But I wasn't. Best Regards, Jason Brower On Wed, 2010-06-09 at 12:54 -0700, mdipierro wrote: > This was fixed in 1.79.1 > > On Jun 9, 2:05 pm, Jason Brower wrote: > > And if I refresh the page that had the error, resubmitting. It logs me > >

[web2py] Re: email attachments not seen on Macs

2010-06-09 Thread mdipierro
In trunk! :-) On Jun 9, 11:04 pm, Bob_in_Comox wrote: > Notwithstanding my backup option of using links instead of > attachments, I discovered a way to make email attachments work for > both PC users as well as Mac users: > > Line 294 of gluon.tools.py: >    payload_in = MIMEMultipart.MIMEMultipa

[web2py] Re: Key query support in Google App Engine

2010-06-09 Thread mdipierro
The belongs is fine but I have a couple of problems: 1) adding __key__ in extra is not backward compatible because it changes the way records in Rows is acceessed 2) if you say db(db.table.id<1000) it does not actually select records if id<1000 but Key(id) wrote: > Hi all, > > attached is a patch

[web2py] Re: email attachments not seen on Macs

2010-06-09 Thread Bob_in_Comox
Notwithstanding my backup option of using links instead of attachments, I discovered a way to make email attachments work for both PC users as well as Mac users: Line 294 of gluon.tools.py: payload_in = MIMEMultipart.MIMEMultipart('related') changed to: payload_in = MIMEMultipart.MIMEMultip

[web2py] Key query support in Google App Engine

2010-06-09 Thread Christian Foster Howes
Hi all, attached is a patch for gql.py. Please review and Massimo, if people like this, can we add it to trunk? what does it do? it allows you to do key queries on Google App Engine. this means that you can now perform all ID queries on tables in google app engine. for example: bel

[web2py] Re: web2pyslices update

2010-06-09 Thread Salvor Hardin
FWIW, I've had 600+ days of uptime running Debian + Apache + qmail at www.linode.com. It was rebooted recently to switch from uml to xen. I have two nodes there, one Debian (sarge) in Texas and one Ubuntu 10.04 in New Jersey. Linode's web-based interface is amazing (I love being able to resize my

Re: [web2py] Re: web2pyslices update

2010-06-09 Thread Thadeus Burgess
Statusactive Distro Ubuntu 9.10 (karmic) Age 7 months Datacenter DFW1 Since I live in Austin, I like having my server so close. Most of slicehosts servers are in Dallas, they allocate your server based on your address, however they do have them located elsewhere and can reque

[web2py] Re: Error on install script?

2010-06-09 Thread mdipierro
You do not need it. Comment that part of the script related to pam. On Jun 9, 9:21 pm, cadrentes wrote: > I don't know the answer but I may have found a clue.  When I try to > manually install the pwauth line of the script, it's not found in the > repository.  I copied Massimo's vimeo instruction

[web2py] Re: Separating models into their own files

2010-06-09 Thread mdipierro
My approach is to use db_blablabla1.py db_blablabla2.py db_blablabla3.py where db_blablabla.py defiles all tables that link each other for a specific purpose. The different files are independent and therefore the order of execution is not important. On Jun 9, 9:20 pm, Thadeus Burgess wrote

[web2py] Re: web2pyslices update

2010-06-09 Thread mdipierro
vps.net I have not rebooted or restarted apache in 3 months (except when upgraded web2py) and only tickets due to known application bugs. On Jun 9, 9:13 pm, Thadeus Burgess wrote: > slicehost! =) > > -- > Thadeus > > On Wed, Jun 9, 2010 at 6:01 PM, mr.freeze wrote: > > VPS provider fail. I'm on

[web2py] Re: Error on install script?

2010-06-09 Thread cadrentes
I don't know the answer but I may have found a clue. When I try to manually install the pwauth line of the script, it's not found in the repository. I copied Massimo's vimeo instructions exactly and got the same error. Oddly, it started working when I screwed with the link (but probably not as in

Re: [web2py] Re: Separating models into their own files

2010-06-09 Thread Thadeus Burgess
There are some things you can do to alleviate the situation. First, you can name you models so that they execute in the correct order. A_db.py B_user.py C_post.py E_tag.py That said, I usually try to keep all related models in the same file. In your case you might have B_user.py C_weblog.py Si

Re: [web2py] web2pyslices update

2010-06-09 Thread Thadeus Burgess
slicehost! =) -- Thadeus On Wed, Jun 9, 2010 at 6:01 PM, mr.freeze wrote: > VPS provider fail. I'm on the hunt for a new provider. I hope to have > it back up tomorrow. >

[web2py] Re: performance issue- multiple db connection

2010-06-09 Thread mdipierro
yes, this was always zero, mostly because it does not work with sqlite (default db) and because when introduced we did not want to change the previous behavior (backward compatibility). On Jun 9, 6:59 pm, Doug Warren wrote: > Sorry to bump an old email, but was this changed at some point? > (mast

Re: [web2py] performance issue- multiple db connection

2010-06-09 Thread Doug Warren
Sorry to bump an old email, but was this changed at some point? (master) [dwar...@thebigwave gluon]$ grep pool_size\= * dal.py:def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8'): dal.py:def __init__(self,db,uri,pool_size=0,folder=None,db_codec ='UTF-8'): dal.py:def __in

[web2py] Re: Best CSS framework for web2py

2010-06-09 Thread GoldenTiger
One more question please About fieldset, I can read: "This solution is a hack as it relies on fieldset to escape caveats related to DIVs. It should not be used for production" Which problems could be found if used for production? On 10 jun, 01:17, GoldenTiger wrote: > Thanks a lot, now I under

[web2py] Re: disable label

2010-06-09 Thread howesc
last time i was wrestling with the forms i noticed that everything has nice class names - use css to put no-wrap on the label class. (firebug plugin to firefox really helps with inspecting generated HTML). also i think i read something about being able to specify table or div based layouts for for

Re: [web2py] Re: Keep the instance of a class during the session

2010-06-09 Thread Doug Warren
I ran into this a few nights ago, and if I wasn't about to leave on a vacation I'd try some prototype code for it, but from what I can tell at the end of any request all open database connections are marked to be closed (Except for those needed to keep the connection pool up to it's proper size.)

[web2py] Re: Best CSS framework for web2py

2010-06-09 Thread GoldenTiger
Thanks a lot, now I understand it :) On 10 jun, 01:06, Yarko Tymciurak wrote: > On Jun 9, 5:59 pm, Jonathan Lundell wrote: > > > On Jun 9, 2010, at 5:39 PM, GoldenTiger wrote: > > > > Athttp://www.ez-css.org/rapid_prototyping,  code of Module3A and > > > Module3B are identical, but looks differ

[web2py] Re: Nice libraries for UI design inspiration (or web2py integration)

2010-06-09 Thread GoldenTiger
Well, maybe both of admin versions could start working together, or testing them as independient apps... but I don't know admin internally, so I can't be very usefull by now On 10 jun, 00:43, mdipierro wrote: > If we were to do this, should have a single tree of applications and > sub trees for

[web2py] Re: Best CSS framework for web2py

2010-06-09 Thread Yarko Tymciurak
On Jun 9, 5:59 pm, Jonathan Lundell wrote: > On Jun 9, 2010, at 5:39 PM, GoldenTiger wrote: > > > Athttp://www.ez-css.org/rapid_prototyping,  code of Module3A and > > Module3B are identical, but looks different. > > > I don't understand it.  Any help please? > > The classes are subtly different. T

Re: [web2py] Re: Best CSS framework for web2py

2010-06-09 Thread Jonathan Lundell
On Jun 9, 2010, at 5:39 PM, GoldenTiger wrote: > At http://www.ez-css.org/rapid_prototyping , code of Module3A and > Module3B are identical, but looks different. > > I don't understand it. Any help please? The classes are subtly different. The difference is whether column 3, which does not ha

[web2py] web2pyslices update

2010-06-09 Thread mr.freeze
VPS provider fail. I'm on the hunt for a new provider. I hope to have it back up tomorrow.

[web2py] Re: Keep the instance of a class during the session

2010-06-09 Thread Jose
On 9 jun, 17:38, Jose wrote: > As I mentioned, with the object caching works well. > When I create the object you pass as argument the db. The problem I > have is that when I save something in the database fails me because > the base is closed. > > ... > File "/usr/home/jose/web2py/applications/

[web2py] Re: Minimal Install on Embedded Arm System

2010-06-09 Thread GoldenTiger
Perhaps for embedded system, it could be good using Stackless python . Anyway, I didn't investigate about, so I'm not sure of being a good idea. On 9 jun, 18:50, Álvaro Justen wrote: > On Mon, Jun 7, 2010 at 15:55, ed wrote: > > I would like to install web2py with the minimal footprint on an em

[web2py] Re: Nice libraries for UI design inspiration (or web2py integration)

2010-06-09 Thread mdipierro
If we were to do this, should have a single tree of applications and sub trees for models/views/controllers/etc. (option 1) or should have separate pages for the list of apps and one for the tree structure inside an app (option 2). Actually this would be easy now that I have seen not elRTE and elF

[web2py] Re: Best CSS framework for web2py

2010-06-09 Thread GoldenTiger
At http://www.ez-css.org/rapid_prototyping , code of Module3A and Module3B are identical, but looks different. I don't understand it. Any help please? On 9 jun, 17:36, Christopher Steel wrote: > I like ez-css a lot also. It that is very flexible, super fast to > learn and use (no manual requi

[web2py] Re: Nice libraries for UI design inspiration (or web2py integration)

2010-06-09 Thread GoldenTiger
That is exactly what I was thinking :) On 10 jun, 00:07, mdipierro wrote: > really nice. Perhaps it is a time for an admin^2 > > On Jun 9, 4:49 pm, GoldenTiger wrote: > > > I would share some pretty libraries. > > I like them a lot and maybe you'll like them > > > elRTE :Open source WYSIWYG ed

[web2py] Re: Nice libraries for UI design inspiration (or web2py integration)

2010-06-09 Thread mdipierro
really nice. Perhaps it is a time for an admin^2 On Jun 9, 4:49 pm, GoldenTiger wrote: > I would share some pretty libraries. > I like them a lot and maybe you'll like them > > elRTE :Open source WYSIWYG editor for website > Demo:http://elrte.ru/en/elrte/demo > Web:http://elrte.ru/en > > elFinder

[web2py] Re: email attachments not seen on Macs

2010-06-09 Thread Yarko Tymciurak
There is no reason you need to use webfaction's mail servers if you are hosted on webfaction. try connecting to a different mail server, and run some tests and see what happens. On Jun 9, 12:49 pm, mdipierro wrote: > I do not know how to help about this. This seems more of a problem > with smtl

[web2py] Nice libraries for UI design inspiration (or web2py integration)

2010-06-09 Thread GoldenTiger
I would share some pretty libraries. I like them a lot and maybe you'll like them elRTE :Open source WYSIWYG editor for website Demo: http://elrte.ru/en/elrte/demo Web: http://elrte.ru/en elFinder: File manager for website (Finder osx style) Demo: http://elrte.ru/en/elfinder/demo Web: http://elr

[web2py] Re: Separating models into their own files

2010-06-09 Thread mdipierro
No. This the main issue with web2py design. This is the price we pay for not having imports of models. On Jun 9, 4:21 pm, Binh wrote: > Hi, > > I am trying to create an orm setup like in ruby on rails with the DAL. > I have a user, post, and tag model. > A user has many posts. > A tag belongs to

[web2py] Separating models into their own files

2010-06-09 Thread Binh
Hi, I am trying to create an orm setup like in ruby on rails with the DAL. I have a user, post, and tag model. A user has many posts. A tag belongs to a user. A post has and belongs to many tags. A tag has and belongs to many posts. I have 4 separate files in my models folder: db.py, user.py, pos

Re: [web2py] bzr cleanup

2010-06-09 Thread Álvaro Justen
On Wed, Jun 9, 2010 at 17:36, mdipierro wrote: > Fran proposed cleaning up the bzr branch since it is getting slow. the > easiest way to do it is bu deleting all previous revisions and their > history. Any strong objection? I think we should maintain only mercurial. -- Álvaro Justen - Turicas

[web2py] Re: eliminated repeat values

2010-06-09 Thread kike
I forget mention I'm cuban, and in my country I not access to googlecode On Jun 9, 4:37 pm, kike wrote: > the same problems I not permission. and now what > > On Jun 9, 4:12 pm, mdipierro wrote: > > > you should just type: > > > hg clonehttps://web2py.googlecode.com/hg/web2py > > > in your s

[web2py] Re: Keep the instance of a class during the session

2010-06-09 Thread Jose
As I mentioned, with the object caching works well. When I create the object you pass as argument the db. The problem I have is that when I save something in the database fails me because the base is closed. ... File "/usr/home/jose/web2py/applications/py_ccu/modules/ incidencias.py", line 124, i

[web2py] Re: eliminated repeat values

2010-06-09 Thread kike
the same problems I not permission. and now what On Jun 9, 4:12 pm, mdipierro wrote: > you should just type: > > hg clonehttps://web2py.googlecode.com/hg/web2py > > in your shell and it will donwload a copy > > On Jun 9, 3:08 pm, kike wrote: > > > let my explain, in the addresshttp://web2py.

[web2py] Re: flot related help

2010-06-09 Thread mdipierro
Although this does not uses flot, it can give an idea. http://web2py.com/appliances/default/show/12 On Jun 9, 3:20 pm, dbb wrote: > Hello: >  I am trying to use flot to draw a graph by reading the data from the > database >   I am stuck, need an example

[web2py] bzr cleanup

2010-06-09 Thread mdipierro
Fran proposed cleaning up the bzr branch since it is getting slow. the easiest way to do it is bu deleting all previous revisions and their history. Any strong objection? Massimo

Re: [web2py] Re: Inserting data with foreign keys not from a form

2010-06-09 Thread Doug Warren
Yep! Thank you. I knew there would be a more idiomatic way of writing it, just wasn't sure what it would be. On Wed, Jun 9, 2010 at 12:27 PM, mdipierro wrote: > You can rewrite > > if db(fk_table.id > 0).count() == 0: >    db.fk_table.insert(name="The Foreign Key") > if db(table2.id > 0).count(

[web2py] flot related help

2010-06-09 Thread dbb
Hello: I am trying to use flot to draw a graph by reading the data from the database I am stuck, need an example

[web2py] Re: eliminated repeat values

2010-06-09 Thread mdipierro
you should just type: hg clone https://web2py.googlecode.com/hg/ web2py in your shell and it will donwload a copy On Jun 9, 3:08 pm, kike wrote: > let my explain, in the addresshttp://web2py.com/examples/default/download > in the trunk part are two link, the first mercurial repository in the >

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread mdipierro
I suggest a subfolder for every table.field and one for every combinations of the first 2 chars? The simpler the better. On Jun 9, 3:01 pm, szimszon wrote: > Good question :) > > Originally I was about to use only the first letter of uuid_key :) and > a parameter true or false :) > It's the gnome

[web2py] Re: eliminated repeat values

2010-06-09 Thread kike
let my explain, in the address http://web2py.com/examples/default/download in the trunk part are two link, the first mercurial repository in the section http://code.google.com/p/web2py/downloads/list they show me the error 403 Forbidden and tell me my client not have permission to get that url, and

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread szimszon
Good question :) Originally I was about to use only the first letter of uuid_key :) and a parameter true or false :) It's the gnome way to doing things. Keep it simple to the endusers... :-D But after that I considered to use the first two characters than came the idea to have an integer paramete

[web2py] Re: Weird error when trying to change my avatar image in my profiles... (Using Auth())

2010-06-09 Thread mdipierro
This was fixed in 1.79.1 On Jun 9, 2:05 pm, Jason Brower wrote: > And if I refresh the page that had the error, resubmitting. It logs me > out and puts me at the loggin screen. > It also seems to have worked when I am logged in.(Image changed and > everything.)  Very funky indeed. > BR, > J > > O

[web2py] Re: eliminated repeat values

2010-06-09 Thread mdipierro
what do you mean "no permission" You do not need permission. On Jun 9, 2:36 pm, kike wrote: > What version of web2py I need use to try that, I download right now > a 1.79.2 version from home site and in that version don't work that > modification, and I not permission to download a trunk version.

[web2py] Re: eliminated repeat values

2010-06-09 Thread mdipierro
sorry. Trunk version only On Jun 9, 2:36 pm, kike wrote: > What version of web2py I need use to try that, I download right now > a 1.79.2 version from home site and in that version don't work that > modification, and I not permission to download a trunk version. > > On Jun 9, 12:30 am, mdipierro

[web2py] Re: eliminated repeat values

2010-06-09 Thread kike
What version of web2py I need use to try that, I download right now a 1.79.2 version from home site and in that version don't work that modification, and I not permission to download a trunk version. On Jun 9, 12:30 am, mdipierro wrote: > I changed the validator in trunk IS_IN_DB. Now it should b

[web2py] Re: Inserting data with foreign keys not from a form

2010-06-09 Thread mdipierro
You can rewrite if db(fk_table.id > 0).count() == 0: db.fk_table.insert(name="The Foreign Key") if db(table2.id > 0).count() == 0: fk = db(db.fk_table.name == "The Foreign Key").select()[0] db.table2.insert(name = "Some name", fk_id = fk.id, field2="some value") as fk = db(db.fk_tabl

Re: [web2py] Re: Inserting data with foreign keys not from a form

2010-06-09 Thread Doug Warren
Sorry to bump my own message but is there a better way to handle this? On Jun 4, 2010 8:02 AM, "Doug Warren" wrote: Yes, but the foreign key here is many to one, not one to one. (I guess I should have been more clear: if db(fk_table.id > 0).count() == 0: db.fk_table.insert(name="The Foreign Ke

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread mdipierro
Does it make sense to have the value of uploadseparate be any different than 2? It is already 3844 subfolders. On Jun 9, 11:15 am, szimszon wrote: > Already done :) > > On jún. 9, 15:45, mdipierro wrote: > > > please email me this as an attachment. > > > On Jun 9, 6:50 am, szimszon wrote: > > >

[web2py] Re: Weird error when trying to change my avatar image in my profiles... (Using Auth())

2010-06-09 Thread Jason Brower
And if I refresh the page that had the error, resubmitting. It logs me out and puts me at the loggin screen. It also seems to have worked when I am logged in.(Image changed and everything.) Very funky indeed. BR, J On Wed, 2010-06-09 at 22:02 +0300, Jason Brower wrote: > When I try to change the

[web2py] Weird error when trying to change my avatar image in my profiles... (Using Auth())

2010-06-09 Thread Jason Brower
When I try to change the avatar image in the profile I get a weird error... This is the actual pickle, as I have no way to read the files while I don't have admin access. Hence why I reported this feature about a month ago. (dp1 S'output' p2 S'' sS'layer' p3 S'Framework' p4 sS'code' p5 S'' sS'trace

[web2py] Re: Funny ordering situation...

2010-06-09 Thread mdipierro
>>> a=lambda b: 'c' is the same as >>> def a(b): return 'c' but often you see >>> def f(a): a() >>> f(lambda b: 'c') 'c' this means that within f, a=lambda b:'c' but outside f, the function has no name. The function (lambda) exist only for the purposed to be passed to f. On Ju

Re: [web2py] how to do a data picker?

2010-06-09 Thread Jean Guy
I found datepicker it is in /static... I'm still searching for a data picker in which I could list data from differents tables and let them be selected by check box... Jonhy 2010/6/9 Jason Brower > It's in the default welcome example if you want to use it in a form. Or > if your using a 'da

Re: [web2py] how to do a data picker?

2010-06-09 Thread Jason Brower
It's in the default welcome example if you want to use it in a form. Or if your using a 'date' in your model you should have a date picker by default. Best Regards, Jason Brower On Wed, 2010-06-09 at 11:10 -0400, Jean Guy wrote: > Hello, > > I have different types of data that must be selected,

Re: [web2py] Re: Funny ordering situation...

2010-06-09 Thread Jason Brower
Nice, I will try number one as I still don't know what the heck a lambda is. Best regards, Jason Brower On Wed, 2010-06-09 at 06:44 -0700, mdipierro wrote: > You have two options: > > 1) perform 4 quesries > > rows=db(query_first).select()+db(query_second).select() > +db(query_third).select()+d

[web2py] Re: email attachments not seen on Macs

2010-06-09 Thread mdipierro
I do not know how to help about this. This seems more of a problem with smtlib than web2py. If anybody has any more insight about this please let us know. The idea of linking the attachment seems a better way anyway because less load on the email server. On Jun 9, 12:46 pm, Bob_in_Comox wrote

[web2py] email attachments not seen on Macs

2010-06-09 Thread Bob_in_Comox
I send email out to 150 club members. No problems with simple emails. However with attachments only PC users can see and download them, while Mac uses cannot even see the attachments. using web2py 1.79.1 on webfaction with webfaction email servers My code (simplified): from gluon.tools import Ma

Re: [web2py] Minimal Install on Embedded Arm System

2010-06-09 Thread Álvaro Justen
On Mon, Jun 7, 2010 at 15:55, ed wrote: > I would like to install web2py with the minimal footprint on an embedded > Arm system.  The embedded Arm system already has Python 2.6 installed. > > What files do I need to install for web2py to run? > What do you expect the total MB size to be? > > Is th

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
Understood. I will test this ASAP. -- Thadeus On Wed, Jun 9, 2010 at 11:05 AM, mdipierro wrote: > This is not going to stay, it is just for you to look at. > Consider defining the field as integer and create a trigger using SQL > to autofill this field. > > On Jun 9, 10:52 am, mdipierro wro

[web2py] Re: Minimal Install on Embedded Arm System

2010-06-09 Thread Christopher Steel
Hi Ed, Just move the entire web2py source folder and you should be good to develop. To save some space you can delete the examples app and potentially the welcome app (if you don't need to create new apps directly on the target system). I was looking into this at my last contract and I think the p

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread szimszon
Already done :) On jún. 9, 15:45, mdipierro wrote: > please email me this as an attachment. > > On Jun 9, 6:50 am, szimszon wrote: > > > Hmm... there are a lot of possibility to separate files into > > folders... > > > I typically would have lots of files with the same type... > > > In the mean

[web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread mdipierro
This is not going to stay, it is just for you to look at. Consider defining the field as integer and create a trigger using SQL to autofill this field. On Jun 9, 10:52 am, mdipierro wrote: > well, I am posting in trunk a modifiled sql.py that > > allows Field('name','autoincrement') and generates

[web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread mdipierro
well, I am posting in trunk a modifiled sql.py that allows Field('name','autoincrement') and generates the following code for postgresql (only postgresql). Give it a try. Massimo On Jun 9, 10:38 am, Thadeus Burgess wrote: > Postgres > > CREATE TABLE foo ( > id integer PRIMARY KEY SERIAL, > bar

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
Postgres CREATE TABLE foo ( id integer PRIMARY KEY SERIAL, bar varchar, did integer DEFAULT SERIAL); Or... CREATE SEQUENCE seq_foo_did START 2; CREATE TABLE foo ( id integer PRIMARY KEY SERIAL, bar varchar, did integer DEFAULT nextval('seq_foo_did')); SQLite however does not support multi

[web2py] Re: Best CSS framework for web2py

2010-06-09 Thread Christopher Steel
I like ez-css a lot also. It that is very flexible, super fast to learn and use (no manual required really) and it works great for creating "flowable" sites as well. As a result of this discussion I am going to give the blueprint typography.css a shot. the Blueprint license seems very interesting

[web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread mdipierro
On a second thought of this matterthis is nonsense. If a table has two autoincrement fields ("id" and "other") they always contain the same values or values that differ for a constant offset (If the started with different values). That is why some database backends probably do not even support

Re: [web2py] Re: Pycon APAC and Web2py

2010-06-09 Thread Zoom.Quiet
On Tue, Jun 8, 2010 at 02:09, mdipierro wrote: > send us some slides when done. > sure, u will sharing voice recoder ;-) > On Jun 7, 2:29 am, Anand Vaidya wrote: >> Pycon APAC 2010 is scheduled to run from 9th to 11th in Singapore. >> >> On the 10th June, 11:10am we have a talk : >> >> "Electro

Re: [web2py] Re: Best CSS framework for web2py

2010-06-09 Thread Jonathan Lundell
On Jun 9, 2010, at 5:54 AM, Pepe wrote: > Hello, > > ez-css is great for layout, I'm using it. > > for typography, you could use the "typography.css" of blueprint. That's what I'm doing. I started out with blueprint, but switched my layout to ez-css to get a variable-width section. Highly reco

[web2py] how to do a data picker?

2010-06-09 Thread Jean Guy
Hello, I have different types of data that must be selected, but a dropbox is not adequate. A popup that could list in columns my different data type would be an interesting alternative. Is there exist a plugin that would do that? I search for the code of calendar date picker included in web2py ..

[web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread mdipierro
I am not sure about the postgresql solution. Tell me how you do it in SQL and i tell you how to do in web2pyese. On Jun 9, 9:01 am, Thadeus Burgess wrote: > Great. What about sqlite? > > -- > Thadeus > > On Wed, Jun 9, 2010 at 8:41 AM, mdipierro wrote: > > In postgresql you get it native: > > >

[web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread mdipierro
I am testing this (both sqlite and postgresql). How do you do it in raw sql? This does not work in sqlite sql CREATE TABLE a( id INTEGER PRIMARY KEY AUTOINCREMENT, d CHAR(512), b INTEGER AUTOINCREMENT ); It does not seem to like two AUTOINCREMENT fields (which is what I thought). O

Re: [web2py] Re: PluginManager?

2010-06-09 Thread Doug Warren
On Wed, Jun 9, 2010 at 3:34 AM, Thadeus Burgess wrote: > We have not fully agreed on the spec of PluginManager, it has been > added as a proof of concept, however no plugins to date have been > implemented with it. There are hundreds of posts debated what it > should do. > > Currently the spec for

Re: [web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread Thadeus Burgess
Great. What about sqlite? -- Thadeus On Wed, Jun 9, 2010 at 8:41 AM, mdipierro wrote: > In postgresql you get it native: > > Field('yourtfield',SQLCustomType('integer','SERIAL PRIMARY > KEY',encoder=(lambda x: int(x)),decoder=(lambda x:x))) > > On Jun 9, 5:28 am, Thadeus Burgess wrote: >> T

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread mdipierro
please email me this as an attachment. On Jun 9, 6:50 am, szimszon wrote: > Hmm... there are a lot of possibility to separate files into > folders... > > I typically would have lots of files with the same type... > > In the mean time I have a path to separate the uploaded files into > subdirector

[web2py] Re: Funny ordering situation...

2010-06-09 Thread mdipierro
You have two options: 1) perform 4 quesries rows=db(query_first).select()+db(query_second).select() +db(query_third).select()+db(query_others).select(orderby=criteria) 2) perform one query and sort them in memoery rows=db(...).select().sort(lambda row: yoursortingfunction(row)) On Jun 9, 5:38 

[web2py] Re: Advice, convert from string storing numbers to autoincrement integer

2010-06-09 Thread mdipierro
In postgresql you get it native: Field('yourtfield',SQLCustomType('integer','SERIAL PRIMARY KEY',encoder=(lambda x: int(x)),decoder=(lambda x:x))) On Jun 9, 5:28 am, Thadeus Burgess wrote: > That is the thing, its *almost* the same, but its not a true postgres > sequence. Postgres already has ma

[web2py] Re: Typo error in the official web2py book

2010-06-09 Thread mdipierro
thanks. here is a good place. On Jun 9, 3:25 am, Giuseppe Luca Scrofani wrote: > I dont know if this is the correct place to post this, but I have > found a typo inhttp://web2py.com/book/default/section/3/9 > In the wiki code presented (first block, the db model) at lines 39 and > 48 a function p

[web2py] Re: tos download

2010-06-09 Thread mdipierro
Mind this works if web2py is serving static files, not if apache does. On Jun 9, 1:06 am, annet wrote: > Massimo, > > I used: > > > {{=A('terms of service',_href=URL(r=request,c='static',f='cms/files/ > > tos_fitwise.pdf',vars=dict(attachment=True)))}} > > and it works, so problem solved thanks.

[web2py] adding table to RBAC

2010-06-09 Thread Jean Guy
Hello, I implement the RBAC in my app and I try to figure it out how I can add more table in the dropbox of auth_permission table... There is only the auth_ table in the dropbox... I'm not experienced with RBAC and web2py then the information in web2py book are a bit short to me. Thanks. Jonhy

Re: [web2py] I have to make a new site, example appliance needed

2010-06-09 Thread Giuseppe Luca Scrofani
Hi Jason, thanks for answer. In a hurry I just exposed my problem in too basic terms. I have started extending the wiki example in the web2py book, it seem to be what I need. My request was for a sort of "template"... I founded it, so thanks. gls

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread szimszon
I have no problem to dealing with large amounts of files its just the underlaying filesystem is just not for storing large number of files in one directory. I speak about ext2/ext3 which I use... Some threads about it: http://serverfault.com/questions/129953/maximum-number-of-files-in-one-ext3-di

[web2py] Re: upload file -- lot of file in one directory

2010-06-09 Thread szimszon
Hmm... there are a lot of possibility to separate files into folders... I typically would have lots of files with the same type... In the mean time I have a path to separate the uploaded files into subdirectories based on uuid_key's first X character: cut --- sql.py.orig 2010-06-08 23:

  1   2   >