I have two tables with a 1-to-many relationship that I would like to
represent in a parent-child form.
SQLFORM.grid plays quite nicely with the children data, but what I'd like
to do is include a row at the top of the form that includes parent data.
This is really only a need to add some editable
ject. Notice
> there is a problem. This only works when you have a single process sharing
> cache.ram.
>
> On Sunday, 15 February 2015 21:08:11 UTC-6, Massimo Di Pierro wrote:
>>
>> That line is clearly wrong!
>>
>> On Sunday, 15 February 2015 19:06:31 UTC-
I am taking a look at the spreadsheet controller in /examples/spreadsheet
in web2py Version 2.9.12 (on CentOS 6.6) .
The callback function is throwing this error.
Traceback (most recent call last):
File "/var/www/web2py/gluon/restricted.py", line 224, in restricted
exec ccode in environm
I have noticed that the "New Application Wizard" ( /admin/wizard/step1 )
does not contain any Layout Themes or Plugins. See attachment.
According to this post (
https://groups.google.com/d/msg/web2py/frUArP3gp6w/PCx2Z-3gxIkJ ) from
2011, these selections are populated by these AJAX calls:
http
Thank you Johann, that worked for me.
On Monday, April 7, 2014 4:52:34 PM UTC+10, Johann Spies wrote:
>
> On 7 April 2014 08:21, chris_g > wrote:
>
>
>> How do I use IS_MATCH for field validation if the field only contains
>> data?
>>
>> This works for
How do I use IS_MATCH for field validation if the field only contains data?
This works for me:
IS_MATCH('^\d{10}', extract=True, error_message='Telephone number should
have 10 digits.')
so long as a 10 digit number is required.
But what if I a want to make it acceptable to enter a 10 digit num
I am happily using the web2py FORM and custom validator's for form
validation using JSON messaging.
The problem I have is a customer wants verbose messages for webpages, but
succinct messages for everything else.
For eg,
On the webpage "You must enter an email address", "A password is required",
I am running web2py.2.0.9 and I get an error on doing INSERTS with MySQL if
I define a table with an Alias.
Apparently the DAL will attempt to do this SQL:
INSERT INTO tbl_favourite_header AS
favourite_header(CreationDate,Description,ChangeDate,MemberID) VALUES
('2013-03-01 12:12:10', 'my favo
Thanks for all the interesting responses.
Here is Apple's description of the Push notificaiton process:
http://developer.apple.com/library/mac/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html
There appears to be a similar framework for
I'm looking into supporting Apple push notifications in an iPhone app that
connects to a web2py server.
In order to know which devices to push details to, web2py's auth module
would presumably need to maintain "Device Tokens".
I'm curious if anyone has implemented a solution that takes care of th
pisa.CreatePDF(html, dest = doc)
return doc.getvalue()
return results
On Sunday, November 11, 2012 8:53:21 PM UTC+11, Paolo Caruccio wrote:
>
> did you try appreport (a web2py plugin)
> https://github.com/lucasdavila/web2py-appreport ?
>
>
> Il giorno domenica 11 no
I believe I need to use a file reference to the html like this:
pdf = pisa.CreatePDF( StringIO.StringIO(html) , result)
But I am still getting an empty string.
--
Has anyone had any luck running Pisa in a web2py view?
I've only had success with using it at the command line:
pisa example.html
--> pisa.pdf
I've tried putting the following in a view, but I am getting an empty
string returned.
{{
import logging
import os
import StringIO
import xhtml2pd
I'm using SQL Server with pyodbc on Linux. ( Web2py 1.99.7 )
I have been trying to force a database timeout in certain methods in my
controller.
I added the following conditional to models/db.py
db_connection_string='mssql://dbuser:pwd@dbserver/DB?DRIVER=FreeTDS'
if request.function ==
Thanks Massimo. That worked for me.
--
I opened the ticket as you suggested and you've confirmed that
in executesql the values in the placeholders argument are passed directly
to the driver without escaping.
I've tried doing the same call with the MSSQL adaptor using the pyodbc
driver.
db.executesql("insert into test1 (t1) VALUES (?)
Here's an example of a problem that I have with a MySQL database and
escaping of executesql placeholders.
I am using web2py 1.99.7 on Ubuntu with Python2.5
testDAL works, but testDB throws this error:
(1064, u"You have an
error in your SQL syntax; check the manual that corresponds to your MySQ
I have a conceptual issue about how I design some aspects of an
application.
I need to make my app customisable with respect to business idiom and
in the longer term, I would like my app to embrace
internationalisation.
I'm curious to know if anyone has ever tackled the issue of business
idiom in
I recently had a similar problem where I could import pyodbc at the
python shell, but I was getting a DLL error when I tried to import
pyodbc under mod_wsgi.
I suggest that you put "import pyodbc" inside your wsgihandler.py (or
at the top of db.py) and see what errors are being produced.
I had rece
Annet,
When I explored this a few years ago, I ended up going with an XML
solution called RML (report markup language). This was developed by
the makers of reportlab, but there are also free implemntations of RML
available (such as the z3c implementation.)
Once I had installed rml2pdf developed XM
I am trying to define a custom type on a MySQL db and I get the error
below. My motivation is to store data in Bigint rather than Integer.
bigint = SQLCustomType(
type = 'integer',
native = 'bigint',
)
db.define_table('s1',
Field('target_id', bigint)
)
db.s1.inser
I have setup web2py version 1.98.2 on Ubuntu Lucid Lynx. My dal is
connecting to SQL Server 2005 using a connection string like this.
db_connection_string = r'mssql://dbuser:pword92.168.1.1/mydb?
DRIVER=FreeTDS'
After my application has been running for some hours or days, there
seems to some
I've just deployed 1.98.2 and noticed that some of the with_alias
behaviour has changed.
With 1.89.1, if I defined my tables like this:
db.define_table(
'tbl_site',
Field('Code', 'integer'),
Field('Name', 'string'),
Field('Active', 'integer')
).with_alias('s
Denes,
I also went down this path and this is what I got. When the Auth class
references self.user.id it appears to be expecting that the user
table will have a field called 'id'. From glancing at the code it
appears that self.user.id is expected to be a key in a Storage , so in
effect the name of
I have a client requirement for tables in my database to be prefixed
with 'tbl_' and to have an ID field caled recid. For legacy purposes,
auth_user is implemented as a VIEW on an existing table.
For this reason, my use of the Auth module is becoming quite
customised.
I had presumed that includi
Thanks, that worked.
I made this change to gluons/tools.py until I captured the error.
def insert(self, **fields):
query = self._insert(**fields)
self._db['_lastsql'] = query
* logging.error('insert:\n%s'%query)
...
On Apr 1, 12:55 pm, mdipierro wrote:
> The las
Currently, my sql.log contains the DAL generated SQL statements that
were used to generated the database schema.
Is there a way to log all SQL statements that DAL generates? I am
getting a SQL error after I customised my Auth tables for a legacy
database, and I'd like to see exactly what SQL is bei
This is marvellous news. I read the manual last night and realised
that the field ID restriction was the only thing stopping me deploying
web2py in conjunction with a major legacy app that I am using.
Thanks Michael for getting this feature happening.
Can I confirm one thing, with a table like th
28 matches
Mail list logo