[web2py:26024] Re: Minus in URI

2009-07-08 Thread Yarko Tymciurak
I suspect this is regex_url (gluon/main.py about line 75). You can search thru all the version changes in launchpad - it might be this change (or maybe an eralier one): http://bazaar.launchpad.net/~mdipierro/web2py/devel/revision/917#gluon/main.py On Thu, Jul 9, 2009 at 1:40 AM, SergeyPo wrote:

[web2py:26023] Re: web2py via shell account

2009-07-08 Thread Yarko Tymciurak
On Thu, Jul 9, 2009 at 1:20 AM, Jonathan Lundell wrote: > On Jul 8, 2009, at 10:01 PM, Yarko Tymciurak wrote: > > you should be running this thru apache+mod_wsgi; > > with mod_wsgi you can just restart the mod_wsgi thread (and thereby web2py) > > > Sadly, no mod_wsgi on the box. I can ask. But I'

[web2py:26022] Re: web2py via shell account

2009-07-08 Thread Yarko Tymciurak
On Thu, Jul 9, 2009 at 1:20 AM, Jonathan Lundell wrote: > On Jul 8, 2009, at 10:01 PM, Yarko Tymciurak wrote: > > you should be running this thru apache+mod_wsgi; > > with mod_wsgi you can just restart the mod_wsgi thread (and thereby web2py) > > > Sadly, no mod_wsgi on the box. I can ask. But I'

[web2py:26021] Minus in URI

2009-07-08 Thread SergeyPo
In version 1.57 this worked: 127.0.0.1:8000/appname/controllername/ function/1/-1/10/-10 (notice negative numbers in arguments) In version 1.65 this causes 'Invalid Request' error. This makes my app incompatible. Please help me where to look to patch. --~--~-~--~~~---~

[web2py:26020] Re: Modern Python Dev Tools ( VirtualEnv, PiP, Fabric) and Web2Py

2009-07-08 Thread Yarko Tymciurak
So you have used these on projects before? On Thu, Jul 9, 2009 at 12:48 AM, gluegl wrote: > > Has anyone use VirtualEnv, PiP and Fabric with Web2Py yet? > virtualenv, pip, and Fabric together, have proven to be invaluable. > > http://clemesha.org/blog/2009/jul/05/modern-python-hacker-tools-virtu

[web2py:26019] Re: IS_IN_DB for multiple tables

2009-07-08 Thread phneoix
only need to validate. On Jul 8, 11:03 pm, mdipierro wrote: > only validate or you need a selection dropdown? You need your own > validator. Look into the code for IS_IN_DB and it is not difficult to > make your own. > > On Jul 8, 11:53 pm, phneoix wrote: > > > hi, > >i am having about 8 di

[web2py:26018] Re: web2py via shell account

2009-07-08 Thread Jonathan Lundell
On Jul 8, 2009, at 10:01 PM, Yarko Tymciurak wrote: > you should be running this thru apache+mod_wsgi; > > with mod_wsgi you can just restart the mod_wsgi thread (and thereby > web2py) Sadly, no mod_wsgi on the box. I can ask. But I'm not sure how practical it is to run mod_wsgi without contr

[web2py:26017] Re: IS_IN_DB for multiple tables

2009-07-08 Thread mdipierro
only validate or you need a selection dropdown? You need your own validator. Look into the code for IS_IN_DB and it is not difficult to make your own. On Jul 8, 11:53 pm, phneoix wrote: > hi, >    i am having about 8 different lookup tables in my database. i need > to validate whether the entry

[web2py:26016] Modern Python Dev Tools ( VirtualEnv, PiP, Fabric) and Web2Py

2009-07-08 Thread gluegl
Has anyone use VirtualEnv, PiP and Fabric with Web2Py yet? virtualenv, pip, and Fabric together, have proven to be invaluable. http://clemesha.org/blog/2009/jul/05/modern-python-hacker-tools-virtualenv-fabric-pip/ --~--~-~--~~~---~--~~ You received this message beca

[web2py:26015] Re: web2py via shell account

