[web2py] Re: Using WrapBootstrap theme with Web2Py - possible?

2013-10-11 Thread hiro
I have tried several themes from http://bootswatch.com/ by just changing the url from the layout.html file. It have worked without any problem. I do not see why the same thing should not be true from themes from wrap-bootstrap.. On Thursday, October 10, 2013 11:17:53 AM UTC+2, Timothy Swieter w

[web2py] Re: IMAP: Insert email to Sent folder

2013-10-11 Thread IVINH
OK, I have uploaded my code: https://code.google.com/p/web2py/issues/detail?id=1707 Vào 06:18:40 UTC+7 Thứ sáu, ngày 11 tháng mười năm 2013, Alan Etkin đã viết: > > I'm try encode "utf-8", but it didn't work for me... >> > > I reproduce the problem unless you provide an example file and the code

[web2py] Re: use of onvalidation in sqlform.grid ?

2013-10-11 Thread Tim Richardson
Ignore this, it works for trunk. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Grou

[web2py] 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
routes_out = ( ('/$app/$anything', '/$anything'), ('/test/$anything', '/$anything'), ) App_name "test" controller "hello": @auth.requires(lambda: auth.has_membership(role='admin')) def function "world": return dict() in hello/world.html: {{=URL('test','hello','world')}} which r

[web2py] using legacy mysql tables

