[web2py] Not able to get html form1 values to controller default when html form 2 is submitted.

2017-07-19 Thread Anthony
form two changes. Anthony -- 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

[web2py] Modules not reloading

2017-07-19 Thread Anthony
Is this Python 2 or 3? Does it work using __import__() instead of importlib? -- 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 bec

[web2py] autobuild'ing web2py models from MySQL metadata?

2017-07-18 Thread Anthony
Have you tried this: https://github.com/web2py/web2py/blob/master/scripts/extract_mysql_models.py -- 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 rec

[web2py] About virtual Fields

2017-07-17 Thread Anthony
as usual, but start their names with at least one underscore - otherwise, they will also be added as virtual fields. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Anthony
You mentioned the field was being re-bound to the same table, which does not appear to be the case below, as SQLFORM. factory creates its own dummy table. Was this causing another problem in some other context? Anthony On Sunday, July 16, 2017 at 4:34:25 PM UTC-4, Joe Barnhart wrote: >

[web2py] Re: ValueError: Field is already bound to a table <-- need a fix for this

2017-07-16 Thread Anthony
On Saturday, July 15, 2017 at 12:47:04 PM UTC-4, Joe Barnhart wrote: > Hmm... That's gonna be a problem. > > > This is occurring in an SQLFORM... which is in a modal pop-up box... over a > tabbed structure with about 5 more SQLFORMS...  plus 5 or 6 jQuery > DataTables... all powered by the sam

[web2py] Re: Ajax upload, working in localhost (rocket), but not working in prodution (nginx)

2017-07-16 Thread Anthony
tterns = ['default/echo_upload.json']  generic_patterns should match the names of the generic templates, not the names of functions that lack a dedicated template. Just matching to 'json' should do, but this line should go in the controller function so it doesn't affe

[web2py] ValueError: Field is already bound to a table <-- need a fix for this

2017-07-15 Thread Anthony
As usual, I think we need to see some code and a traceback. -- 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 subs

