[web2py:20231] Re: Referring url

2009-04-22 Thread TeamBlack
Yea I understand the point you're making. After testing it out for a few hours I saw that in some cases the value for http_referer was "None". I wondered if it was a quirk of some browsers. When I was testing it I was using firefox. What's the alternative to using http_referer, if there is one? O

[web2py:20232] New Ubuntu Release

2009-04-22 Thread Yarko Tymciurak
FYI - Ubuntu 9.04rc is distributed w/ Python 2.6.2 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this g

[web2py:20233] Re: default values for request.vars

2009-04-22 Thread desfrenes
ok! Being influenced by other frameworks I was expecting something like this: myvalue = request.vars.offset.defaults('some default value') where defaults() would either return the actual value or the default value (as seen in ZF: $myvalue = $request->getParam('offset', 'some default value');).

[web2py:20234] Re: Issues about cron

2009-04-22 Thread Iceberg
On Apr17, 3:44am, AchipA wrote: > Linux definitely works, all crom modes, I have it in production in all > three modes. Had no Mac reports so don't know about those. Achipa, to upset you again, today I deploy my app on Linux for my first time, and find that similar problem on my Windows XP still

[web2py:20235] Re: site wide-plugins

2009-04-22 Thread Timmie
OKI, this applys to controller and maybe model code. But where and how to locate view documents to make them available either in widget form or full pages to all applications? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

[web2py:20236] Re: site wide-plugins

2009-04-22 Thread Iceberg
On Apr22, 4:18pm, Timmie wrote: > OKI, this applys to controller and maybe model code. > > But where and how to locate view documents to make them available > either in widget form or full pages to all applications? > I did this before. Maybe it can help you too. There are some "resources" need

[web2py:20237] Re: Issues about cron

2009-04-22 Thread AchipA
Woo, now you got me blinking (I have over a dozen linux boxen running various cron modes). Can you package me a sample app that demonstrated this so we're literally looking at the same thing ? If you use extcron, make sure to include your system crontab. On Apr 22, 10:03 am, Iceberg wrote: > On

[web2py:20238] Re: Issues about cron

2009-04-22 Thread AchipA
I'll comission an appliance to make checks easier (as this is something not easily doctestable). I can check windows and linux, I need volunteers for Mac. You'd have to download the latest web2by, the appliance and start a script I'll provide that goes through the cron modes and reports any odditi

[web2py:20239] ENUM field

2009-04-22 Thread Álvaro Justen [Turicas]
Is there a way to create ENUM() fields in database or I have to create a string field and do some verification? -- Álvaro Justen Peta5 - Telecomunicações e Software Livre 21 3021-6001 / 9898-0141 http://www.peta5.com.br/ --~--~-~--~~~---~--~~ You received thi

[web2py:20241] Re: ENUM field

