YES !
This did it.
There is just a typo about the path to web2py.
After testing all parameters separately, I found that my problem was comming
from the missing line :
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
Thanks a lot !
Regards,
On Wed, Aug 25, 2010 at 10:50 PM, mdipierro
Hi,
I have a table with two upload fields. I need to transform the file from
the first upload field, and create it in the second upload field.
What is the best way to do it, and possibly avoid to first create the file
in memory before writing it to the disk.
It looks like I can generate the ran
v file.')
Le samedi 14 avril 2012 12:51:36 UTC+2, François Delpierre a écrit :
>
> Hi,
>
> I have a table with two upload fields. I need to transform the file from
> the first upload field, and create it in the second upload field.
> What is the best way to do it, and p
Thanks for the tip.
But I do not understand the default behavior of Web2Py.
I would expect to have the original file name displayed, instead of just
the link named "file".
In order to achieve this, I take your previous typ and I adapt my DAL :
db.mytable.f_sourcefile.represent = lambda rowid,ro
Hi,
Here is exactly what I would like to have, but it does not compute on
update :
db.define_table('t_templates',
Field('f_template', type='upload', label=T('File'),notnull=True),
Field('f_revision', ty
I have no error message, but I suspect the row to not be populated with the
['f_revision'] field.
Le mardi 1 mai 2012 13:31:43 UTC+2, François Delpierre a écrit :
>
> Hi,
>
> Here is exactly what I would like to have, but it does not compute on
> update :
>
&g
Thanks Khalil,
I did a try but it did not work, in fact the form.vars.t_revision does not
exists.
1. Could it be because I'm using SQLFORM.grid ?
2. I was aware that we can paste a list to onvalidation, but never a dict
( onvalidation={'onsuccess':mycustom} ), is this in the docs ?
I would have
compute=lambda: db.t_templates(request.vars.id).f_revision + 1 if
> (request.vars.id and
> request.vars._formname and request.vars_formname.startswith(
> 't_templates')) else 1))
>
> Anthony
>
> On Tuesday, May 1, 2012 7:31:43 AM UTC-4, François Delpierre wrote:
>>
So both solutions are working. One on the form in the controller, one as
compute in the models when defining the table.
Thanks,
Le mardi 1 mai 2012 21:38:59 UTC+2, François Delpierre a écrit :
>
> Hi Anthony,
>
> The proposal does not work as is. It looks like there is
>
Hi,
Here is my problem. It looks like the databases closes while in my
Generator. I also tried to pass the DB with the send() function as
described in an other post.
In a web page, I have an iframe that calls a function that returns a
generator to get some kind of "asynchronous" update in the
nerator() :
for i in xrange(20):
time.sleep(0.2)
outline = 'My Name is : \n'
yield outline
time.sleep(0.2)
yield outline
time.sleep(0.2)
mygen = createGenerator()
return mygen
Le vendredi 4
Hi,
When I try to select the fields to be displayed as follow :
form = SQLFORM.smartgrid(
db.t_xlsfile,
fields=dict(
t_xlsfile=[
db.t_xlsfile.f_xlsfile,
],
),
I immediately get this strange error :
fields=[
> db.t_xlsfile.f_xlsfile,
> ],
> ),
>
> do you get the same error. Can you try web2py trunk as well?
>
>
> On Wednesday, 9 May 2012 19:08:31 UTC-5, François Delpierre wrote:
>>
>> Hi,
>>
>> When
Hi,
I have no error message when I wrongly fill a list with spaces / special
characters.
However the validator works, as I need to respect it to update the record.
db.define_table('parameter',
Field('allowed_users', type='list:string'),
)
db.parameter.allowed_users.requires = IS_LIST_OF(
Sorry Massimo,
I didn't found any Bug Reporting Tool on the web2py web site or on the
presentation message of this list.
Where can I report the bug ?
Thanks,
Le jeudi 10 mai 2012 02:08:31 UTC+2, François Delpierre a écrit :
>
> Hi,
>
> When I try to select the fields to be di
Le jeudi 10 mai 2012 02:08:31 UTC+2, François Delpierre a écrit :
>
> Hi,
>
> When I try to select the fields to be displayed as follow :
> form = SQLFORM.smartgrid(
> db.t_xlsfile,
> fields=dict(
>
Hi,
Here is my solution :
If my response.menu is somthing like :
response.menu = [('Menu1', False), ('Menu2', True), ('Menu3', False)]
I can use this in my view to display the active menu :
{{=[x[0] for x in response.menu if x[1]==True][0]}}
It's working well, but is there no better and more e
Anyway thanks, I'll keep my workaround.
Regards,
Le samedi 19 mai 2012 14:22:23 UTC+2, François Delpierre a écrit :
>
> Hi,
>
> Here is my solution :
> If my response.menu is somthing like :
>
> response.menu = [('Menu1', False), ('Menu2', True), ('Me
Thanks Niphlod,
Yes, it's more 'tune my code' is it's perfectly working, and it keeps very
fast.
The problem with the javascript version is that I want to have the
Translated name of the menu not just the link.
My previous version is buggy when you're not logged in. So, I had to adapt :
{{
I must ensure there is always at least one row in a table. (My application
parameter table)
How can I prohibit delete of the last row of a table ?
As it looks the ondelete is executed AFTER deletion...
Thanks,
>
> Excellent idea Johann,
You're totally right, I was not looking into this approach.
Here is the working code :
def manage_parameters():
# Make sure user cannot delete the last parameter set. (row)
if db(db.para
... working but I have a side effect :
It looks like the "Delete" on a row is just removing the row from the
screen, without full refresh of the page. So, the last line is always
"deletable", but in fact it does not deletes.
Hi,
I'm getting (again) stuck with an "Invalid Circual Reference" using Wizard.
Finally, it looks like I have been able to fix it by just changing the
order of the table in my wizard, so the table order counts in the wizard.
We must have listed first all the tables to which we want to refer in
I just created a simple plugin as described here (Only the view/layout.html
and a CSS) :
http://comments.gmane.org/gmane.comp.python.web2py/71183
Here is the content of the w2p plugin file :
pivert@skinner:~/Downloads$ tar -ztvf web2py.plugin.layout_name.w2p
-rw-rw francoisd/www-data 6279 201
No, it's not a permission problem.
It seems to happen when I include the view/layout.html file in the w2p file
by issuing the tar command manually as described by Massimo.
Here is the command I use :
tar zcvf ../web2py.plugins.name_layout.w2p views/layout.html
views/plugin_layout_name/* static/p
Ok, so it means that the solution from Massimo is not working anymore :
http://permalink.gmane.org/gmane.comp.python.web2py/71241
How can I then make plugins that automatically change the layout of the
application without having to leave web interface ?
That's strange, as one of the downloadable
Then I do not understand why when I
deploy web2py.plugin.layout_Compromise.w2p from the web interface it
overwrites the view/layout.html file!
pivert@skinner:~/Downloads/web2py/applications/Incident_report_2$ ls -lh
views/layout.html
-rw-r--r-- 1 pivert pivert 6.2K Jun 26 23:49 views/layout.ht
Hi,
I'm getting an invalid circual reference very often with the wizard. It's
seems very buggy.
Most of the time, this is because I refer to a table that is later in my
definition list. Changing the order fixes this problem.
But sometimes, I have no idea. I already lost a lot of time with this
I'll have a look to build the steps to reproduce the problem, however I
wonder if the problem could not occur when I change the name (and type) of
the first field of a table, that is 'name' by default.
When using the CSV export with hidden cols or the TSV export with hidden
cols, I have none of the hidden columns in the view.
Here is the SQLFORM being used:
def index():
form = SQLFORM.smartgrid(
db.t_bsc,
onupdate=auth.archive,
linked_tables=['t_bsc', 't_device
Hi Kaare,
I'm not sure I fully understand your need. But, if all you need is a simple
web app to make a calculation from some fields and get one or more answers,
Web2Py is probably the right tool for doing it. One of your wish is to have
this app correctly displaying on your mobile phone browse
Thanks Alan,
Just tried the nightly build, and it's not (yet) fixed.
Regards,
--
websocket_messaging.py looks nice, and the example in the comments
immediately works in chrome. (not in ff)
But how can I encapsulate that in https or using it through ssl?
Regards,
--
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi,
Let's see the definition:
db.define_table('t_bsc',
Field('id', type='integer', label=T('Service Code')),
Field('f_name', type='string',
label=T('Service name'),
comment=T('The name of the customer facing service as known to
your customer.')),
But in my smartgrid,
Ok, so it's not included in the grid options.
changing it in web2py.js would disable the confirmation globally, that's a
bit dangerous for other tables. I would prefer to do it only for 1
particular table.
Or maybe creating a web2py_noconfirm.js included in a layout_noconfirm.html
?
--
---
Hi,
I got a quite similar result by working on the validation at the form level:
if form1.process().accepted:
session.flash = 'File uploaded'
redirect(URL('check_xls_file', args=form1.vars.id, user_signature=
True))
elif form1.errors:
response.flash = 'File rejecte
I'm using Web2Py for 6 months now, and I'm very happy with it.But here are
the most missing features I found in Web2Py. Most of those missing features
concerns grids/smartgrids.
- inline_editing parameter for SQLFORM.(smart)grid to allow inline
edition of some or all fields (ajax), withou
Hi,
How can I orderby IP address?
Can I write my own sort function?
How?
The following code:
db.t_device2ip.f_ip_id.requires = IS_IN_DB(db,'t_ip.id','%(f_ip_addr)s:
%(f_dns_name)s',multiple=False, orderby = 't_ip.f_ip_addr')
Sort as if IP was a string. (well in fact it is.. but that's not the r
Yes Anthony, I think such an option is missing, as usually you just want to
disable that for few grids...
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Field('name', 'string',length=50, requires=IS_NOT_EMPTY()),
>>...
>> Field('country','string',length=3),
>> Field('active','boolean'),format='%(name)s', singular='customer'
So, for instance :
db().select(db.person.name, db.person.id.count(), groupby=db.person.id,
left=db.dog.on(db.person.id==db.dog.person_id))
will give me the person, and the number of dogs that this person has.
But I only want to get persons with no dogs.
Regards,
--
Excellent !!
That did it.
Thanks a lot.
It would be very nice to have a wiki with all the samples for the DAL. I
did found this one :
http://web2py.wordpress.com/2010/05/23/some-tricks-to-use-when-dealing-with-databases/
but it didn't help me. I was not thinking about the negation.
Thanks,
--
http://web2py.com/books/default/chapter/29/07#The-process-and-validate-methods
Typo in the list.
http://web2py.com/books/default/chapter/29/04
scheduler.queur_task(
--
Hi,
The unique constraint is not working in the following Field definition.
Field('f_xlsfile', type='upload', notnull=True,
requires=[
IS_UPLOAD_FILENAME(extension='^xlsx?$',
error_message='Please post .xls or .xlsx Excel files
only.'),
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
Hi,
I get an Integrity Error everytime I modify a record in the t_route, and I
don't understand what's wrong. The t_route contains only 1 record, the
t_route_archive is empty.
What should I do?
The controller:
@auth.requires_login()
def route_manage():
form = SQLFORM.smartgrid(db.t_route,
Hi,
>From the admin interface, it's easy to create a new file or to delete it,
but how do I move one to an other folder, or just copy an existing one to a
new file name?
This is one of the few operation I still need a shell on the server for.
Regards,
--
Resources:
- http://web2py.com
- http
Hi,
On a Debian 7, with web2py 2.9.12-stable+timestamp.2015.02.13.23.31.09
(Running on Apache, Python 2.7.3) - WSGI with https
I have a problem I can't figure out.
On a healthy instance of Web2PY, when an error occurs, we have an "Internal
Error" message, and a Ticket Issued with a link pointi
49 matches
Mail list logo