[web2py] Re: how to optimize this query to get ids like [100,200,102,909] not [{'id':100,'id':200...}

2017-07-14 Thread Anthony
can do .column('column_name'). The alternative (which is what the .column() method actually does) is: [r.id for r in db(db.entities.type==5).select(db.entities.id)] Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web

[web2py] Re: How do I set the application that shows at domain root? Plus a couple other questions...

2017-07-14 Thread Anthony
app that included for > example the Semantic Web appliance with an e-commerce app. > Is there a way to do that, to merge two apps into one? > There is no simple or automated way. You would simply have to combine the files/code of each app into a single app, making any necessary adjustment

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Anthony
Are you saying that used to work but doesn't any longer? How about db(db.table).select(max)? Anthony On Thursday, July 13, 2017 at 1:16:31 PM UTC-4, lyn2py wrote: > > I'm using a simple query to get aggregate: > > max = db.table.date.max() > row = db().select(max) >

[web2py] Re: web2py 2.15.1 is OUT

2017-07-13 Thread Anthony
On Thursday, July 13, 2017 at 1:03:31 PM UTC-4, Massimo Di Pierro wrote: > > @Anthony, > > could you provide a simple example? > model: db.define_table('mytable', Field('name'), Field('photo', 'upload')) controller: def main_page

[web2py] Re: Is there any workaround to include 'does not contain' option in SQLform grid search?

2017-07-12 Thread Anthony
On Wednesday, July 12, 2017 at 5:28:03 AM UTC-4, Pranshul Chitransh wrote: > > Thanks for the prompt reply Anthony! Actually this is not quite I was > looking for. I meant to include the 'does not contain' option in the > pre-defined filters that grid already has in its

[web2py] Re: web2py 2.15.1 is OUT

2017-07-11 Thread Anthony
One new feature is that in modern browsers (that support FormData), web2py Ajax components now support file uploads out of the box (no need for third-party plugins). Anthony On Monday, July 10, 2017 at 5:40:08 PM UTC-4, Massimo Di Pierro wrote: > > It took a year. Thanks to everybo

[web2py] Re: How organize double-inheritance in web2py

2017-07-09 Thread Anthony
On Sunday, July 9, 2017 at 3:10:47 PM UTC-4, Anthony wrote: > > On Saturday, July 8, 2017 at 4:54:51 PM UTC-4, Filipe Reis wrote: >> >> I was trying to implement this but I can't understand one thing. >> >> In this example: >> >> db.define_table(&#

[web2py] Re: How organize double-inheritance in web2py

2017-07-09 Thread Anthony
db.person table does not also appear in the db.abonet table. If you want a single collection of records that can have different types, you should probably just have a single table with some kind of "type" field. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Docum

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread Anthony
.update(**r) > > > These methods aren't working: > > db[table_name].update_or_insert(**r) > > db[table_name].update_or_insert(db[table_name]._id == current_id,**r) > Please define "aren't working". What do you expect, and what do you observe instead. Wha

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread Anthony
, so that may be why. > > > > On Friday, July 7, 2017 at 11:40:55 AM UTC-7, Anthony wrote: >> >> On Friday, July 7, 2017 at 2:27:52 PM UTC-4, ad...@swcacloud.com wrote: >>> >>> >>> We can insert and update from a dictionary, but its not possible

[web2py] Re: update_or_insert from dictionary?

2017-07-07 Thread Anthony
update_or_insert(). The book provides examples for .insert() and .update() just as a hint for those that might not be aware of this possibility, but a lack of such examples for other methods and functions should not be taken to imply that it is not possible. Anthony -- Resources: - http:

[web2py] Re: Update hidden field / id for hidden field

2017-07-07 Thread Anthony
Why do your hidden fields need ids? Note, you can always create the hidden fields manually rather then using the "hidden" argument: hidden = lambda f, v: INPUT(_name=f.name, _id=f.name, _type='text', _value=v ) form = SQLFORM.factory(Field('hidden_field', widget=

[web2py] Re: Limit the field to search in sqlgrid?

2017-07-07 Thread Anthony
See https://groups.google.com/d/msg/web2py/--XcMFzpBn0/LYiwKoc-CQAJ. On Thursday, June 27, 2013 at 9:03:12 PM UTC-4, fun man wrote: > > Hi all, > > I have a couple tables joined in the sqlform.grid. They both have around > 20 fields. I am only displaying around 10~15 fields for a particular > pu

[web2py] Re: Grid - limit searches to specified fields not whole tables

2017-07-07 Thread Anthony
y#L2618. Note, it is built based on the SQLFORM.search_menu static method. Feel free to open an issue or make a pull request. Anthony On Friday, July 7, 2017 at 8:42:37 AM UTC-4, Matthew J Watts wrote: > > Hi all > > > > I’m having problems trying to tailor the grid to my need

[web2py] Re: Dropdown not created using SQLFORM inspite of using references

2017-07-06 Thread Anthony
To get the default dropdown, you must specify the "format" argument when defining the db.room table. Anthony On Thursday, July 6, 2017 at 3:14:12 PM UTC-4, Prashant Tanksali wrote: > > Hi, > > This is my database definition: > > db.define_table('room'

[web2py] Re: trigger some js code on successful login

2017-07-06 Thread Anthony
do a redirect. Alternatively, in the user() action, you can simply delete the _next variable before processing the Auth request: def user(): if request.args(0) == 'login' and '_next' in request.get_vars: del request.get_vars._next return dict(form=auth()) Anth

Re: [web2py] Re: function lazy_user at ...

2017-07-06 Thread Anthony
update, select the records, get all the data necessary for the computed fields, and then make the update. Anthony On Monday, July 3, 2017 at 12:55:13 PM UTC-4, Ramos wrote: > > I´m moving my computed fields from db.entities to another table > db.entities_wf_fields and t

[web2py] Re: change login page layout

2017-07-06 Thread Anthony
> {{if not 'user' in request.env.path_info:}} > {{extend 'layout.html'}} > {{else:}} > {{extend 'mylayout.html'}} > {{pass}} > Presumably this goes in the user.html view, so why bother with the conditional logic and no

[web2py] Re: show form errors in html form

2017-07-06 Thread Anthony
widgets will include the default error messages automatically when they are present. Anthony On Thursday, July 6, 2017 at 8:33:06 AM UTC-4, icodk wrote: > > I build a form like explained in : > > http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-in-HTML >

[web2py] Re: FOREIGN KEY constraint failed

2017-07-02 Thread Anthony
Not sure if you're showing your actual code, but the table name is spelled "governmenttForm" (note the extra "t"), and for the field type, you have "reference govmntForm". Anthony On Sunday, July 2, 2017 at 4:37:22 AM UTC-4, mostwanted wrote: > > Hi gu

[web2py] Re: Totally app-internal routing

2017-07-01 Thread Anthony
On Friday, June 30, 2017 at 4:24:35 PM UTC-4, Brendan Barnwell wrote: > > On Thursday, June 29, 2017 at 8:27:01 AM UTC-7, Anthony wrote: >> >> You need to have at least a basic routes.py in the root /web2py folder, >> but for application specific routing, you can also

Re: [web2py] Re: function lazy_user at ...

2017-06-30 Thread Anthony
t first select the records from the database (which would be inefficient), so it has no access to the current records. If you need the current values of some of the fields for the computed field to be calculated, then you must first select the records yourself. Anthony -- Resou

[web2py] Re: user logout before ajax returns

2017-06-30 Thread Anthony
ets called before the logout. Otherwise, it won't work, so you may need to add some logic to deal with that case. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repo

[web2py] Re: response.js after redirect

2017-06-30 Thread Anthony
ature (requires login) as follows: $.web2py.component('{{=URL(..., user_signature=True)}}', ...); And then decorate the action with @auth.requires_signature(). Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: JSON field with MySQL database

2017-06-29 Thread Anthony
h how MySQL JSON fields work, so not entirely sure what would be appropriate. Note, the filter_in/filter_out example in the book is a JSON example, so maybe start there. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

[web2py] Re: response.js after redirect

2017-06-29 Thread Anthony
You don't need to do it that way. Just import json -- see https://groups.google.com/d/msg/web2py/9WnoALNHxTI/54cTUgHNBgAJ. Anthony On Thursday, June 29, 2017 at 12:36:42 PM UTC-4, Filipe Reis wrote: > > Got it all working now. It was a problem with using response.json to parse

[web2py] Re: response.js after redirect

2017-06-29 Thread Anthony
Try wrapping it in XML(): var w2p_flash = {{=XML(response.json(response.flash)) if response.flash else 'null'}}; Anthony On Thursday, June 29, 2017 at 11:25:20 AM UTC-4, Filipe Reis wrote: > > Was looking better it seems that this is a problem with how response.flash &g

[web2py] Re: Totally app-internal routing

2017-06-29 Thread Anthony
quot;router" from the root routes.py file with the "router" from the application routes.py file. Anthony On Wednesday, June 28, 2017 at 6:39:47 PM UTC-4, Brendan Barnwell wrote: > > Looking at the routing discussion in the docs, it seems that any kind of > custom routing

[web2py] Re: Violating unique constraint in Field doesn't go to standard 500 page

2017-06-29 Thread Anthony
Have you specified routes_onerror? If so, what does that code look like? It looks like your error handler itself may be generating an error. Anthony On Thursday, June 29, 2017 at 9:42:42 AM UTC-4, Chris wrote: > > Hello! > > I'm running 2.14.6-stable+timestamp.2016.05.10.00.2

[web2py] Re: response.js after redirect

2017-06-29 Thread Anthony
You can instead put that code in the view of the controller. If you need it across multiple actions, just create a separate view template for it and use {{include ...}} to include it wherever needed. Anthony On Thursday, June 29, 2017 at 9:25:00 AM UTC-4, Filipe Reis wrote: > > Thanks fo

[web2py] Re: JSON field with MySQL database

2017-06-29 Thread Anthony
ion-layer#filter_in-and-filter_out> functions. Or submit a pull request to support the MySQL JSON field type. Anthony On Thursday, June 29, 2017 at 9:10:16 AM UTC-4, narcissus wrote: > > Hi, > I've created a database model containing a field of type json to access a > pre-existent

Re: [web2py] Re: function lazy_user at ...

2017-06-29 Thread Anthony
ted_by = created_by() if callable(created_by) else created_by if not created_by in ret: ret.append(created_by) Anthony -- 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 Issu

[web2py] Re: response.js after redirect

2017-06-29 Thread Anthony
in options as well, you could make response.flash a dictionary holding both the message and the options and convert the options part to JSON in the layout. Anthony On Thursday, June 29, 2017 at 6:49:20 AM UTC-4, Filipe Reis wrote: > > Hello, I was wondering if someone could help me in f

[web2py] Re: function lazy_user at ...

2017-06-28 Thread Anthony
ault functions are called, so compute functions should not depend on the values of other fields whose defaults are set via a function. In this case, you have two alternatives: ret.append(record["created_by"]()) # This calls the lazy_user function, which returns auth.user_id or: re

Re: [web2py] Re: Auth.signature not updating update_on

2017-06-27 Thread Anthony
We probably need to see more code and an exact description of the workflow to make the update and check whether it was applied. Anthony On Tuesday, June 27, 2017 at 5:02:04 AM UTC-4, Ramos wrote: > > Yes anthony i meant modified_on ,not update_on > > I have this code > > table

Re: [web2py] Re: Future of web2py

2017-06-27 Thread Anthony
ne via raw SQL (i.e., no DAL models defined). Both the standard web2py app and the web2py-optimized app have sessions disabled (as they are not needed for any of the tests) and have the apps compiled. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Auth.signature not updating update_on

2017-06-26 Thread Anthony
auth.signature includes a modified_on field, not an update_on field. Also, if you update a record by making changes to the row object and then calling row.update_record() (with no arguments), it will update the record with all the existing values (so modified_on will not be changed). Anthony

Re: [web2py] Re: Future of web2py

2017-06-26 Thread Anthony
ed). In this case, no JS is served -- it's just a single HTML page. The latency is due to (a) the time it takes to execute the DB query, an (b) the time it takes for the framework code to run and produced the output. We can only improve it by making the framework code faster. Anthony --

Re: [web2py] Re: web2py 2.15.1

2017-06-26 Thread Anthony
Python date formatting string -- it can simply using the Flatpickr formatting. Anthony -- 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 me

Re: [web2py] Re: web2py 2.15.1

2017-06-26 Thread Anthony
return values in that format (using whatever formatting options the Flatpickr API requires to do so). Anthony -- 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) --- Y

[web2py] Re: Future of web2py

2017-06-26 Thread Anthony
o=6 (that link includes only full stack frameworks using a full ORM). Actually, if you don't want to code in Java or C++, Python has some top contenders. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

Re: [web2py] Re: web2py 2.15.1

2017-06-26 Thread Anthony
and then point users to the Flatpickr documentation if they want to use alternative formats (they'll need the Flatpickr documentation anyway to make other types of customizations)? Anthony On Monday, June 26, 2017 at 10:16:05 AM UTC-4, Richard wrote: > > To integrate flatpickr a flatp

[web2py] Re: Future of web2py

2017-06-26 Thread Anthony
rks, but still within a factor of two compared with Django and Flask, and a factor of four compared with the fastest frameworks. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/i

[web2py] Re: How to use FORM, INPUT to create a field with dropdown list?

2017-06-26 Thread Anthony
, quote_row.customer) Anthony On Thursday, June 22, 2017 at 6:34:54 AM UTC-4, Rudy wrote: > > Hi there, > > Due to the javascript reason, i need to create a form using FORM and INPUT > helper. I wonder how I can create a form using these helpers with field > displaying a dropdown list

Re: [web2py] Re: vue.js

2017-06-26 Thread Anthony
Change: To: and add the following CSS rule: [v-cloak] { display: none; } That will cause the div to remain hidden until after the Vue instance has finished compiling. Anthony On Monday, June 26, 2017 at 12:10:35 AM UTC-4, Ben Lawrence wrote: > > This thread might be a little o

[web2py] Re: smartgrid tampering with url in browser

2017-06-24 Thread Anthony
f not 'auth' in session: to: if not session.auth: The first will be True only when there is no 'auth' key in session, but the second will be True even if there is an 'auth' key in session, as long as the value is Falsey (such as None). Anthony On Saturday

[web2py] Re: smartgrid tampering with url in browser

2017-06-23 Thread Anthony
On Friday, June 23, 2017 at 1:35:23 AM UTC-4, T.R.Rajkumar wrote: > > Anthony, When I comment out auth and in model amc/amc.py I add this > from gluon.storage import Storage > from gluon.utils import web2py_uuid > if not 'auth' in session: > session.auth =

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2017-06-23 Thread Anthony
rtualFields()) > First, the above is an old-style virtual field -- you should instead use the new style <http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#New-style-virtual-fields>. Second, that is not the correct code even for the old style -- see the docu

[web2py] Re: Scaling web2py

2017-06-23 Thread Anthony
Either store sessions in the database or use stick sessions. See http://web2py.com/books/default/chapter/29/13/deployment-recipes#Efficiency-and-scalability. Anthony On Friday, June 23, 2017 at 4:12:37 PM UTC-4, briann...@gmail.com wrote: > > I'm planning to have 2 servers hosting

[web2py] Re: Error message customization

2017-06-23 Thread Anthony
That is best handled via CSS. The error div will have class "error", so you can use that to specify a CSS rule. Anthony On Friday, June 23, 2017 at 3:44:38 PM UTC-4, Simona Chovancová wrote: > > So I have a form with field which looks like this. I want the error > messag

Re: [web2py] Re: Newbie question about github / trunk

2017-06-22 Thread Anthony
nload zip file generated by Github does not include submodules, so that zip file will not work. Anthony -- 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) ---