2009-04-22 Thread Álvaro Justen [Turicas]
On Wed, Apr 22, 2009 at 9:20 AM, Michal Jursa wrote: > Just use: > > SQLField('field_name', requires = IS_IN_SET(['val1', 'val2']) Ok, I'm doing this way, but my doubt is: how web2py will handle this? Will it be a 'string' field with validation made by web2py or will it be a ENUM() field (exampl

[web2py:20242] Re: ENUM field

2009-04-22 Thread Michal Jursa
Validation is done by web2py and database field is string as you've said. This is so due to database compatibility i think. Not every database supported by web2py provides ENUM type. Michal Álvaro Justen [Turicas] wrote: > On Wed, Apr 22, 2009 at 9:20 AM, Michal Jursa wrote: >> Just use: >> >

[web2py:20243] Re: site wide-plugins

2009-04-22 Thread Timmie
This is exactly what I am looking for! How would you import / reuse the "modules/mylib.py"? many thanks & regards, Timmie On 22 Apr., 10:49, Iceberg wrote: > On Apr22, 4:18pm, Timmie wrote: > > > OKI, this applys to controller and maybe model code. > > > But where and how to locate view docum

[web2py:20240] Re: ENUM field

2009-04-22 Thread Michal Jursa
Just use: SQLField('field_name', requires = IS_IN_SET(['val1', 'val2']) Michal Álvaro Justen [Turicas] wrote: > Is there a way to create ENUM() fields in database or I have to create > a string field and do some verification? > --~--~-~--~~~---~--~~ You receive

[web2py:20244] Re: site wide-plugins

2009-04-22 Thread Iceberg
Just as usual, in your whatever app's controllers/default.py, you can do: import applications.share.modules.mylib On Apr22, 8:27pm, Timmie wrote: > This is exactly what I am looking for! > > How would you import / reuse the "modules/mylib.py"? > > many thanks & regards, > Timmie > > On 22 Apr

[web2py:20245] Re: Auth - disable registration

2009-04-22 Thread vihang
how can I decorate the register function in the tools.Auth from the application? Thanks On Apr 21, 3:08 pm, AchipA wrote: > You can call the decorator directly, or just wrap it in an internal > func. > > On Apr 21, 11:06 am, vihang wrote: > > > Even better would be to be able to use decorators

[web2py:20246] Re: Form for adding db line does not work; input text instead of select

2009-04-22 Thread DenesL
Drop downs are only created for non-list requires, e.g. db.person.country.requires = [IS_IN_DB (db,'country.id','country.name')] should be db.person.country.requires = IS_IN_DB (db,'country.id','country.name') Denes. On Apr 22, 1:57 am, dvid wrote: > Massimo, > > thank you for a blitz repl

[web2py:20247] Re: Auth - disable registration

2009-04-22 Thread AchipA
Hm, off the top of my head, if I understand correctly what you're asking: def user(): @decorator def myreg(): return dict(form=auth()) if 'register' in request.args: return myreg() return dict(fom=auth()) On Apr 22, 2:51 pm, vihang wrote: > how can I decorate the register fun

[web2py:20249] Re: Compliments

2009-04-22 Thread Fran
On Apr 21, 8:59 pm, Omar Munk wrote: > Windows isn't much used in the "Web-Framework-Scene":( Several people develop using Web2Py on Windows - I'm 1 :) F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web

[web2py:20250] SQLFORM

2009-04-22 Thread annet
I wonder whether it is possible in SQLFORM to mark the fields that are required with an asterisk. Now the visitor finds out whether a field is allowed to be empty after validation, which is a bit awkward. Furthermore, I wonder whether it is possible to add a reset and a cancel button to my forms,

[web2py:20251] Re: Compliments

2009-04-22 Thread Pynthon Pynthon
I also use WIndows. What is btw T1 and T2 *shame*? 2009/4/22 Fran > > On Apr 21, 8:59 pm, Omar Munk wrote: > > Windows isn't much used in the "Web-Framework-Scene":( > > Several people develop using Web2Py on Windows - I'm 1 :) > > F > > > > --~--~-~--~~~---~--~

[web2py:20252] Re: SQLFORM

2009-04-22 Thread Pynthon
You mean somehting like a "*" for this is required? I've not tried WebPy but maybe in your views? On 22 apr, 16:05, annet wrote: > I wonder whether it is possible in SQLFORM to mark the fields that are > required with an asterisk. Now the visitor finds out whether a field > is allowed to be empt

[web2py:20253] Re: default values for request.vars

2009-04-22 Thread mdipierro
you can do myvalue=request.vars.get('offset','somedefaultvalue') or, which I like better myvalue=request.vars.offset or 'somedefaultvalue' On 22 Apr, 02:32, desfrenes wrote: > ok! Being influenced by other frameworks I was expecting something > like this: > > myvalue = request.var

[web2py:20254] Re: ENUM field

2009-04-22 Thread mdipierro
You can make the field integer and then do db.mytable.myfield.requires=IS_IN_SET(range(3),('dog','cat','mouse')) This would be a enum. Massimo On 22 Apr, 07:27, Michal Jursa wrote: > Validation is done by web2py and database field is string as you've > said. This is so due to database compati

[web2py:20255] Re: site wide-plugins

2009-04-22 Thread mdipierro
Or for more portability exec('import applications.%s.modules.mylib as mylib' % request.application) Massimo On 22 Apr, 07:41, Iceberg wrote: > Just as usual, in your whatever app's controllers/default.py, you can > do: > >   import applications.share.modules.mylib > > On Apr22, 8:27pm, Timmie

[web2py:20256] Re: Form for adding db line does not work; input text instead of select