2009-07-08 Thread Yarko Tymciurak
you should be running this thru apache+mod_wsgi; with mod_wsgi you can just restart the mod_wsgi thread (and thereby web2py) On Wed, Jul 8, 2009 at 6:45 PM, Jonathan Lundell wrote: > > On Jul 8, 2009, at 4:29 PM, AchipA wrote: > > > > > Err, are you saying @reboot did not work for you ? > > I w

[web2py:26014] IS_IN_DB for multiple tables

2009-07-08 Thread phneoix
hi, i am having about 8 different lookup tables in my database. i need to validate whether the entry is in any one of the 8 tables. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" gr

[web2py:26013] Re: Tip of the Day: Documentation

2009-07-08 Thread mdipierro
I think Tim did that. Am I right? Eventually we need to address the logo/design issue at a more comprehensive level. Massimo On Jul 8, 7:54 pm, "Zoom.Quiet" wrote: > On Thu, Jul 9, 2009 at 01:51, mdipierro wrote: > > > The Sphinx docs are here: > > >http://www.web2py.com/examples/static/sphinx/

[web2py:26012] Re: gluon/validators.py for python 2.4

2009-07-08 Thread mdipierro
thanks. domain=value.split('@')[1] will be sufficient since value already passed the regex. Uploading the fix to trunk now. Massimo On Jul 8, 11:05 pm, "ont.rif" wrote: > Some portion of code in gluon/validators.py use python 2.5 specific > code. > And so, registration of users in web2py does n

[web2py:26011] gluon/validators.py for python 2.4

2009-07-08 Thread ont.rif
Some portion of code in gluon/validators.py use python 2.5 specific code. And so, registration of users in web2py does not work on hosting with CentOS 5.3 Solution: change this: domain = value.partition('@')[2] to this: ## >>> absent in python 2.4 >>> domain = value.partition('@')[2] dom

[web2py:26010] Re: innerHTML about javascript

2009-07-08 Thread mdipierro
If you make an ajax request the JS code inside the HTML is NOT executed. This is not a web2py issue. That is how AJAX works. Here is a possible workaround. http://www.daniweb.com/forums/thread53137.html Massimo On Jul 8, 8:39 pm, zhang zheng wrote: > the right is div's id. > > for example: >

[web2py:26009] Re: innerHTML about javascript

2009-07-08 Thread zhang zheng
the right is div's id. for example: in controller start/ def index(): return dict() def get_info(): return dict() end/ in view index.html {{extend 'layout.html'}} info display info get_info.html alert('

[web2py:26008] Re: upgrade app from w2p

2009-07-08 Thread mdipierro
I guess the current "upload" app form could have a radio box (new, upgrade, replace) where replace would delete the old one while upgrade would preserve database files. On Jul 8, 8:40 pm, "mr.freeze" wrote: > I wrote a small app that lets me upload a w2p from my dev machine to > my production m

[web2py:26007] Re: newbie encryption question

2009-07-08 Thread mdipierro
It cannot be. Something is wrong. Is it possible you mispelled "requires"? On Jul 8, 7:54 pm, coolaid wrote: > I am storing password in my databases. I am using the validator > > requires=CRYPT(key='my_key') > > everything seems to be working fine. However, when I look at users > passwords in

[web2py:26006] upgrade app from w2p

2009-07-08 Thread mr.freeze
I wrote a small app that lets me upload a w2p from my dev machine to my production machine then upgrades (copy with overwrite) selected folders of the production app. I mainly use it to keep separate dev and production models and databases. Two questions: 1) Is there a better way? 2) If not, wo

[web2py:26005] newbie encryption question

2009-07-08 Thread coolaid
I am storing password in my databases. I am using the validator requires=CRYPT(key='my_key') everything seems to be working fine. However, when I look at users passwords in the databases I can read their values of the passwords. That is they are not hashed values like I would expect. Would the e

[web2py:26004] Re: Tip of the Day: Documentation

