[web2py] execute sql statement at create only

2010-08-30 Thread Manu
Hi , I would like to execute a statement only the first time the database is create by inserting a fake record and never anymore then . Where should i put that code ? Thx E.

[web2py] inital setup controller/route

2010-09-07 Thread Manu
Hi , I would like to know if it would make sense to have a initial setup controller to run initialisation scripts , adjust few parameters , ... to a web2pyapp. Something like first time you try to access the app you are redirected to this controller and never anymore ? Does someone already implem

[web2py] adding a js file to an inherited template file

2010-09-16 Thread Manu
Hi , I have a file body.html that extend layout.html , is it possible to add a new javascript reference inside the body.html ? Thx

Re: [web2py] Re: adding a js file to an inherited template file

2010-09-16 Thread Manu
many thanks On Thu, Sep 16, 2010 at 1:50 PM, mdipierro wrote: > before {{extends...}} > > {{response.files.append(URL())}} > > On Sep 16, 4:31 am, Manu wrote: >> Hi , >>   I have a file body.html that extend layout.html , is it possible to >> add a ne

[web2py] addClass to an item with ajax

2010-09-16 Thread Manu
Hi, Instead of changing the value of a field i would like to dynamically add a class to an item from an ajax request if the request succeeded. Is it possible to that with the ajax function provided by the web2py framework. It seems that we can only specify a target and not a function to call ? Ho

[web2py] timestamp update from a crud form

2010-09-30 Thread Manu
Hi I need some help with a simple thing , My DB is defined this way : db.define_table('test', Field('message'), Field('date',datetime), ) I would like to ensure that when the form is created with form = crud.create('test') , that when i submit my form the timestamp is updated with the in

Re: [web2py] Re: timestamp update from a crud form

2010-09-30 Thread Manu
;, >  Field('message'), > > Field('saved_on','datetime',default=request.now,writable=False,readable=False), > ) > > and then you can use > > form = crud.create(db.test) > > On Sep 30, 12:00 pm, Manu wrote: >> Hi >>   I need

Re: [web2py] Re: timestamp update from a crud form

2010-09-30 Thread Manu
Let me be more acurate , this is a stripped down version of my app: in my model i have defined the test table, db.define_table('test', Field('message'), Field('saved_on','datetime', default = datetime.now()), ) if if my action i have something like def create(): form = crud.create('test')

[web2py] javascript in layout.html

2010-09-30 Thread Manu
Hi, What is the reason to not have these functions into a dedicated external file. By including it in the html page we can't use the browser cache and we need to transfer it again and again , sounds me a waste of time transfer and bandwidth. As i am not a web expert ( i am actually learning with

Re: [web2py] javascript in layout.html

2010-09-30 Thread Manu
dinamicaly by 'web2py_ajax.html'  which builds the >> JS script at runtime, as this uses string interpolation to build scripts, >> this could not be stored in a separate file. >> I guess thats the reason. >> 2010/9/30 Manu >>> >>> Hi, >>>

Re: [web2py] javascript in layout.html

2010-09-30 Thread Manu
> I think putting that 17 lines in 'layout.html' is not a good idea, because > 'layout.html' are there for you to replace or customize, putting more JS out > there, users will need to implement that by their own. I totally agree with that just in case people doesn't want to have many small files ar

Re: [web2py] Re: web2py 1.86.1 is OUT

2010-10-03 Thread Manu
Hi , I have tried this release and have some issues with the Windows release . Here is the log generated when i start the web2py_no_console.exe . Traceback (most recent call last): File "web2py.py", line 17, in File "gluon/widget.py", line 25, in File "gluon/main.py", line 44, in File

Re: [web2py] Re: web2py 1.86.1 is OUT

2010-10-03 Thread Manu
Thx Massimo , It works perfectly on windows now! On Mon, Oct 4, 2010 at 4:16 AM, mdipierro wrote: > Fixed in 1.86.2 > > incidentally I discovered the win binary was missing login_methods and > both osx and win binaries were missing pyfpdf. > > I am surprised nobody noticed. This was an error in t