2009-04-22 Thread mdipierro
This still requires that you insert the id and not the name. If you want a text field where you insert the "name" and that stores the id into the field, assuming the name is unique you must define your own validator for example class IS_IN_TABLE_NAME: def __init__(self,table,error_message="na

[web2py:20257] Re: SQLFORM

2009-04-22 Thread mdipierro
SQLFORM tables an argument called col3 col3 is a dictionary of comments. So you can do: SQLFORM(...,col3=dict(field1='*',field4='*')) Massimo On 22 Apr, 09:17, Pynthon wrote: > You mean somehting like a "*" for this is required? I've not tried > WebPy but maybe in your views? > > On 22 apr,

[web2py:20258] Re: Compliments

2009-04-22 Thread mdipierro
T1 does not exist. T2 is a deprecated web2py tier 2 http://www.web2py.com/examples/statis/plugin_t2.pdf T3 is the evolution of T2 and still evolving... it includes T2. http://web2py.appspot.com/t3 This will merge with this http://www.web2py.com/events/default/index + KPAX + eStore to make a ki

[web2py:20259] Problems with web2py behind Proxy and mod_proxy_html

2009-04-22 Thread Bernd das Brot
Hi web2py fans ! I want to use web2py (current production version 1.61.1) behind an apache proxy, alongside other applications. Therefore I need a unique URL-Prefix to guide mod_proxy to the (standalone) web2py-Server (Application "cookbook": https://server:port/prefix/cookbook/...) 1) I followe

[web2py:20260] Re: ENUM field

2009-04-22 Thread Álvaro Justen [Turicas]
On Wed, Apr 22, 2009 at 11:19 AM, mdipierro wrote: > > You can make the field integer and then do > > db.mytable.myfield.requires=IS_IN_SET(range(3),('dog','cat','mouse')) > > This would be a enum. Ok, but with this I can't add this way: db.mytable.insert(myfield='cat') So, what I have to do?

[web2py:20261] Re: ENUM field

2009-04-22 Thread mdipierro
It is our philosophy that web2py DAL should not implement structures that are supported by the backend database engine. If you make the field an int, you need to store an int in it. Your map makes this explicit and I think it is fine. Massimo On 22 Apr, 09:41, Álvaro Justen [Turicas] wrote: >

[web2py:20262] Re: site wide-plugins

2009-04-22 Thread Iceberg
Thanks! This trick is what I am looking for, for a long time. :-) On Apr22, 10:20pm, mdipierro wrote: > Or for more portability > > exec('import applications.%s.modules.mylib as mylib' % > request.application) > > Massimo --~--~-~--~~~---~--~~ You received this m

[web2py:20263] Re: Compliments

2009-04-22 Thread Pynthon Pynthon
So also a web-framework :$? 2009/4/22 mdipierro > > T1 does not exist. > > T2 is a deprecated web2py tier 2 > http://www.web2py.com/examples/statis/plugin_t2.pdf > > T3 is the evolution of T2 and still evolving... it includes T2. > http://web2py.appspot.com/t3 > > This will merge with this > htt

[web2py:20264] Re: default values for request.vars

2009-04-22 Thread desfrenes
well, I didn't know about the "or" construction. Now that's elegant ! :-) Learning Python with web2py is a pleasure. Thank you. On Apr 22, 4:18 pm, mdipierro wrote: > you can do > >     myvalue=request.vars.get('offset','somedefaultvalue') > > or, which I like better > >     myvalue=request.var

[web2py:20265] Re: Compliments

2009-04-22 Thread JohnMc
I will give PHP one kudo -- They have wrapped themselves a fantastic suite of prebuilt componentry. Just go over to phpclasses.org and take a look. If you can't find a piece of code to use or morph then maybe PHP can't do it. Web2py has as a framework the mechanism to do the same. Even has worki

[web2py:20266] Re: Issues about cron

2009-04-22 Thread AchipA
Could you try my web2py branch from https://code.launchpad.net/~achipa/web2py/cron ? This is 1.61.4 merged back to my cron branch. On Apr 22, 3:36 pm, Iceberg wrote: > Achipa, I do not use extcron. In my usage, it should be a hardcron. > > In this mail I attach the crontest app. All the trick i

[web2py:20267] Re: SQLFORM

2009-04-22 Thread DenesL
On Apr 22, 10:05 am, annet wrote: > I wonder whether it is possible in SQLFORM to mark the fields that are > required with an asterisk. Now the visitor finds out whether a field > is allowed to be empty after validation, which is a bit awkward. You can use CSS to highlight the field or the lab

[web2py:20268] total of two time fields

2009-04-22 Thread Wes James
I have a db with two time fields - start_time, end_time. With db.table.represent = lambda row: TABLE(.) it will ouput the rows in a table. What I need to do is in the last column show end_time - start_time I'm trying to do this with represent, but I don't see a way. Is there a way other t