2009-07-08 Thread Zoom.Quiet
On Thu, Jul 9, 2009 at 01:51, mdipierro wrote: > > The Sphinx docs are here: > > http://www.web2py.com/examples/static/sphinx/index.html > M ! usage my design ?! soo surprised! notice that is some unexpected white border; from different bg color; when u decide the final wep2py's Sphinx do

[web2py:26003] Re: web2py via shell account

2009-07-08 Thread Jonathan Lundell
On Jul 8, 2009, at 4:29 PM, AchipA wrote: > > Err, are you saying @reboot did not work for you ? I wrote that before I read your suggestion. I'm sure it would work for me, but sadly my ISP won't allow a long- running process like web2py. > I though it's > enough to do > > crontab -e > > and e

[web2py:26002] Re: web2py via shell account

2009-07-08 Thread AchipA
Err, are you saying @reboot did not work for you ? I though it's enough to do crontab -e and enter something like @reboot username cd /home/web2py && python web2py.py -i 192.168.0.200 - p 8000 -a 'recycle' (obvioudly you still have to start web2py manually the first time you install it, but it

[web2py:26001] Re: Waht is cron for?

2009-07-08 Thread mdipierro
Should be easy. Perhaps example 14 (http://www.web2py.com/examples/ default/examples) can help On Jul 8, 5:49 pm, Tim Michelsen wrote: > > a) it will work transparently on all platforms (mac&win incl) > > b) you don't need root access or user settable crontabs > > c) can call web2py controller f

[web2py:26000] Re: Waht is cron for?

2009-07-08 Thread Tim Michelsen
> a) it will work transparently on all platforms (mac&win incl) > b) you don't need root access or user settable crontabs > c) can call web2py controller functions directly > d) allows you to call init/preload/precache functions on web2py > startup > e) allows asynchronous execution of code after

[web2py:25999] Re: new chapters for the book CRUD and AUTH

2009-07-08 Thread Vidul Petrov
That's splendid, Massimo! Thank you! On Jul 7, 3:09 am, Massimo Di Pierro wrote: > Here are two very very draft chapters for the second edition of the   > book. > Chapter 7 has been amended to include CRUD > Chapter 8 has been added and discusses AUTH > > This is very draft because I just wrote,

[web2py:25998] web2py could provide an interface for this. any takers?

2009-07-08 Thread mdipierro
http://developer.yahoo.net/blog/archives/2009/07/yql_insert.html It should be easy with the new DAL. --~--~-~--~~~---~--~~ 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:25997] Re: Using existing tables

2009-07-08 Thread mdipierro
1. implies you need migrate=False in both 6 and 7 On Jul 8, 5:15 pm, "Mico Siahaan" wrote: > Dear all, I and my friend make applications,  use a sharing database. I am > using web2py and he is using Java. So: > 1. We create a database in MySQL > 2. Create a user and give access, alter privilege

[web2py:25996] Re: draft recipe: web2py from a non-admin login account

2009-07-08 Thread Joe Barnhart
On Jul 8, 1:20 pm, Yarko Tymciurak wrote: > FYI - If you name your default app as init, you do not need the welcome > rewrite rule... Or even just make a symbolic link from your app to 'init'. ;-) --~--~-~--~~~---~--~~ You received this message because you are

[web2py:25995] Using existing tables

2009-07-08 Thread Mico Siahaan
Dear all, I and my friend make applications, use a sharing database. I am using web2py and he is using Java. So: 1. We create a database in MySQL 2. Create a user and give access, alter privileges to that user 3. Create tables in that database using phpmyadmin. Tables that will be shared between

[web2py:25994] Re: Web2py vs the world

2009-07-08 Thread JohnMc
In this case you have to write a script to do it. This kind of failure is usually very easy to recover from except if you use MySQL. MySQL does not allow multiple ALTER tables in the same transaction hence it can get into an odd state where some tables have been altered and some have not. You can

[web2py:25993] Re: Web2py vs the world