2013-10-11 Thread James Thompson
Wondering about support for legacy Mysql tables in web2py. Read the book section on legacy databases, but keep getting: keyed tables can only reference other keyed tables (for now) My mysql db and web2py models like something like this: CREATE TABLE `car_models` ( `model_id` int(10) unsigne

[web2py] Re: 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
On v 2.7.2 still not work пятница, 11 октября 2013 г., 16:10:44 UTC+6 пользователь LightOfMooN написал: > > routes_out = ( > ('/$app/$anything', '/$anything'), > ('/test/$anything', '/$anything'), > ) > > App_name "test" > > controller "hello": > > @auth.requires(lambda: auth.has_membersh

[web2py] Re: 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
Seems, the problem is here: Tools.py line 3224: next = self.here() current.session.flash = current.response.flash return call_or_redirect( self.settings.on_failed_authentication,

[web2py] Re: 2.6.4 routes out does not work with decorators

2013-10-11 Thread LightOfMooN
Ok, I found the solution. Now all works fine. Problem was in Here() function. Tools.py line 1126: def here(self): return current.request.env.request_uri I replaced it with: *def here(self):* *return URL(args=current.request.args,vars=current.request.vars)* And all works f

[web2py] Re: Database models don't import when using IPython 1.0.0 with web2py 2.7 (interactive shell)

2013-10-11 Thread Tim Richardson
work for me, python 2.7.5, ipython 1.1 on OS X On Friday, 11 October 2013 13:16:17 UTC+11, Mark Li wrote: > > I recently upgraded to the new version of web2py from 2.5 (on > Pythonanywhere); everything seems to work fine except for the interactive > shell. > > Using the command "python web2py.py

[web2py] Re: using legacy mysql tables

2013-10-11 Thread Niphlod
I don't think that you need to use the dotted notation for the reference. you just have a table whose pk is "model_id" instead of "id". Try just 'reference car_model'. PS: keyed table in web2py are when you need to pass a primarykey=[] to the table definition in your case it's just a matter

[web2py] Re: Fix Field names when exporting from SQLFORM.grid

2013-10-11 Thread Niphlod
given that the grid can display results from joined tables, using tablename.fieldname is the only way to export a good csv in all cases...if you need something different you can write your own export function On Thursday, October 10, 2013 10:31:03 PM UTC+2, Nicolas Palacios wrote: > > Hi, when

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
In v 2.7.2 don't work redirects after login and logout. How to fix it? четверг, 27 июня 2013 г., 19:36:27 UTC+6 пользователь roy...@gmx.de написал: > > > > hello together, > > my problem is , i want a simply redirect after a user is logged in. > > i am using the auth setup from web2py: > > > > my

[web2py] Re: unable to run latest version from source code

2013-10-11 Thread Tim Richardson
On Friday, 11 October 2013 04:02:14 UTC+11, Derek wrote: > Make sure you have the right version for your 64-bit python! There is 64-bit > win32 (yes, I know it sounds idiotic). > > On Wednesday, October 9, 2013 7:27:26 PM UTC-7, jarrodwilcox wrote: > > Massimo, Derek >   > Thanks for replies! >

[web2py] Newer version worse and worse

2013-10-11 Thread LightOfMooN
It's really headache for me with new 2.7.2 version of web2py. There are no more redirects after users login and logout. Double click in mirror editor on empty string leads to crash browser. (fixed by removing from admin/views/default/edit.html) Stupid needs to be removed too. It doesn't impro

Re: [web2py] Re: .ics file name

2013-10-11 Thread Richard Vézina
Great! Richard On Fri, Oct 11, 2013 at 2:50 AM, Annet wrote: > Thanks for your replies. > > I solved the problem by moving the code to generate the file name and > response.headers to the controller: > > filename='hour_' + name.replace(" ","_") + '_' + row.dayOfWeek.byday + > '_' + row.openi

[web2py] Re: Newer version worse and worse

2013-10-11 Thread 黄祥
please be patience, perhaps the experts still fixed the bug reported or make enhancement for newer version. i found one too about the grid showing field not in sequential like in table. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://git

[web2py] I am looking for technical co-founder expert in web2py for a startup

2013-10-11 Thread Gianpaolo Galli
I want to test my startup through the creation of a "minimum viable product" [ http://en.wikipedia.org/wiki/Minimum_viable_product] in the lean startup way. I want to create a bootstraped startup ( like those in http://37signals.com/bootstrapped). Here are the features that my co-founder (he/sh

[web2py] Web2py invoke PHP file

2013-10-11 Thread khaireddine Rezgui
Hi, Is there a way to invoke a php file using web2py ? I tried like this : your name: but it didn't work -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues)

[web2py] Re: Load with ajax doesn't work since upgrade > 1.6

2013-10-11 Thread Michael Helbling
yes, jquery.js and web2py.js are configured in web2py_ajax.html and jquery.js is preceding web2py.js: {{ response.files.insert(0,URL('static','js/jquery.js')) response.files.insert(1,URL('static','css/calendar.css')) response.files.insert(2,URL('static','js/calendar.js')) response.files.insert(3,

[web2py] Re: Web2py invoke PHP file

2013-10-11 Thread Massimo Di Pierro
There are two problem here. One is that these fields: are web2py fields so they are not necessary if you post to a PHP action. The other, and major, problem is with this action= "/var/www/en/gps/connect.php" That cannot be. That is a OS path, it is not a URL. The action must be the URL asso

[web2py] Pynuke CMS

2013-10-11 Thread Gour
Hello, I noticed that Bruno abandoned Movuca CMS ("project is not updated/maintained anymore") and he recommends ("If you want a stable CMS for web2py take a look at..") Pynuke (https://bitbucket.org/pynukedev/pynuke), so I wonder if anyone is using it and/or whether there is plan to provide so

Re: [web2py] Re: Database models don't import when using IPython 1.0.0 with web2py 2.7 (interactive shell)

2013-10-11 Thread Michele Comitini
I have same problem it must be ipython 1.0.0... https://code.google.com/p/web2py/issues/detail?id=1710&start=100 2013/10/11 Tim Richardson > work for me, python 2.7.5, ipython 1.1 on OS X > > > On Friday, 11 October 2013 13:16:17 UTC+11, Mark Li wrote: >> >> I recently upgraded to the new ve

[web2py] Re: auth, redirect after login

2013-10-11 Thread lesssugar
Did you try using *next* in your login function? user_auth = auth.login(next=URL('controller_name', 'function_name') On Friday, October 11, 2013 2:34:35 PM UTC+2, LightOfMooN wrote: > > In v 2.7.2 don't work redirects after login and logout. > How to fix it? > > четверг, 27 июня 2013 г., 19:36:2

[web2py] wsgi on directory

2013-10-11 Thread Vicente Deluca
Hi, I'm running web2py like wsgi ( http://web2py.com/book/default/chapter/13#mod_wsgi) and that's fine, I can access to my web2py on www.[domain].com. But I need now run the same on www.[domain].com/web2py, because on www.[domain].com are running one joomla system. What I have to modify? Thank

[web2py] Re: No row buttons in SQLFORM.grid using groupby

2013-10-11 Thread Luis Furtado
I'm afraid you're right. I'll have to find another way of creating this table with a link to each row's main table/field. Thanks On Thursday, 10 October 2013 18:34:16 UTC+1, Derek wrote: > > If you are grouping then you can't access a specific ID. You'd just be > getting aggregates back. > > On

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
Yes, I tried. It workds with login, but not with logout. пятница, 11 октября 2013 г., 22:37:20 UTC+6 пользователь lesssugar написал: > > Did you try using *next* in your login function? > > user_auth = auth.login(next=URL('controller_name', 'function_name') > > > On Friday, October 11, 2013 2:34:3

[web2py] T() lack at welcome application?

2013-10-11 Thread mcamel
Hello, There are a couple of things not being translated at the Welcome application, even after added to the language file. I think the reason is lack of T() at the code. Observed at: - Share: div at bottom-right to social networks - User Id: at user/impersonate - Group uniquely ass

[web2py] Re: auth, redirect after login

2013-10-11 Thread lesssugar
What do you mean it doesn't wok with logout? Linking your logout to /default/user/logout should log user out and simply redirect to default/index. Do you want to redirect user to other URL with /default/user/logout ? On Friday, October 11, 2013 6:58:45 PM UTC+2, LightOfMooN wrote: > > Yes, I tr

[web2py] Re: Create a drop-down menu from a database

2013-10-11 Thread Py Dev
Massimo, thank you very much for your example, but it does not work, here is my complete code: model: db.define_table('cities', Field('name'), Field('mystate'), format = '%(name)s' ) #db.cities.requires=IS_IN_DB(db, 'cities.id', '%(name)s')#IS_IN_DB(db,db.cities.id,'%(name)s') cont

Re: [web2py] T() lack at welcome application?

2013-10-11 Thread Richard Vézina
Just change your welcome and make the test!! It is easy you have done the hard work so far... Don't forget to update language files after change the app and then add your translation to the file and update the files. If you feel confident you fix that, you can pull request here : https://github.c

[web2py] My company has created the bootstrap 3 form for web2py

2013-10-11 Thread Jason (spot) Brower
We have made it but how would you like it accepted into the code? A diff here? BR, Jason Brower -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You recei

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
def logout(): auth_logout = auth.logout(next=URL('default', 'index')) return dict(auth_logout = auth_logout) in template: {{=auth_logout}} And it returns None and no redirects. Other variation: def user(): return dict(form=auth()) in template: {{=form}} If i go to url /defa

[web2py] Re: auth, redirect after login

2013-10-11 Thread lesssugar
How about a simple logout-link: Logout This also does not redirect to default/index when clicked? On Friday, October 11, 2013 7:15:03 PM UTC+2, LightOfMooN wrote: > > def logout(): > auth_logout = auth.logout(next=URL('default', 'index')) > return dict(auth_logout = auth_logout) > > in

Re: [web2py] My company has created the bootstrap 3 form for web2py

2013-10-11 Thread Michele Comitini
Hi Jason, Do you think that a fork on github and a pull request with modifications can be viable? mic 2013/10/11 Jason (spot) Brower > We have made it but how would you like it accepted into the code? A diff > here? > BR, > Jason Brower > > -- > Resources: > - http://web2py.com > - http://we

[web2py] Re: My company has created the bootstrap 3 form for web2py

2013-10-11 Thread Derek
I would think a pull request in github. https://github.com/web2py/web2py On Friday, October 11, 2013 10:09:47 AM UTC-7, encompass wrote: > > We have made it but how would you like it accepted into the code? A diff > here? > BR, > Jason Brower > > -- Resources: - http://web2py.com - http://web

Re: [web2py] Pynuke CMS

2013-10-11 Thread Michele Comitini
I opened an issue: https://bitbucket.org/pynukedev/pynuke/issue/54/internationalization-support 2013/10/11 Gour > Hello, > > I noticed that Bruno abandoned Movuca CMS ("project is not > updated/maintained anymore") and he recommends ("If you want a stable CMS > for web2py take a look at..")

[web2py] Re: DAL query: include aggregate in a SQLFORM.grid column .. no can do?

2013-10-11 Thread Derek
The grid is great for getting simple apps up quickly, but it's not your only option. It will take more time, but you can build your own grid, or even use jqgrid ( http://www.web2pyslices.com/slice/show/1400/jqgrid-and-web2py). On Tuesday, October 8, 2013 4:31:55 AM UTC-7, Tim Richardson wrote: >

[web2py] Re: Blank screen from app/admin/edit button

2013-10-11 Thread Dave S
On Thursday, October 10, 2013 12:49:10 PM UTC-7, Paolo Caruccio wrote: > > Maybe the issue is due to bad ajax caching in opera. > > @Dave S > Please replace the function "load_file(url)" in > "admin/static/js/ajax_editors_js" file with: > Short answer: I still got a blank page within the nav-b

[web2py] Re: Mini crawler/indexer for your pages (not web2py)

2013-10-11 Thread Dave S
On Thursday, October 10, 2013 7:13:27 PM UTC-7, Massimo Di Pierro wrote: > > I wrote this today. Perhaps it can be used to some of you: > > https://gist.github.com/mdipierro/6624cb39851ca750bb2b > Nice! Thank you! /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Re: Column ordering in SAQLFORM.grid

2013-10-11 Thread Stefaan Himpe
Hi, def index(): form = SQLFORM.grid(db.stazione, fields={db.stazione.codice,db.stazione.sito_id,db.stazione.data_prelievo}, ... You could try: fields = [db.stazione.codice, db.stazione.sito_id, db.stazione.data_prelievo] i.e. [] instead of {} HTH, Stefaan. -- Resources: - http://we

[web2py] Re: Blank screen from app/admin/edit button

2013-10-11 Thread Paolo Caruccio
Thank you Dave S for testing my code. I reproduced the issue in my enviroment: windows8 and opera 12.16. Then I searched for a solution and the issue is gone away by applying the posted code. In summary I have only added to original function: contentType: 'application/json', cache: false, I had

[web2py] Re: Load with ajax doesn't work since upgrade > 1.6

2013-10-11 Thread Niphlod
can you pack a minimal app to reproduce the behaviour please ? I can't reproduce the issue you're seeing On Friday, October 11, 2013 8:55:19 AM UTC+2, Michael Helbling wrote: > > > yes, jquery.js and web2py.js are configured in web2py_ajax.html and > jquery.js is preceding web2py.js: > {{ > resp

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
I use just such link. But the problem is, that when user click on it, He logout and stays on /default/user/logout page. It's terrible. пятница, 11 октября 2013 г., 23:18:19 UTC+6 пользователь lesssugar написал: > > How about a simple logout-link: > > Logout > > This also does not redirect to defa

[web2py] Re: Newer version worse and worse

2013-10-11 Thread Niphlod
from the developer point of view, these kind of posts make my head spin a little bit. 2.4.6 was released 6 months ago: where were you in this timespan ? First of all, you're reporting bugs that belongs more to codemirror than web2py itself. My browser doesn't crash when double clicking on an e

Re: [web2py] Re: Database models don't import when using IPython 1.0.0 with web2py 2.7 (interactive shell)

2013-10-11 Thread Massimo Di Pierro
I cannot reproduce this. On Friday, 11 October 2013 09:03:00 UTC-5, Michele Comitini wrote: > > I have same problem it must be ipython 1.0.0... > > https://code.google.com/p/web2py/issues/detail?id=1710&start=100 > > > > > 2013/10/11 Tim Richardson > > >> work for me, python 2.7.5, ipython 1.1 on

Re: [web2py] Re: Load with ajax doesn't work since upgrade > 1.6

2013-10-11 Thread José Luis Redrejo
Movuca app from Bruno, available at Github has this behaviour. El 11/10/2013 21:05, "Niphlod" escribió: > can you pack a minimal app to reproduce the behaviour please ? I can't > reproduce the issue you're seeing > > On Friday, October 11, 2013 8:55:19 AM UTC+2, Michael Helbling wrote: >> >> >> y

[web2py] Re: wsgi on directory

2013-10-11 Thread Niphlod
you have to play hard with apache rewrite rules I'm not an expert on apache configs (as soon as nginx was out, it was clear to me that its syntax was more understandable to me) but basically you need to tell your apache that everything coming to / should be passed to joomla, except /web2py/

[web2py] Re: auth, redirect after login

2013-10-11 Thread lesssugar
If you use the newest version, it's most probably a bug. Give the guys time to fix it or move back to previous stable version. On Friday, October 11, 2013 9:10:12 PM UTC+2, LightOfMooN wrote: > > I use just such link. But the problem is, that when user click on it, He > logout and stays on /defa

Re: [web2py] Re: Load with ajax doesn't work since upgrade > 1.6

2013-10-11 Thread Niphlod
talking about minimal app, heh anyway, better than nothing. taken movuca, setupped, doesn't work (as advertised in web2py's changelog). Take web2py.js from welcome and overwrite web2py.js in /static/bootstrap/js/web2py.js Next issue, movuca ships jquery 1.7.1 (november 2011). web2py.js requir

Re: [web2py] Re: Load with ajax doesn't work since upgrade > 1.6

2013-10-11 Thread José Luis Redrejo
El 11/10/2013 21:52, "Niphlod" escribió: > > talking about minimal app, heh anyway, better than nothing. I know, but I am answering from my phone, without a PC available ;) > taken movuca, setupped, doesn't work (as advertised in web2py's changelog). > Take web2py.js from welcome and overwri

[web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Diogo Munaro
Nobody knows? Em quinta-feira, 10 de outubro de 2013 11h08min42s UTC-3, Diogo Munaro escreveu: > > Hey guys, I have a menu with 3 elements. > > When I try it: > > {{=MENU(response.contextmenu,_ > > class="catalogo_topo_menu",li_class='textcenter',li_first="textcenter",li_last="textcenter")}} > >

[web2py] Re: onselect ajax...

2013-10-11 Thread Avi A
No, I don't have it and I changed it to get echo.load and that solve that issue, but it still renders the table instead of rendering the dict in the for loop, which should render the dropdown. This is a video of what it does: http://goo.gl/DWHqrp Thanks. On Friday, October 11, 2013 1:11:34 AM UTC

[web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Massimo Di Pierro
li_class is only used for list items which contain sub-menus. It is not for mid elements. I do not think anything has changed there. Do you think it has? Massimo On Thursday, 10 October 2013 09:08:42 UTC-5, Diogo Munaro wrote: > > Hey guys, I have a menu with 3 elements. > > When I try it: > >

[web2py] Issues with integers

2013-10-11 Thread Stefan Pochmann
I'm getting an "enter an integer between -1e+100 and 1e+100" error message when trying to enter 7 into an integer form field in the appadmin. Screenshot: http://tinypic.com/r/minx2c/5 Clearly the number is in that range, what's wrong? I'm doing the "images" example from chapter 3

[web2py] Re: Load with ajax doesn't work since upgrade > 1.6

2013-10-11 Thread Michael Helbling
These differences between the old and the new compileapp.py are making the difference between working and not working: 173,178c174,177 < statement = "web2py_component('%s','%s');" % (url, target) < script = SCRIPT(statement, _type="text/javascript") < if not content is

[web2py] html2canvas to db

2013-10-11 Thread Ruud Schroen
Hi, I am creating a app which uses html2canvas to create a screenshot of all content inside a specific div. It generates a canvas which acts as the screenshot. Now it is also possible to generate a image which you can download directly. Is it possible to upload this as a image to a db record?

[web2py] windows script to run locally

2013-10-11 Thread Carlos Cesar Caballero Díaz
Hi, sometimes I need to deploy aplications to run locally and I write this bash script for linux PCs that help to run a web2py application like a desktop one, starting the web2py app in a browser, and killing the web2py process when the browser is closed: #!/bin/bash WEB2PY_PORT="2024"

Re: [web2py] Newer version worse and worse

2013-10-11 Thread Roberto Perdomo
El oct 11, 2013 8:25 AM, "LightOfMooN" escribió: > > It's really headache for me with new 2.7.2 version of web2py. > > There are no more redirects after users login and logout. > Double click in mirror editor on empty string leads to crash browser. (fixed by removing from admin/views/default/edit

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
It's really strange. I moved back to 2.4.6 and the problem still remain. But in our other server with 2.4.6 web2py there are no that problem. I tested both servers on the same app. суббота, 12 октября 2013 г., 1:30:31 UTC+6 пользователь lesssugar написал: > > If you use the newest version, it's m

[web2py] Re: Issues with integers

2013-10-11 Thread Massimo Di Pierro
It is a bug in validator with numbers where int(float(x))!=int(x). I no fixed it in trunk. There may still be problems with the fact that this number is so large that may not be store in a database integer and requires a database big-int. I also changed the default validator for integers to be

[web2py] Re: Newer version worse and worse

2013-10-11 Thread Massimo Di Pierro
Let's keep this thread about the problem with the editor. @LightOfMooN, please send us more info about browser and os. The redirect issue will be addressed on a different thread. I am working on it trying to reproduce it. On Friday, 11 October 2013 07:55:55 UTC-5, LightOfMooN wrote: > > It's re

Re: [web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Diogo Munaro
Thx Massimo, but how could I make it? It's working with first and last. How could I insert for mid elements? 2013/10/11 Massimo Di Pierro > li_class is only used for list items which contain sub-menus. It is not > for mid elements. > I do not think anything has changed there. Do you think it

[web2py] Re: auth, redirect after login

2013-10-11 Thread Massimo Di Pierro
I cannot reproduce any of your problems. The redirection works fine for me in 2.7.2. Something else may be affecting your redirection. There are some error in your code, although, not cause of your problem: def register_user(): register = auth.register() if register.process().accepted:

[web2py] Re: thread._local' object has no ANY attribute

2013-10-11 Thread Massimo Di Pierro
I am not sure about your workflow but unless there is an HTTP request that executes the models current.db is not set. The current.db only lives for the short time while a request is being processed, unless you run your tests using python web2py.py -S app -M -R test_script.py There is a discuss

[web2py] Re: onvalidation upload size

2013-10-11 Thread Massimo Di Pierro
If you read the file (csv.reader(sent_file) or sent_file.readlines(), etc.) you then have to rewind it: sent_file.seek(0) On Tuesday, 23 July 2013 21:18:07 UTC-5, __pyslan__ wrote: > > Hello everybody. > > > I'm trying upload files with SQLFORM.grid. > > Model: > > FilesUploaded = db.define_t

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
I changed in gluon/tools.py line 2421: next = self.settings.logout_next with: next = self.get_vars_next() And now logout redirects users, if there is _next var in the url. So, now all works fine, but I don't know, what other effects may occur this replacement. пятница, 11 октября 2013 г.

[web2py] Re: Newer version worse and worse

2013-10-11 Thread LightOfMooN
OS Ubuntu 12.04 Tested browsers Firefox 24.0 and Google Chrome 30.0.1599.69 m суббота, 12 октября 2013 г., 4:14:28 UTC+6 пользователь Massimo Di Pierro написал: > > Let's keep this thread about the problem with the editor. @LightOfMooN, > please send us more info about browser and os. > > The re

[web2py] Re: field show in grid is not sequential

2013-10-11 Thread Massimo Di Pierro
Fixed in trunk. Will release 2.7.3 soon. On Wednesday, 9 October 2013 20:13:34 UTC-5, 黄祥 wrote: > > hi, > > i realize that in the new version of web2py 2.7.x the field show in grid > is not sequential without explicit it in the fields. > > e.g. > models/db.py > db.define_table('model', > Fiel

Re: [web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Massimo Di Pierro
But why do you need it? You can refer to elements using jQuery('.catalogo_topo_menu li') and you can use the jQuery addClass method to do it client side. Massimo On Friday, 11 October 2013 17:19:09 UTC-5, Diogo Munaro wrote: > > Thx Massimo, but how could I make it? > > It's working with first

[web2py] Re: Issues with integers

2013-10-11 Thread Stefan Pochmann
Thanks. And I'm actually relieved, the 100 digits allowance had made me worried about speed. However, I think you now reject all negative numbers, because: >>> str(-42).isdigit() False None of the many examples (and thus maybe none of your tests? don't know the system well yet) try negative nu

[web2py] Re: Issues with integers

2013-10-11 Thread Massimo Di Pierro
g. fixed. Thanks for checking it. Please check again. On Friday, 11 October 2013 17:16:59 UTC-5, Stefan Pochmann wrote: > > Thanks. And I'm actually relieved, the 100 digits allowance had made me > worried about speed. However, I think you now reject all negative numbers, > because: > > >>>

Re: [web2py] Newer version worse and worse

2013-10-11 Thread LightOfMooN
I think, that framework should be more clean. So, if somebody wants some scripts to make his work easier, he should install it himself. When I type *left_arrow*div <> *left_arrow* /div. So, i expect to get , but I get div> instead. I want to decide myself, when to open and when to close tags. с

[web2py] Re: Newer version worse and worse

2013-10-11 Thread Massimo Di Pierro
Since we have problems reproducing two of your issues (redirect after login and editor js) I suspect you have an incomplete installation. Did you upgrade via admin? I suggest you get a clean web2py_src.zip and unzip over the existing one. Anyway, wait one hour and I will have a 2.7.3 with fixes

Re: [web2py] Re: Newer version worse and worse

2013-10-11 Thread Roberto Perdomo
We can add an option button in the editor config page to enable autoclose tags El oct 11, 2013 6:40 PM, "Massimo Di Pierro" escribió: > Since we have problems reproducing two of your issues (redirect after > login and editor js) I suspect you have an incomplete installation. Did you > upgrade via

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
So, that Ubuntu 12.04 web2py 2.7.2 http://welcome.all-shops.info Try to login and logout with profile email: he...@world.com password: helloworld And see, that redirects don't work. Administrative interface: https://all-shops.info/admin/ Password for administrative interface: helloworld -- Re

[web2py] Re: Newer version worse and worse

2013-10-11 Thread LightOfMooN
To reproduce redirect problems please look here: https://groups.google.com/forum/#!topic/web2py/qZFL6kLNIp0 суббота, 12 октября 2013 г., 5:10:55 UTC+6 пользователь Massimo Di Pierro написал: > > Since we have problems reproducing two of your issues (redirect after > login and editor js) I suspe

[web2py] Re: Blank screen from app/admin/edit button

2013-10-11 Thread Dave S
On Friday, October 11, 2013 12:02:55 PM UTC-7, Paolo Caruccio wrote: > > Thank you Dave S for testing my code. > I reproduced the issue in my enviroment: windows8 and opera 12.16. Then I > searched for a solution and the issue is gone away by applying the posted > code. In summary I have only a

[web2py] Best way to migrate from sqlite to postgresql (or other db)

2013-10-11 Thread François Delpierre
Hi, For performance reason I would like to migrate my DB from sqlite to postgreSQL DB. What's the best way to do it. I spent some time with the export / db.import_from_csv_file(open('somefile.csv', 'rb')) and I just feel like I'm loosing my time for 2 hours. After trying to fix various problems

[web2py] Re: field show in grid is not sequential

2013-10-11 Thread 黄祥
thank you very much. it works well now, tested in web2py 2.7.3 stable version, os windows 7. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Iss

[web2py] Re: windows script to run locally

2013-10-11 Thread Dave S
On Friday, October 11, 2013 7:18:04 AM UTC-7, Carlos Cesar Caballero Díaz wrote: > > Hi, sometimes I need to deploy aplications to run locally and I write > this bash script for linux PCs that help to run a web2py application > like a desktop one, starting the web2py app in a browser, and killin

[web2py] Re: auth, redirect after login

2013-10-11 Thread Massimo Di Pierro
This helps. You are right there is a problem with logout next. That is now fixed in trunk based on your suggestion. The problem about login I cannot reproduce. I deleted your other post. Never post your admin password. That would give full access to your server to everybody. Make sure you chang

[web2py] Re: onselect ajax...

2013-10-11 Thread Derek
Pretty strange. My example as shown in the web2pyslices site works just fine. On Friday, October 11, 2013 1:30:46 PM UTC-7, Avi A wrote: > > No, I don't have it and I changed it to get echo.load and that solve that > issue, but it still renders the table instead of rendering the dict in the > f

[web2py] Re: onselect ajax...

2013-10-11 Thread Derek
perhaps you didn't save the echo.html in the proper folder? On Friday, October 11, 2013 5:34:56 PM UTC-7, Derek wrote: > > Pretty strange. My example as shown in the web2pyslices site works just > fine. > > On Friday, October 11, 2013 1:30:46 PM UTC-7, Avi A wrote: >> >> No, I don't have it and I

[web2py] Re: Best way to migrate from sqlite to postgresql (or other db)

2013-10-11 Thread Massimo Di Pierro
Did you try from shell: python web2py.py -S app -M -P db.export_to_csv_file(open('backup.csv','wb')) exit and change DAL('sqlite:') to DAL('postgres:...') python web2py.py -S app -M -P db.import_to_csv_file(open('backup.csv','rb'),id_map={}) It will not preserve the IDs but it sho

Re: [web2py] Re: li_class on Menu doesn't work

2013-10-11 Thread Diogo Munaro
Ok, thx... li_first and li_last confused me. I think I could put mid li classes on server side like li_first and li_last do. Thx for explanation Em 11/10/2013 20:00, "Massimo Di Pierro" escreveu: > But why do you need it? You can refer to elements using > > jQuery('.catalogo_topo_menu li') and y

[web2py] Re: Issues with integers

2013-10-11 Thread Stefan Pochmann
It's better, but... Outside character classes, the "-" is not a metacharacter and thus doesn't need a backslash. So it could/should be: re.compile('^-?\d+$') You might want to accept a plus sign like in "+43" (Python's int(...) does accept it), so: re.compile('^[-+]?\d+$') Or don't reinvent Py

[web2py] Re: Issues with integers

2013-10-11 Thread Massimo Di Pierro
I am adding the +- but we cannot use int because int("3.14") would round. Anyway, I agree this can be rewritten better. Feel free to post your patch on google code or as a github pull request. Thanks. Massimo On Friday, 11 October 2013 20:05:29 UTC-5, Stefan Pochmann wrote: > > It's better, but

[web2py] Re: html2canvas to db

2013-10-11 Thread IVINH
You can try it: in view: function update() { var url = '{{=URL(f="update",args=request.args,vars=request.vars)}}'; var data = document.getElementById('drawcomment').toDataURL("image/png"); $.ajax({ url: url, type: "GET", data: {'data':data}, success: function (html) { $('#results').html(html); }

[web2py] sqlform.grid boolean field search doesn't return any rows

2013-10-11 Thread Adi
Search: table.field = "on" (shows rows with "T") table.field != "on" (no rows, even though there are some "F"'s) 2.7.3-stable+timestamp.2013.10.11.19.30.17, MySQL, field defined as boolean, char(1) I think this worked, but haven't used it in some time. -- Resources: - http://web2py.com - http

[web2py] Re: using legacy mysql tables

2013-10-11 Thread James Thompson
I tried it without the dotted notation, it gets rid of the error message, but in the admin interface it shows raw integer values for the foreign key fields rather than the value from the referenced table. Do I need to add something else? On Friday, October 11, 2013 2:02:42 AM UTC-10, Niphlod wr

[web2py] Re: Issues with integers

2013-10-11 Thread Massimo Di Pierro
Actually int("3.14") does not round. int(3.14) does. On Friday, 11 October 2013 20:43:54 UTC-5, Massimo Di Pierro wrote: > > I am adding the +- but we cannot use int because int("3.14") would round. > > Anyway, I agree this can be rewritten better. Feel free to post your patch > on google code o

[web2py] Re: sqlform.grid boolean field search doesn't return any rows

2013-10-11 Thread Massimo Di Pierro
there are the only valid queries involving a boolean: table.field == True table.field == False table.field == None table.field != True table.field != False table.field != None On Friday, 11 October 2013 21:19:52 UTC-5, Adi wrote: > > Search: > table.field = "on" (shows rows with "T") > table.fie

Re: [web2py] Re: Newer version worse and worse

2013-10-11 Thread Roberto Perdomo
https://github.com/web2py/web2py/pull/248 Please check and comment/send suggestions if you find errors. Tested with Chrome in Mac OS X 2013/10/11 LightOfMooN > To reproduce redirect problems please look here: > https://groups.google.com/forum/#!topic/web2py/qZFL6kLNIp0 > > суббота, 12 октября

[web2py] Re: Issues with integers

2013-10-11 Thread Stefan Pochmann
I see you used unnecessary backslashes again in [\+\-], is that some web2py convention or so? It's equivalent to just [+-] and [-+] because inside character classes, "+" is not a metacharacter and "-" acts as regular character when placed right after "[" or right before "]". You can even find [

[web2py] Re: Issues with integers

2013-10-11 Thread Stefan Pochmann
Did you try that? It doesn't round that for me: >>> int("3.14") Traceback (most recent call last): File "", line 1, in int("3.14") ValueError: invalid literal for int() with base 10: '3.14' It does round int(3.14), so if floats are a possible input there, you could do int(str(value)) inst

[web2py] Re: Issues with integers

2013-10-11 Thread Massimo Di Pierro
I just like to err on the safe side. I did not notice the recommendation from the Python documentation. I changed as you suggested. :-) On Friday, 11 October 2013 21:37:47 UTC-5, Stefan Pochmann wrote: > > I see you used unnecessary backslashes again in [\+\-], is that some > web2py convention

[web2py] Re: auth, redirect after login

2013-10-11 Thread LightOfMooN
Thanks, but it was not necessary :) It was the special server to show the problem. The problem about login: If there are no _next var, I think, it should redirect to auth.settings.login_next url, but it doesn't happen. суббота, 12 октября 2013 г., 6:32:09 UTC+6 пользователь Massimo Di Pierro на