[web2py] Re: powertable problem

2011-02-04 Thread ceriox
i re-download the plugin from bitbucket and now it work (powertable.blouweb.com is not update!) but now i have another little problem... when i "open" the details of a record i see the logo of my template ... how i can personalize the interface of the details? and a new question... i can have 2 o

Re: [web2py] http and https

2011-02-04 Thread Tom Atkins
Yes - I should have said that I was assuming it was running behind Apache. With the standard setup as created by the 'setup-ubuntu.sh' or 'setup-fedora.sh' scripts (in the scripts folder) you'll already be set with a self-sigend certificate and Apache configured to send https requests to web2py.

Re: [web2py] Re: powertable problem

2011-02-04 Thread Kenneth Lundström
It should not be a problem, you need to create more virtual fields. If you look at http://powertable.blouweb.com/products and The Code, starting from row 8 you see how a new virtualfield is created. Kenneth i re-download the plugin from bitbucket and now it work (powertable.blouweb.com is n

[web2py] Re: powertable problem

2011-02-04 Thread ceriox
oh ok... but how i can associate a function link to the button? @virtualsettings(label=T('Small Picture')) def smallpicture(self): picture = IMG(_src=URL('default','download',args=self.products.picture), _border='0', _height='30px',

[web2py] Re: Unicity condition and database update

2011-02-04 Thread Joseph.Piron
Yes I understand that :) And it asks also for triggerValue if not given, but it's a bit annoying. Isn't it possible for it to get those existing values directly ? Thanks. On Feb 3, 7:38 pm, Massimo Di Pierro wrote: > The problem is that unicity must be computed but it needs triggename. > You ar

[web2py] Database design challenge

2011-02-04 Thread Johann Spies
I would like to invite web2py users who enjoy such challenges to think with me about solving the following problem: Take two tables: db.define_table('article', Field("author_id", 'list:reference outeur'), Field("title")) db.define_table('author',

[web2py] Re: powertable problem

2011-02-04 Thread ceriox
another questions... how can manage parameters in function call ? details={'detailscallback':URL('myfunction.load')} ) i want to have my row id in myfunction On 4 Feb, 09:28, ceriox wrote: > oh ok... > but how i can associate a function link to the button? > >         @

Re: [web2py] http and https