2009-07-08 Thread JohnMc
Fran, I think to be fair, you could lay those same real world impediments to Django and Zend as well. Its more of a culture process issue than a technology selection. JohnMc On Jul 7, 4:53 pm, Fran wrote: > On Jul 7, 10:36 pm, eric cs wrote: > > > I'm just wondering to do big e-commerce sites

[web2py:25992] Re: Tip of the Day: Documentation

2009-07-08 Thread Yarko Tymciurak
With references I have this all in some state I abandoned some months back when life intruded Makefiles, many other updates I'll see about finishing off, sending you a patch after this weekend.. On Wed, Jul 8, 2009 at 3:33 PM, mdipierro wrote: > > thanks. By references I mean that

[web2py:25991] Re: Tip of the Day: Documentation

2009-07-08 Thread mdipierro
thanks. By references I mean that when we split the docs into multiplempages we may want some docstrings to cite/refer to other docstrings. I do not know how to do it. On Jul 8, 2:42 pm, Tim Michelsen wrote: > mdipierro schrieb:> The Sphinx docs are here: > > >http://www.web2py.com/examples/stat

[web2py:25990] Re: draft recipe: web2py from a non-admin login account

2009-07-08 Thread Yarko Tymciurak
FYI - If you name your default app as init, you do not need the welcome rewrite rule... By default, web2py looks for existence of an app called init; if it is not found, it looks for "welcome". Init does not show up as part of the URL, so for example if you browse from welcome to examples, you se

[web2py:25989] draft recipe: web2py from a non-admin login account

2009-07-08 Thread Jonathan Lundell
This deployment recipe requires Apache with mod_proxy and mod_rewrite. It runs the welcome (or some other) web2py application with the admin interface disabled (no password). 1. Install a shell script with execute permissions as ~/bin/w2p.sh: #!/bin/sh HTDOCS=/usr/www/users/username

[web2py:25988] Re: Waht is cron for?

2009-07-08 Thread mdipierro
For the record. this is documented here: http://www.web2py.com/examples/default/cron Achipa did all the work. Massimo On Jul 8, 1:57 pm, AchipA wrote: > It's like linux cron but with the following extras: > > a) it will work transparently on all platforms (mac&win incl) > b) you don't need r

[web2py:25987] Re: Tip of the Day: Documentation

2009-07-08 Thread Tim Michelsen
mdipierro schrieb: > The Sphinx docs are here: > > http://www.web2py.com/examples/static/sphinx/index.html > > they still need some work. All Docstrings are Sphinx compliant. Errors: http://www.web2py.com/examples/static/sphinx/index.html#general-documents => just save the document http://baza

[web2py:25986] Re: web2py via shell account

2009-07-08 Thread Jonathan Lundell
On Jul 8, 2009, at 11:44 AM, mdipierro wrote: > > and what was a Jonathan talking about? Linux cron (or in my case FreeBSD cron, which amounts to the same thing). The idea is to get web2py running from a login account after a reboot, when presumably web2py cron isn't going to be of any help.

[web2py:25985] Re: ajax + jquery

2009-07-08 Thread kozo
ty alot annet didnt know about the plugin... has all i need --~--~-~--~~~---~--~~ 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 fr

[web2py:25984] Re: Waht is cron for?

2009-07-08 Thread AchipA
It's like linux cron but with the following extras: a) it will work transparently on all platforms (mac&win incl) b) you don't need root access or user settable crontabs c) can call web2py controller functions directly d) allows you to call init/preload/precache functions on web2py startup e) all

[web2py:25983] Re: web2py via shell account

2009-07-08 Thread mdipierro
cool. I did not know that. Achipa, would you be writing 3-4 pages about cron for the book v2? Massimo On Jul 8, 1:45 pm, AchipA wrote: > @reboot is a cron keyword, in unix context it means right after boot. > Web2py cron *also* supports that keyword, and it means right after > starting web2py.

[web2py:25982] Re: Waht is cron for?

2009-07-08 Thread mdipierro
web2py has its own cron. It lets you register tasks (web2py scripts) to be run at scheduled time or after completion of certain actions. It works on Mac and Windows too. They are part of your app. Massimo On Jul 8, 12:59 pm, Jason Brower wrote: > I know what it does in linux.  But what is it fo

