I think I have answered myself. This does the job:
db.define_table('comments',
Field('logged_in_user', 'reference auth_user',
default=auth.user_id),
Field('user_comment', 'text',requires=IS_NOT_EMPTY()),
)
On Monday, September 3, 2018 at 12:02:24
i am getting the error:
'NoneType' object has no attribute
'first_name'.
Field('logged_in_user', 'string',auth.user.first_name),
AttributeError: 'NoneType' object has no attribute 'first_name'
the site is behind the login page and even when I attempt to go the
homepage (can't open the
I am a weekend coder and my queries probably need to be redesigned. I was
trying to move everything to a newer environment and immediately weak areas
fail first. In time I should be able to sort things out. I do enjoy working
with web2py . Thanks for your input.
On Monday, May 14, 2018 at
db stats for 2.16.11
SELECT `labour`.`lab_description`, `labour`.`lab_id` FROM `labour` WHERE
((`labour`.`lab_id` IS NOT NULL) AND (`labour`.`lab_term_date` IS NULL)) ORDER
BY `labour`.`lab_description`, `labour`.`lab_id`;
1.11ms
---
db stats for 2.9.11
SET
After update from web2py 2.9.11 (mysql 5.6.37) to web2py 2.16.11 (mysql
5.6.40) the SQLFORM.smartgrid shows zero results and at the top right
displays a message: Query Not Supported: (1066, "Not unique table/alias:
'labprice'").
This same code works in 2.9.11:
db.labprice._common_filter =
I use the stock Rocket server that comes with web2py and I restart it
after changing the routes.py. I must say that I don't fully understand the
big picture of how the apps the compiler and the operating system
cooperate. One time I uploaded a site to GAE with two separate apps but the
tables
I removed routes_in and routes_out. The routes.py file in the site's root
looks like so:
routers = dict(
# base router
BASE=dict(
default_application='init',
),
stock=dict(
default_function='index',
functions=dict(
Big thank you! This works.
One little detail emerged though. Now that I replaced the pattern
router.py (having my line in routes_out as above) in my site root with the
parameter rewrite method my URL shows 'default':
https://192.168.1.25:8000/stock
No, the name 'index' withing 'showcase' is idle.
On Monday, August 28, 2017 at 9:56:13 AM UTC-4, Anthony wrote:
>
> Do you have a /showcase/index function?
>
> On Monday, August 28, 2017 at 2:03:40 AM UTC-4, 98u...@gmail.com
> wrote:
>>
>> I chose pattern-based rewrite because I don't know
I chose pattern-based rewrite because I don't know better. I am temporary
part time web coder relying on web2py book 100% with understanding at about
60%. Being a mature person I am fond of eloquence in life as well as in
URL's however complexity has its price. I sense from what you are
I chose pattern-based rewrite because I don't know better. Please know
that I am only temporary part time web coder relying on web2py book 100%
with understanding at about 60%. Being a mature person I am fond of
eloquence in life as well as in URL's however complexity has its price. I
sense
I could make "asset" function the default for the "showcase" controller
however I am not sure how as I am already using renamed
routes.patterns.example.py in the root of the website (multiple apps) to
rewrite one URL (works nicely):
routes_out = (
('/stock/default/index','/stock'),# <== my
How can I rewrite the URL (to drop asset):
https://192.168.1.25:8000/stock/showcase/asset/2017-Some-fridge?id=79&_signature=c2e7899530c858f1b478cb7ea5f03bb30d4f68e1
to look like:
https://192.168.1.25:8000/stock/showcase/2017-Some-fridge?id=79&_signature=c2e7899530c858f1b478cb7ea5f03bb30d4f68e1
the
Hello,
I have not seen mention of this anywhere. Perhaps my question is
a superfluous. If a table contains uuid field type can it be used as a
record_id for an argument in CRUD update call.
It looks that it cannot.
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book
Thank you for your input. By creating a separate project the issue goes
away. However it seems to me that in this way more resources are consumed.
Such discussion would be beyond my competence level. Thanks
On Monday, June 19, 2017 at 8:29:14 AM UTC-4, Karoly Kantor wrote:
>
> You can
Hello,
I uploaded a simple web2py app named 'mynotes', (based on markmin app
example) to gae under a project 'projectnotes' to keep my notes in. Very
simple model:
db.define_table('tblpage',
Field('page_title','string',label='Title'),
My mistake!
Please forgive me for wasting your time. I can't replicate that situation
where I received above mentioned message. Suddenly I can do everything that
I want.
Working with web2py is fun!
On Thursday, June 15, 2017 at 12:21:11 AM UTC-4, Anthony wrote:
>
> It's still not clear what is
Thank you for your response!
I am afraid that my question lacked precision! Here is my regular command
line to start web2py:
~/src/w2app$ ./web2py.py --password='1' -c ../ssl-key-crt/server.crt -k
../ssl-key-crt/server.key --ip=192.168.1.25
It works very nice!
Here is my command required
I run my web2py on a home lan, headless box of linux. My web2py apps
require login and it can only be performed over a secure channel. My
question: is it possible (if yes then how) to configure my linux box to
simulate local host accessing so that I can remain sitting on my couch?
Should I
It did help to delete the folder upon upgrading via browser. But I
experience something odd now, when I set-up web2py from the new source
files (not via upgrade because that works) on Linux I cannot uninstall
application that I have just created and also I cannot install external
application
Well, drop down is too tight when you have lots of rows and also in the
window I have the functionality of the browser search tool.
I filed an issue about my dilemma:
https://code.google.com/p/web2py/issues/detail?id=1974start=100;
On Tuesday, September 2, 2014 6:12:12 PM UTC-4, Cliff
1) smartgrid produces a form for a new record
2) I click on an input field and with the help of javascript smaller
(second) browser window opens with related table content
3) I select a row in the window and ID is inserted in the first window
field, the smaller second window closes.
4) I click
The grid below orders the rows by part_description column only the first
time the action is called. After that if you click on the header link it
orders by pp_part_id foreign
key which is not as useful as it could be by part_description.
Why the link in the header for that column does not
I did what you suggested but the calls to:
db.owner.own_end_date.writable = False # not writable
db.owner.own_end_date.readable = False # do not show is at all!
are effective only if executed before the call to form =
SQLFORM.smartgrid(db.owner, ...
When executed after, have no effect.
I want
Why readonly elements (select and date field) of a form respond to clicks
and allow for changes and can be submitted? They look grayed out as if
readonly but when I click on date field the date picker appears and works
as it shoud also the select option is grayed out but it offers a list to
# table definition
db.define_table('vehicle',
Field('manufacturer','string'),
Field('name','string'),
Field('vin','string',length=32,unique=True),
Field('year','string'),
Field('colour','string'),
Resolved!
This is the sql string needed to produce a selection for my reference field
in IS_IN_DB:
select vehicle.id,vehicle.manufacturer,vehicle.name,UPPER(vin) as vin from
vehicle inner join (select a.own_veh_fk from owner a where a.own_end_date
is not null and a.own_veh_fk not in (select
This is my short version of SQL string that I am trying to convert for use
with web2py. I am studding how to do it at this time but any help that
comes sooner will be appreciated. It finds a vehicle without owner that is
used when creating a vehicle owner.
select
Thank you Mr. Massimo and your colleagues for bringing the web2py to the
masses.
I need to have a field that will present a choice of values that result
from a union of query1 and query2
How can i create a set that would go where the question mark is? Thanks for
any help!
I did try:
query = query1 | guery2
and received error: Set | Set or similar
On Wednesday, May 28, 2014 7:47:36 PM UTC-4, 98u...@gmail.com wrote:
Thank you Mr. Massimo and your colleagues for bringing the web2py to the
masses.
I need to have a field that will present a choice of values that
Found the problem, it is my ignorance. Names that start with digits aren't
valid identifiers. Thanks. I am new to all this.
On Monday, December 2, 2013 8:03:43 PM UTC-5, 黄祥 wrote:
not sure why it's not work, please try to rename your modules files into
friendly name. e.g. rental_master.py
I am wondering if anyone else experience similar issue:
I create a new application, create a new module 123test.py file and when
saving it get the error:
failed to reload module because: invalid syntax (string, line 1)
The content of the file at this point is:
#!/usr/bin/env python
# coding:
Thanks for reporting the issue.
On Tuesday, October 29, 2013 3:38:04 PM UTC-4, Alan Etkin wrote:
Note: The current markmin render engine requires a first line-break for
multi-line code, otherwise it renders as single line. Try adding a leading
line-break in the text box.
Nevermind
I am afraid that expression $$ x + y $$ will render as xy rather than
x+y. I tried escaping the plus character but without any luck. I was
wondering if somebody else encountered such an issue.
Any help will be much appreciated. Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book
Hello,
I am new to web programming. I use web2py built-in wiki: auth.wiki(), the
simplest form. Why is it that when I click the preview button the style for
markmin items like ``this is some code`` looks OK (code is highlighted,
break lines are present) and when I click on submit a record I see
35 matches
Mail list logo