2011-02-04 Thread Martin Weissenboeck
Thanks for all answers. A second question: If I want to use port 8000 for http and 8001 for https: is it possible to write routers = dict( BASE = dict( domains = { 'http://www.domain.com:80 00' : 'myappname1', 'https://www.domain.com:

Re: [web2py] Re: powertable problem

2011-02-04 Thread Johann Spies
On 4 February 2011 11:50, ceriox wrote: > another questions... > how can manage parameters in function call ? > > details={'detailscallback':URL('myfunction.load')} > ) > > i want to have my row id in myfunction You can specify the sql-query in myfunction. I have the foll

[web2py] bug?

2011-02-04 Thread vortex
I am setting a table column 'code' as Unique. When I insert repeated rows it doesn't raise exception. db.define_table('tag', Field('code', 'string', length=24, unique=True, requires=[ IS_HEX24(error_message=err_is_hex24)]), Field('of_client', 'reference client', requires=IS_IN_D

[web2py] Re: powertable problem

2011-02-04 Thread ceriox
thanks, it works but now i have another step to do ... the CRUD don't save on db the operations.. for example it don't delete any item ... and why i have 2 id field in my form this is my function: def myfunction(): """ return a custom object to be inserted in detail for table """

Re: [web2py] Re: powertable problem

2011-02-04 Thread Bruno Rocha
2011/2/4 ceriox > thanks, > it works but now i have another step to do ... > the CRUD don't save on db the operations.. for example it don't delete > any item ... and why i have 2 id field in my form > I guess datatables JavaScript is in conflict with the JavaScript for the crud form, I have

[web2py] Re: bug?

2011-02-04 Thread vortex
Never mind. I think this is due to IS_HEX24 function. On Feb 4, 10:39 am, vortex wrote: > I am setting a table column 'code' as Unique. When I insert repeated > rows it doesn't raise exception. > > db.define_table('tag', >     Field('code', 'string',   length=24, unique=True, requires=[ >        

[web2py] Re: SQLFORM and read-only references

2011-02-04 Thread Kenneth
I´m having the same problem. In a SQLFORM I have a Field that is sometimes writable and sometimes not. If you are admin you can modify this field but not as user. Field is a reference to and other table, so admin gets a dropdown but the user gets None but he should get the selection that admin has

Re: [web2py] postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Tom Atkins
I am getting the same error as reported by Carlos and cannot fix it. I have just set up a new server (Ubuntu 10.04 - postgres 8.4, Python 2.6.5) and have web2py trunk up and running fine. I have an unmodified 'welcome' app which runs perfectly with sqlite. I then delete all the files in database

Re: [web2py] postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Tom Atkins
(PS I have tried auth.define_tables(migrate='False') and it doesn't help) On 4 February 2011 13:22, Tom Atkins wrote: > I am getting the same error as reported by Carlos and cannot fix it. > > I have just set up a new server (Ubuntu 10.04 - postgres 8.4, Python 2.6.5) > and have web2py trunk up

Re: [web2py] Database design challenge

2011-02-04 Thread w2padawan
I think the solution is use the third table "article_author" with both, author_id and article_id having an autocomplete widget. Then, add a button there to [create author if not exist][1]. I think all this can be performed in a [single form][2] kind regards. [1] http://www.web2pyslices.com/main/

[web2py] Book: "Why Web2py"

2011-02-04 Thread Michele Comitini
http://www.web2py.com/book/default/chapter/01#Why-web2py There must be an error... how one can compare Apache+mod_proxy speed Vs. Rocket?? Should that be Apache+mod_wsgi? mic

[web2py] Re: plugin_wiki routes.py

2011-02-04 Thread Igor Hercowitz
Hello Plumo, I used a solution to bypass the routes.py configuration... Instead create controllers and call those methods, I created some objects on models, instantiated them (using a file called z.py) and then called them on my default.py (like use Auth) So the only route I had to create is the o

[web2py] MySQL and web2py

2011-02-04 Thread stargate
Lets say I am running the web2py Server in windows. And for my mySQL database i am using http://www.uwamp.com/ Can web2py connect to that database using the connection string it has given in the example. What would i have to do to get the database working with web2py.

Re: [web2py] Re: form / subform / adding row (field)...

2011-02-04 Thread Richard Vézina
Here a other design I would implement... http://developer.android.com/resources/articles/contacts.html Maybe not the MIME type, but to normalize the relation in : Entity : Master result Repeated result Relation Master result one2man

Re: [web2py] MySQL and web2py

2011-02-04 Thread Bruno Rocha
I do not know how uwamp works, but for sure, web2py will connect to mysql using the connection string: mysql://username:password@localhost/test Just take the username, password, ip or host name and datatabase name in your model file define: db = DAL('mysql://username:password@localhost/test') h

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Massimo Di Pierro
You are using web2py trunk right? Did you set a sequence_name manually? On Feb 4, 7:22 am, Tom Atkins wrote: > I am getting the same error as reported by Carlos and cannot fix it. > > I have just set up a new server (Ubuntu 10.04 - postgres 8.4, Python 2.6.5) > and have web2py trunk up and runnin

Re: [web2py] MySQL and web2py

2011-02-04 Thread Vasile Ermicioi
you need to define your models before using dal expressions or you can execute raw sql db = DAL('mysql://username:password@localhost/test') list_of_dicts = db.executesql("SELECT * FROM mytable", as_dict=True)

[web2py] How do I explicitly close a database connection?

2011-02-04 Thread vortex
How do I explicitly close a database connection?

Re: [web2py] Form to Email

2011-02-04 Thread Alexandre Andrade
a sample (in portuguese, just change the name or fields): in controller: def fale_conosco(): form = SQLFORM.factory( Field('nome', requires=IS_NOT_EMPTY(error_message='Preencha o seu nome')), Field('email', requires=IS_EMAIL()), Field('motivo',requires=IS_EMPTY_OR(IS_IN_SET

[web2py] dal to use a limited number of connections

2011-02-04 Thread elffikk
hi, I use dal standalone with gevent for a high io bound program, there are thousands of users each with his own database (mysql), I update some tables with info from the web, and to make it fast I use a few hundreds greenlets, that means each has a db (DAL) object, which use a db connection how

Re: [web2py] http and https

2011-02-04 Thread Alexandre Andrade
you just need to setup it in apache, like in the book: http://web2py.com/book/default/chapter/11#mod_wsgi and: http://web2py.com/book/default/chapter/11#mod_wsgi-and-SSL Or if you use

[web2py] Re: Few general questions

2011-02-04 Thread devGS
Thanks for your reply. Regarding the first answer: does it mean that every model from my app will be called on every page refresh? Do the names of the model files have any effect? I.e. if I rename db.py to mydb.py, or change "0.py" to something else - what will happen behind the scene? Regarding m

[web2py] Create databases folder

2011-02-04 Thread Thadeus Burgess
Isn't web2py supposed to create the databases, sessions, uploads, etc folders if they don't exist? -- Thadeus

Re: [web2py] Re: Few general questions

2011-02-04 Thread Kenneth Lundström
The model files will be executed in alfabetical order. So there is a difference. Kenneth - Ursprungsmeddelande - > Thanks for your reply. Regarding the first answer: does it mean that > every model from my app will be called on every page refresh? Do the > names of the model files have a

[web2py] is this possible with computed

2011-02-04 Thread Richard Vézina
Hello Dear web2py users, I would like to achieve this. I have a referenced field 1 to many The referenced table is mostly for storing the dropdown option. So I have : IS_IN_DB(choice1, choice2, etc.) I would like to add on the same form a empty choice field that could populate the referenced

[web2py] Re: How do I explicitly close a database connection?

2011-02-04 Thread Massimo Di Pierro
db._adapter.connection.close() On Feb 4, 10:24 am, vortex wrote: > How do I explicitly close a database connection?

[web2py] Re: Create databases folder

2011-02-04 Thread Massimo Di Pierro
yes. Except on GAE. Is it not? On Feb 4, 11:36 am, Thadeus Burgess wrote: > Isn't web2py supposed to create the databases, sessions, uploads, etc > folders if they don't exist? > > -- > Thadeus

Re: [web2py] Create databases folder

2011-02-04 Thread Bruno Rocha
2011/2/4 Thadeus Burgess > Isn't web2py supposed to create the databases, sessions, uploads, etc > folders if they don't exist? > in which case? running from terminal I do: ## $ python web2py.py -S myapp -M -P web2py Enterprise Web Framework Created by Ma

Re: [web2py] Create databases folder

2011-02-04 Thread Bruno Rocha
I now removed ['cache','cron','uploads','databases','sessions'] ran web2py and it created all folders for me.

Re: [web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Tom Atkins
On 4 February 2011 14:33, Massimo Di Pierro wrote: > You are using web2py trunk right? Yes - just a clean version of web2py pulled by Hg from Google code. > Did you set a sequence_name > manually? No (not even sure what sequence_name is!) - I tried another app of my own and get the same res

[web2py] Re: postgresql error ... (relation "auth_user" already exists)

2011-02-04 Thread Massimo Di Pierro
This is a trunk bug. The problem does should be there in stable. I will fix this tonight. On Feb 4, 12:50 pm, Tom Atkins wrote: > On 4 February 2011 14:33, Massimo Di Pierro wrote: > > > You are using web2py trunk right? > > Yes - just a clean version of web2py pulled by Hg from Google code. > >

[web2py] Re: LIKE case sensitivity: Postgres differs to MySQL => DAL not portable

2011-02-04 Thread KMax
On 29 янв, 04:53, Thadeus Burgess wrote: > IMHO This breaks backwards compatibility... If .like() should match case-insensitive then this is bug fix. At http://web2py.com/book/ this does not specified explicitly. PS. .ilike for case insensitive? I think the question is, to make it available for

[web2py] IS_NOT_IN_DB failing to create a dropdown?

2011-02-04 Thread SethKinast
Hi, First off, I've already fixed my problem by coding it differently. However, I was curious as to the proper way to set up this validator so it shows a dropdown. I have two models, which can be simplified to: db.define_table('booth', Field('name','string',length=10,required=True,notnull=True

[web2py] drop support for python 2.4?

2011-02-04 Thread Massimo Di Pierro
@web2py-developers we have discussing the possibility of dropping support for Python 2.4. So far we have put a great effor t in having web2py run on 2.4 because this is the default python version on CentOS for shared hosts. Yet by dropping support we could improve the code base, make it more readab

Re: [web2py] Create databases folder

2011-02-04 Thread Thadeus Burgess
Nope not working for me. A raw checkout of a branch, there is no NEWINSTALL file, nor a welcome.w2p file since we don't need it. The app only contains controllers, cron, languages, models, modules, static, tests, views, __init__.py. >From this state, when starting web2py just by python web2py.py.

[web2py] Re: Few general questions

2011-02-04 Thread devGS
Thanks! I'd be glad to get help about the last two issues I described. On Feb 4, 7:43 pm, Kenneth Lundström wrote: > The model files will be executed in alfabetical order. So there is a > difference. > > Kenneth > > - Ursprungsmeddelande - > > > > > > > > > Thanks for your reply. Regardi

[web2py] How do I create a new child process from controller?

2011-02-04 Thread Martin
Hi All, Sorry for the bother. I would like to consult if there is a way to create a totally separated child process process unsing popen class (subprocess module) from a controller. I would like to be able to launch a new child process outside web2py execution environment when an SOAP message

[web2py] Re: How do I create a new child process from controller?

2011-02-04 Thread Massimo Di Pierro
Don't because the parent process is created by the web server (and that may not be rocket) and the web server can kill and restart processes at will. Have a separate background process make children. have the app simply queue tasks (using a task table for example) and have the background process pi

[web2py] Re: Create databases folder

2011-02-04 Thread Kurt Grutzmacher
If migrate is True on your Fields then web2py will want to have the databases directory existing first as it tries to open databases/ sql.log first. If this directory doesn't exist then an exception is thrown. web2py$ ls -FC applications/newapp/ ABOUT __init__.py cont

Re: [web2py] Re: Create databases folder

2011-02-04 Thread Thadeus Burgess
I know. I thought that this had been patched in web2py, and I was just wondering the feature got lost in the translation to the new DAL. -- Thadeus On Fri, Feb 4, 2011 at 4:16 PM, Kurt Grutzmacher wrote: > If migrate is True on your Fields then web2py will want to have the > databases directo

[web2py] Re: How do I create a new child process from controller?

2011-02-04 Thread Martin
Thank you very much Massimo for your reply! Take care!

Re: [web2py] Create databases folder

2011-02-04 Thread Jonathan Lundell
On Feb 4, 2011, at 1:19 PM, Thadeus Burgess wrote: > Nope not working for me. A raw checkout of a branch, there is no NEWINSTALL > file, nor a welcome.w2p file since we don't need it. > > The app only contains controllers, cron, languages, models, modules, static, > tests, views, __init__.py. >

Re: [web2py] http and https

2011-02-04 Thread Jonathan Lundell
On Feb 4, 2011, at 1:54 AM, Martin Weissenboeck wrote: > Thanks for all answers. > A second question: > > If I want to use port 8000 for http and 8001 for https: > is it possible to write > > routers = dict( > BASE = dict( > domains = { > 'http://www.domain.com:8000' : 'myappn

[web2py] Pull "user" out of gluon?

2011-02-04 Thread pbreit
Pardon me if this is a naive question but I'm wondering if it would make sense to pull all of the user functionality out of gluon and put it in the app? I ask because there are quite a few customizations I'd like to do and am not really sure where to start. Could not "user" be delivered from an

[web2py] Re: Create databases folder

2011-02-04 Thread Massimo Di Pierro
As Jonathan says, it is main that creates the missing folders, the first time the app is accessed. dal just assumes it is there. On Feb 4, 4:56 pm, Jonathan Lundell wrote: > On Feb 4, 2011, at 1:19 PM, Thadeus Burgess wrote: > > > Nope not working for me. A raw checkout of a branch, there is no N

[web2py] Re: Pull "user" out of gluon?

2011-02-04 Thread Massimo Di Pierro
You can do that. At three levels: 1) in models from gluon.tools import Auth class MyAuth(Auth): pass # extend as needed Auth=MyAuth 2) in controllers: normally in default.py there is def user(): return dict(form=auth()) you can move this code in another controller and break it up into seperat

[web2py] How to get request

2011-02-04 Thread walter
I define a decorator into the modules folder and try get request.args. How to do correct import of request and use it in my decorator? I try something like this: env = globals() args = env.request.args

Re: [web2py] How to get request

2011-02-04 Thread Jonathan Lundell
On Feb 4, 2011, at 2:28 PM, walter wrote: > > I define a decorator into the modules folder and try get request.args. > How to do correct import of request and use it in my decorator? > > I try something like this: > env = globals() > args = env.request.args An imported module has its own namespa

[web2py] Auth message internationalizaton

2011-02-04 Thread kawate
My last question has been solved. I dont remember the original message, but the problem is how to tranlate the message "Registration needs vefificaiton" initialized at Auth. Simply put the line T = self.environment.T and parenthese the phrases in this function. Thank you

[web2py] Re: IS_MATCH() changing a valid value ?

2011-02-04 Thread Ken
That change would have prevented my problem. However, would it guaranty that the returned (accepted) match.group() value would never differ from the input value? I am worried about more complex queries now. I still think that if IS_MATCH() finds that it has accepted something that is not the input

[web2py] Re: IS_MATCH() changing a valid value ?

2011-02-04 Thread Massimo Di Pierro
Validators are filters. They do not always return what is passed as input. It is a feature. For example IS_INT_IN_RANGE() takes a string and returns an int. IS_DATE, takes a string in the internationalization format and returns a datetime.date(). IS_SLUG(), sluggifies (probably the verb does not ex

Re: [web2py] Re: Create databases folder

2011-02-04 Thread Thadeus Burgess
I will add debugging to find out next time I am working on it. -- Thadeus On Fri, Feb 4, 2011 at 7:11 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > As Jonathan says, it is main that creates the missing folders, the > first time the app is accessed. dal just assumes it is there.

Re: [web2py] drop support for python 2.4?

2011-02-04 Thread Kenneth Lundström
I´m using CentOS on all my servers but I have nothing against dropping 2.4 support as I have allways installed python 2.5 or 2.6 beside the default 2.4. Kenneth @web2py-developers we have discussing the possibility of dropping support for Python 2.4. So far we have put a great effor t in ha

[web2py] web2py working on my iPad! :vD

2011-02-04 Thread kgingeri
I have renewed interest in using web2py for simple Google gadgets and CRUD updates to a web database, and in exploring it, wondered if I could load and use it on my iPad. Well, sure enough, I got it going! Very impressive!! Procedure is: a) jailbreak your iPad & install Cydia (a bit involved, but

Re: [web2py] drop support for python 2.4?

2011-02-04 Thread Martin Weissenboeck
Me too. Martin 2011/2/5 Kenneth Lundström > I´m using CentOS on all my servers but I have nothing against dropping 2.4 > support as I have allways installed python 2.5 or 2.6 beside the default > 2.4. > > > Kenneth > > > > @web2py-developers we have discussing the possibility of dropping > >> su

[web2py] Re: Can any help me with new dal in trunk?

2011-02-04 Thread drayco
Goodnight to everybody I think my problem with legacy databases with mysql is finished. Change the driver SQLDB by DAL and now, my old application left to give me the problem that I described above with web2py trunk version. Thank you very much everybody and my apologize because I didn't see that.

[web2py] Re: How do I explicitly close a database connection?

2011-02-04 Thread mart
I don't get it... doesn't this make you logged out because you wouldn't have auth_user anymore? then what do you do? But on the other hand could we use this to hop from one db to another (thinking through script) ? Sorry for asking ;) Mart On Feb 4, 12:57 pm, Massimo Di Pierro wrote: > db._ad