Re: [web2py] V199.4 Error when define table in module and import it?

2012-02-28 Thread Bruno Rocha
try: from gluon import current from html import * from *gluon*.dal import Field import os def define(table_name): *T = current.T * db = current.globalenv['db'] auth= current.globalenv['auth'] if table_name not in db.tables: db.define_table(table_name, Field

Re: [web2py] Error that i really dont understand

2012-02-28 Thread Bruno Rocha
have you changed datatype for some field? i.e: if you changed from datetime to date, or from string to date and are using SQLITE, it will be not possible to execute the ALTER table. You need to change it on SQLITEMANAGER or recreate the database. On Tue, Feb 28, 2012 at 4:20 AM, Hassan Alnatour w

[web2py] Re: Error that i really dont understand

2012-02-28 Thread Hassan Alnatour
How do i recreate the database ??

Re: [web2py] Re: Error that i really dont understand

2012-02-28 Thread Bruno Rocha
On Tue, Feb 28, 2012 at 5:32 AM, Hassan Alnatour wrote: > How do i recreate the database ?? > If you are using SQLITE, just remove everything under yourapp/databases folder. ** deleteing all these files will delete your database and you will loose all your data NOTE: The ALTER table is a limit

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
i tried this but i am not be able to run my controller Can you give me the simple example through which i can run the function written under the controller inside my application On Mon, Feb 27, 2012 at 5:39 PM, Luciano Pacheco wrote: > Example: > > http://movu.ca/demo/article/show/31/web2py-cron

[web2py] About concurrent tasks

2012-02-28 Thread Marcelo Zamperetti
I know a bit of programming but still new to python and web2py (and to web programming in general, actually), so sorry if I make a gaffe and for my poor english. I have the intention of developing a meta-search website. It queries a bunch of other sites for results, processes them and show to the

[web2py] Get the IP of the System

2012-02-28 Thread Sanjeet Kumar
How we can get the IP address of the system

Re: [web2py] Re: cron setup

2012-02-28 Thread Luciano Pacheco
Following the same example. In you controller: from applications.instore.modules.background_updater main def force_background_updater(): ret = main() return 'The result was: %s' % ret But, the cron is run time based tasks, usually those tasks won't be used in controller.One exception is

Re: [web2py] About concurrent tasks

2012-02-28 Thread Luciano Pacheco
How you are thing to show this to user ? Case 1: User request a search => you (web2py) dispatch all the 5 (up to 20) sub-external-searches, *only* after finishing all 5 - 20 sub-external-searches, send the response for the user. Case 2: User request a search => you (web2py) put all the 5 - 20 sub

[web2py] Capture the system shut down and browser close event

2012-02-28 Thread Sanjeet Kumar
I am going to develop the time sheet app so for that i captured the login and logout event through this :- auth.settings.login_onaccept = lambda form: lgin(form) auth.settings.logout_onlogout = lambda usr: lgout(usr) and one more question in my mind when the browser will be closed by some reaso

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
I am not be able to get you properly can you give me the better clarification i have the default controller and the index function can you tell me how can i run the index function by using crontab which are in my application folder. On Tue, Feb 28, 2012 at 4:12 PM, Luciano Pacheco wrote: > Follo

[web2py] Re: About concurrent tasks

2012-02-28 Thread Marcelo Zamperetti
I was thinking of showing the results to the user after all searches have been made, with maybe a timeout of 1 or 2 seconds for each individual search, so the whole process would never take more than 2 seconds, even if some results are lost eventually. This way the user will see everything ordered

Re: [web2py] Re: cron setup

2012-02-28 Thread Luciano Pacheco
You want to run the index function of your controller in a cron ? Usually it doesn't make sense, but, in the example file # file: applications/instore/modules/background_updater.py from applications.instore.controllers.default import index # instead of time.sleep(5), inside the function main()

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
Yes I want to run the index function of my default controller in a cron is this possible or not ? On Tue, Feb 28, 2012 at 4:58 PM, Luciano Pacheco wrote: > You want to run the index function of your controller in a cron ? > > Usually it doesn't make sense, but, in the example file > > # file: ap

Re: [web2py] Re: About concurrent tasks

2012-02-28 Thread Luciano Pacheco
On Tue, Feb 28, 2012 at 10:26 PM, Marcelo Zamperetti wrote: > I was thinking of showing the results to the user after all searches > have been made, > with maybe a timeout of 1 or 2 seconds for each individual search, so > the whole > process would never take more than 2 seconds, even if some resu

Re: [web2py] Re: cron setup

2012-02-28 Thread Luciano Pacheco
I have written to you how to do that. Copy and paste: , but, in the example file, do this changes: # file: applications/instore/modules/background_updater.py from applications.instore.controllers.default import index # instead of time.sleep(5), inside the function main() index() On Tue, F

Re: [web2py] Re: cron setup

2012-02-28 Thread Sanjeet Kumar
Thanks Luciano i will try. On Tue, Feb 28, 2012 at 5:06 PM, Luciano Pacheco wrote: > I have written to you how to do that. > > Copy and paste: > > , but, in the example file, do this changes: > > # file: applications/instore/modules/background_updater.py > > from applications.instore.controllers

[web2py] Web2py.com Online Demo redirect error

2012-02-28 Thread Rakesh Singh
Hi all, The Online Demo application on web2py.com generates an error in Firefox. Error : The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be cause

[web2py] Passing variables from form to function to be classified and matched against DB

2012-02-28 Thread Sam Flynn
I'm trying to do a step process with data and having difficulty figuring it out. Any help MUCH appreciated! I want to use a standard form such as input_form.html. The input values will be for values of w, x, y, z (e.g. W: ). From there I want to send the input values to the following function t

Re: [web2py] Get the IP of the System

2012-02-28 Thread Phyo Arkar
Which system? On 2/28/12, Sanjeet Kumar wrote: > How we can get the IP address of the system >

[web2py] Re: Get the IP of the System

2012-02-28 Thread Alan Etkin
I think that this is not a trivial subject. I didn't find an easy way of solving it with web2py, but perhaps there is a framework feature for this. Here are some ways described to retrieve the machine IP address http://stackoverflow.com/questions/166506/finding-local-ip-addresses-using-pythons-std

[web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Massimo Di Pierro
you need do use websockets (gluon/contrib/comet_messaging.py) On Feb 28, 4:55 am, Sanjeet Kumar wrote: > I am going to develop the time sheet app so for that i captured the login > and logout event through this :- > auth.settings.login_onaccept = lambda form: lgin(form) > auth.settings.logout_onl

[web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Alan Etkin
For checking if the server is up from the client browser (without refreshing the page) you can use jQuery .ajax() and a simple function at the controller to return the server state. I have submitted a LOAD helper enhancement to perform a ajax loop at the client side. It could be used for this purpo

[web2py] Re: Passing variables from form to function to be classified and matched against DB

2012-02-28 Thread Alan Etkin
I assume you are using web2py to expose the form. Have you? If so, any data pickleable processed from the input can be stored and retrieved with de session object, which is available at any controller, model or view with each action: # store my input data session.my_input_data = # show my input

[web2py] Re: Passing variables from form to function to be classified and matched against DB

2012-02-28 Thread Sam Flynn
How would the form definition "def form_input()" be altered (or would it?) within the default.py to accommodate this scheme? On Feb 28, 9:36 am, Alan Etkin wrote: > I assume you are using web2py to expose the form. Have you? > > If so, any data pickleable processed from the input can be stored

[web2py] Re: Passing variables from form to function to be classified and matched against DB

2012-02-28 Thread Massimo Di Pierro
session.my_input_data = Not quite. Anything pickable built out of list, dict, tuples, int, float, bool. Not instances of classes defined in modules. Even if web2py can pickle it and store it, it may not be able to retrieve it. On Feb 28, 8:36 am, Alan Etkin wrote: > I assume you are using web2p

Re: [web2py] Get the IP of the System

2012-02-28 Thread José Luis Redrejo Rodríguez
You can use netifaces, http://alastairs-place.net/projects/netifaces/ El 28/02/2012 11:39, "Sanjeet Kumar" escribió: > How we can get the IP address of the system >

Re: [web2py] Get the IP of the System

2012-02-28 Thread Ross Peoples
Alternatively, you can run ipconfig/ifconfig depending on the operating system and parse the results. I have been using this method for a year now and it works great. I would much rather have an API solution, but this method seemed to be the easiest with the fewest dependencies on external libr

[web2py] Re: Passing variables from form to function to be classified and matched against DB

2012-02-28 Thread Sam Flynn
I was thinking that I had to do it through validation. Like: validate input against class function spit out scenario follow-on action triggers call to DAL with a look-up function trigger output view that takes ID from row in the table and passes relevant data to the view but so far I can't figur

Re: [web2py] About concurrent tasks

2012-02-28 Thread Anthony
> > Case 1: > User request a search => you (web2py) dispatch all the 5 (up to 20) > sub-external-searches, *only* after finishing all 5 - 20 > sub-external-searches, send the response for the user. > > Case 2: > User request a search => you (web2py) put all the 5 - 20 > sub-external-searches in

[web2py] Re: Support for PyPy

2012-02-28 Thread sherdim
What the difference in the speed? On Friday, February 10, 2012 7:35:40 PM UTC+4, Sathvik Ponangi wrote: > > Is there some way to run Web2Py on PyPy ?

[web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Wikus van de Merwe
You could simply assume x minutes (eg. 15) without any user action equals to logout. Then all you need is just a small script that runs periodically by cron and does a DB update when inactivity is detected.

[web2py] help with css

2012-02-28 Thread Massimo Di Pierro
http://code.google.com/p/web2py/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&groupby=&sort=&id=589

[web2py] Re: Support for PyPy

2012-02-28 Thread Massimo Di Pierro
I have fixed all pypy bugs that have been reported but I did not run it myself. Please report any problems if any. On Feb 11, 3:51 am, Phyo Arkar wrote: > has anyone tested with Pypy 1.8 ? Seems good this time. > > Previous tests fails web2py , > > On Fri, Feb 10, 2012 at 10:05 PM, Sathvik Ponang

[web2py] Admin section locking up computer

2012-02-28 Thread Bruce Wade
Hi, Lately I have found the appadmin completely freezing my entire computer. Even when I try to view the errors log my system hangs. Deleting all contents from the errors folder fixes this problem, however also defeats the purpose of having error logs :D Another issue I have a small not very comp

[web2py] Re: Admin section locking up computer

2012-02-28 Thread Anthony
Which OS? On Tuesday, February 28, 2012 1:17:01 PM UTC-5, Detectedstealth wrote: > > Hi, > > Lately I have found the appadmin completely freezing my entire computer. > Even when I try to view the errors log my system hangs. Deleting all > contents from the errors folder fixes this problem, howev

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Bruce Wade
Ubuntu 11.10 On Tue, Feb 28, 2012 at 10:23 AM, Anthony wrote: > Which OS? > > > On Tuesday, February 28, 2012 1:17:01 PM UTC-5, Detectedstealth wrote: >> >> Hi, >> >> Lately I have found the appadmin completely freezing my entire computer. >> Even when I try to view the errors log my system hang

[web2py] Thumbnails

2012-02-28 Thread Ivan Vilches Basaul
Any way for automatic thumbnails creation? Thanks Ivan Vilches Basaul

[web2py] SQLFORM paging

2012-02-28 Thread Bruce Wade
Original URL: http://127.0.0.1:8000/adviewer/ad_rating_details/1749?_signature=6d045f02c7916caa71c27157e52725b601215fb4 Notice the ID /1749 Page 2 URL: http://127.0.0.1:8000/adviewer/ad_rating_details?page=2&_signature=4d3c979026c296d467e5b47b7eed2ca92368a76e Notice the ID was removed. Why is th

[web2py] Re: SQLFORM paging

2012-02-28 Thread Bruce Wade
OK looking at sqlhtml.py I figured out how to get this to work. I had to also pass the ad_id to args=[ad_id] to keep the ID in the URL. I think there should be a better way like the grid keeping any args that were originally in the URL. On Tue, Feb 28, 2012 at 11:04 AM, Bruce Wade wrote: > Origi

[web2py] unalbe to create application

2012-02-28 Thread JoeCodeswell
Dear web2py folks, I just re upgraded web2py using: wget -q http://www.web2py.com/examples/static/web2py_src.zip The current version is shown to be: Version 1.99.4 (2011-12-14 14:46:14) stable Running on Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1 I can't create a new application from the web

Re: [web2py] help with css

2012-02-28 Thread Bruno Rocha
I've never seen this plus icon, so I created a new widget with an "add new" button. This widget I am using for cook recipes in Movuca. The code is in github. http://zerp.ly/rochacbruno Em 28/02/2012 14:40, "Massimo Di Pierro" escreveu: > > http://code.google.com/p/web2py/issues/detail?can=2&star

[web2py] Re: Admin section locking up computer

2012-02-28 Thread Massimo Di Pierro
Do you have a many provinces in database? IS_IN_DB(db, db.provinces.id, '%(name)s')) may be trying to build a huge dropdown On Feb 28, 12:17 pm, Bruce Wade wrote: > Hi, > > Lately I have found the appadmin completely freezing my entire computer. > Even when I try to view the errors log my syste

[web2py] Re: Thumbnails

2012-02-28 Thread Massimo Di Pierro
will be in the packt recipe book. I think there is a web2pyslice.com recipe as well On Feb 28, 12:32 pm, Ivan Vilches Basaul wrote: > Any way for automatic thumbnails creation? > Thanks > > Ivan Vilches Basaul

[web2py] Re: unalbe to create application

2012-02-28 Thread Massimo Di Pierro
Can be a permission issue chown -R www-data:www-data * or you do have it already (perhaps a file under applications with that name?) On Feb 28, 1:19 pm, JoeCodeswell wrote: > Dear web2py folks, > > I just re upgraded web2py using: > wget -qhttp://www.web2py.com/examples/static/web2py_src.zip >

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Bruce Wade
WOW I didn't even think about that. It is probably the cities causing the problem because there is over 1 million cities and on every view that uses it in my site I use ajax to get only the provinces and cities related to the other selection. On Tue, Feb 28, 2012 at 11:21 AM, Massimo Di Pierro < m

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Richard Vézina
That is a lot of city :) Richard On Tue, Feb 28, 2012 at 2:24 PM, Bruce Wade wrote: > WOW I didn't even think about that. It is probably the cities causing the > problem because there is over 1 million cities and on every view that uses > it in my site I use ajax to get only the provinces and c

[web2py] Re: Thumbnails

2012-02-28 Thread Anthony
http://www.web2pyslices.com/slices/take_slice/62 If you search the list, you may find some additional methods and advice. Anthony On Tuesday, February 28, 2012 2:22:02 PM UTC-5, Massimo Di Pierro wrote: > > will be in the packt recipe book. I think there is a web2pyslice.com > recipe as well >

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Bruce Wade
Time for me to customize the appadmin to work with my location's using chain selects. Thanks for pointing that out. On Tue, Feb 28, 2012 at 11:24 AM, Bruce Wade wrote: > WOW I didn't even think about that. It is probably the cities causing the > problem because there is over 1 million cities an

[web2py] Re: room booking system with web2py...

2012-02-28 Thread Christoph Ott
Thank you for the great examples, helped me a lot. It's almost working I've got only a few Problems... My DB has 3 fields: Room, time, date. Is there any possibility to check if the room already booked? So I can't book a room twice I've found nothing in the book and with google. Can you give me h

[web2py] Re: Passing variables from form to function to be classified and matched against DB

2012-02-28 Thread Wikus van de Merwe
If I understand you correctly, you simply want to use the matched scenario on the next stage of the form. So, after validation you need to pass the id of the matched scenario either by: a) storing it in a session (1) and reading it later in the "next" function (2) 1) session.scenario = scen

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Richard Vézina
Have you seen pass Burno mail about badmin? Maybe it could help and avoid you to customise appadmin... Richard On Tue, Feb 28, 2012 at 2:28 PM, Bruce Wade wrote: > Time for me to customize the appadmin to work with my location's using > chain selects. > > Thanks for pointing that out. > > > On

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Bruce Wade
Not sure I seen his mall on it. On Tue, Feb 28, 2012 at 11:42 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Have you seen pass Burno mail about badmin? > > Maybe it could help and avoid you to customise appadmin... > > Richard > > > On Tue, Feb 28, 2012 at 2:28 PM, Bruce Wade wrote:

Re: [web2py] Re: Admin section locking up computer

2012-02-28 Thread Richard Vézina
http://groups.google.com/group/web2py/browse_thread/thread/47d75521c6d4d8df?pli=1 On Tue, Feb 28, 2012 at 2:52 PM, Bruce Wade wrote: > Not sure I seen his mall on it. > > > On Tue, Feb 28, 2012 at 11:42 AM, Richard Vézina < > ml.richard.vez...@gmail.com> wrote: > >> Have you seen pass Burno mail

[web2py] Re: unalbe to create application

2012-02-28 Thread JoeCodeswell
Dear Massimo, Thanks for the reply. No, there was no ip_hold directory under applications. I may have a permissions problem, but I'm not sure. Here's the history of what i did. I tried to work around the problem by using the command line. So after the new re-upgrade of web2py i said: [applicatio

[web2py] Grid examples

2012-02-28 Thread greenpoise
Any good source out there of grid examples? I am struggling even with the book in hand..The grid comes out but in an ugly manner. I just want to customize it to remove/add headings etc. Thanks dan

[web2py] Re: room booking system with web2py...

2012-02-28 Thread Cliff
To start, you really need two tables. This is a very simple example. Look in the simple examples code for dogs and owners to get the whole story about one-to-many relationships. Also there is more information in the on-line manual in the database chapter. db.define_table('rooms', Field('room_n

[web2py] Re: why web2py is not listed in Google App Engine ? (Django is there!)

2012-02-28 Thread GoldenTiger
who said web2py not listed in GAE? It is listed in the getting started tutorial, that's enough by now http://code.google.com/intl/es/appengine/docs/python/gettingstartedpython27/usingwebapp.html *Explaining the webapp2 Framework* The WSGI standard is simple, but it would be cumbersome to writ

[web2py] web2py 1.99.5 (please read)

2012-02-28 Thread Massimo Di Pierro
I am planning to release this tomorrow but you can test it today. ***Please help us test it today*** It is really important. There is a huge number of improvements and bug fixes. We should really call this web2py 2.0 but we prefer to wait before advertising some of the new features which are in bu

Re: [web2py] web2py 1.99.5 (please read)

2012-02-28 Thread Richard Vézina
Trunk or nightly build has good tag? Richard On Tue, Feb 28, 2012 at 3:28 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I am planning to release this tomorrow but you can test it today. > ***Please help us test it today*** It is really important. > > There is a huge number of impr

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Anthony
We need to make the book editable again so some of us can start adding this stuff to the documentation. :-) On Tuesday, February 28, 2012 3:28:09 PM UTC-5, Massimo Di Pierro wrote: > > I am planning to release this tomorrow but you can test it today. > ***Please help us test it today*** It is re

[web2py] Re: why web2py is not listed in Google App Engine ? (Django is there!)

2012-02-28 Thread Anthony
> > *Explaining the webapp2 Framework* > > The WSGI standard is simple, but it would be cumbersome to write all of > the code that uses it by hand. Web application frameworks handle these > details for you, so you can focus your development efforts on your > application's features. Google App E

Re: [web2py] Grid examples

2012-02-28 Thread Bruce Wade
http://www.web2pyslices.com/slices/take_slice/148 On Tue, Feb 28, 2012 at 12:04 PM, greenpoise wrote: > Any good source out there of grid examples? I am struggling even with > the book in hand..The grid comes out but in an ugly manner. I just > want to customize it to remove/add headings etc. > >

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread szimszon
+1 Anyway it could be good to have some more hint about what the new features do. So we can easily test without to follow all conversation about features between versions :-o 2012. február 28., kedd 21:35:03 UTC+1 időpontban Anthony a következőt írta: > > We need to make the book editable again

[web2py] Re: Grid examples

2012-02-28 Thread greenpoise
Thanks for the lead. Why do I get duplicate grid in my view I am trying to build a simple grid and I get a duplicate grid one on top of the other. On Feb 28, 12:42 pm, Bruce Wade wrote: > http://www.web2pyslices.com/slices/take_slice/148 > > On Tue, Feb 28, 2012 at 12:04 PM, greenpoise wr

Re: [web2py] Re: Grid examples

2012-02-28 Thread Bruce Wade
Need to see some code before anyone can help On Tue, Feb 28, 2012 at 12:47 PM, greenpoise wrote: > Thanks for the lead. Why do I get duplicate grid in my view I am > trying to build a simple grid and I get a duplicate grid one on top of > the other. > > > > > > On Feb 28, 12:42 pm, Bruce Wade

[web2py] Re: why web2py is not listed in Google App Engine ? (Django is there!)

2012-02-28 Thread Massimo Di Pierro
:-) On Feb 28, 2:36 pm, Anthony wrote: > > *Explaining the webapp2 Framework* > > > The WSGI standard is simple, but it would be cumbersome to write all of > > the code that uses it by hand. Web application frameworks handle these > > details for you, so you can focus your development efforts on

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Massimo Di Pierro
I promise I will do this within the end of March. Possibly sooner. Massimo On Feb 28, 2:35 pm, Anthony wrote: > We need to make the book editable again so some of us can start adding this > stuff to the documentation. :-) > > > > > > > > On Tuesday, February 28, 2012 3:28:09 PM UTC-5, Massimo Di

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Massimo Di Pierro
No. If you have time test the debugger. That is a major piece of code that you will notice right away. Mariano can explain better than me. The other features have been reasonably tested. Massimo On Feb 28, 2:46 pm, szimszon wrote: > +1 > > Anyway it could be good to have some more hint about wh