[web2py:20269] Re: Compliments

2009-04-22 Thread Pynthon Pynthon
I did not try W2P yet but I want to make something like this: Content system with categories (add pages and categories etc.) News system with categories (add news and categories etc.) Menu Manager Poll system That can be done easily done with W2P right? In PHP this takes weeks! 2009/4/22 JohnMc

[web2py:20270] Script using DAL: references don't work

2009-04-22 Thread Álvaro Justen [Turicas]
Hello, I'm creating a script to do some database verifications. This is called script.py and is in web2py root directory. To script.py works find I have to modify applications/myapp/models/db.py, adding in start: if __name__ != '__builtin__': from gluon.sql import * from gluon.validators

[web2py:20271] Re: total of two time fields

2009-04-22 Thread mdipierro
You can try to do rows = db(...).select(,db.table.end_time- db.table.start_time,) and the result should be in rows[0]._extra[db.table.end_time-db.table.start_time] but I would not trust it because it becomes dependent on the database backend. I suggest you use the standard iteration i

[web2py:20272] Re: Script using DAL: references don't work

2009-04-22 Thread mdipierro
web2py already has a mechanism for running scripts that see models. Did you look into python web2py.py -S yourapp -M -R script.py Try python web2py.py -h Massimo On Apr 22, 10:49 am, Álvaro Justen [Turicas] wrote: > Hello, > I'm creating a script to do some database verifications. This is >

[web2py:20273] Re: Problems with web2py behind Proxy and mod_proxy_html

2009-04-22 Thread mdipierro
I am not sure I understand so I apologize if the answer is incomplete. I do not know what mdp_proxy_html does vs mod_proxy. mod_proxy is required if you want to have another database server run as a proxy, but its job is not to rewrite URL, although you can do that. You can also have web2py rew

[web2py:20274] Scalability

2009-04-22 Thread Pynthon
Hello Ruby on Rails is sometimes hard to scale I heard. How is this with W2P? Thanks Pynthon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@

[web2py:20275] Re: Scalability

2009-04-22 Thread mdipierro
If you store everything in the database the only bottleneck is the database. The web2py DAL does not add a significative overhead. You can have as many servers you need under a load balancer. Those web server can work independently (other than for the database) thus providing scalability. You ca

[web2py:20276] Using external libraries?

2009-04-22 Thread Michael
Hey guys, I've been messing around with the twitter library for python from the command line. Is it possible to use this in web2py? It has a JSON library dependency. Also, if i have it in web2py how do i 'install' it? from the command line, i know to just do; python setup.py install B

[web2py:20278] Re: Compliments

2009-04-22 Thread Yarko Tymciurak
We built a news system in 2 hours in PyCon, at a web2py code dojo. I'll try to find the link to the slides. On Wed, Apr 22, 2009 at 10:47 AM, Pynthon Pynthon wrote: > I did not try W2P yet but I want to make something like this: > > Content system with categories (add pages and categories etc.) >

[web2py:20277] Re: Scalability

2009-04-22 Thread Pynthon
And the cache function is that easy to do? Is W2P also faster then Django? On 22 apr, 19:01, mdipierro wrote: > If you store everything in the database the only bottleneck is the > database. The web2py DAL does not add a significative overhead. You > can have as many servers you need under a loa

[web2py:20279] Re: Compliments

2009-04-22 Thread Yarko Tymciurak
http://www.web2py.com/examples/static/dojo.pdf On Wed, Apr 22, 2009 at 12:15 PM, Yarko Tymciurak wrote: > We built a news system in 2 hours in PyCon, at a web2py code dojo. > I'll try to find the link to the slides. > > > On Wed, Apr 22, 2009 at 10:47 AM, Pynthon Pynthon wrote: > >> I did not tr

[web2py:20280] Re: Compliments

2009-04-22 Thread Yarko Tymciurak
Overview of the dojo is here: http://us.pycon.org/2009/openspace/web2py_dojo/ On Wed, Apr 22, 2009 at 12:17 PM, Yarko Tymciurak wrote: > http://www.web2py.com/examples/static/dojo.pdf > > > On Wed, Apr 22, 2009 at 12:15 PM, Yarko Tymciurak wrote: > >> We built a news system in 2 hours in PyCon,

[web2py:20283] Admin Panel

2009-04-22 Thread Pynthon
Hello Sorry for making so much posts :P. But I have a question about the admin panel. Is the out-of-the-box a-panel only for developing apps or also for maintenance apps? Need I build a custom a-panel for maintenance apps or can I just use the out-of-the-box a-panel? Thanks, Pynthon --~--~--