Re: [web2py] Re: we2admin tables

2017-06-22 Thread Anthony
e that runs *after* the plugin's model file. Given that the "plugins" object isn't even defined yet, including that line in db.py should result in an exception. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.c

Re: [web2py] Re: web2py_component does not work with https...

2017-06-22 Thread Anthony
tp browser does not? Anthony On Thursday, June 22, 2017 at 6:01:09 AM UTC-4, Ramos wrote: > > I think i know why no console errors nor admin tickets > > this is the last line that is executed and comes from jquery > > [image: Imagem inline 1] > > after this line i get &g

[web2py] Re: smartgrid tampering with url in browser

2017-06-22 Thread Anthony
As far as I understand, you are not using Auth, so why are you defining auth = Auth(...) at all? Just get rid of that line. On Thursday, June 22, 2017 at 1:06:05 AM UTC-4, T.R.Rajkumar wrote: > > I put the below code in my model file amc.py > > from gluon.storage import Storage > from gluon.util

[web2py] Re: smartgrid tampering with url in browser

2017-06-21 Thread Anthony
The user_signature functionality expects auth.hmac_key in the session, so, you could add something like the following in a model file: from gluon.storage import Storage from gluon.utils import web2py_uuid if not 'auth' in session: session.auth = Storage(hmac_key=web2py_uuid()) A