[web2py:25981] Re: web2py via shell account

2009-07-08 Thread AchipA
@reboot is a cron keyword, in unix context it means right after boot. Web2py cron *also* supports that keyword, and it means right after starting web2py. On Jul 8, 7:51 pm, mdipierro wrote: > you talking about web2py cron or unix cron? > > On Jul 8, 12:07 pm, AchipA wrote: > > > Actually, cron

[web2py:25980] Re: web2py via shell account

2009-07-08 Thread mdipierro
and what was a Jonathan talking about? On Jul 8, 1:21 pm, NetAdmin wrote: > I'm talking about the cron from Linux. > > Sterling > > On Jul 8, 12:51 pm, mdipierro wrote: > > > you talking about web2py cron or unix cron? > > > On Jul 8, 12:07 pm, AchipA wrote: > > > > Actually, cron has a keywor

[web2py:25979] Re: Web2py vs the world

2009-07-08 Thread Yarko Tymciurak
On Wed, Jul 8, 2009 at 11:25 AM, mdipierro wrote: > > Do not worry, we are not changing to an ORM. Right now you can do > this: > > db.define_table('person',Field('birthdate','date')) > db.person.age = lambda row: (request.now-request.birthdate).years > > for person in db().select(db.person.ALL):

[web2py:25978] Re: Web2py vs the world

2009-07-08 Thread Yarko Tymciurak
On Wed, Jul 8, 2009 at 9:35 AM, mdipierro wrote: > > I think this is gone off topic. The issue is whether it should be > possible for a table to have dynamic columns that are calculated from > the values of other columns and are not stored in the db. One option is to set this up in the DB throu

[web2py:25977] Re: Waht is cron for?

2009-07-08 Thread NetAdmin
I was talking about using Linux cron. I've never used the web2py cron. Sterling On Jul 8, 12:59 pm, Jason Brower wrote: > I know what it does in linux.  But what is it for in Web2py and why do I > need it? > Regards, > Jason --~--~-~--~~~---~--~~ You received t

[web2py:25976] Re: web2py via shell account

2009-07-08 Thread NetAdmin
I'm talking about the cron from Linux. Sterling On Jul 8, 12:51 pm, mdipierro wrote: > you talking about web2py cron or unix cron? > > On Jul 8, 12:07 pm, AchipA wrote: > > > Actually, cron has a keyword for that. Specify the time of the task as > > @reboot and itt will be run only once, rig

[web2py:25975] Re: Web2py vs the world

2009-07-08 Thread Yarko Tymciurak
On Wed, Jul 8, 2009 at 9:44 AM, Speedbird wrote: > > From Yarko: > # > #...@user.is_logged_in > #def my secure function > # > #A user (class) validating access to sensitive information ugh! > > Perhaps I am a little lost here Yarko, what would then be the > alternative to the above syntax?

[web2py:25974] Waht is cron for?

2009-07-08 Thread Jason Brower
I know what it does in linux. But what is it for in Web2py and why do I need it? Regards, Jason --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to we

[web2py:25973] Re: Tip of the Day: Documentation

2009-07-08 Thread mdipierro
or this better: http://www.web2py.com/examples/static/sphinx/gluon/gluon.html On Jul 8, 12:51 pm, mdipierro wrote: > The Sphinx docs are here: > > http://www.web2py.com/examples/static/sphinx/index.html > > they still need some work. All Docstrings are Sphinx compliant. The > problem is the pag

[web2py:25972] Re: drop-box that keeps previous value

2009-07-08 Thread mdipierro
Try if form.accepts(...,keepvalues=True) does what you ask. On Jul 8, 12:40 pm, Yarko Tymciurak wrote: > On Wed, Jul 8, 2009 at 4:45 AM, annet wrote: > > > I wonder whether it is possible to have a drop-box that keeps its > > previous value. For Instance, I have a table in which I insert days >

[web2py:25971] Re: web2py via shell account