[web2py:20281] Re: Script using DAL: references don't work

2009-04-22 Thread Álvaro Justen [Turicas]
On Wed, Apr 22, 2009 at 1:02 PM, mdipierro wrote: > web2py already has a mechanism for running scripts that see models. > > Did you look into > > python web2py.py -S yourapp -M -R script.py > > Try > > python web2py.py -h It worked. Thanks! -- Álvaro Justen Peta5 - Telecomunicações e Softwar

[web2py:20282] Re: Compliments

2009-04-22 Thread Pynthon
Thanks, looks interesting! When I know some more about W2P I'm gonne read it full! On 22 apr, 19:19, Yarko Tymciurak wrote: > Overview of the dojo is here:http://us.pycon.org/2009/openspace/web2py_dojo/ > > On Wed, Apr 22, 2009 at 12:17 PM, Yarko Tymciurak wrote: > >http://www.web2py.com/exampl

[web2py:20284] google 3d js api

2009-04-22 Thread mdipierro
http://code.google.com/apis/o3d/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to

[web2py:20285] Re: Using external libraries?

2009-04-22 Thread mdipierro
If you are running web2py from source there is nothings special for you to do. The steps below should just work. Massimo On Apr 22, 12:09 pm, Michael wrote: > Hey guys, > >I've been messing around with the twitter library for python from > the command line. Is it possible to use this in we

[web2py:20286] Re: Admin Panel

2009-04-22 Thread Yarko Tymciurak
It should be good for maintenance of stes, this this depends on what you think of when you say this. for PyCon registration, we added some application-specific manager functions for the application, used admin toolset for some (few) things, and for the occasional special processing request, just ra

[web2py:20287] Re: Scalability

2009-04-22 Thread mdipierro
say you have a function f() and you want to cache it for 3000ms. You do instead of calling f() you call cahe.ram('somekeyword',f,3000) This way you can cache anything but database connections. You can cache quesries with db(...).select(...cache=(cache.ram,3000)) More examples ar

[web2py:20288] Re: Scalability

2009-04-22 Thread mdipierro
The template system is faster than Django's (because you can bytecode compile after parsing thus there is no persing overhead in production). The models and controllers are probably of comparable speed. I do not have precise data. Massimo On Apr 22, 12:13 pm, Pynthon wrote: > And the cache func

[web2py:20289] Re: Admin Panel

2009-04-22 Thread Pynthon
So, a normal news system with categories with this functions: Add news, edit news, delete news. Add cats, edit cats, delete cats Can be good for maintenance sites? On 22 apr, 20:02, Yarko Tymciurak wrote: > It should be good for maintenance of stes, this this depends on what you > think of when

[web2py:20290] Re: Scalability

2009-04-22 Thread mdipierro
I do not know if it is faster than Django because it depends on what you do. - the web2py template language is faster than Django's - the web2py DAL is faster than Django's ORM - Django has a url.py overhead (required). You have the same in web2py is you use routes.py (optional) If you want to r

[web2py:20291] Re: Scalability

