Re: [web2py] Re: function in query

2011-02-14 Thread Manuele Pesenti
Il 14/02/2011 19:57, villas ha scritto: Well, this might not help at all... but maybe you can pick out something to give you a step forward:) I cannot see how, the problem is the introduction of a function inside an expression in which appears fields objects that contains date or datetime ob

[web2py] Re: error occurs when use executesql

2011-02-14 Thread hywang
Please help to run it :-) # File Name: default.py def index(): db.define_table("pymysql",Field("content","text"),migrate=True) content = """'http://img1.t.sinajs.cn/t3/style/css/common/ layer.css'""" #content = """this sentence is no problem at all""" db.executesql("INSERT INTO py

[web2py] Re: Suggestion for the Web2py book regarding importing and exporting data

2011-02-14 Thread johntynan
Hi Kenneth. Would it be possible to share the code you use to export and import as a csv file only the data that belongs to a particular user. Thanks kindly, JT On Jan 17, 12:47 pm, Kenneth Lundström wrote: > Appadmin already has the ability to expoert and import CSV-files. So no > need puttin

[web2py] Re: error occurs when use executesql

2011-02-14 Thread hywang
I install two different version web2pys , one is 1.91.6 and the other is 1.87.3 1.87.3 works well while 1.91.6 throws the error On 2月14日, 下午5时53分, "Martin.Mulone" wrote: > are you sure is not syntax error? > > db.executesql("insert into hytest (conent)values(%s)",content) > > "conent"

[web2py] Re: broken images