2009-07-08 Thread mdipierro
you talking about web2py cron or unix cron? On Jul 8, 12:07 pm, AchipA wrote: > Actually, cron has a keyword for that. Specify the time of the task as > @reboot and itt will be run only once, right after booting. > > On Jul 8, 4:47 pm, Mr admin wrote: > > > You can use CRON entry like  this to

[web2py:25970] Re: Tip of the Day: Documentation

2009-07-08 Thread mdipierro
The Sphinx docs are here: http://www.web2py.com/examples/static/sphinx/index.html they still need some work. All Docstrings are Sphinx compliant. The problem is the pages layout and organization and references. On Jul 8, 12:10 pm, "Zoom.Quiet" wrote: > On Thu, Jul 9, 2009 at 00:51, mdipierro w

[web2py:25969] Re: drop-box that keeps previous value

2009-07-08 Thread Yarko Tymciurak
On Wed, Jul 8, 2009 at 4:45 AM, annet wrote: > > I wonder whether it is possible to have a drop-box that keeps its > previous value. For Instance, I have a table in which I insert days > and facilities. On some days the facility is open several slots of > time. In the create form, when I submit e

[web2py:25968] Re: Web2py vs the world

2009-07-08 Thread SergeyPo
person.name, person.age syntax is really nice, could be a good addition to DAL. I will try lambda syntax to define calculated fields, if this work as I expect that's what I ND On Jul 8, 8:25 pm, mdipierro wrote: > Do not worry, we are not changing to an ORM. Right now you ca

[web2py:25964] Re: web2py via shell account

2009-07-08 Thread AchipA
Actually, cron has a keyword for that. Specify the time of the task as @reboot and itt will be run only once, right after booting. On Jul 8, 4:47 pm, Mr admin wrote: > You can use CRON entry like  this to try and run web2py every 15 minuses > > # cron entry to run web2py every 15 minutes > 0,15,

[web2py:25967] Re: web2py via shell account

2009-07-08 Thread Jonathan Lundell
On Jul 8, 2009, at 10:07 AM, AchipA wrote: > > Actually, cron has a keyword for that. Specify the time of the task as > @reboot and it will be run only once, right after booting. Perfect! Thanks. > > On Jul 8, 4:47 pm, Mr admin wrote: >> You can use CRON entry like this to try and run web2py

[web2py:25966] Re: Tip of the Day: Documentation

2009-07-08 Thread Zoom.Quiet
On Thu, Jul 9, 2009 at 00:51, mdipierro wrote: > > Right now there are many ways to get Documentation about web2py (until > port to Sphinx is completed) > > Here is the epydoc reference > >    http://www.web2py.com/examples/static/epydoc/index.html > sooo sweetness ... usage Sphinx export like ep

[web2py:25965] Re: Tip of the Day: Documentation

2009-07-08 Thread Zoom.Quiet
On Thu, Jul 9, 2009 at 01:03, Jason Brower wrote: > > Speaking of... did you find a good tutorial on how to use sphinx?  Our Writing Technical Documentation with Sphinx, Paver, and Cog - Doug Hellmann http://www.doughellmann.com/articles/Writing-Technical-Documentation-Sphinx/index.html > site o

[web2py:25963] Re: Tip of the Day: Documentation