2009-04-22 Thread Pynthon
Nice! I searched at the document via Google but cannot find anything about caching =[. On 22 apr, 20:09, mdipierro wrote: > I do not know if it is faster than Django because it depends on what > you do. > > - the web2py template language is faster than Django's > - the web2py DAL is faster than

[web2py:20292] Re: Using external libraries?

2009-04-22 Thread Michael
excuse my illiteracy on this. I've downloaded the client for the mac. and it run it through the web2py.app also, how does one go about doing this in a production enviroment? i.e a webhost, or GAE. On Apr 22, 2:00 pm, mdipierro wrote: > If you are running web2py from source there is nothings sp

[web2py:20293] Re: Compliments

2009-04-22 Thread Francisco Gama
Btw, is there going to be a 2nd edition of the book? If yes, When? On Apr 21, 2:23 pm, mdipierro wrote: > Thank you for your comments. Mind that the "real" book is the same as > the pdf book on lulu. > If you have one there is no reason to spend money on the other. > > Massimo > > On 21 Apr, 05:

[web2py:20294] Re: google 3d js api

2009-04-22 Thread Michael
Holy smokes! This looks amazing On Apr 22, 1:59 pm, mdipierro wrote: > http://code.google.com/apis/o3d/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email

[web2py:20295] Re: Compliments

2009-04-22 Thread Pynthon
I don't know but is it outdated? On 22 apr, 20:18, Francisco Gama wrote: > Btw, is there going to be a 2nd edition of the book? > If yes, When? > > On Apr 21, 2:23 pm, mdipierro wrote: > > > Thank you for your comments. Mind that the "real" book is the same as > > the pdf book on lulu. > > If y

[web2py:20296] pdf in js

2009-04-22 Thread mdipierro
http://code.google.com/p/jspdf/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to

[web2py:20297] Re: Scalability

2009-04-22 Thread JorgeR
On Apr 22, 1:09 pm, mdipierro wrote: > I do not know if it is faster than Django because it depends on what > you do. > If you want to run some tests I can help you and I'd be very much > interested in quantifying this. > > Massimo I am also very interested in those results! --~--~-~

[web2py:20298] Re: Admin Panel

2009-04-22 Thread Fran
On Apr 22, 7:08 pm, Pynthon wrote: > So, a normal news system with categories with this functions: > Add news, edit news, delete news. > Add cats, edit cats, delete cats > Can be good for maintenance sites? If your admin is happy with this more-complex-than-necessary UI, then sure, it'll do the

[web2py:20299] Re: How do I make a restricted page that I go to return after I login.

2009-04-22 Thread Fran
On Apr 21, 6:32 pm, Jason Brower wrote: > I have auth setup, but after entering my information to log into a > restricted page, I get back to the index page.  Wouldn't it be natural > to go to the page I was at rather than to index? Yes & is the default setting, which works for me (it picks it u

[web2py:20300] Re: dynamically changing page headers

2009-04-22 Thread Fran
On Apr 21, 10:52 pm, Tim Michelsen wrote: > is it possible to dynamically change web page headers in view? > I am using openlayers.org, an external javascript library which demands > to embed > * a library script reference in the header > * a custom css in the header > How can this be done dynami

[web2py:20301] Re: Compliments

2009-04-22 Thread Yarko Tymciurak
Looking it over, I would say - no, it's not that the book is outdated... (see the table of contents yourself at http://www.web2py.com/examples/static/web2py_manual_cut.pdf) I think it's more that there are new things to talk about. I continue to use the book. On Wed, Apr 22, 2009 at 1:20 PM, Py

[web2py:20302] Q: Will "wwwSQLdesigner" be added into the "Web2Py" release cycle???

2009-04-22 Thread cesmiga
Massimo, I don't know if this question has been asked before, but is it possible to include "wwwSQLdesigner" into "Web2Py"? wwwSQLdesigner http://code.google.com/p/wwwsqldesigner/ I have been playing with this web based, JavaScript ERM application and it is pretty cool. I hope the author c

[web2py:20303] Re: Form for adding db line does not work; input text instead of select

2009-04-22 Thread dvid
Thanks for both replies. For now I only wanted what the first advice solved, but the second one is interesting indeed. I can say I like your piece of software increasingly, as getting deeper. Really, it has brought the fresh air to the world of web frameworks :) With regards David --~--~

[web2py:20304] templating a non-html file (in view)

2009-04-22 Thread Tim Michelsen
Hello, I would like to use the following how-to to generate a kml file from my data base selection: Better Python Practices for the GeoWeb http://sgillies.net/blog/584/better-python-practices-for-the-geoweb/ http://earth.google.com/kml/2.1"; xmlns:py="http://genshi.edgewall.org/"; >

[web2py:20305] Tipp: SQLItebrowser [was: Re: [web2py:20302] Q: Will "wwwSQLdesigner" be added into the "Web2Py" release cycle???]

2009-04-22 Thread Tim Michelsen
additionally, if you name your tables with the .sqlite extension, you can associate sqlitebrowser (http://sqlitebrowser.sourceforge.net/) to this file and explore the databse in the table --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:20306] Re: Using external libraries?

2009-04-22 Thread mdipierro
You cannot use the Mac binary (the app) with third party libraries easily. If you want to use third party Python libraries you need to install Python (2.5) and run the web2py source distribution. Any web host that provides Python 2.5 can run web2py. Some hosts do it via mod_proxy, some via mod_w

[web2py:20307] Re: Compliments

2009-04-22 Thread mdipierro
I agree with Yarko. web2py is always backward compatible so technically the book is not outdated. Specifically it does not cover: - dbtable[...] shortcuts - new routes.py features - tools.py Massimo On Apr 22, 4:08 pm, Yarko Tymciurak wrote: > Looking it over, I would say - no, it's not that

[web2py:20308] Re: Form for adding db line does not work; input text instead of select

2009-04-22 Thread mdipierro
Thanks David, tell everybody. ;-) On Apr 22, 4:47 pm, dvid wrote: > Thanks for both replies. For now I only wanted what the first advice > solved, but the second one is interesting indeed. > > I can say I like your piece of software increasingly, as getting > deeper. Really, it has brought the f

