Re: [web2py] Skytoop : a web desktop like, created with Web2Py on server side

2011-05-03 Thread Jason (spot) Brower
It would be fun to put a widget for online radio. Like that. :D It's the station I listen to. BR, Jason Brower On Mon, May 2, 2011 at 8:08 PM, Jason Brower wrote: > On 05/02/2011 07:13 PM, Alexandre Strzelewicz wrote: > >> I have the pleasure to present you Skytoop, >> >> http://www.skytoop.co

[web2py] Re: Backup Database

2011-05-03 Thread howesc
in mysql i use mysqldump in postgres i use pgdump in GAE i use the bulkloader tools. import from CSV is great for small databases, but beyond a few megs gets pretty hard. cfh

[web2py] Re: getting error while trying to deploy on gae (Google App Engine Deployment Interface)

2011-05-03 Thread howesc
i've never used the wizards, i was use GAE before they existed and already had my shell scripts... anyhow try: 'which appcfg.py' in the shell to see where it really is installed and update the wizard. if that fails then you don't have the GAE SDK installed (it is distributed by google and is

[web2py] MongoDBAdapter -- in DAL

2011-05-03 Thread joseph simpson
The current dal.py file contains the following code, between lines 3381 and 3404: ADAPTERS = { 'sqlite': SQLiteAdapter, 'sqlite:memory': SQLiteAdapter, 'mysql': MySQLAdapter, 'postgres': PostgreSQLAdapter, 'oracle': OracleAdapter, 'mssql': MSSQLAdapter, 'mssql2': MSSQ

[web2py] Re: EULA agreement on first login

2011-05-03 Thread Charles Law
I actually had that code originally, but if I edit the flag using the appadmin, I get strings, so I added the 2nd check. Also, Massimo, that did the trick! I had: db(db.auth_user.id==me).update(eula_accepted=True) Thanks, Charles On May 3, 9:42 am, Massimo Di Pierro wrote: > You may have an ol

[web2py] Re: deal with CSV

2011-05-03 Thread DenesL
You are welcome. Note: if you have strings you don't need map(str,...) and that \n at the end of 'usr\n' must be causing a blank line, so '\n'.join([';'.join(map(str,['id','num','ves','dt','usr\n']))]) can be just '%s\n' %';'.join('id num ves dt usr'.split()) On May 3, 3:46 pm, cyber wrote:

[web2py] Re: how to set the value of textarea form field on accept, upload without storing files

2011-05-03 Thread DenesL
Set the uploadfield to the name of the other field: Field('species_file', 'upload', label="Upload Names", uploadfield='species') uploadfield = True # means store file on disk uploadfield = 'field_name' # store content in that DB field uploadfield = False # file content is discarded On May 2,

Re: [web2py] Re: What is the convention for using web2py/site-packages for GAE?

2011-05-03 Thread howesc
ok, i'll play with it more. i just upgraded to the latest release yesterday, but in older versions i noticed that sometimes site-packages would be on the path and sometimes not, but i only have had that problem in the SDK and a restart usually solves it so i didn't worry too much about it. tha

[web2py] Re: Backup Database

2011-05-03 Thread luifran
If I use import_from_csv_file and this fail, rollback is automatic? On 3 mayo, 14:59, luifran wrote: > What mechanisms? > > On 2 mayo, 23:20, howesc wrote: > > > > > > > > > i'm a little old-skool and just use thedatabase'sbackupmechanisms since > > they are slightly different from db to db, but

[web2py] Re: Confusion using experts4solutions

2011-05-03 Thread Plumo
$0.02 ... Be wary of taking a percentage of profit as payment. This can mean the other guy doesn't need to invest anything - neither time nor money. Ideas are cheap. So there is no risk for them, but there is a high risk that you will never get paid since most web apps go no where. If they reall

[web2py] Re: Help with broken migration

2011-05-03 Thread pbreit
I think I might have fixed it. We shall see. I can't remember all my steps but I did some manual editing to the DB, removed and added back the Field() and then did a fake_migrate. It seems that I need to have both migrate and fake_migrate True for anything to happen?

[web2py] Re: Help with broken migration

2011-05-03 Thread Massimo Di Pierro
Do NOT add or delete fields now. Make sure you have your models as they were when the .table were there working. The exact command to fix migrations depends on the version. If you have the latest web2py DAL(...,fake_migrate_all=True) will rebuild the .table. After you remove fake_migrate_all=Tr

Re: [web2py] Help with broken migration

2011-05-03 Thread Richard Vézina
Don't understand exactly your problem... When it is dropped it gone most of the time... If you talk about the file of SQLite in database folder and if you are under mercurial version control as you seems to be, may be you can recover your old SQLite file if you haven't commit your change yet. SQL

[web2py] Help with broken migration

2011-05-03 Thread pbreit
I am having trouble getting a column added to a Postgres table. Have I made an unrecoverable error in deleting the *.table files without backing up? Is there any way to recover short of dropping the DB? I can regenerate the /table files of course but are they incompatible with the existing DB?

Re: [web2py] blocked permanently key word

2011-05-03 Thread Richard Vézina
You are my man! I miss disabled... Thanks Anthony. Richard On Tue, May 3, 2011 at 4:34 PM, Anthony wrote: > On Tuesday, May 3, 2011 4:16:59 PM UTC-4, Richard wrote: >> >> You miss read... I know that. >> >> My problem is that when I update my user status I have no switch except >> build my o

[web2py] Re: routes_out protocol

2011-05-03 Thread Dan
Hi, did you find any solution to your problem? I have the same problem. The Url function should build a link over ssl (https) if the url contains the controller "user". e.g. /myapp/user/ login or /myapp/user/register On Apr 12, 4:43 am, LightOfMooN wrote: > The problem is because urls is relat

Re: [web2py] blocked permanently key word

2011-05-03 Thread Anthony
On Tuesday, May 3, 2011 4:16:59 PM UTC-4, Richard wrote: > > You miss read... I know that. > > My problem is that when I update my user status I have no switch except > build my own to not update the status of user that should stay blocked. > > I mean when I go for maintenance I put everybody to

Re: [web2py] Re: What is the convention for using web2py/site-packages for GAE?

2011-05-03 Thread Jonathan Lundell
On May 3, 2011, at 1:09 PM, howesc wrote: > Jonathan, > > I added the logging statements and learned some more things: > - when running the controllers directly it seems to add site-packages > properly > - when running the controllers via the _TEST() function for executing > doctests it fails

Re: [web2py] blocked permanently key word

2011-05-03 Thread Richard Vézina
You miss read... I know that. My problem is that when I update my user status I have no switch except build my own to not update the status of user that should stay blocked. I mean when I go for maintenance I put everybody to blocked but then when I want to bring back access to user I put all the

Re: [web2py] Re: What is the convention for using web2py/site-packages for GAE?

2011-05-03 Thread howesc
Jonathan, I added the logging statements and learned some more things: - when running the controllers directly it seems to add site-packages properly - when running the controllers via the _TEST() function for executing doctests it fails to add site-packages to the path - after trying to run

[web2py] Re: deal with CSV

2011-05-03 Thread cyber
My experiments gave the following results. def export_day(): response.headers['content-type']='text/csv' response.headers['Content-disposition'] = 'attachment; filename=export.csv' results=db(db.autos.dt>=date).select(orderby=~db.autos.dt) return '\n'.join([';'.join(map(str,['id','

Re: [web2py] blocked permanently key word

2011-05-03 Thread Anthony
In the auth_user table, set the user's registration_key to "blocked" (see http://web2py.com/book/default/chapter/08#Restrictions-on-registration). Anthony On Tuesday, May 3, 2011 3:20:46 PM UTC-4, Richard wrote: > Hello Web2py friends, > > I am quite buzzy these days that why I have been out

Re: [web2py] Mercurial Error

2011-05-03 Thread Richard Vézina
If you say that everything work well with ubuntu and that both system don't have the same version of software I would agree that the version are in cause. Mercurial 1.0.1 is kind of very old I think... You must check if it has been compatible with web2py in the first place. Why you need mercurial

Re: [web2py] Re: What is the convention for using web2py/site-packages for GAE?

2011-05-03 Thread Jonathan Lundell
On May 3, 2011, at 12:27 PM, howesc wrote: > Jonathan, > > Just upgraded to Version 1.95.1 (2011-04-25 15:04:14) > > running GAE SDK, i logged sys.path at the start of a controller, and this is > it (note no web2py/site-packages): > > '/Users/cfhowes/clients/pump/source/web2py', > '/Applicatio

Re: [web2py] Re: What is the convention for using web2py/site-packages for GAE?

2011-05-03 Thread howesc
Jonathan, Just upgraded to Version 1.95.1 (2011-04-25 15:04:14) running GAE SDK, i logged sys.path at the start of a controller, and this is it (note no web2py/site-packages): '/Users/cfhowes/clients/pump/source/web2py', '/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEn

[web2py] blocked permanently key word

2011-05-03 Thread Richard Vézina
Hello Web2py friends, I am quite buzzy these days that why I have been out of the mailing list for a wild. I would like to know if the possibility to blocked a user permanently had been anticipated?? I mean if you can't remove a user from the auth_user for regulation reason is there a key word t

[web2py] Re: Send E-mail on exception/Internal error

2011-05-03 Thread Dan
Thanks a lot Massimo and Anthony. Both of the ways are perfect! Web2py is absolutely awesome :) On May 3, 8:51 pm, Anthony wrote: > Another alternative might be to use routes_onerror > (http://web2py.com/book/default/chapter/04#Routes-on-Error) to redirect to an > action (possibly in another a

[web2py] Re: Send E-mail on exception/Internal error

2011-05-03 Thread Anthony
Another alternative might be to use routes_onerror ( http://web2py.com/book/default/chapter/04#Routes-on-Error) to redirect to an action (possibly in another application) that will handle sending the email (and whatever else you want to do with the error). Anthony On Tuesday, May 3, 2011 2:44:

[web2py] Re: doctests and @cache

2011-05-03 Thread howesc
thanks! ticket 257: http://code.google.com/p/web2py/issues/detail?id=257 i don't understand how those bits work, but feel free to point me to where the @cache might be interfering with the doctests and i'm happy to take a look.

[web2py] Re: Send E-mail on exception/Internal error

2011-05-03 Thread Massimo Di Pierro
Oops. we have this already... I forgot scripts/tickets2email.py On May 3, 1:21 pm, Dan wrote: > I guess there is no internal function to send new tickets caused by > exceptions/Internal error to a given E-mail address. What would be the > best way to implement this without hacking the core frame

[web2py] Re: Send E-mail on exception/Internal error

2011-05-03 Thread Massimo Di Pierro
If the tickets go in file system, run a backgroup web2py script that monitors the errors folder and when it finds a new file sends you the email. On May 3, 1:21 pm, Dan wrote: > I guess there is no internal function to send new tickets caused by > exceptions/Internal error to a given E-mail addre

[web2py] Re: fixed: decimal field not supported in AJAX / JSON

2011-05-03 Thread Massimo Di Pierro
will do. On May 3, 1:00 pm, vpiotr wrote: > As far as I can see decimal fields like the following are not > supported in JSON services. > >     Field('car_price', 'decimal(8,6)', requires=IS_NOT_EMPTY()), > > In functions like: > > @service.json > def getjson(): >     return mydata > > web2py fra

[web2py] Re: Customising the menu with specific classes...

2011-05-03 Thread Massimo Di Pierro
My mistake. Errata: In response.menu=[item1,item2,] instead of item1=[label,False,link] use item1=[label,False,A(label,_href=link,_class='...')] On May 3, 1:14 pm, Jason Brower wrote: > Very odd, but when I put this: > response.menu.append((A(T('register'), _href="bla", _class="

[web2py] Re: Confusion using experts4solutions

2011-05-03 Thread Massimo Di Pierro
I did not know Ross (or I did not remember). That means there are even more people doing experts4solution work than I thought. Massimo On May 3, 12:39 pm, Ross Peoples wrote: > Experts4solutions has hooked me up with someone nearby looking to do a long > term job which plans to sell a web2py app

[web2py] Re: doctests and @cache

2011-05-03 Thread Massimo Di Pierro
Interesting... please open a ticket on google code. To fix this may take some work. On May 3, 12:16 pm, howesc wrote: > Hi all, > > i'm using doctests and the nifty web2py _TEST function to call doctests on > my controllers (like in the admin app, but since i'm on GAE i am not running > through a

[web2py] Re: user data

2011-05-03 Thread Massimo Di Pierro
auth.user is a Storage object that you can dovert to a python dict with dict(auth.user) and contains the user record. It only contains the information that janrain provides to web2py. Thay may or may not include email. On May 3, 9:28 am, Resa wrote: > how do i run a query to get the user data whe

[web2py] Re: compressed field

2011-05-03 Thread Massimo Di Pierro
If you need encryption I would just store the sql database in a truecrypt folder instead of having the application handle it. On May 3, 8:59 am, Jose wrote: > On 3 mayo, 10:40, Massimo Di Pierro > wrote: > > > I never promised long term support so it is not documented anywhere I > > think.But th

[web2py] Send E-mail on exception/Internal error

2011-05-03 Thread Dan
I guess there is no internal function to send new tickets caused by exceptions/Internal error to a given E-mail address. What would be the best way to implement this without hacking the core framework? Thanks for any help.

[web2py] fixed: decimal field not supported in AJAX / JSON

2011-05-03 Thread vpiotr
As far as I can see decimal fields like the following are not supported in JSON services. Field('car_price', 'decimal(8,6)', requires=IS_NOT_EMPTY()), In functions like: @service.json def getjson(): return mydata web2py framework uses simplejson for serialization. The release version o

Re: [web2py] Re: Customising the menu with specific classes...

2011-05-03 Thread Jason Brower
Very odd, but when I put this: response.menu.append((A(T('register'), _href="bla", _class="test"), False, None, [])) I get this: href="bla" class="test">register What up with the javascript? That javascript line is making an extra bunch of content in my menu and miss aligning it... like th

[web2py] getting error while trying to deploy on gae (Google App Engine Deployment Interface)

2011-05-03 Thread geekbuntu
on step 6 of the wizard, it asks for the path to appcfg.py it automatically fills in the field with /usr/local/bin/appcfg.py the error is that it cannot find /usr/local/bin/appcfg.py this file does not exist in my hard drive profile:ubuntu 11.04 running wizard form .py in web2py folder thanks

[web2py] Re: Confusion using experts4solutions

2011-05-03 Thread Ross Peoples
Experts4solutions has hooked me up with someone nearby looking to do a long term job which plans to sell a web2py app as an appliance. Instead of getting paid up front or by the hour, I chose to take a percentage of profits, since it's just me and the other person working on it. I can only devo

[web2py] doctests and @cache

2011-05-03 Thread howesc
Hi all, i'm using doctests and the nifty web2py _TEST function to call doctests on my controllers (like in the admin app, but since i'm on GAE i am not running through admin). I just noticed today that functions that i have decorated with @cache do not run when i call _TEST. If i remove the @

[web2py] Re: text field display when writable=False

2011-05-03 Thread DenesL
db.some_table.some_text.writable = False db.some_table.some_text.represent = lambda s: XML(s.replace('\n','')) On May 3, 8:36 am, szimszon wrote: > Is there a way to replace \n with and space with in the > displayed value of text field if the field is writable=False and displayed > in crud f

[web2py] Re: user data

2011-05-03 Thread Resa
you dont have to answer this again On May 3, 9:28 am, Resa wrote: > not really a query but how do i get it at all... > > On May 3, 9:28 am, Resa wrote: > > > how do i run a query to get the user data when they sign into Janrain. > > i was trying to use: "authEmail=auth.user.email" and > > "authL

[web2py] Re: deal with CSV

2011-05-03 Thread DenesL
Are you running Windows?. Check that your list separator (which Excel uses) is set to a comma or change the delimiter used in the code. You can find the list separator in the Control Panel, under Regional Settings, Customize. On May 3, 7:38 am, cyber wrote: > I mean that after export each row i

[web2py] Re: user data

2011-05-03 Thread Resa
not really a query but how do i get it at all... On May 3, 9:28 am, Resa wrote: > how do i run a query to get the user data when they sign into Janrain. > i was trying to use: "authEmail=auth.user.email" and > "authLast=auth.user.last " to grab the data and put in a variable

[web2py] user data

2011-05-03 Thread Resa
how do i run a query to get the user data when they sign into Janrain. i was trying to use: "authEmail=auth.user.email" and "authLast=auth.user.last " to grab the data and put in a variable

Re: [web2py] Re: compressed field

2011-05-03 Thread Richard Baron Penman
have a look in gluon/dal.py to see the internals. Very convenient. On Tue, May 3, 2011 at 11:30 PM, Jose wrote: > > > On 3 mayo, 00:21, Massimo Di Pierro > wrote: > > You can easily make a custom type to do that: > > > > import xlib > > compressed = > > SQLCustomType( > > type > >

[web2py] Re: compressed field

2011-05-03 Thread Jose
On 3 mayo, 10:40, Massimo Di Pierro wrote: > I never promised long term support so it is not documented anywhere I > think.But the Sahana Eden project uses it so I continue to maintain it > until something better comes along. > > There is not much more than in the example above. > I am thinking

[web2py] Re: compressed field

2011-05-03 Thread Jose
On 3 mayo, 10:40, Massimo Di Pierro wrote: > I never promised long term support so it is not documented anywhere I > think.But the Sahana Eden project uses it so I continue to maintain it > until something better comes along. > > There is not much more than in the example above. > Thanks

[web2py] Re: EULA agreement on first login

2011-05-03 Thread Massimo Di Pierro
You may have an old web2py version. The auth.user should be re-read after editing profile. If the eula is not in profile than you have to set it manually in the action that handles he eula auth.user.eula_accepted=True On May 2, 11:10 pm, Charles Law wrote: > I'm trying to add an EULA that user

[web2py] Re: compressed field

2011-05-03 Thread Massimo Di Pierro
I never promised long term support so it is not documented anywhere I think.But the Sahana Eden project uses it so I continue to maintain it until something better comes along. There is not much more than in the example above. On May 3, 8:30 am, Jose wrote: > On 3 mayo, 00:21, Massimo Di Pierro

[web2py] Re: displaying user's local time

2011-05-03 Thread Massimo Di Pierro
jQuery(function(){jQuery('#table_field').val((new Date()).format("isoDateTime"));}); http://blog.stevenlevithan.com/archives/date-time-format On May 3, 7:20 am, niknok wrote: > How do I display the user's local time in a form?

[web2py] Re: button action

2011-05-03 Thread Massimo Di Pierro
Is question the same page that displays the link? If not you do not need the redirection because you can make the decrement via ajax. Otherwide: form[0][-1][1].append(INPUT(_type='button',_value=T('Previous') ,_onclick='document.location="%s"' %URL("question2"))) def

[web2py] Re: markitup in web2py...

2011-05-03 Thread Massimo Di Pierro
I re-sent it. On May 3, 6:29 am, villas wrote: > Yes, the author responded to me but could not remember receiving a > patch.  I asked Massimo to contact him again. > > On May 3, 4:22 am, Bruno Rocha wrote: > > > > > > > > > You have to use the markitup that is shipped with pkugin_wiki Massimo ma

[web2py] Re: compressed field

2011-05-03 Thread Jose
On 3 mayo, 00:21, Massimo Di Pierro wrote: > You can easily make a custom type to do that: > > import xlib > compressed = > SQLCustomType( >             type > ='text', >             native > ='text', >             encoder =(lambda x: zlib.compress(x or > '')), >             decoder = (lambda x:

[web2py] Re: text field display when writable=False

2011-05-03 Thread szimszon
I need it only writable=False I need to display it like: " some text other text another line " but I got only: "some textother textanother line"

[web2py] Re: Skytoop : a web desktop like, created with Web2Py on server side

2011-05-03 Thread Jose
Beautiful application. Congratulations! Jose

[web2py] Re: text field display when writable=False

2011-05-03 Thread Jose
On 3 mayo, 09:36, szimszon wrote: > Is there a way to replace \n with and space with in the > displayed value of text field if the field is writable=False and displayed > in crud form: > > db.define_table('some_table', >   Field('some_text','text',writable=False) >   ) > > crud.update(db.some

[web2py] EULA agreement on first login

2011-05-03 Thread pbreit
How about "not auth.user.eula_accepted"?

[web2py] Re: Backup Database

2011-05-03 Thread luifran
What mechanisms? On 2 mayo, 23:20, howesc wrote: > i'm a little old-skool and just use the database's backup mechanisms since > they are slightly different from db to db, but in general faster to run than > CSV dump and import. > > cfh

[web2py] text field display when writable=False

2011-05-03 Thread szimszon
Is there a way to replace \n with and space with in the displayed value of text field if the field is writable=False and displayed in crud form: db.define_table('some_table', Field('some_text','text',writable=False) ) crud.update(db.some_table,request.args(0))

[web2py] Re: compressed field

2011-05-03 Thread Plumo
excellent! I found I needed to use a blob to avoid errors: import zlib from gluon.dal import SQLCustomType compressed = SQLCustomType( type='text', native='blob', encoder=(lambda x: zlib.compress(x or '')), decoder=(lambda x: zlib.decompress(x)) )

[web2py] displaying user's local time

2011-05-03 Thread niknok
How do I display the user's local time in a form?

[web2py] Re: button action

2011-05-03 Thread niknok
+1 for the link :P On May 2, 9:36 pm, Massimo Di Pierro wrote: > http://mywiki.wooledge.org/XyProblem > > what do you want to do exactly? > > On May 1, 8:04 pm, niknok wrote: > > > > > > > > > I have this button that redirects to a URL: > > > form[0][-1][1].append(INPUT(_type='button',_value=T('

[web2py] Re: button action

2011-05-03 Thread niknok
The old function I used passed values using args. Now I'm using session variables instead, so I need a way to move forward and backward between records. I need the button to decrement the session variable, then redirect to the page. On May 2, 9:36 pm, Massimo Di Pierro wrote: > http://mywiki.woo

[web2py] Re: jquery for triggering change in dropdown list values

2011-05-03 Thread niknok
Right now, I just generate a list from the database and feed it into a IS_IN_SET validator. It worked out faster than slice 85. On May 2, 11:38 pm, Anthony wrote: > On Sunday, May 1, 2011 11:56:55 PM UTC-4, niknok wrote: > > > Thanks Anthony. > > > I've actually tried that, but it was a tad too s

[web2py] Re: deal with CSV

2011-05-03 Thread cyber
I mean that after export each row is located into one cell (if I open *.csv file in ms excel). For example, if result returns two rows all values from first row are located into A1 cell and the second one - into A2 cell. So, I need to divide each row by columns. Current divider is ",". Is there a w

[web2py] Re: markitup in web2py...

2011-05-03 Thread villas
Yes, the author responded to me but could not remember receiving a patch. I asked Massimo to contact him again. On May 3, 4:22 am, Bruno Rocha wrote: > You have to use the markitup that is shipped with pkugin_wiki Massimo made > some changes including markmin syntax which.is not in the author >

[web2py] Re: Skytoop : a web desktop like, created with Web2Py on server side

2011-05-03 Thread Alexandre Strzelewicz
Thanks a lot ! Thanks to all the Web2Py community, without this framework I couldn't do this project, I will continue to work on it and I have a lot of other projects ! (The JS Ui used is Jquery-UI) Alexandre Strzelewicz