2009-07-08 Thread Jason Brower
Speaking of... did you find a good tutorial on how to use sphinx? Our site of a huge bug I found nothing that showed how to actualy document in the code. Regards, JAson On Wed, 2009-07-08 at 09:51 -0700, mdipierro wrote: > Right now there are many ways to get Documentation about web2py (until >

[web2py:25962] Tip of the Day: Documentation

2009-07-08 Thread mdipierro
Right now there are many ways to get Documentation about web2py (until port to Sphinx is completed) Here is the epydoc reference http://www.web2py.com/examples/static/epydoc/index.html Of use the shell for [youapp] http://127.0.0.1:8000/admin/shell/index/[yourapp] and type: help(ke

[web2py:25961] Re: IS_NOT_IN_DB() and no automatic drop box

2009-07-08 Thread mdipierro
OK. I need to change the optionswidget. Give me a couple of days. Massimo On Jul 8, 11:32 am, annet wrote: > Massimo, > > I did add the line of code you asked me to add. The validator read > like: > > db.companyactivity.company.requires=IS_IN_DB(db,db.company.id,'% > (company_name)s') > db.com

[web2py:25960] Re: IS_NOT_IN_DB() and no automatic drop box

2009-07-08 Thread annet
Massimo, I did add the line of code you asked me to add. The validator read like: db.companyactivity.company.requires=IS_IN_DB(db,db.company.id,'% (company_name)s') db.companyactivity.activity.requires=[IS_IN_DB(db,db.activity.id,'% (activity_name)s'),IS_NOT_IN_DB(db (db.companyactivity.company=

[web2py:25959] Re: MySQLdb stored procedure oddness

2009-07-08 Thread mdipierro
This is a mysqldb issue, not a web2py issue, nevertheless I suggest you move to a more recent web2py version. Massimo On Jul 8, 7:04 am, ae wrote: > I'm using the MySQLdb module directly; I'm not using web2py's SQL > module. > > Also, I'm running on mod_wsgi although I don't think that would ma

[web2py:25958] Re: innerHTML about javascript

2009-07-08 Thread mdipierro
No problem with the english. I need to see and example else I do not know what 'right' is. Massimo On Jul 8, 7:34 am, 张峥 wrote: > hello,all: > > IN web2py, I want to use ajax("body_2_5",[],"right"); to display a page. > but javascript function in the page can't run > > The problem may be innerH

[web2py:25957] Re: Web2py vs the world

2009-07-08 Thread mdipierro
Do not worry, we are not changing to an ORM. Right now you can do this: db.define_table('person',Field('birthdate','date')) db.person.age = lambda row: (request.now-request.birthdate).years for person in db().select(db.person.ALL): print person.name,'is',db.person.age(person),'years old' pe

[web2py:25956] Re: Web2py vs the world

2009-07-08 Thread SergeyPo
Please don't! DAL is minimalist now but that's what positively differs web2py from others. In return it works fast (I'd say 10x faster than RoR) and takes no time to learn. On Jul 8, 6:35 pm, mdipierro wrote: > I think this is gone off topic. The issue is whether it should be > possible for a t

[web2py:25955] Re: ajax + jquery

2009-07-08 Thread annet
I don't intend to be offensive, but why are you making such an effort to get the pagination code above to work? Why don't you use a jQuery plugin like dataTables? With just a few lines of code you enable a bunch of features on your tables. In web2py_ajax.html you add: jQuery('#demo').dataTab

[web2py:25954] Re: ajax + jquery

2009-07-08 Thread kozo
Manufacturer Type Size Amount {{=SELECT(*Manufacturer,**dict (_name='Manufacturer', _id="Manufacturer", _onchange="ajax('_search', ['number','Manufacturer','Type','Size'],'target')"))}} {{=SELECT(*Type, **dict(_name='Type', _id="Type", _onchange="ajax('_search', ['number','Manufacturer',

[web2py:25953] Re: web2py via shell account

2009-07-08 Thread Mr admin
You can use CRON entry like this to try and run web2py every 15 minuses # cron entry to run web2py every 15 minutes 0,15,30,45 * * * * /root/runweb2py.sh Here are the contents of the shell script. #!/bin/bash # # runweb2py.sh # cd /home/web2py python web2py.py -i 192.168.0.200 -p 8000 -a MyPa

[web2py:25952] Re: Web2py vs the world

2009-07-08 Thread Speedbird
>From Yarko: # #...@user.is_logged_in #def my secure function # #A user (class) validating access to sensitive information ugh! Perhaps I am a little lost here Yarko, what would then be the alternative to the above syntax? - I am asking this because at least in the Zope realm, this is rather

[web2py:25951] Re: Web2py vs the world

2009-07-08 Thread mdipierro
I think this is gone off topic. The issue is whether it should be possible for a table to have dynamic columns that are calculated from the values of other columns and are not stored in the db. Right now the answer is not. You would have to implement such function outside of the DAL. Should the DA

[web2py:25950] Re: web2py via shell account

2009-07-08 Thread Jonathan Lundell
On Jul 8, 2009, at 5:13 AM, Mr admin wrote: > One thing you can do is, login to the box using ssh, edit your > models, views and controllers without using the admin interface at > all. I'm not particularly concerned about the admin interface; I'm happy to develop locally (OS X in my case)

[web2py:25949] Re: How to create a JavaScript confirmation popup?

2009-07-08 Thread Mr admin
Thanks Massimo, It's GREAT to know that web2py can do that, but I thought I should learn about passing variables between python and web2py using JavaScript. On Mon, Jul 6, 2009 at 4:53 PM, mdipierro wrote: > > hey... web2py does this automatically if you use an input checkbox > with class="de

[web2py:25948] Re: ajax + jquery

2009-07-08 Thread Mr admin
Can you post an example of your code? It might help us find the problem. Sterling On Tue, Jul 7, 2009 at 10:20 PM, kozo wrote: > > hi all, > > i need a basic understanding of ajax^^ > > i have a dynamic table filled with an ajax call.i want to paginate > the > table with an jquery plugin. >

[web2py:25947] innerHTML about javascript

2009-07-08 Thread 张峥
hello,all: IN web2py, I want to use ajax("body_2_5",[],"right"); to display a page. but javascript function in the page can't run The problem may be innerHTML, can you help me my English was poor,sorry!! --~--~-~--~~~---~--~~ You received this message because yo

[web2py:25946] Re: web2py via shell account

2009-07-08 Thread NetAdmin
As for running after a reboot, you could use cron to try and start web2py hourly. If it's running, it should give an error message that says "Address already in use" Sterling On Jul 6, 10:04 am, Jonathan Lundell wrote: > Is it practical to run web2py from a non-admin remote-login account, > w

[web2py:25945] Re: web2py via shell account

2009-07-08 Thread Mr admin
Hello, One thing you can do is, login to the box using ssh, edit your models, views and controllers without using the admin interface at all. I use this method most of the time Sterling On Mon, Jul 6, 2009 at 10:04 AM, Jonathan Lundell wrote: > Is it practical to run web2py from a non-admin r

[web2py:25944] Re: MySQLdb stored procedure oddness

2009-07-08 Thread ae
I'm using the MySQLdb module directly; I'm not using web2py's SQL module. Also, I'm running on mod_wsgi although I don't think that would make any difference. web2py 1.55/Python 2.5.2/MySQL 5.1 Thanks for looking. --ae --~--~-~--~~~---~--~~ You received this mes

[web2py:25943] drop-box that keeps previous value

2009-07-08 Thread annet
I wonder whether it is possible to have a drop-box that keeps its previous value. For Instance, I have a table in which I insert days and facilities. On some days the facility is open several slots of time. In the create form, when I submit e.g. MondayCreche10 am - 2 pm ... I would like

[web2py:25942] Re: Web2py vs the world

2009-07-08 Thread Hans Donner
On Wed, Jul 8, 2009 at 8:56 AM, Yarko Tymciurak wrote: > > > On Wed, Jul 8, 2009 at 1:55 AM, Yarko Tymciurak wrote: >> >> On Wed, Jul 8, 2009 at 1:45 AM, Hans Donner wrote: >>> >>> Hi All, >>> >>> yarko, are you carrying an ID? So if I want to know who you are you >>> show me your ID aren't you?

[web2py:25941] Re: Web2py vs the world

2009-07-08 Thread Yarko Tymciurak
On Wed, Jul 8, 2009 at 1:47 AM, SergeyPo wrote: > > Yarko, > > imagine a web shop. You have Products class (SQL table) and Users > class (SQL table). > In RoR you would write a method in Product class: > > def price_for_user(user_id=nil) > if user_id >user = User.find(user_id) >return se