[web2py:20309] Re: templating a non-html file (in view)

2009-04-22 Thread mdipierro
If you app is called "yourapp" and you put this file in applications/yourapp/views/default/kml.html you also need to edit applications/yourapp/controllers/default.py and add an action def kml(): placemarks=db(...).select() ## fill the ... return dict(placemarks=placemarks) then

[web2py:20310] Re: Q: Will "wwwSQLdesigner" be added into the "Web2Py" release cycle???

2009-04-22 Thread mdipierro
The problem is that sqldesigner is GPL and may not be compatible with the web2py exception in the license. we are working on simplifying the DAL syntax anyway, Massimo On Apr 22, 4:39 pm, cesmiga wrote: > Massimo, > > I don't know if this question has been asked before, but is it > possible

[web2py:20311] Re: Tipp: SQLItebrowser [was: Re: [web2py:20302] Q: Will "wwwSQLdesigner" be added into the "Web2Py" release cycle???]

2009-04-22 Thread mdipierro
cool. On Apr 22, 5:55 pm, Tim Michelsen wrote: > additionally, > if you name your tables with the .sqlite extension, you can associate > sqlitebrowser (http://sqlitebrowser.sourceforge.net/) to this file and > explore the databse in the table --~--~-~--~~~---~--~~

[web2py:20312] Re: Compliments

2009-04-22 Thread suiato
Look forward to T3 evolving :-) Tried it after downloading from http://web2py.appspot.com/t3, and it seems to work fine so far. Noticed some updating is needed on the Main page (http:// web2py.appspot.com/t3/default/wiki/main) for the current T3 version: - Click on Configure -> Click on Manage Se

[web2py:20313] How to insert db record, and return ID of new record

2009-04-22 Thread waTR
I am trying to have a controller insert a db record, and then update the same record. However, in order to update the record just created by a user session, I need to use the db record's id number. The problem is, I don't know how to get the id number from the record just created by a user session

[web2py:20314] Re: Compliments

2009-04-22 Thread waTR
No, it is a webapp being developed using web2py. Think Drupal/Jumla + Plug-ins. On Apr 22, 7:51 am, Pynthon Pynthon wrote: > So also a web-framework :$? > > 2009/4/22 mdipierro > > > > > T1 does not exist. > > > T2 is a deprecated web2py tier 2 > >http://www.web2py.com/examples/statis/plugin_

[web2py:20315] Auth API - Registration allow to save Empty Password ????

2009-04-22 Thread Yannick
Hello mate, I just tested the new version 1.61.4 after a small break and noticed that the Auth API still allows the registration form to register a new user with an empty password (In the both fields) I was wondering if this is how that Auth API is intend to work or it is just a small bug. I

[web2py:20316] Re: How to insert db record, and return ID of new record

2009-04-22 Thread Iceberg
Havn't you read this? http://www.web2py.com/examples/default/dal On Apr23, 9:21am, waTR wrote: > I am trying to have a controller insert a db record, and then update > the same record. However, in order to update the record just created > by a user session, I need to use the db record's id numbe

[web2py:20317] Re: Using external libraries?

2009-04-22 Thread Iceberg
I don't know mac, but when using Windows binary (the web2py_win.zip), I can always put 3rd party libraries into web2py/applications/myapp/ modules, then access it, in a slightly different way: import applications.myapp.modules.third_parti_lib On Apr23, 7:46am, mdipierro wrote: > You cannot us

[web2py:20318] Re: Auth API - Registration allow to save Empty Password ????

2009-04-22 Thread mdipierro
You are right. but it does not need to be change within web2py. you can just do auth.settings.table_user.password.requires=[IS_NOT_EMPTY(),CRYPT (key='bla')] you can replace IS_NOT_EMPTY with your own validator requiring complexity. key='' forces CRYPT to use HMAC(key) instead of the naive m

[web2py:20319] Re: How to insert db record, and return ID of new record