[web2py] Re: Newbie question about github / trunk

2017-06-21 Thread Anthony
That just means test the master branch on Github. You can get it via: git clone --recursive g...@github.com:web2py/web2py.git Of course, you need Git installed. Anthony On Wednesday, June 21, 2017 at 3:53:55 AM UTC-4, Karoly Kantor wrote: > > I raised an issue in github about Google Clo

[web2py] Re: google_adapters.py vs google.py

2017-06-21 Thread Anthony
If the change is small, you could simply try manually replicating the change in your google_adapters.py file. Otherwise, the simplest option would probably be to just create a separate installation of web2py from Github via: git clone --recursive g...@github.com:web2py/web2py.git Anthony On

[web2py] Re: we2admin tables

2017-06-21 Thread Anthony
admin/plugin_web2admin.py#L44, but you can add additional dbs. Note, though, that it expects Auth to be in the first db listed, and functionality related to Auth is limited to the first db listed. If dbhome is your only database or the primary database, then list it first. Anthony On Wednesday,

[web2py] Re: user register form does not submit. Keeps reloading

2017-06-21 Thread Anthony
If the form doesn't submit but no errors appear, that could mean the _formkey check is failing, which would typically happen if cookies are disabled. If that's not the issue, we probably need to see some code. Anthony On Wednesday, June 21, 2017 at 5:25:43 AM UTC-4, Ramos wrote: >