[web2py] model across multiple file order resolution

2010-10-25 Thread Manu
Hi , I was looking at the db.py file and in the section regarding the table definition , there is a note advertising the possibility to split the model accross multiple model files. It sounds interesting but i was wondering how can we enforce the order these files will be loaded/executed into th

Re: [web2py] Re: web2py 1.88.1 is OUT

2010-10-30 Thread Manu
Hi , Not playing in the same league as everyone here , but definitely think that providing better unit tests + ui tests will definitely serve many purposes . First will ensure that release goes smoother and also will be a distinctive advantage over concurrence ( not sure if anyone else has some

Re: [web2py] FYI - Google Refine - transforms messy data

2010-11-11 Thread Manu
This is an amazing app ! On Fri, Nov 12, 2010 at 12:48 AM, mikech wrote: > Just in case you didn't see this impressive piece of software, here is > the link: http://code.google.com/p/google-refine/ > > The videos are well worth watching, and the app is a desktop program > so you don't have to sha

Re: [web2py] Re: web2py 1.89.1 is OUT

2010-11-12 Thread Manu
It s absolutely beautiful on windows. On Fri, Nov 12, 2010 at 4:46 PM, mdipierro wrote: > Congratulations to all those how contributed (whose names are in the > hg logs) because this is a beautiful version. > > If your name is not mentioned in the who.html page and you think it > should be please

Re: [web2py] web2py 1.89.2 is OUT

2010-11-16 Thread Manu
e process ( i have started the web2py_no_console exe ) . I guess that this is the process locking the dll Manu On Tue, Nov 16, 2010 at 8:04 PM, mdipierro wrote: > Please check it. > > It is almost minor bug fixes. > >

[web2py] Getting the focus of the tk gui

2010-12-20 Thread Manu
Hi , Here is my 2cents tip to earn few seconds when i lauch web2py !!! I usually add these lines to the widget.py file to ensure that i get the focus as soon as i start the application to enter my password and have also bound the RETURN key to the start method self.password = Tkinter.Ent

Re: [web2py] Re: Getting the focus of the tk gui

2010-12-20 Thread Manu
them? > > On Dec 20, 4:26 pm, Manu wrote: >> Hi , >> Here is my 2cents tip to earn few seconds when i lauch web2py !!! >>   I usually add these lines to the widget.py file to ensure that i get >> the focus as soon as i start the application to enter my password a

Re: [web2py] Re: Getting the focus of the tk gui

2010-12-20 Thread Manu
Many thx On Mon, Dec 20, 2010 at 11:58 PM, mdipierro wrote: > Since clicking not automatically starts the server, I changed > the order of the entry widgets. I hope this ok. > > On Dec 20, 5:57 pm, mdipierro wrote: >> Uploading to trunk, thanks >> >> O

[web2py] CSS probleme

2010-12-25 Thread Manu
Hi I have noticed few small issues with the current CSS file . When you create a SQLFORM , the style is not uniform accross the different part of your form for ex: the id, upload field and submit button don't have the same style as the other field Thx Emmanuel

[web2py] IS_IN_SET validator

2010-12-30 Thread Manu
Hi , I have a database which contains a list:string field type and a requirement to be in a set of value ( with IS_IN_SET AND multiple=True ) . My question is how would you dynamically generate this set( my categories are stored in another table ) ? What i am trying to do is to allow user to sel

Re: [web2py] Re: IS_IN_SET validator

2010-12-30 Thread Manu
Any idea how properly doing it , should i try to create a new validator ( mixing IS_IN_SET and IS_IN_DB ) ? On Thu, Dec 30, 2010 at 8:04 PM, mdipierro wrote: > this is not currently supported. > > On Dec 30, 1:20 pm, Manu wrote: >> Hi , >> >>   I have a database w

Re: [web2py] Re: Not open source yet... but

2010-12-30 Thread Manu
It is awesome, like it . Just looking at the video i have learn a lot of new tools( websocket, processing.js, html5 canvas ) . Even if i understood that web2py was the main tool here , would it be possible to have the websocket part of rocket so that we can play with this kind of tool too ( i am w

Re: [web2py] Re: IS_IN_SET validator

2010-12-30 Thread Manu
validators already in the code or should I write mine ? Thx On Thu, Dec 30, 2010 at 11:03 PM, mdipierro wrote: > I was mistaken. I misunderstood. I am still not sure I understand. Can > you make an example? > > On Dec 30, 2:04 pm, mdipierro wrote: >> this is not currentl

[web2py] internal style sheet

2011-01-03 Thread Manu
Hi I would like to know if it would be possible to pass a internal stylesheet to a resonse object ? for inst ; hr {color:sienna;} p {margin-left:20px;} body {background-image:url("images/back40.gif");} Can i pass this to the reponse.header dictionary ? Thx

[web2py] app design

2011-02-24 Thread Manu
Hi I would like to have some hints about building a small app where i have two types of users ( different roles ). The first role can only post task requests and see the accepted request . The second role can receive tasks and accepts them. Do you recomend me to create two controllers ( one for e

Re: [web2py] Re: app design

2011-02-24 Thread Manu
I will follow this advice and Jonathan one. Is there some appliance you would be aware of that have the similar features ? On Thu, Feb 24, 2011 at 9:12 PM, Anthony wrote: > Have you looked at the web2py authorization functionality: > http://web2py.com/book/default/chapter/08#Authorization > > I

[web2py] DB design question . Gmail like schema

2011-04-19 Thread Manu
would like to know if someone would suggest me a sound design for the db so that my users can exchange messages that can be organised in threads like Gmail . Any help or pointer to some appliance that would help me starting the db will be appreciated Thx Manu

[web2py] shell tool used for videos

2011-07-14 Thread Manu
Hi Massimo; I was interested to know what is the tool you are using to script your presentation ( open web page; text2voice ...) Thx

[web2py] TypeError: list indices must be integers, not str

2012-09-27 Thread Manu Mora
Hello! I have a problem with DAL. I have this table: *cdb.define_table('laptops', * *Field('id_laptop','integer'),* *Field('serial_number','string'),* *Field('id_trademark','integer'),* *primarykey=['i

[web2py] UnicodeDecodeError: \'ascii\' codec can\'t decode byte

2012-10-11 Thread Manu Mora
Hello. I have a problem with code and decode chars. This is my code: # coding: utf8 result = cdb.executesql("SELECT * FROM laptops") for reg in result: text = ("Número de serie: "+reg[0]).decode("utf8").encode("latin1") And this is the error: *("N\xc3\xbamero de serie: "+reg[0]).decode("

[web2py] What are the available choices to implement a full text search?

2013-07-26 Thread Manu Ganji
Hi, I'm planning a project using web2py. That project needs full text search using something like Solr or Sphinx Search or one of the other specalized search programs. How do we do this in web2py? I'm specifically looking for an equivalent of django-haystack. Another one. I know this is not th

[web2py] SELECT/OPTION field (optional)

2013-10-31 Thread Manu Mora
I want to do a SELECT/OPTION field in a form: db.define_table('cows', Field('type','reference cows_types'), ... db.cows.type.requires = IS_IN_DB(db, db.cows_types.id, '%(type)s') But I want this field be optional and not mandatory Thanks!! -- Resources: - http://web2py.com -

[web2py] Store a file using Crud

2014-09-04 Thread Manu Grandío
s in some way. I mean, doing: form.vars.file_ = urllib2.urlopen(form.vars.url).read() # Assign a string instead of: form.vars.file_ = urllib2.urlopen(form.vars.url) # Assign a file-like object web2py creates a text file named 'file.txt' and stores the content of the string in

[web2py] websocket: Send data when connect

2015-03-05 Thread Manu Mora
In websocket_messaging.py there are the following code: class DistributeHandler(tornado.websocket.WebSocketHandler): def open(self, params): group, token, name = params.split('/') + [None, None] self.group = group or 'default' self.token = token or 'none' self.n