2009-04-22 Thread mdipierro
id=db.db_users.insert( dbu_name=request.vars.nick, dbu_email=request.vars.email, dbu_password=request.vars.pass1, dbu_city=request.vars.city, dbu_referral=request.vars.referral) USERID

[web2py:20320] Re: Using external libraries?

2009-04-22 Thread mdipierro
You can do the same with the Mac binary. The problem may be with modules that contain binary files. I just have never tried. In principle every module can be installed into the binary distributions. It is just a matter of finding the right place so that your app can find it. Massimo On 22 Apr, 2

[web2py:20321] Re: Using external libraries?

2009-04-22 Thread Michael
This makes sense, but do i put the whole folder inside of modules? would i access the library by saying import applications.myapp.modules.modulefolder or import applications.myapp.modules.modulefolder.twitter.py thanks! sorry for being such a newb ;P On Apr 22, 10:02 pm, Iceberg wrote: > I

[web2py:20322] Bug: When an error in a form occures, upload file feilds are empty.

2009-04-22 Thread Jason Brower
I wonder if there is a way to fix this bug. My project I work on using file uploading very heavily and it would be nice if, when an error in the form is found, it still has the file there ready for the upload. Rather than the user needlessly having to find the file again. Any thoughts on a soluti

[web2py:20323] Re: Using external libraries?

2009-04-22 Thread mdipierro
probably import applications.myapp.modules.modulefolder.twitter as twitter no .py at the end. or better exec('import applications.%s.modules.modulefolder.twitter as twitter' % request.application) Massimo On 22 Apr, 22:03, Michael wrote: > This makes sense, but do i put the whole fold

[web2py:20324] new alterego entry

2009-04-22 Thread mdipierro
http://www.web2py.com/AlterEgo/default/show/217 feel free to correct any spelling/english error is you have the code. Massimo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to

[web2py:20325] Bug in admin/default/design

2009-04-22 Thread Álvaro Justen [Turicas]
Hello, if I have: {{extend "template.html"}} instead of {{extend 'template.html'}} in myview.html, admin 'design' page of app show some buggy information, like this: # myview.html [ edit | htmledit | delete ] extends template.html"}} http://www.peta5.com.br/ --~--~-~--~~-

[web2py:20326] Re: Bug in admin/default/design

2009-04-22 Thread Álvaro Justen [Turicas]
On Thu, Apr 23, 2009 at 1:42 AM, Álvaro Justen [Turicas] wrote: > Hello, > if I have: > > {{extend "template.html"}} > > instead of > > {{extend 'template.html'}} > > in myview.html, admin 'design' page of app show some buggy > information, like this: > > # myview.html [ edit | htmledit | delete

[web2py:20327] Overriding default field validators

2009-04-22 Thread Joe Barnhart
I have a special application that holds the results of swimming matches. I store all times as floating-point "seconds" internally, but I want to permit users to enter times as either a formatted string (mm:ss.hh) or an integer (mmsshh). I created my own custom validator which can take either inp

[web2py:20328] Re: new alterego entry

2009-04-22 Thread Álvaro Justen [Turicas]
On Thu, Apr 23, 2009 at 1:32 AM, mdipierro wrote: > > http://www.web2py.com/AlterEgo/default/show/217 > > feel free to correct any spelling/english error is you have the code. Thanks. I've found an AlterEgo bug: Text that you wrote: "Here item and items are not keywords. There are been defined

[web2py:20329] Re: Using external libraries?

2009-04-22 Thread Iceberg
Just some thought. Is it a good idea that if web2py can automatically do this BEFORE accessing an app? old_syspath=sys.path sys.path.append(os.path.abspath('applications/%s/ modules'%request.application)) try: serve_currect_request() finally: sys.path=old_syspath # So that different app won't m

[web2py:20330] Re: Overriding default field validators

2009-04-22 Thread Álvaro Justen [Turicas]
On Thu, Apr 23, 2009 at 2:11 AM, Joe Barnhart wrote: > I have a special application that holds the results of swimming > matches.  I store all times as floating-point "seconds" internally, > but I want to permit users to enter times as either a formatted string > (mm:ss.hh) or an integer (mmsshh

[web2py:20331] Integrated Development Environment with web2py

2009-04-22 Thread Speedbird
Folks, Just wanted to share with the community a real jewel, many of you knew this but I actually started using it "heavily" during the past couple of weeks: the IDE is wing from wingware, basically you run web2py from inside of it, then just open your controller/module/model from the IDE, set up

  1   2   >