[web2py] Re: Auth_membership issues

2017-06-20 Thread Anthony
Be sure to read the relevant documentation: http://web2py.com/books/default/chapter/29/09/access-control#Authorization. You need to create an "admin" group and make sure you are a member of it. Anthony On Tuesday, June 20, 2017 at 11:13:15 AM UTC-4, Maurice Waka wrote: > > I

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-20 Thread Anthony
when > trying out different users and get the same result? > auth.user is the user record of the currently logged in user. If *you* are logged in, then it will always be *your* user record. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] Re: smartgrid tampering with url in browser

2017-06-20 Thread Anthony
Have you tried user_signature=True? On Tuesday, June 20, 2017 at 6:42:11 AM UTC-4, T.R.Rajkumar wrote: > > I have this page from the edit button of the child. > > http://127.0.0.1:8000/web_ocms/amc/new_contract/amc_master/amc_details.amc_id/17/edit/amc_details/10 > Here 17 is the id of the master

[web2py] Re: smartgrid links

2017-06-19 Thread Anthony
I don't think that is supported. You can instead use server-side DOM manipulation <http://web2py.com/books/default/chapter/29/05/the-views#Server-side-DOM-and-parsing> to remove the unwanted DOM elements after the grid is created (or hide them via Javascript). Anthony On Wednesd