2011-02-14 Thread villas
> Why would you have another folder called layouts. I only copied what was in the other post to demonstrate a different (more recent) syntax. If you look in the views/layout.html file you will see how the other .js files are included, e.g. {{response.files.append(URL('static','js/superfish.js'))}

[web2py] Re: 'Voting and Rating' Ajax Recipe (chapter 10) not working?

2011-02-14 Thread cjrh
On Feb 15, 4:21 am, skwasha wrote: > Yah, I had some issues with that as well... Try adding adding > name="id" to the input element of the form. Apparently, the ajax > function is doing a get by name, not id. That appears to be correct, and I've fixed the book accordingly. Thanks for taking the t

[web2py] Re: "undefined record" error in appadmin on GAE

2011-02-14 Thread johntynan
Wikus, I enabled the remote api in app.yaml as you suggested. Then, after changing the path slightly in the following command: python appcfg.py create_bulkloader_config --filename=config.yaml -e $em...@gmail.com --url=https://$APP.appspot.com/_ah/remote_api your suggestion for creating a config

[web2py] Re: Is it a good idea to keep auth_user minimal?

2011-02-14 Thread Panupat
Thanks howsec. So if I want only a certain field to show up during registration, I mark the ones I want to hide with writable/readable = False right? Will doing so also prevent those field from editing later on? On Feb 15, 8:10 am, howesc wrote: > i think someone asked a similar question on this

Re: [web2py] Re: IS_IN_DB no dropdown list

2011-02-14 Thread Rage Callao
On Fri, Feb 11, 2011 at 10:30 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > import datetime > now=datetime.date.today() > > > db=DAL('mysql://cookbook:cookb...@127.0.0.1/cookbook') > > db.define_table('category', >Field('name',length=32,notnull=True,unique=True), >

[web2py] Re: powertable: howto adjust table width

2011-02-14 Thread tomt
Thanks for the response, but I had limited success. I can control the width of the scroll area, but not the header or trailer. I used the following options: table = plugins.powerTable ... table.dtfeatures['bAutoWidth'] = False table._width='700' (I wasn't quite sure what you meant

[web2py] Re: broken images

2011-02-14 Thread stargate
I am trying to figure out a proper structure. Right now i have it like this. ..//static/plugin_layouts/Optimism/images/img17.jpg Why would you have another folder called layouts. Also i am including my scripts like this Is that correct On Feb 14, 8:38 pm, villas wrote: > > > > You could

[web2py] Re: 'Voting and Rating' Ajax Recipe (chapter 10) not working?

2011-02-14 Thread skwasha
Yah, I had some issues with that as well... Try adding adding name="id" to the input element of the form. Apparently, the ajax function is doing a get by name, not id. On Feb 14, 6:21 am, Notnasiul wrote: > I'm trying to reproduce the example in the 'Voting and Rating' Ajax > Recipe from the offi

[web2py] Re: broken images

2011-02-14 Thread villas
> You could also try this format (available in more recent versions of web2py): {{=IMG(_src=URL('static','plugin_layouts',args=('layouts','optimism','images','img17.jpg')),_alt='pic',_width='90',_height='90')}}

[web2py] Re: How to create a parallel mobile site

2011-02-14 Thread howesc
is the view different or just the css? if just the css put a conditional css include in layout.html and make sure everything extends layout.html.

[web2py] Re: broken images

2011-02-14 Thread howesc
try replacing: with: what that does is use the web2py URL method to build a routes-aware URL and will make a proper URL for your image. note that i assume that your image is in this directory: ..//static/plugin_layouts/layouts/Optimism/images/img17.jpg good luck! cfh

[web2py] Re: Is it a good idea to keep auth_user minimal?

2011-02-14 Thread howesc
i think someone asked a similar question on this group recently, and there were some good opinions in that response thread if you can find it. short answer (in my opinion): it depends on the database and your style. on GAE since you can't do joins i put all the info on the auth_user table. on

[web2py] Re: GAE database namespace

2011-02-14 Thread howesc
i agree with massimo about tickets matching app namespacei also agree that it might be hard for admin to know how to deal with that. if each app i have uses a different postgres db, how does admin know where to look? cfh

[web2py] Re: Using comet sockets

2011-02-14 Thread Anthony
On Monday, February 14, 2011 6:54:28 PM UTC-5, Massimo Di Pierro wrote: > > The problem that the web server needs to keep many connections open > (whether long polling or websocket) and a normal web server cannot > handle the traffic because of too many threads. It requires an async > server li

[web2py] Re: PowerTable Issue

2011-02-14 Thread Bruno Rocha
That was a problem with absolute url paths. It is fixed in https://bitbucket.org/rochacbruno/powertable/downloads Note that in the latest version, the 'extrajs' was renamed to 'extra', you just need to change your .extrajs to .extra -- Bru

[web2py] Re: DatePicker not working

2011-02-14 Thread greenpoise
nevermind, got it..I had commented out the web2py_ajax lines thanks On Feb 14, 4:06 pm, greenpoise wrote: > Something is wrong in my app. The date picker is not working. Which > web2py files that come standard in web2py I might have edited??  the > picker is just not showing and I dont get any

[web2py] DatePicker not working

2011-02-14 Thread greenpoise
Something is wrong in my app. The date picker is not working. Which web2py files that come standard in web2py I might have edited?? the picker is just not showing and I dont get any error. THanks

[web2py] Re: format strings and multiple levels of indirection [SOLVED]

2011-02-14 Thread rocket
I think I've found the solution here: http://groups.google.com/group/web2py/browse_thread/thread/1d94e9bfc9877769 format=lambda r: r.f_tbte_project_number + r.f_client.f_name +r.f_name On Feb 14, 1:58 pm, rocket wrote: > Hi, > > I have two tables defined like this: > > db.define_table('t_c

[web2py] Re: MSSQL or MSSQL2

2011-02-14 Thread Ross Peoples
Thanks for the clarification. My existing database uses BIT fields, so I will be sticking to mssql for now. On Feb 14, 4:17 pm, Massimo Di Pierro wrote: > The difference is subtle. > > mssql is the first version of the adapter, the one that everybody > uses. It stores data as UTF8 but in ascii. T

[web2py] Importing a csv file works via the GUI but not in appadmin.py

2011-02-14 Thread bfg
Hi, I just started using web2py a few weeks ago, so I may be missing something. I have extended appadmin.py so I can export to a csv file (and then check into svn), and import a csv file (from svn). I am having no problem writing the csv file, but I cannot seem to re- populate the database with t

[web2py] Re: Using comet sockets

2011-02-14 Thread Massimo Di Pierro
The problem that the web server needs to keep many connections open (whether long polling or websocket) and a normal web server cannot handle the traffic because of too many threads. It requires an async server like tornado and/or lightweight threads like erlang or node.js. Implementing it in web2

[web2py] PowerTable Issue

2011-02-14 Thread Ialejandro
Hi everybody!! I'm using powertable plugin for a simple app I have the following: (Model) db.define_table('location', Field('name','string'),format='%(name)s') db.define_table('car', Field('name','string'), Field('model','string'), Field('loca

[web2py] where should I put those lines

2011-02-14 Thread Richard Vézina
Hello Massimo, I would like to update the languages files at startup or once in a wild... Where should I put those lines : # - import os import gluon.portalocker import cPickle from gluon.languages import read_dict, read

[web2py] Re: Using comet sockets

2011-02-14 Thread Anthony
On Monday, February 14, 2011 9:20:29 AM UTC-5, Massimo Di Pierro wrote: > > websockets use http-based long polling so I think the terminology is > correct, but I may be wrong. I'm certainly no expert, but from what I've read, it looks like websocket is a separate protocol from HTTP ( http://t

[web2py] Re: SQLFORM limit contents of dropdown

2011-02-14 Thread Ed Greenberg
Way cool, and many thanks. On Feb 14, 4:19 pm, Massimo Di Pierro wrote: > def index(): >     query = >     db.table.field.requires=IS_IN_DB(db(query),) >     form=SQLFORM(...) >     if form.accepts(...) >         ... >     return dict(form=form) > > On Feb 14, 3:06 pm, Ed Greenberg wrot

[web2py] Re: How to create a parallel mobile site

2011-02-14 Thread Chris
That works but doesn't scale - presumably you'd have to do it for every single action in every single controller. Is there a lower level bit I could hook it into? On Feb 14, 4:02 pm, Vasile Ermicioi wrote: > if is_mobile_env: >     response.view = 'index.mobile.html' > else: >     response.view =

[web2py] Re: How to create a parallel mobile site

2011-02-14 Thread Michael McGinnis
Also, you might want to look at what Ethan Marcotte has done with media queries using CSS, which he calls "responsive web design": http://www.alistapart.com/articles/responsive-web-design/ Michael McGinnis On Feb 14, 2:47 pm, Chris wrote: > Hi all, > > I'm making a site on web2py that has a mobi

[web2py] Re: Subclassing Login or getting code to run every time a user logs in

2011-02-14 Thread Massimo Di Pierro
auth.settings.login_onaccept=lambda form: do_something_with(form) the do_something_with can see session. On Feb 14, 3:08 pm, Ed Greenberg wrote: > I'd like to store some session variables on login. (Look the userid up > in another table and get some convenient stuff out of there. )   Is > there

[web2py] Re: SQLFORM limit contents of dropdown

2011-02-14 Thread Massimo Di Pierro
def index(): query = db.table.field.requires=IS_IN_DB(db(query),) form=SQLFORM(...) if form.accepts(...) ... return dict(form=form) On Feb 14, 3:06 pm, Ed Greenberg wrote: > When SQLFORM constructs an HTML form with a dropdown of foreign keys, > I need to limi

[web2py] Re: MSSQL or MSSQL2

2011-02-14 Thread Massimo Di Pierro
The difference is subtle. mssql is the first version of the adapter, the one that everybody uses. It stores data as UTF8 but in ascii. That means the length of the fields is not the number of unicode chars but the length of the utf8 encoded chars. It also uses BIT for booleans. mssql2 uses unicod

[web2py] Re: Upload Delete Checkbox

2011-02-14 Thread Massimo Di Pierro
It is bug. Please open an issue in google code. On Feb 14, 11:39 am, villas wrote: > Why does the upload.widget not show a 'delete file' checkbox for an > upload field with a 'requires' clause? > > This seems like an unnecessary limitation.  If you want to delete the > file, then who cares what t

[web2py] Re: GAE database namespace

2011-02-14 Thread Massimo Di Pierro
I feel the opposite. tickets should be in the namespace of the app. So the problem is how does admin know what the namespace should be? On Feb 14, 9:23 am, howesc wrote: > sounds like we would want tickets to automagically go to the same namespace > as admin.  though i must admit i don't use the

Re: [web2py] Re: problem nesting menu generated from database

2011-02-14 Thread danto
thank you Massimo, I wanted to generate valid html and I was not able to embed, for subcategories, inside directly using the web2py html helpers. It won me this round (time presion), but I build it just as html and got it working as follow: def catree(): # Identificando a las categorías raí

[web2py] Subclassing Login or getting code to run every time a user logs in

2011-02-14 Thread Ed Greenberg
I'd like to store some session variables on login. (Look the userid up in another table and get some convenient stuff out of there. ) Is there any way to tag onto the Auth login method AFTER login is successful and before it redirects to whatever is specified in the _next argument? Thanks, Ed G

[web2py] SQLFORM limit contents of dropdown

2011-02-14 Thread Ed Greenberg
When SQLFORM constructs an HTML form with a dropdown of foreign keys, I need to limit the records to only those that match a certain where clause. This is a master-detail problem. For instance, when displaying a detail form, we only want some of the maser records to be selectable (and even visibl

Re: [web2py] How to create a parallel mobile site

2011-02-14 Thread Vasile Ermicioi
if is_mobile_env: response.view = 'index.mobile.html' else: response.view = 'index.html'

[web2py] How to create a parallel mobile site

2011-02-14 Thread Chris
Hi all, I'm making a site on web2py that has a mobile counterpart. I'd like to be able to, once I've detected that a browser is mobile, use a different set of views but share the same controller logic. I saw that in an earlier post (http://groups.google.com/group/web2py/ browse_thread/thread/7277

[web2py] Re: broken images

2011-02-14 Thread stargate
Is there something I am doing wrong? On Feb 13, 9:14 pm, Massimo Di Pierro wrote: > Can you tell the layout name, an example of image url that you get and > what should be? > > On Feb 13, 6:50 pm, stargate wrote: > > > I just created a new site with the wizard and the template Optimism. > > When

[web2py] Is it a good idea to keep auth_user minimal?

2011-02-14 Thread Panupat
There are a whole lot of information I would like each members to have, would it be a good idea to store them into the auth_user table together with the email, username and password? Or would storing them in a separate table with the same id a better approach?

Re: [web2py] possibly difficult database form

2011-02-14 Thread Richard Vézina
On Mon, Feb 14, 2011 at 2:54 PM, rick wrote: > I'd like to do something quite challenging (in my view) with web2py. > > I have a table (products), where each product has one or more codes. > The list of possible codes are stored in a separate table (codes), and > a third table (product_codes) sto

[web2py] Reference With primarykey on Legacy Database

2011-02-14 Thread Ross Peoples
I am trying to integrate with an existing database which uses varchar primary key fields as references instead of integers. Reading the book, I found that I could still get this to work by setting primarykey=['the_field'] in the define_table definition. The table I am defining has two fields that r

[web2py] MSSQL or MSSQL2

2011-02-14 Thread Ross Peoples
I am new to web2py and I just finished reading the book and have started to develop my first application. I recently had the same problem mentioned in this thread: http://groups.google.com/group/web2py/browse_thread/thread/e620c5708f746629/2b123921e3695e77?lnk=gst&q=mssql2#2b123921e3695e77 I was w

[web2py] format strings and multiple levels of indirection

2011-02-14 Thread rocket
Hi, I have two tables defined like this: db.define_table('t_client', Field('f_name', type='string', notnull=True, label=T('Name')), format='%(f_name)s') db.define_table('t_project', Field('f_name', type='string', notnull=True, label=T('Name')), Field('f_tbte_project_number', type

[web2py] How to allow access to web2py application only from google app hosted site

2011-02-14 Thread mcwong
Hi, I have uploaded a web2py application to GAE and created a website on site.google. Is there a way to prevent users from directly accessing the web2py application and only allow access via the google site? Possibly via HTTP Post from the Google site and the web2py application will respond if som

[web2py] possibly difficult database form

2011-02-14 Thread rick
I'd like to do something quite challenging (in my view) with web2py. I have a table (products), where each product has one or more codes. The list of possible codes are stored in a separate table (codes), and a third table (product_codes) stores the relationship(s) between the product and the code

Re: [web2py] Re: .represent not representing

2011-02-14 Thread Richard Vézina
yes you are right, but I have problem with format some times don't know why... Format with that syntax : Field('myother_id','db.othertable'). And represent not work with : Field('myother_id',db.othertable) in case of crud.select, but works for crud.read... Richard On Mon, Feb 14, 2011 at 12:08

[web2py] Re: function in query

2011-02-14 Thread villas
> I use datetime.combine() it says "TypeError: combine() argument 1 must > be datetime.date, not Field" > any suggestion? Well, this might not help at all... but maybe you can pick out something to give you a step forward :) import datetime, time # create a datetime for the example d1 = datetime.

Re: [web2py] Re: Apache, Wsgi problem

2011-02-14 Thread Jonathan Lundell
On Feb 14, 2011, at 10:24 AM, Luis Díaz wrote: > ready to investigate: > > psycopg2 > > http://wiki.postgresql.org/wiki/Using_psycopg2_with_PostgreSQL > > The error could be caused by a bad query > developed? > > Could provide an app that generates the error? I'm not using it myself; I'm not

Re: [web2py] Re: Apache, Wsgi problem

2011-02-14 Thread Luis Díaz
ready to investigate: psycopg2 http://wiki.postgresql.org/wiki/Using_psycopg2_with_PostgreSQL The error could be caused by a bad query developed? Could provide an app that generates the error? Díaz Luis TSU Analisis de Sistemas Universidad de Carabobo Facultad de Odontología

Re: [web2py] Re: Apache, Wsgi problem

2011-02-14 Thread Luis Díaz
I have installed: python-psycopg2/lenny update 2.0.7-4 Question: What is the funsion of psycopg2? Díaz Luis TSU Analisis de Sistemas Universidad de Carabobo Facultad de Odontología 2011/2/14 Jonath

Re: [web2py] Re: web2py not using global http_proxy

2011-02-14 Thread Luis Díaz
Greetings. I'm waiting for the documentation ;) Díaz Luis TSU Analisis de Sistemas Universidad de Carabobo Facultad de Odontología 2011/2/14 whowhywhat > Solved the problem! :) .. wsgi has a opti

Re: [web2py] Re: Apache, Wsgi problem

2011-02-14 Thread Jonathan Lundell
On Feb 14, 2011, at 9:48 AM, Luis Díaz wrote: > > Greetings. > > I have tried to replicate the error and have had no > exicto. Thanks. What version of psycopg2 are you using? > > Environment: > virtual server 1: debian ssl web2py > virtual server 2: debian ssl postgresql > > Application: > si

Re: [web2py] Re: Apache, Wsgi problem

2011-02-14 Thread Luis Díaz
Greetings. I have tried to replicate the error and have had no exicto. Environment: virtual server 1: debian ssl web2py virtual server 2: debian ssl postgresql Application: simple queries and throwing 2 results. tool: Jmeter: Threads 1200 0.2 seconds upload Díaz Luis TSU Analisis de Sistemas U

Re: [web2py] Re: GAE local running oddity

2011-02-14 Thread Jonathan Lundell
On Feb 14, 2011, at 7:28 AM, howesc wrote: > is this a new bug in the sys.path handling? it has not be a problem for me, > and i think i am using it as recently as 1.91.6. > > also, are you restarting GAE each time you change those files? GAE > dev_appserver caches a bunch of stuff. i find th

[web2py] Upload Delete Checkbox

2011-02-14 Thread villas
Why does the upload.widget not show a 'delete file' checkbox for an upload field with a 'requires' clause? This seems like an unnecessary limitation. If you want to delete the file, then who cares what the 'requires' says? Rgds, D

[web2py] Re: .represent not representing

2011-02-14 Thread DenesL
In theory it should work but you can get the same effect with format, try: db.define_table('adres', Field('straat'), format='%(straat)s' ) and remove the represent. On Feb 12, 10:04 am, Johann Spies wrote: > I get the following output : > > inwoner.idinwoner.v

Re: [web2py] Re: Gluon tools.py - form style

2011-02-14 Thread David J.
Thanks; I guess someone else added it; But I will reference this for the future; On 2/14/11 11:25 AM, villas wrote: You can add an issue here: http://code.google.com/p/web2py/issues/list But search first to make sure not already reported. In this case I think it has (~issue 190/191). I th

[web2py] Re: Gluon tools.py - form style

2011-02-14 Thread villas
You can add an issue here: http://code.google.com/p/web2py/issues/list But search first to make sure not already reported. In this case I think it has (~issue 190/191). I think you can add comments to the issue, which is good if you have a suggested fix etc. On Feb 14, 3:47 pm, "David J." wro

Re: [web2py] Re: Gluon tools.py - form style

2011-02-14 Thread David J.
Not sure how to do that; If you could tell me so I know for the future. Thanks. On 2/14/11 10:38 AM, howesc wrote: the diff from trunk for what i think this change is attached david - do you mind adding this as a ticket in google code so that the code owners can track it? thanks, christi

[web2py] Re: Gluon tools.py - form style

2011-02-14 Thread howesc
the diff from trunk for what i think this change is attached david - do you mind adding this as a ticket in google code so that the code owners can track it? thanks, christian diff -r 01b763ebddf9 gluon/tools.py --- a/gluon/tools.pySun Feb 13 20:11:01 2011 -0600 +++ b/gluon/tools.pyMon

[web2py] Re: GAE local running oddity

2011-02-14 Thread howesc
is this a new bug in the sys.path handling? it has not be a problem for me, and i think i am using it as recently as 1.91.6. also, are you restarting GAE each time you change those files? GAE dev_appserver caches a bunch of stuff. i find that if i am editing any of the web2py core files, mod

Re: [web2py] Re: GAE database namespace

2011-02-14 Thread howesc
sounds like we would want tickets to automagically go to the same namespace as admin. though i must admit i don't use the ticket system on GAE, i just read the log messages from the console on localhost and from the "logs" like of the admin screen on production. namespaces are a new add, and p

[web2py] Re: problem nesting menu generated from database

2011-02-14 Thread Massimo Di Pierro
This def catree2(): supercategorias = db(db.t_categoria.supercategoria==None).select(db.t_categoria.id,db.t_categ oria.nombre) catree = [] for supercat in supercategorias: catree.append([supercat.nombre,False,'link']) cats = db(db.t_categoria.supercategoria==supercat.id

[web2py] Re: Using comet sockets

2011-02-14 Thread Massimo Di Pierro
websockets use http-based long polling so I think the terminology is correct, but I may be wrong. On Feb 13, 9:59 pm, Anthony wrote: > On Sunday, February 13, 2011 4:41:18 PM UTC-5, Massimo Di Pierro wrote: > > > Right now the only examples are in web2py/gluon/contrib/ > > comet_messaging.py > >

[web2py] 'Voting and Rating' Ajax Recipe (chapter 10) not working?

2011-02-14 Thread Notnasiul
I'm trying to reproduce the example in the 'Voting and Rating' Ajax Recipe from the official book (http://www.web2py.com/book/default/ chapter/10#Voting-and-Rating), but I simply cannot manage to get it working. After inserting two images in the database, I try to vote them and nothing happens. How

[web2py] Re: geo spatial GIS in web2py

2011-02-14 Thread gavin
The SAHANA project (http://eden.sahanafoundation.org) was ported last year from php to web2py and contains lots of GIS: http://eden.sahanafoundation.org/wiki/GIS On Jan 20, 7:50 am, Massimo Di Pierro wrote: > One year ago a user (do not recall his name) implemented something > like geodjango in

[web2py] Re: Web2py in combination with mod_python

2011-02-14 Thread Grezly
No, my host doesn't provide FastCGI access, so i need to use mod_python. On Feb 13, 10:08 am, cjrh wrote: > On Feb 13, 12:17 am, Grezly wrote: > > > I'm trying now for a few days to get web2py working with mod_python > > (on a shared hosting). Because i have no other options of configuring > > a

[web2py] Re: routes.py

2011-02-14 Thread Wikus van de Merwe
The syntax for url with domains is a bit more complex than what you've tried. It's "[remote address]:[protocol]://[host]:[method] [path]". To make the following rewriting: http://domain1.com/ -> http://domain1.com/d1/default/index http://domain2.com/ctr/fcn -> http://domain2.com/d2/ctr/fcn http:/

Re: [web2py] .represent not representing

2011-02-14 Thread Richard Vézina
I have the same problem... I think there is a bug. Try to do this : 'db.adres' In your model "inwoner". For me it solve the problem in old app (create in june or july that I transfert from one web2py version to an other since that time)... But not working if I am using a new freshly created app

[web2py] Re: broken images

2011-02-14 Thread stargate
I even tried creating a new application called template and then i installed the Pluralism layout plugin and applied it to the site but when i view the site all the images are broken. How do I fix this. Thanks for all the help On Feb 13, 9:14 pm, Massimo Di Pierro wrote: > Can you tell the layou

Re: [web2py] Re: problem nesting menu generated from database

2011-02-14 Thread danto
Hi, I attached the whole ticket. thanks in advance for any help. the controller remains as: CONTROLLER: === def catree2(): supercategorias = db(db.t_categoria.supercategoria==None).select(db.t_categoria.id,db.t_categoria.nombre) catree = [] for supercat in super

Re: [web2py] Re: function in query

2011-02-14 Thread Manuele Pesenti
Il 11/02/2011 18:53, Massimo Di Pierro ha scritto: db(db.mytab.date1-db.mytab.date1 == datetime.timedelta(days=2).select() must be db(db.mytab.date1 == db.mytab.date1 + datetime.timedelta(days=2).select() a query has the form field = expression. You cannot have the expression on the left-hand

[web2py] Re: error occurs when use executesql

2011-02-14 Thread Martin.Mulone
are you sure is not syntax error? db.executesql("insert into hytest (conent)values(%s)",content) "conent"

[web2py] Re: log in with username?

2011-02-14 Thread Panupat
Ok I see, there's a new empty column "username" that got created after I change the settings, need to add the username into that too. Was assuming it would be the same as "First name"

[web2py] log in with username?

2011-02-14 Thread Panupat
I seem to only be able to log in with email. When I added auth.define_tables(username=True) in db.py, it always says "invalid user" when I try to log in. I'm using the default login form, are there anything I should add into db.py to be able to login with username?

[web2py] error occurs when use executesql

2011-02-14 Thread hywang
# database is mysql # web2py version: 1.91.6, which uses pymysql as mysql driver # my codes is something like this # import gluon.tools content = gluon.tools.fetch("http://t.sina.com.cn/reg.php? inviteCode=104174") db.executesql("i