Resolution, in case anyone else sees this:
I had imported the database from our production system. The database
includes a view. The database username, and thus the view creator name, are
different on the production vs development system. That means the view is
not visible to the MySQL user on
I'm getting:
...
File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 50, in
defaulterrorhandler
raise errorvalue
OperationalError: (1045, "Access denied for user 'pytrack2'@'localhost' (using
password: YES)")
The password, user and database are accessible from the command
Fabulous. Thanks Massimo!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2
I have a list of members that I want to schedule for certain duties. One
table lists the people:
db.define_table(
'members',
Field('fullname', type='string', label='Name'),
[...]
)
I select members from that table according to certain criteria, but I want
to not select them if they
This code fails:
uri = configuration.get('db.uri')
print uri
db = DAL(uri)
The uri printed is:
'mysql://rota:rota@localhost/rota?set_encoding=utf8mb4'
This code works:
db = DAL('mysql://rota:rota@localhost/rota?set_encoding=utf8mb4')
That's exactly the same URI (it was copy and pasted in Vim)
>
> MySQL is listening on the default port:
>
$ telnet localhost 3306
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
c
5.5.5-10.3.17-MariaDB-0+deb10u1�a3y(W]OS��-��5KZaY|$920;vmysql_native_password^CConnection
closed by foreign host.
--
Resources:
- htt
I've just downloaded web2py 2.18.5 and set the MySQL URI as follows:
uri = 'mysql://rota:rota@localhost/rota'
Web2py gives:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Traceback (most recent call last):
File "/home/kae/web2py-2.18.5/gluon/restricted.py", line 219, in restric
We're looking to move a web2py app to run in a container under Kubernetes.
I'm interested in experiences of running web2py in a non-persistent
container. In particular, how have people handled the app/databases
directory?
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Docu
Thanks Anthony. It almost works (but it fails in an odd way). I was getting
some odd results, and I've narrowed it down to this:
In [10]: task_duration = (db.t_periods.f_end - db.t_periods.f_start)
In [11]: results = db(query).select(p.id, p.f_start, p.f_end, task_duration
).as_list()
In [1
OK, I know I can't get a sum of virtual fields, but here's what I'm trying
to do:
db.define_table(
't_periods',
Field('f_start', type='datetime', label=T('Start time')),
Field('f_end', type='datetime', label=T('End time')),
Field('f_task', type='reference t_tasks', label=T('Task')
Thanks, Bernhard.
The solution I ended up with is quite messy, but it does work:
# Set defaults
if request.get_vars:
filter_bar.vars.from_date = datetime.datetime.strptime(
request.get_vars.from_date, "%Y-%m-%d").date()
filter_bar.vars.to_date = datetime.dateti
I have a page that is a report, and at the top of that page is a form with
a 'from' and 'to' date field so that the user can select the date range to
report on. By default, the dates select and the first to the last of last
month. That works fine.
I want to add a combo that will allow the selec
You're right, of course.I, too, get frustrated by people asking the wrong
question, and now I'm doing it...
I have a form that requires a 'from_date' and a 'to_date', which is
currently implemented using two fields. I like the idea of using the
'daterangepicker' tool, particularly the predefine
I want to use javascript to update a hidden field, but I can't find a way
to give a hidden field an id which would make it much easier to update.
SQLFORM.factory(..., hidden=dict(a="",b=""))
will create the hidden fields, but not with an id.
What's the best way to create non-database hidden f
My PEP8 checker tells me that:
db.table.field == None
should be
db.table.field is None
But that doesn't evaluate correctly. Why?
(I did search for this but couldn't find it discussed before: apologies if
I missed it).
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Docum
I found that I was unable to authenticate to an OpenLDAP server running TLS
on port 389 (which is the recommended way apparently). The following patch
to ldap_auth.py fixes things for me; YMMV.
Please add to upstream source if helpful.
--- gluon/contrib/login_methods/ldap_auth.py.original 201
Hmm, we may have an LDAP server issue. Ignore for now; sorry for the noise.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message beca
Does anyone have an example of configuring an OpenLDAP TLS connection for
authentication?
I've tried:
auth.settings.login_methods.append(ldap_auth(
server='my.ldap.server',
base_dn='ou=users,dc=my,dc=ldap,dc=server',
secure=True,
port=389,
))
...but that fails with "Invalid logi
On Sunday, 30 March 2014 14:08:38 UTC+1, Anthony wrote:
>
> Would help to see the controller code.
>
Here's the code from a test app I've put together to simplify:
def index():
grid = SQLFORM.grid(db.t_dogs,
create=True,
csv=False,
Hi All
Am I doing something wrong on this group?
I've highlighted what looks like a bug to me, but I've had no response. Is
this the wrong place to discuss what looks like a bug?
Thanks
Keith
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py
I have slightly more information now. Once the SQLFORM.grid 'Add' form is
displayed, typing in the 'name' form does not call the echo() function.
This seems like a bug to me.
The echo() function is called as expected when the grid is shown, but not
when the Add form is shown - but there is some
>
> Bump...is is possible to use AJAX in a SQLFORM.grid Add form?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you
Thanks Derek, but I don't think that's it. The example in the book doesn't
define a view for 'echo', and even I do define one that explicitly calls
the grid view, the problem persists (is there a view for just the Add
form?).
--
Resources:
- http://web2py.com
- http://web2py.com/book (Document
Is it expected that AJAX can be used within the Add form of a SQLFORM.grid?
If so, what am I doing wrong (or is it a bug)?
Thanks,
Keith
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/
My SQLFORM.grid is based on a table that includes a field defined as a
textarea. When I add a new record using the grid 'Add' button, I want to
update that textarea using AJAX.
My test view looks like this:
{{extend 'layout.html'}}
{{=' '.join(x.capitalize() for x in request.function.split('_'
I did a pretty poor job of explaining my problem. I'll post again and try
to make it clearer.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You receive
I have a db table, t_services, that includes:
Field('f_service', type='string',
label=T('Service')),
Field('f_default_specification', type='text',
label=T('Default specification')),
Another table, t_line_items, includes:
Field('f_service', type='reference t_servic
I've a couple of questions about SQLFORM.grid:
- Is it possible to position the buttons/links created by the 'links'
argument somewhere other than the end of the row? It feels as if the
'fields' argument should be able to do this, but I can't see how.
- Is it possible for the 'search' box to
28 matches
Mail list logo