[web2py] Re: Archived records not being written to archive file

2017-06-18 Thread Anthony
people new to the platform. > Yes, I agree the book could be more clear on all of this. Anthony -- 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

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-17 Thread Anthony
auth.user_id is the id of the logged in user or None if the current user is not logged in. There is no "default" user. Unless the "quest" and "report" fields are sometimes set to None rather than an actual user id, your second set of queries will never return any

[web2py] Re: Archived records not being written to archive file

2017-06-16 Thread Anthony
makes the archive table definitions available in all requests. > re. the ".editable" - lack of familiarity with what's going on. Was trying > to protect against the potential of a form trying to edit the archive table > Sure, but did you see that somewhere? That func

[web2py] Re: Archived records not being written to archive file

2017-06-16 Thread Anthony
(and of course, you *can* edit those files, but they are framework files, so if you upgrade, you will have to merge your changes with the upgrade). Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

[web2py] Re: Archived records not being written to archive file

2017-06-16 Thread Anthony
n your own code somewhere? Anthony On Friday, June 16, 2017 at 3:09:08 PM UTC-4, jim kaubisch wrote: > > Hi Anthony, > > Attached is an app about as minimal as possible that exhibits the problem. > As before, a standard db.py except: > >- auth.define_tables(usernam

[web2py] Re: Archived records not being written to archive file

2017-06-16 Thread Anthony
Can you attach a minimal app (using SQLite) that reproduces the problem? Also, do not use auth.archive in conjunction with auth.enable_record_versioning (when working properly, that will cause duplicates of archived records). Anthony On Friday, June 16, 2017 at 12:50:54 AM UTC-4, jim kaubisch

[web2py] Re: Archived records not being written to archive file

2017-06-15 Thread Anthony
What do you mean by archive "file" -- archived records are written to a database table? How are you checking for the archived records? Anthony On Thursday, June 15, 2017 at 11:06:57 PM UTC-4, jim kaubisch wrote: > > Hi, > > > I’m stuck. Have looked at all documentation/

[web2py] Re: Is there any workaround to include 'does not contain' option in SQLform grid search?

2017-06-15 Thread Anthony
SQLFORM.grid(~db.sometable.somefield.contains('some string'), ...) The first argument can be a DAL Query object. Use .contains() with the query preceded by ~ for negation. Anthony On Thursday, June 15, 2017 at 10:08:53 AM UTC-4, Pranshul Chitransh wrote: > > I want to filt

[web2py] Re: Application developed and hosted in the web2py is very slow, how to increase memory for application?

2017-06-14 Thread Anthony
What makes you think it is a memory problem? What does your code look like? What happens if you access the /welcome/default/index, or /admin? Do those pages also take 5-20 seconds? Anthony On Thursday, June 15, 2017 at 2:31:11 AM UTC-4, skylab.chennai2...@gmail.com wrote: > > H

[web2py] Re: How I can disable user_group, membership, permission, events?

2017-06-14 Thread Anthony
rators and appadmin. Move that to a model file. Anthony On Thursday, June 15, 2017 at 1:56:20 AM UTC-4, Вячеслав Анатольевич wrote: > > So, I have db/table where i have data, i want just login user by the my > field/data: > > > def user(): > auth = Auth(db, signatu

Re: [web2py] Re: Why do I get a blank screen on view

2017-06-14 Thread Anthony
On Thursday, June 15, 2017 at 1:48:51 AM UTC-4, Maurice Waka wrote: > > Sorry. Am not sure about value of Auth.user_id > It is the id of the current logged in user. You can simply display it on the page or print it to the console to inspect it. Anthony -- Resources: - http://web2py.c

[web2py] Re: Why do I get a blank screen on view

2017-06-14 Thread Anthony
What is the value of auth.user_id? Are you sure there are records in the database whose "post_by" value is equal to it? On Thursday, June 15, 2017 at 12:03:54 AM UTC-4, Maurice Waka wrote: > > when trying to view posts created by author, i tried this piece of code on > controller: > >1. opti

[web2py] Re: dev_appserver does not allow login to my web2py app from LAN client

2017-06-14 Thread Anthony
/'): request.requires_https() # Only when running on GAE. If that's the issue, though, it has nothing to do with requiring login. Anthony On Wednesday, June 14, 2017 at 7:30:53 PM UTC-4, 98uj...@gmail.com wrote: > > Thank you for your response! > > I am afraid that my que

Re: [web2py] Re: web2py 2.15.1

2017-06-14 Thread Anthony
On Wednesday, June 14, 2017 at 2:33:58 PM UTC-4, Richard wrote: > > Anthony, > > What are the issue with Calendar?? I know it outdated, support seems to > shade away (http://www.dynarch.com/ -> Website down and a link to > documentation is provide... > See OP.

[web2py] Re: dev_appserver does not allow login to my web2py app from LAN client

2017-06-14 Thread Anthony
ing to access either the admin app or the appadmin page of your app -- those are the only things that require HTTPS (or alternatively a local connection). Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: Trying to use a variable as a field name in a table insert

2017-06-12 Thread Anthony
t; category you mentioned, > I don't think I said anything was "non pythonic" (I identified some *invalid *code -- but that code literally doesn't work at all, it is not merely non-Pythonic). The above code was my suggested (working) alternative, and I think the use o

Re: [web2py] Re: web2py 2.15.1

2017-06-12 Thread Anthony
On Monday, June 12, 2017 at 2:28:21 PM UTC-4, Richard wrote: > > Also, I am not sure what happen with web2py_ajax.*js *I found reference > to it in web2py_ajax*.html* > You must have a very old version -- web2py_ajax.js was changed to web2py.js a long time ago. Anthony -- Resou

[web2py] Re: Future of web2py

2017-06-12 Thread Anthony
e > validators built in (and known to be equivalent/compatible with the > server-side ones) would be really nice. > Got it, but that's not what you described in your previous post. web3py will likely work more like this. Anthony -- Resources: - http://web2py.com - http://web2py.c

[web2py] Re: SQLFORM.grid filtering with local and external table

2017-06-12 Thread Anthony
You probably want .belongs() with a nested ._select(), as shown here: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#belongs Anthony On Monday, June 12, 2017 at 10:27:43 AM UTC-4, J-Michel Angers wrote: > > Hi, > My app goes forward, I have plaisure to dev

[web2py] Re: Future of web2py

2017-06-12 Thread Anthony
> > >1. *Better token based authentication for apis* > > web2py Auth supports JWT tokens. > >1. Support of GET and POST requests on login like flask does. > > What does this mean? Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documen

Re: [web2py] Re: Future of web2py

2017-06-11 Thread Anthony
ll be released in the next few days and will support Python 3. It is still web2py, just with Python 3 support and a number of other updates and fixes. web3py will be a completely new framework (also supporting Python 3), quite different from web2py. It is not close to ready for release. Anthony

[web2py] Re: Future of web2py

2017-06-11 Thread Anthony
; than forms loaded in full pages), and only the component itself refreshes upon submission. It is not quite clear what else you are looking for. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.googl

[web2py] Re: Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-09 Thread Anthony
which cannot be the case, as the current version of web2py requires specifying the table names with the exportclasses argument of smartgrid. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] Re: Do not redirect to URL ("default", "user", args = "login") when login fails ...

