[web2py] Re: How to demonstrate LOAD() working properly?

2015-10-02 Thread pn
Hi, the link you posted shows a blank page. I think you may have copy-pasted from inside an email that requires you to have been logged in, try visiting the link and copy-pasting from the browser URL. Or maybe provide the example of your app by uploading it to github/bitbucket. On Friday,

[web2py] Re: Nested Role Based Access Control

2015-09-30 Thread PN
No graph database needed the way we implemented it. We use a regular db and generate the graph in-memory. The current simple implementation is to query auth_permissions where table_name = 'auth_group' so we only get entries that are relevant to group-group ownerships. The graph is kept in

[web2py] Nested Role Based Access Control

2015-09-30 Thread PN
Currently web2py's RBAC functionality does not accommodate nested groups. Any interest in adding this to the standard web2py access control module? *Example Use-Case* Suppose we are creating an inventory management application that lets you view addresses for buildings within your portfolio

[web2py] Re: My first web project

2014-12-10 Thread PN
User registration and authentication -- use the auth functionality that comes with web2py by default (see the chapter on Access Control). Create a group called 'Instructor' and if someone is a member of that they get additional functionality (like viewing other users' grades). Use the built-in

[web2py] Re: 2 factor auth doesn't seem to take effect.

2014-12-09 Thread pn
I contributed this originally, will take a look today. Should be an easy fix. On Monday, December 8, 2014 9:27:35 PM UTC-5, Massimo Di Pierro wrote: Honestly I have not used this much myself recently. Please open a ticket about this problem. It may be broken. v On Friday, 5 December 2014

[web2py] Re: 2 factor auth doesn't seem to take effect.

2014-12-09 Thread pn
to note: - You must have a group with this name in auth_group - You must add user to this group - You must have email setup in order to receive the two factor authentication code I'll submit a fix to the documentation in the book. On Tuesday, December 9, 2014 1:50:33 PM UTC-5, pn wrote

[web2py] Re: Scheduler: plugin cs_plugin_monitor updated to 2.0.1

2014-11-02 Thread pn
Looks really impressive! Will check out the code tomorrow. Are you looking for any help besides code-review/comments? On Sunday, November 2, 2014 8:49:51 AM UTC-5, Niphlod wrote: Followers of the relevant repo https://github.com/niphlod/cs_monitor_plugin should be yet aware that there was

[web2py] Re: web2py usage monitor with slow web2py vs fast web2py

2014-09-30 Thread PN
Are the SLOW version and FAST version different web2py applications (i.e. the code under web2py/applications/project_name is different)? If so, the difference in speed is likely coming from what processes each app is running on call. Some places to look at -- try to identify which page is the

[web2py] Re: Upgrading an old version - will my app work?

2014-09-28 Thread pn
The bad news: You will need to test to be sure it works, and there may be some work required for the upgrade. The good news: Most likely, you will only need to make minor changes and will be happy with the features offered by the newer versions. The biggest change you will have to deal with

[web2py] Re: mssql legacy tables reference

2014-09-28 Thread pn
Can you provide some clarification on what behavior are you expecting but not seeing when you create the reference? For example, are you able to create entries in the 'Partneri' table that refer keys not in the 'Mjesta' table? A quick workaround would be to put in a 'requires' lambda into the

[web2py] Re: Version 2.9.6 indeed breaks backward compat for some users

2014-09-22 Thread PN
Seems like a related issue still exists in web2py 2.9.11 for Microsoft SQL Server. list:integer type fields get mapped to 'text' type fields in MS SQL. The text type fields cannot use functions like 'LOWER', only varchar type fields can. So now queries like field.contains(integer) will not

[web2py] Running a long task with task scheduler multiple times in the same browser

2014-09-21 Thread pn
Did you test in a production environment (example behind an apache/other server calling web2py via wsgi as described in the deployment recipes chapter) or just using the built-in web2py server on your dev machine? The difference is that apache will certainly be able to handle multiple

[web2py] Re: using plugin_jqmobile prevents uploading a file

2014-09-14 Thread pn
It is probably because you cannot upload files when ajax is enabled in jquery-mobile forms. There are more details at the following links on how to correctly structure a file upload form in jquery mobile. Quote from their docs (http://demos.jquerymobile.com/1.4.4/forms/ -- near the bottom of

[web2py] Re: Is anyone working on a two-step login for auth? (Sometimes called two factor authentication)

2014-09-02 Thread PN
Update. The code is part of web2py starting at version 2.9.6 On Wednesday, May 14, 2014 2:18:59 PM UTC-4, pallav wrote: Another update - submitted the fixed code as a pull request. This fixes the issue that was causing unit tests to fail. Waiting to hear back from the team. On Tuesday,

[web2py] Re: Is anyone working on a two-step login for auth? (Sometimes called two factor authentication)

2014-04-24 Thread PN
I just implemented two-factor authentication in an app that I am working on. Unfortunately it required changing the login() method of the gluon/tools.py file directly, there was no mechanism that would allow a secondary login requirements. Is this still useful? If someone is more experienced

[web2py] Re: 2.9.5-stable Version throws ticket when /admin accessed - dead in water

2014-03-21 Thread PN
Any luck? Posting the details of the ticket error output will help debug the problem. On Friday, March 21, 2014 12:06:11 AM UTC-4, weheh wrote: Gaah! I just restored the older version of web2py from which I upgraded (ashamed to say it's 2.3.2) and now I'm getting the same error. So

[web2py] Re: list reference with ondelete=set null breaking when delete parent

2014-03-21 Thread PN
Your desired behavior is that when a color is deleted it should be set to null in tshirts, so you need to put the ondelete attribute in the color field in the color table instead of on the colors field in the tshirt table. db.define_table('color', Field('color', 'string',

[web2py] Re: Can the DAL produce pivot table query (for use with Google Charts Plugin)?

2014-03-21 Thread PN
I don't think the DAL provides that by default. You have the option of writing your own pivot function (it's not very complicated, that's the way I went) or you can use a library like pandas if your production server lets you install numpy/scipy/pandas. Pandas will give you a lot more data

Re: [web2py] Re: list reference with ondelete=set null breaking when delete parent

2014-03-21 Thread PN
... ondelete is for use with upload and reference fields... http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Field-constructor On Fri, Mar 21, 2014 at 1:54 PM, PN pal...@fielddiagnostics.comjavascript: wrote: Your desired behavior is that when a color is deleted

[web2py] Re: Boots trap user graph

2014-03-20 Thread PN
The solution will depend on what user activity you are trying to log/graph. You can use Google Analytics (the code is built into web2py, but there are tons of help pages available) to track usage report. There are many useful standard reports (how often, what location, what device, etc.) and if

[web2py] Re: Pulling data every 30s for a ticker with web2py

2014-03-20 Thread PN
You can also use web2py components (see the chapter titled 'Components and Plugins' in the web2py book). Basically first make a normal web2py page that reads the remote API every time the page is loaded, and displays the results. Then, load this page as a component into another page, and

[web2py] DAL has not attribute db when field is a reference to another table

2014-03-06 Thread PN
When I use a query which uses a reference type field, I get the error: type 'exceptions.AttributeError' 'DAL' object has no attribute 'db' In my code below, db.Units.site_id is a reference field. The error only happens when I use this field and not on other fields of the table. The relevant

[web2py] Re: DAL has not attribute db when field is a reference to another table

2014-03-06 Thread PN
(if referenced in self.db.tables:) On Friday, March 7, 2014 12:31:09 AM UTC-5, PN wrote: When I use a query which uses a reference type field, I get the error: type 'exceptions.AttributeError' 'DAL' object has no attribute 'db' In my code below, db.Units.site_id is a reference field

[web2py] Re: DAL has not attribute db when field is a reference to another table

2014-03-06 Thread PN
Problem found and fixed - it was in my own code. I was using the wrong format to reference another table, changed it to match what is specified in the web2py book and all is well. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Microsoft SQL Server Migrate Trying to Create New Table instead of Editing Old One

2014-01-08 Thread PN
:45:17 PM UTC-4, PN wrote: So, in theory, will the following process fix the issue? 1. Start web2py with old DAL definitions and migrate = True. This should create the .table files as the old structure 2. Then change the DAL to reflect the new database structure, migrate still = True 3

[web2py] Re: Microsoft SQL Server Migrate Trying to Create New Table instead of Editing Old One

2013-10-04 Thread PN
on the backend) On Sunday, September 29, 2013 2:06:50 AM UTC+2, PN wrote: Version: Using web2py 2.6.4 Steps: 1. I used web2py DAL to create a table in ms sql. This ran in production for a while. 2. I downloaded the web2py app to my development machine, and added a column

[web2py] Microsoft SQL Server Migrate Trying to Create New Table instead of Editing Old One

2013-09-28 Thread PN
Version: Using web2py 2.6.4 Steps: 1. I used web2py DAL to create a table in ms sql. This ran in production for a while. 2. I downloaded the web2py app to my development machine, and added a column to the table in DAL. 3. When I try to go to the table in web2py admin (database