Re: [web2py] Get the IP of the System

2012-02-28 Thread Niphlod
simplest method for machines connected to internet willing to retrieve their external ip: print urllib2.urlopen('http://icanhazip.com/').read()

Re: [web2py] Thumbnails

2012-02-28 Thread Bruno Rocha
I do it using the compute attribute, take a look: http://movu.ca/demo/article/show/36/creating-thumbnails-with-web2py On Tue, Feb 28, 2012 at 3:32 PM, Ivan Vilches Basaul < ivan_vilc...@hotmail.com> wrote: > Any way for automatic thumbnails creation? > Thanks > > Ivan Vilches Basaul > > -- Br

Re: [web2py] Get the IP of the System

2012-02-28 Thread Niphlod
using google I found also this one nice to play with print urllib2.urlopen('http://ifconfig.me/ip').read( ) print urllib2.urlopen('http://ifconfig.me/all').read( ) print urllib2.urlopen('http://ifconfig.me/all.xml').

Re: [web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Richard Vézina
'db' With trunk and copied my app in application folder... Richard On Tue, Feb 28, 2012 at 4:01 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > No. If you have time test the debugger. That is a major piece of code > that you will notice right away. Mariano can explain better than

[web2py] Correctly resolve message[.verify_email | .resetPassword] literal protocol referenes

2012-02-28 Thread Dirk
Is there an automatic, deployment architecture agnostic way to determine whether web2py is running with SSL support so message.verify_email and message.resetPassword can be rendered correctly? This should work for both Rocket and WSGI deployment. TIA, D

[web2py] Re: Correctly resolve message[.verify_email | .resetPassword] literal protocol referenes

2012-02-28 Thread Massimo Di Pierro
You can check if a request is going over https (request.is_https) but it may fail behind a proxy. There is no way to check whether https is available when receiving an http request. On Feb 28, 4:00 pm, Dirk wrote: > Is there an automatic, deployment architecture agnostic way to > determine whethe

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Massimo Di Pierro
What triggers it? I need a little more info. On Feb 28, 3:22 pm, Richard Vézina wrote: > 'db' > > With trunk and copied my app in application folder... > > Richard > > On Tue, Feb 28, 2012 at 4:01 PM, Massimo Di Pierro < > > > > > > > > massimo.dipie...@gmail.com> wrote: > > No. If you have time

[web2py] Re: Grid examples

2012-02-28 Thread greenpoise
Got it, typo on my part..thanks Bruce d On Feb 28, 12:49 pm, Bruce Wade wrote: > Need to see some code before anyone can help > > On Tue, Feb 28, 2012 at 12:47 PM, greenpoise wrote: > > > > > > > > > > > Thanks for the lead. Why do I get duplicate grid in my view I am > > trying to build a

[web2py] Multiple auth - Good practice?

2012-02-28 Thread greenpoise
I have been searching in this group for a way of implementing two authentication within one application. My idea is to have Auth table managed by an administrator. However, I want to give the flexibility to added users to add their own employees and the employees being able to log into the applicat

[web2py] Re: Multiple auth - Good practice?

2012-02-28 Thread greenpoise
Sorry, I pressed enter without being finished: My second option 2. Build a table called employee that uses only one auth table. Either way I am stuck on how to do this.. First would like to know which is a good practice and second, how could I accomplish this?? Thanks dan On Feb 28, 2:10 p

[web2py] Re: using existing DB connection inside module/class

2012-02-28 Thread JaapP
Hi Anthony, Sorry for the delay.. The code as you show above looks indeed much the same as my code. I already discovered before that restarting Web2py server after module changes is a good idea. So this is not the solution for my problem. Your code works fine for me as well. After removing the db

[web2py] Possible bug with a referenced field?

2012-02-28 Thread Tsvi Mostovicz
Hi, In my models I have 2 tables, where table 1 has field "a" referencing table 2. As each user has a bunch of fields both in table 1 as well as in table 2, I used the request_tenant field with some uuid in both tables which is tied to the user (I'm not using the users ID for various reasons). I t

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Richard Galka
A couple minor points with the admin pages and the new debugging section: In the Admin -> Debug -> breakpoints -> Add breakpoints section, if the current application has long directory & file names then the table's hints run off the page. I think it may be pertinent to identify that in the a

Re: [web2py] help with css

2012-02-28 Thread Bruno Rocha
That is my widget: http://awesomescreenshot.com/07fnx882 and this is the code: https://github.com/rochacbruno/Movuca/blob/master/modules/helpers/widgets.py#L241 On Tue, Feb 28, 2012 at 4:20 PM, Bruno Rocha wrote: > I've never seen this plus icon, so I created a new widget with an "add > new" bu

[web2py] Admin Disabled

2012-02-28 Thread Bruce Wade
For some reason the admin interface was not accepting the new password I created on my development server. Now it says admin has been disabled how do I re-enable it? -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://www.warplydesigned.com http://w

[web2py] Re: Multiple auth - Good practice?

2012-02-28 Thread Massimo Di Pierro
You can have two auth objects and you can swicth between them using for example a session variable or a parameter in the URL. Yet is is going to be a mess. I suggest instead you use one auth table and user roles and permissions to decide who can do what. massimo On Feb 28, 4:12 pm, greenpoise

[web2py] Re: Possible bug with a referenced field?

2012-02-28 Thread Massimo Di Pierro
Can you show us the code so I can reproduce the behavior and fix it (if a bug, as it looks like). On Feb 28, 4:47 pm, Tsvi Mostovicz wrote: > Hi, > > In my models I have 2 tables, where table 1 has field "a" referencing > table 2. As each user has a bunch of fields both in table 1 as well as > in

Re: [web2py] V199.4 Error when define table in module and import it?

2012-02-28 Thread IVINH
Thank rochacbruno. Use gluon.dal instead gluon. Vào 15:08:17 UTC+7 Thứ ba, ngày 28 tháng hai năm 2012, rochacbruno đã viết: > > try: > > > > from gluon import current > from html import * > from *gluon*.dal import Field > import os > > > def define(table_name): > *T = current.T * > d

[web2py] Re: Admin Disabled

2012-02-28 Thread Massimo Di Pierro
Do you have ssh access? You better do. cd under web2py/ then do: sudo -u www-data python -c "from gluon.main import save_password; save_password(raw_input('admin password: '),443)" replace 443 with the port you use for admin. Should be 443 for https On Feb 28, 7:15 pm, Bruce Wade wrote: > For s

[web2py] Re: room booking system with web2py...

2012-02-28 Thread mikech
You should consider having a from and to date as a start, and as stated below, split room and reservations into two tables joined by room id. On Tuesday, February 28, 2012 11:28:46 AM UTC-8, Christoph Ott wrote: > > Thank you for the great examples, helped me a lot. > > It's almost working I've

[web2py] Re: web2py 1.99.5 (please read)

2012-02-28 Thread Massimo Di Pierro
Here corrected list of new features (in trunk and nightly build. web2py 1.99.5 is NOT out yet) - admin in Russian (Bulat), Japanese (Omi) and Slovenian (Robert Valentak) - included web-based debugger (experimental, thanks Mariano) - def index(): return dict(a=gluon.tools.Expose(folder)) - db.table

Re: [web2py] V199.4 Error when define table in module and import it?

2012-02-28 Thread IVINH
Thanks. Use "gluon.dal" instead "dal". Vào 15:08:17 UTC+7 Thứ ba, ngày 28 tháng hai năm 2012, rochacbruno đã viết: > > try: > > > > from gluon import current > from html import * > from *gluon*.dal import Field > import os > > > def define(table_name): > *T = current.T * > db = curr

Re: [web2py] Re: Admin Disabled

2012-02-28 Thread Bruce Wade
Yes I have ssh. The site is on an amazon ubuntu instance. If my python process is running with a user other then www-data do I just change the first part of the command? sudo -u user_name python -c "from gluon main import save_password; save_password(raw_input('admin password:'), 443)" On Tue, F

Re: [web2py] Get the IP of the System

2012-02-28 Thread Sanjeet Kumar
i want to insert the system ip address in the database so how i get the ip of the system through web2py controller On Tue, Feb 28, 2012 at 7:29 PM, Phyo Arkar wrote: > Which system? > > On 2/28/12, Sanjeet Kumar wrote: > > How we can get the IP address of the system > > >

Re: [web2py] Get the IP of the System

2012-02-28 Thread Sanjeet Kumar
I want to insert the client system IP address in my database through the controller can you explain how i get the client IP address of the system when they login. On Tue, Feb 28, 2012 at 7:29 PM, Phyo Arkar wrote: > Which system? > > On 2/28/12, Sanjeet Kumar wrote: > > How we can get the IP add

[web2py] Re: Possible bug with a referenced field?

2012-02-28 Thread Greg Sier
Confirming that we've come across the same issue lately ... On Feb 29, 11:42 am, Massimo Di Pierro wrote: > Can you show us the code so I can reproduce the behavior and fix it > (if a bug, as it looks like). > > On Feb 28, 4:47 pm, Tsvi Mostovicz wrote: > > > > > > > > > Hi, > > > In my models I

Re: [web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Sanjeet Kumar
Alan can you explain in detail On Tue, Feb 28, 2012 at 7:58 PM, Alan Etkin wrote: > For checking if the server is up from the client browser (without > refreshing the page) you can use jQuery .ajax() and a simple function > at the controller to return the server state. I have submitted a LOAD >

Re: [web2py] Re: Capture the system shut down and browser close event

2012-02-28 Thread Sanjeet Kumar
Massimo how can i use this On Tue, Feb 28, 2012 at 7:41 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > you need do use websockets (gluon/contrib/comet_messaging.py) > > On Feb 28, 4:55 am, Sanjeet Kumar wrote: > > I am going to develop the time sheet app so for that i captured the

[web2py] Using the epydoc

2012-02-28 Thread davidkw
I'm fairly new to programming and haven't used documentation extensively before. I'm having some trouble finding information. For example, I want to know the arguments that can be passed to db().select(...) and what the arguments for select() do. However, when I looked under web2py.gluon.dal, I w

Re: [web2py] Get the IP of the System

2012-02-28 Thread Anthony
I've seen recommendations to check request.env.http_client_ip, request.env.http_x_forwarded_for, and request.env.remote_addr, in that order (remote_addr should always be there, but you want one of the other two if available because the client may be behind a proxy). Anthony On Tuesday, Februar

[web2py] Re: Using the epydoc

2012-02-28 Thread Anthony
Note, db() is not a DAL object but a Set object, so select() is a method of the Set class in dal.py. Ultimately, though, it calls the select() method of the database adapter (which itself calls the _select() method to generate the SQL). In addition to looking at the code and Epydoc, this is all

  1   2   >