2017-06-09 Thread Anthony
L settings, as they will automatically be constructed properly based on the new controller. Note, you can also specify a custom function via the "function" argument. Anthony On Friday, June 9, 2017 at 4:22:46 PM UTC-4, Junior Phanter wrote: > > Sorry my bad english. > > Guys, I ne

[web2py] Re: Future of web2py

2017-06-09 Thread Anthony
"I am guessing speed will be the only motivation to consider in going from pathon 2 to python 3." How does that relate to third party packages and web3py vs. Django/Flask? Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] Re: Smartgrid, grid export control works on Linux, but not on Windows Server

2017-06-09 Thread Anthony
t;>divider="»", formname='title_grid') >>>> >>>> >>>> -Jim >>>> >>>> On Friday, June 9, 2017 at 10:33:01 AM UTC-5, Seth J wrote: >>>>> >>>>> Sorry, d

[web2py] Re: Trying to use a variable as a field name in a table insert

2017-06-09 Thread Anthony
ayment_ref=payment.id, > > invoice_ref=record.id, > > amount_allocated=allocation) > > Thanks for talking the time to explain Anthony! > > Peter > > > > > > -- Resources: - http://web2py.com -

[web2py] Re: Web2PY not importing global modules

2017-06-08 Thread Anthony
Looks like you are using the OSX binary web2py, which includes its own Python interpreter and doesn't see anything in your system installation of Python. Instead, just use the source version of web2py -- binary is only needed if you don't have Python installed. Anthony On Thursd

[web2py] Re: User login

2017-06-08 Thread Anthony
: http://web2py.com/books/default/chapter/29/07/forms-and-validators#smartgrid-signature Anthony On Thursday, June 8, 2017 at 5:06:32 PM UTC-4, Swayambodha Mohapatra wrote: > > Need some help regarding restricting the contents of a table to view only. > I have used a smartgrid to link 4 ta

<    6   7   8   9   10   11   12   13   14   15   >