[web2py] Auth - overlapping permissions problem

2020-07-16 Thread Paul Ellis
the situation is that I have permissions associated with auth_groups. eg. user, team leader, business leader, oversight now I need a "secretary" or "accounts" group which has access to some business leader features i.e reports. Some team leader features ie. price maintainence. But does not

[web2py] Accessing Postgres server from a secondary docker container without db.py

2019-12-17 Thread Paul Ellis
How do I do connect to a prostgres server using PyDAL but without a db.py in the secondary container or having all the tables drop when I connect without a db definition? I have a server running docker with containers for the nginx proxy, lets encrypt, web2py and postgres. one

[web2py] Smartgrid with multiple references between tables - Undocumented - Solved

2019-12-09 Thread Paul Ellis
When using Smartgrid and there are multiple links between two tables. For example a user_id might appear multiple times in db.offer because of created_by, updated_by, belongs_to fields. db.define_table( 'offer', Field('offer_number', unique=True, label = T('Offer Number')),

[web2py] Re: Tempfile not found when uploading images with the Add function in a Grid

2019-11-04 Thread Paul Ellis
Actually I was looking at the wrong controller function. I have a utility function which returns part of the UI. Somehow when the form is submitted and this is run the tempfile for the image is closed. So by doing this at the end, after the form processing is complete, the problem is solved.

[web2py] Re: SQLFORM.grid search with fields readable = False

2019-11-01 Thread Paul Ellis
If you want the fields to be searchable. Then instead of setting readable = false. Hide the fields with: db.table.field.represent = lambda value, row: DIV(value, _class='hidden') and the column heading with: grid = SQLFORM.grid( headers = { 'table.field' : DIV(_style =

[web2py] Tempfile not found when uploading images with the Add function in a Grid

2019-11-01 Thread Paul Ellis
I am getting this error when users upload an image with the Add function of a grid. As background, it is adding a product which can only be seen by users in a particular group (belong to the same company). Traceback 1. 2. 3. 4. 5. 6. 7. Traceback (most recent call last): File

[web2py] Upload field causing a temp file issue

2019-08-21 Thread Paul Ellis
I have 2 similar controller functions using SQLFORM() with an upload field. One works and one is giving an error online (not when testing locally). I suspect a file system permission problem but I am not sure. The error only occurs if an image is uploaded. The extra processing after the form is

[web2py] Colleagues, how can I generate an identification code automatically?

2019-06-20 Thread Paul Arsenio Blanco Reyes
It turns out that I have a company table, in turn, the company can be classified as a client, as a supplier or both together. How to assign a consecutive to the company according to its classification? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Generating graph with chartjs

2019-06-08 Thread Paul Arsenio Blanco Reyes
Recently I found the theme "AdminLTE" (https://adminlte.io/themes/AdminLTE/index.html) I have already implemented it in my application. I would like to generate some graphics like those that appear in the preview but I don't know how yo do it. Would any of you can help me with any example to

Re: [web2py] Re: How to convert my view to pdf

2019-05-07 Thread Paul Ellis
I had a look at xhtml2pdf and I am not sure how to implement it in my web2py application. Do you save the PDF as a file or output it to the browser? Do you use the html generated by the web2py view and have the function calls in a view or do you generate the HTML another way in a controller

[web2py] Receiving JSON via AJAX in controller function

2019-05-02 Thread Paul Ellis
I have some JS which sends data from a row in a grid to the server as JSON. The controller function receives the JSON in a request.vars key (not a value). This is awkward to find if there are other request.vars. Currently I am testing for lengths over 10. This was a quick hot fix because I

[web2py] Re: How to convert my view to pdf

2019-04-29 Thread Paul Ellis
This is really hard to answer because a PDF has a set page size and a HTML file (view) does not. Plus getting the css used in a HTML file to translate into css is also a challenge. Just print the page you are talking about with a pdf printer driver to see. You probably won't be happy with the

Re: [web2py] Re: MARKMIN - Sanitizing

2019-04-29 Thread Paul Ellis
Hey Villas, thanks. I actually thought that the XML sanitization would break the MARKMIN conversion but it doesn't. I probably should have tested that first. Regards On Mon, Apr 29, 2019 at 7:06 PM villas wrote: > Hi Paul > > If you are worried about saving dodgy text in the

[web2py] MARKMIN - Sanitizing

2019-04-25 Thread Paul Ellis
I am using an editable span with some js to submit the input via ajax to the server. The span is only editable by admins. To give them some formatting options they can use MARKMIN in the span. The problem is it only seems to be one directional. How can I take the processed HTML and turn it

[web2py] Re: Don't allow textarea to contain html tags

2019-04-23 Thread Paul Ellis
you could use XML(input_text, sanitize=True) as part of your form processing. http://www.web2py.com/books/default/chapter/29/05/the-views#XML if form.process().accepted: form.vars.text_input = XML(form.vars.text_input, sanitze=True) -- Resources: - http://web2py.com -

[web2py] Re: Asynchronous submission of request.vars values to Controller for calculations using Ajax

2019-04-17 Thread Paul Ellis
Which controller is displaying the view you have posted? It looks like the ajax function is calling the same controller which returns the index page. The controller function called by the ajax function should return a string. The string can be jquery which will be evaluated if you use ':eval'.

[web2py] Re: mysql import from csv problem

2019-03-03 Thread Paul Ellis
Which python and web2py version are you using? Do you mean you don't have the csv file anymore? Do you have a backup of the old database to make another one from? On Tuesday, 19 February 2019 22:13:24 UTC+1, Andrea Fae' wrote: > > Hello, when I import with this procedure >

Re: [web2py] Re: dict values error in python 3.6

2019-03-03 Thread Paul Ellis
https://github.com/web2py/web2py/issues/2126 done On Sat, Mar 2, 2019 at 12:16 PM Kevin Keller wrote: > Can someone file an issue on github and also attach the solution please? > Thanks > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Re: custom_auth_table TypeError: a bytes-like object is required, not 'str'

2019-03-01 Thread Paul Ellis
I have solved this by deleting errors. I think there was some errors pickled while running Python 2 still in the directory. Is it possible your /databases/*.table files were pickled while running under Python 2? Might need to export the data and start a fresh database with python 3 and then

[web2py] Re: custom_auth_table TypeError: a bytes-like object is required, not 'str'

2019-03-01 Thread Paul Ellis
web2py™Version 2.17.2-stable+timestamp.2018.10.06.11.34.06 PythonPython 3.7.0: Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 219, in restricted exec(ccode, environment) File "C:/web2py/applications/admin/controllers/default.py"

[web2py] Re: dict values error in python 3.6

2019-03-01 Thread Paul Ellis
This is a issue with generic.html. In Python 3 dict.values() does not return a list it returns a dict_values object. On line 10 of Generic.html wrap the values method call in list() and it works. {{=BEAUTIFY(list(response._vars.values())[0])}} -- Resources: - http://web2py.com -

[web2py] Re: Issue with db.export_to_csv_file and Python 3.7

2019-03-01 Thread Paul Ellis
I have been having a similar problem with importing from csv file and the same solution works. db.import_from_csv_file(open(path, 'r', encoding='utf-8', newline=''))Enter code here... On Saturday, 2 March 2019 00:53:29 UTC+1, jim kaubisch wrote: > > been looking around some more. turns out

[web2py] Re: web2py - docker - sending email

2019-03-01 Thread Paul Ellis
is not required for outgoing mail. On Friday, 1 March 2019 05:46:10 UTC+1, Paul Ellis wrote: > > I am moving an app to a new server. Previously on pythonanywhere and could > send email for password resets. So the email settings are correct. > > New server is using docker. web2py + nginx >

[web2py] Re: Cannot import modules

2019-02-28 Thread Paul Ellis
I know this sounds odd. But this worked for me recently. It can be caused by a corrupt .pyc file. Try deleting the .pyc files and see if the problem remains. On Thursday, 28 February 2019 20:54:24 UTC+1, Ben Duncan wrote: > > Getting the following errors when trying to import a module > Module

[web2py] web2py - docker - sending email

2019-02-28 Thread Paul Ellis
I am moving an app to a new server. Previously on pythonanywhere and could send email for password resets. So the email settings are correct. New server is using docker. web2py + nginx Trying to send email I am getting the following error: web2py:Mail.send failure:[SSL: WRONG_VERSION_NUMBER]

[web2py] Fresh install - ImportError: cannot import name Cookie

2019-02-28 Thread Paul Ellis
with a fresh install of web2py by running git clone --recursive https://github.com/web2py/web2py.git and then running: python web2py.py I am getting: Traceback (most recent call last): File "web2py.py", line 21, in import gluon.widget File "C:\w2p\gluon\__init__.py", line

[web2py] Re: SQLFORM.grid() buttons have no names? 2.17.2-stable

2018-12-30 Thread Paul Ellis
Seems to me that it would as simple as using the buttonclass key as a name or id in the gridbutton function. But I am not a professional so I don't know if this is a good idea. def gridbutton(buttonclass='buttonadd', buttontext=T('Add'), buttonurl=url(args=[]),

[web2py] SQLFORM.grid() buttons have no names? 2.17.2-stable

2018-12-30 Thread Paul Ellis
Is there a reason there are no names or ids attached to the grid buttons? Like addBtn, deleteBtn and so on. There's no identifying information on the buttons to make it easy to change the text or colour, for example. I don't want 'Add record' I want something more contextual depending on the

[web2py] Re: removing / hiding SQLFORM.grid links in the view, edit, add forms?

2018-12-12 Thread Paul Ellis
After reading the sqlhtml.py for a while last night. I decided to use the same method. Before creating the grid: if request.args(-3) in ('edit', 'view'): On Wednesday, 12 December 2018 00:10:02 UTC+1, Paul Ellis wrote: > > I have a grid with some links. One of the buttons is a place

Re: [web2py] removing / hiding SQLFORM.grid links in the view, edit, add forms?

2018-12-12 Thread Paul Ellis
@Sandeep That will disable the view, edit, create forms completely. I want to use the forms. I just don't want the extra buttons (links) which I use in the grid to appear in these forms. On Wed, Dec 12, 2018 at 6:23 AM sandeep patel wrote: > @Paul, > You can do this way, > grid = SQL

[web2py] removing / hiding SQLFORM.grid links in the view, edit, add forms?

2018-12-11 Thread Paul Ellis
I have a grid with some links. One of the buttons is a placeholder which some Jquery attaches to. How do I stop this button from appearing in the subforms add, view etc. I don't really want or need any of the links to appear in the subforms. grid = SQLFORM.grid(query, links = [

[web2py] Broken/Changed Link on Web2py.com

2018-09-26 Thread Paul Ellis
Hey Contributors, The link behind the 3rd picture on web2py.com goes to paktpub.com and shows a book about 'Internet Marketing with WordPress'. Looks like the site is correct, not sure about the book. Just thought you would like to know. Best Regards -- Resources: - http://web2py.com -

[web2py] Re: How to select row based on item ID or name

2018-01-04 Thread Paul Ellis
You would still get a Rows Object though, even though there is only 1 row in it. You would need .first() .last() or [0] at the end to get just the row. Or use the shortcut method. db.table[id] On Thursday, 4 January 2018 18:24:26 UTC+1, Dave S wrote: > > > > On Wednesday, January 3, 2018 at

[web2py] Requesting button names for grid and smartgrid

2018-01-04 Thread Paul Ellis
Would it be possible to name the grid buttons and smartgrid table links? This would make it pretty easy to tweak the buttons. For example. I would like to change the Delete button to red. I can do it like this: rowBtns = grid.elements('div', _class = 'row_buttons') if rowBtns: for row in

Re: [web2py] Re: smartgrid - limit dropdown menu items in edit form

2018-01-04 Thread Paul Ellis
in your db.py > file to apply this rule to the entire site. > > http://web2py.com/books/default/chapter/29/06/the- > database-abstraction-layer?search=common+filter#Common-filters > > > > On Monday, January 1, 2018 at 4:51:33 PM UTC-6, Paul Ellis wrote: >> &

[web2py] smartgrid - limit dropdown menu items in edit form

2018-01-01 Thread Paul Ellis
I want to start using a smartgrid to browse a couple of tables as an admin tool. There are a couple of companies using the same database. When an admin edits an 'Offer' I want them to be able to change the user_id. Effectively assigning the offer to a different staff member in the event of

[web2py] Small correction to the manual

2017-08-30 Thread Paul Furber
In this section of the manual: http://www.web2py.com/books/default/chapter/29/10/services#parse_as_rest--experimental- There is a paragraph explaining how to use cURL to test a restful API as follows: If you have the "curl" utility installed you can try: $ curl -d "name=Tim"

Re: [web2py] SQLFORM.grid search type error reduce()

2017-08-15 Thread Paul Ellis
. Thanks for the fix. On Tue, Aug 1, 2017 at 10:46 AM, Paul Ellis <eddie.dig...@gmail.com> wrote: > I am getting this error only when searching the auth_membership table > > I have put in a basic 'appadmin' in my webapp. I call it 'tooladmin' to > differentiate from the built i

Re: [web2py] Re: SQLFORM.grid search type error reduce()

2017-08-07 Thread Paul Ellis
I will gladly test. But I can't do it until next week. ⁣Sent from TypeApp ​ On 4 Aug. 2017, 17:58, at 17:58, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: >Just fixed in trunk. Can you please help test the fix? > >On Tuesday, 1 August 2017 03:46:13 UTC-5, Paul Ellis wr

[web2py] SQLFORM.grid search type error reduce()

2017-08-01 Thread Paul Ellis
I am getting this error only when searching the auth_membership table I have put in a basic 'appadmin' in my webapp. I call it 'tooladmin' to differentiate from the built in stuff. I use this function to edit any database table: def manage_table(): tablename = request.args(0) pagetitle

Re: [web2py] Re: PDF Download File Name

2017-05-29 Thread Paul Ellis
y 29, 2017 at 10:41 AM, Paul Ellis <eddie.dig...@gmail.com> wrote: > I tried your suggestion like this: > response.view = offer_number > response.headers['Content-Type'] = 'application/pdf' > return pdf.output(dest='S') > > but I still get the controller

Re: [web2py] Re: PDF Download File Name

2017-05-29 Thread Paul Ellis
ely@gmail.com> wrote: > > > On Tuesday, May 16, 2017 at 1:27:06 AM UTC-7, Paul Ellis wrote: >> >> Hello, >> >> I use pyfpdf to display some information from my my database. When I >> click save the filename is 'pdf_view' which is the name of the controller >

[web2py] PDF Download File Name

2017-05-16 Thread Paul Ellis
Hello, I use pyfpdf to display some information from my my database. When I click save the filename is 'pdf_view' which is the name of the controller function. How can I change this? I want the name to also come from the database. With the help of others on here. I can make a download link

Re: [web2py] Re: Python web2py console

2017-03-07 Thread Paul Ellis
cation -M > > Em segunda-feira, 6 de março de 2017 11:14:53 UTC-3, Paul Ellis escreveu: >> >> Yes. I want an interactive shell with my application loaded. >> >> I know I can run a 'Test' page with output to the console, but it would >> be much easier (and I know

Re: [web2py] Re: Python web2py console

2017-03-07 Thread Paul Ellis
t have > Python installed. If you have Python installed, it would be preferable to > just use the source version of web2py -- don't bother with the .exe version. > > Anthony > > > On Monday, March 6, 2017 at 7:14:34 AM UTC-5, Paul Ellis wrote: >> >> Hello, >> >

Re: [web2py] Re: Python web2py console

2017-03-06 Thread Paul Ellis
, Mar 6, 2017 at 2:36 PM, Marlysson Silva <marlyss...@gmail.com> wrote: > Try just double click in web2py.exe , it open a server in a screen. > > Or are you trying accessing models of application via shell? > > Em segunda-feira, 6 de março de 2017 09:14:34 UTC-3, Paul Ellis

[web2py] Python web2py console

2017-03-06 Thread Paul Ellis
Hello, I know this question has been asked before, but didn't solve the problem for me. I am using Windows 10 and web2py binary and have replaced web2py.py with web2py.exe in the command python web2py.py -s [applicaiton] -m and am getting this error: python web2py.exe -s [application] -m

Re: [web2py] Re: Autoincrement which resets each month (not primary id)

2017-03-06 Thread Paul Ellis
Hey Brian, Doing it on the fly won't work because I want the number to be set at record creation and be a part of the dataset. Also, this is what I am already doing. Using a database trigger is something I don't know anything about. So thank you for the nudge, I will research this option. Paul

[web2py] Autoincrement which resets each month (not primary id)

2017-03-05 Thread Paul Ellis
I want to have a numbering system which is 2 digit year, 2 digit month and then an autoincrement number which resets each month. 1703# Currently using SQLite with a view to move to MYSQL in future. The MYSQL examples I have found suggest using a composite primary key, which doesn't seem to

[web2py] Re: how to open web2py console shell on my windows 8 ??

2017-03-04 Thread Paul Ellis
Hi Anthony, I am using Windows 10 and have replaced web2py.py with web2py.exe and am getting this error: SyntaxError: Non-ASCII character '\x90' in file web2py.exe on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details What am I doing wrong? Cheers On

[web2py] Re: SQLFORM.grid field.represent not working with joined tables

2017-02-20 Thread Paul Ellis
I still don't know what caused this. There was obviously something missing in the grid. I have come back to the problem after working around it with js and can't replicate the issue. It is now working. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: SQLFORM.grid field.represent not working with joined tables

2017-02-15 Thread Paul Ellis
Here is the traceback: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. Traceback (most recent call last): File "E:\web2py\gluon\restricted.py",

[web2py] SQLFORM.grid field.represent not working with joined tables

2017-02-14 Thread Paul Ellis
I have have a grid with a left outer join. So the row objects look like this: I am trying to use represent to make some of them editable. For the optional checkbox it is like this: db.product_offer_item.optional.represent = lambda value, row: INPUT(_type='checkbox',

Re: [web2py] Re: SQLFORM.grid changing the behaviour when there are no records

2017-02-13 Thread Paul Ellis
Oh I didn't know I could do that. That's perfect! Thanks Edwin. On Mon, Feb 13, 2017 at 8:59 PM, Edwin Haver <edwinha...@gmail.com> wrote: > Hi Paul, > > You can test if the grid has rows by doing the following > > {{if grid.rows:}} > {{=grid.rows}} > {{else

[web2py] SQLFORM.grid changing the behaviour when there are no records

2017-02-13 Thread Paul Ellis
I want to display something else if the query returns empty. Like some instructions and buttons. I can't find anything in the SQLFORM.grid signature, like an on_empty option and haven't found anything in the book or by googling. As the Add button doesn't fit this situation. I am getting a DIV

[web2py] Re: [web2py:34645] Re: Does your Response Flash get in the way?

2017-02-13 Thread Paul Ellis
Hi Thadeus, How did you move the flash messages? On Thursday, 5 November 2009 17:52:15 UTC+1, Thadeus Burgess wrote: > > Instead of putting a timer on response.flash, I moved its location to > another location on the site that does conflict with any text. > > -Thadeus > > > > > On Thu, Nov 5,

[web2py] Changing the default PDF dowload filename (fpdf)

2017-02-12 Thread Paul Ellis
When want to save a PDF made with FPDF and web2py. The filename is always the controller function name (pdf_view) in this case. I would like to make the filename take a value from the database. Customer name or Business name for example. I have tried adding a name in the output() but it

[web2py] Re: Changing Bootstrap Navbar to light background colour

2017-02-07 Thread Paul Ellis
In my version of web2py the layout.html has this: However, it is definitely black. If I change it to navbar-inverse I get a green navbar. By using the above css. I am able to get a light navbar. Thanks On Thursday, 3 December 2015 11:32:48 UTC+1, Leonel Câmara wrote: > > I don't mean in the

Re: [web2py] Re: How to add an input field in SQLFORM.grid??

2016-11-28 Thread Paul Ellis
What about if I don't use 'callback' but 'href' so it loads the whole page. I still can't get the quantity value to be passed as an arg. On Saturday, 26 November 2016 14:35:33 UTC+1, Anthony wrote: > > On Friday, November 25, 2016 at 11:11:41 PM UTC-5, Paul Ellis wrote: >> >>

Re: [web2py] Re: How to add an input field in SQLFORM.grid??

2016-11-25 Thread Paul Ellis
Hi, I am trying to do the same thing as the OP. Add a quantity input field to a grid and then use Callback to work with the product_id and quantity. I just don't seem to be able to pass the quantity to the callback function. Using this method I don't get a value from quantity.

[web2py] Experts4Solutions down?

2016-10-11 Thread Paul Flaherty
consulting? Best regards, Paul Flaherty -- 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] Re: set difference using db

2016-03-10 Thread Paul
elect() > > > -Jim > > On Thursday, March 10, 2016 at 8:49:32 AM UTC-6, Paul wrote: >> >> Does anyone know if there is a way to perform set difference (ie the >> elements in set A that are not in set B) using database queries / DAL? >> >> for example if you

[web2py] set difference using db

2016-03-10 Thread Paul Green
thing"s owned by person X, create python set objects and use the set difference operator. I'm wondering if there is a way to do this as a single db query? Thanks! Paul -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - ht

Re: [web2py] Re: Create a service running continuously

2016-03-06 Thread Paul Gerrard
un_my_loop() > > > > On Monday, 29 February 2016 10:36:23 UTC+1, Paul Gerrard wrote: >> >> I have written some Python code to act as a chatbot working with Slack. >> All looks good so far. I could add it as a service to /etc/init.d etc and >> make it work at startup.

[web2py] Create a service running continuously

2016-02-29 Thread Paul Gerrard
need to add credentials to the command too? How do I do this? Assuming there's a way to provide credentials through the shell, would a permanently running service created this way cause any other issues? thanks, Paul. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Simple left sidebar example

2016-01-05 Thread Paul McDonald
Can anyone post a simple example of a View with a left sidebar? I must be missing something. It looks so simple in the manual "5.7 Blocks in views". Thank you in advance. Paul -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2

[web2py] Re: Simple left sidebar example

2016-01-05 Thread Paul McDonald
On Tuesday, January 5, 2016 at 5:03:19 PM UTC-5, Paul McDonald wrote: > > Can anyone post a simple example of a View with a left sidebar? > I must be missing something. It looks so simple in the manual "5.7 Blocks > in views". > Thank you in advance. Paul > Sti

[web2py] Re: Q: Efficiently searching by tag / field widths

2015-05-28 Thread Paul Coy
Thanks for the reply. I can't find anything that looks like your reply so I think I'm going to try Example 29 from the Web2py site instead. It looks very similar to what I'm trying to accomplish. On Thursday, May 28, 2015 at 1:16:53 AM UTC-4, Paul Coy wrote: In the Web2Py Cookbook, Ch3

[web2py] Q: Efficiently searching by tag / field widths

2015-05-27 Thread Paul Coy
In the Web2Py Cookbook, Ch3 there is a section called Efficiently searching by tag which works quite well, thanks. I've been playing with it and when I enter more than 16 characters to the data.value the data shows up as 15 characters followed by this happens with the results rows also.

Re: [web2py] Re: Crud is deprecated?

2015-04-12 Thread Paul
There is a bug in crud search which i pointed out in this issue (and highlighted a fix for it) https://github.com/web2py/web2py/issues/844 On Saturday, 11 April 2015 05:19:20 UTC+1, Massimo Di Pierro wrote: We never officially said it but we have not touched the crud code in more than 2

[web2py] Am I correct that the | operator has multiple meanings

2015-04-07 Thread Paul McDonald
For queries the | means or: rows = db((db.person.name=='Alex') | (db.person.id3)).select() ↖ here it is an or You can sort the records according to multiple fields by concatenating them with a |: for row in db().select(

[web2py] Help with two python operators

2015-03-28 Thread Paul McDonald
In the web2py Application Development Cookbook: page 69 the | operator alphabetical = User.first_name|User.last_name *← | what is this doing??* page 82 the = operator if not form: # search flatpage according to the current request query = db.flatpage.c==request.controller

[web2py] Help with two Python operators

2015-03-28 Thread Paul McDonald
these are doing? Thank you in advance Paul -- 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

[web2py] Automatically displaying email field as mailto anchor tag in views.

2015-01-22 Thread Paul
I am a web2py newbie though I've used Python for years. I need a CRMy kind of application so I latched onto this https://github.com/mdipierro/web2py-appliances/tree/master/CustomerRelationshipManagement and am trying to tweak it for my specific needs. It would probably be better to cut my

[web2py] Re: Beginner issues

2014-09-14 Thread Jean-Paul McCoy
I am not an expert but it seems that you need a two stage validation, for which I would use AJAX form submission. On Thursday, September 11, 2014 5:22:04 AM UTC-7, Pedro Henrique Correa Ferreira wrote: Hey, lads! How you're doing? I've got a issue with data validation. I gotta use a

[web2py] Live preview, with COLT + Sublime Text, server config?

2014-09-04 Thread Jean-Paul McCoy
How can I use CodeOrchestraRPCHttpServer with Web2py? COLT live preview is all html and Java so it must be doable. The COLT server opens one port for itself then a second for the live coding session. Should I attempt to hack the COLT side to proxy through Rocket, or can I just get Web2py to

[web2py] Is it ok (i.e. safe !?) to extend the crud class

2014-02-18 Thread Paul
is in in the applications modules folder, i had to import from gluon.tools import Crud , from gluon import * to get past errors with current.request Before I spend more time working on this just wanted to check this is safe to do! Thanks Paul -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: DAL select help

2013-07-23 Thread Paul
try: Field('name','list:string') then select: db.table.name.contains('string') On Tuesday, 23 July 2013 09:37:00 UTC+8, Trevor Overman wrote: In my database, I have a list of items stored. What I am trying to do is select a database row when the list in the database contains the item that

[web2py] How to conditionally add a _class=warning to a TR using the TR() helper ?

2013-03-31 Thread Paul
Hi, its been a while since I've used web2py, I'm sure this is easy but cannot find it in the manual:- In a view I'm generating html using the helper TR() while looping over rows from a sqlite table, I just want to add a class=warning to some rows based on the value in a database field (e.g.

[web2py] Re: How to conditionally add a _class=warning to a TR using the TR() helper ?

2013-03-31 Thread Paul
) to an existing helper object as follows: tr = TR(...) if row.field1 == None: tr['_class'] = 'warning' Anthony On Sunday, March 31, 2013 8:50:42 AM UTC-4, Paul wrote: Hi, its been a while since I've used web2py, I'm sure this is easy but cannot find it in the manual:- In a view I'm

[web2py] Re: Example JSON Code

2013-02-28 Thread Paul Lozancich
Figured out error. Co-worker showed me I had the Python file in the wrong directory. I need to study Web2py and get a better undertstanding of it. Thanks for all the help! On Thursday, February 14, 2013 2:17:21 AM UTC-8, Alan Etkin wrote: How do you put that before the $.jsonp({ call?

[web2py] How do I define a table that references itself

2013-02-18 Thread Paul Whipp
wondering what happens when there are many thousands of dockets - will the dropdown for the Reference_Docket_ID on the form cope effectively? Cheers, Paul -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop

Re: [web2py] Re: How do I define a table that references itself

2013-02-18 Thread Paul Whipp
be optional? On Monday, February 18, 2013 12:19:04 AM UTC-8, Paul Whipp wrote: Here is an example of what I need to do: db.define_table('Docket', Field('Docket_No', 'integer', required = True), Field('Reference_Docket_ID', 'reference Docket', required

Re: [web2py] Re: How do I define a table that references itself

2013-02-18 Thread Paul Whipp
February 2013 02:19:04 UTC-6, Paul Whipp wrote: Here is an example of what I need to do: db.define_table('Docket', Field('Docket_No', 'integer', required = True), Field('Reference_Docket_ID', 'reference Docket', required = False), Field

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-30 Thread Paul Whipp
January 2013 16:25, Anthony abasta...@gmail.com wrote: And how do you define magic in this case? On Wednesday, January 30, 2013 12:38:25 AM UTC-5, Paul Whipp wrote: A very fair question. I'd like to define a class that inherits from the controller class set up in the magic stuff

[web2py] What is the right way to specialize an application?

2013-01-29 Thread Paul Whipp
this. Cheers, Paul -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Paul Whipp
January 2013 13:42, Anthony abasta...@gmail.com wrote: Maybe look into plugins: http://web2py.com/books/default/chapter/29/12#Plugins On Tuesday, January 29, 2013 6:39:44 PM UTC-5, Paul Whipp wrote: I'm new to web2py but not to Python or web application frameworks. I love the dry pythonic nature

[web2py] Is auth.requires_signature() worth using?

2013-01-29 Thread Paul Whipp
I'm trying to get a quick crud interface up for a large number of tables. The default controller data method is decorated with auth.requires_signature() which I don't understand. I could not get past 'not authorized' with it. I changed it to auth.requires_login() and added a 'create', 'read',

Re: [web2py] Re: What is the right way to specialize an application?

2013-01-29 Thread Paul Whipp
and indicating that my controller class is to be used in place of the usual magic controller. On 30 January 2013 15:30, Anthony abasta...@gmail.com wrote: What sort of solution do you envision? On Tuesday, January 29, 2013 11:02:36 PM UTC-5, Paul Whipp wrote: Thanks for that. If I use a plug

Re: [web2py] Having some strange occurence with label printing and FPDF

2013-01-17 Thread Paul Rykiel
/fpdf directory so you can use: from gluon.contrib.fpdf.pdflabels import PDFLabel PDFLabel accepts \n , if you use cell, it doesn't understand \n Regards. 2013/1/16 Paul Rykiel ptry...@gmail.com javascript:: Hi Jose, I tried what you suggested, I was getting errors on the line

Re: [web2py] Having some strange occurence with label printing and FPDF

2013-01-17 Thread Paul Rykiel
/fpdf directory so you can use: from gluon.contrib.fpdf.pdflabels import PDFLabel PDFLabel accepts \n , if you use cell, it doesn't understand \n Regards. 2013/1/16 Paul Rykiel ptryk...@gmail.com: Hi Jose, I tried what you suggested, I was getting errors on the line from

Re: [web2py] Having some strange occurence with label printing and FPDF

2013-01-17 Thread Paul Rykiel
a stupid example app? Thank you António 2013/1/17 Paul Rykiel ptryk...@gmail.com I just want to say a big Thank you! this works perfectly!! I am so happy! Best Regards, On Thu, Jan 17, 2013 at 1:49 AM, Mariano Reingart reing...@gmail.comwrote: Sorry, the correct url for PDFLabels

Re: [web2py] Having some strange occurence with label printing and FPDF

2013-01-16 Thread Paul Rykiel
Hi Mariano, thank you for the response. Let me look into the margin issue, maybe you have given me enough to figure this out. thanks so much for the response. you know, Massimo was my professor last term. On Wednesday, January 16, 2013 12:39:06 AM UTC-6, Mariano Reingart wrote: Hello Paul

Re: [web2py] Having some strange occurence with label printing and FPDF

2013-01-16 Thread Paul Rykiel
thanks Jose, I am going to try this out, it would be so great if this worked! I know I am close to my answer, this is more or less a configuration issue at this point. thanks for all of your help!! Regards, Paul On Wednesday, January 16, 2013 12:46:34 PM UTC-6, José L. wrote: Some time ago

Re: [web2py] Having some strange occurence with label printing and FPDF

2013-01-16 Thread Paul Rykiel
' response.headers['Content-Disposition']='attachment.filename = sample.pdf' return pdf.output(dest='S') Regards José L. 2013/1/16 Paul Rykiel ptry...@gmail.com javascript:: Hi Mariano, thank you for the response. Let me look into the margin issue, maybe you have given me enough

[web2py] why is my \n not working

2013-01-16 Thread Paul Rykiel
greetings, I have a string that I have defined string = line 1 + \n string += line 2 + \n shouldn't my string print as follows: line 1 line 2 it does not what do I seem to be doing incorrectly? --

[web2py] Anyone have experience printing labels Avery 5160

2013-01-16 Thread Paul Rykiel
I need to create a sheet of labels (Avery 5160) I am using FPDF cells any assistance would be greatly appreciated. Regards, --

[web2py] Re: why is my \n not working

2013-01-16 Thread Paul Rykiel
I am printing the text in a cell in PDF pdf.cell() On Wednesday, January 16, 2013 9:57:45 PM UTC-6, Massimo Di Pierro wrote: Are you printing it or writing it into HTML? In html \n is not newline. On Wednesday, 16 January 2013 21:51:56 UTC-6, Paul Rykiel wrote: greetings, I have a string

[web2py] Having some strange occurence with label printing and FPDF

2013-01-15 Thread Paul Rykiel
Greetings this is my code: def triagePrintTags(bikeIds): assert(bikeIds != None) assert(isinstance(bikeIds, list) or isinstance(bikeIds, tuple)) pdf = FPDF('P', 'mm', (66.548, 25.4)) # get all the r(ows rows = db(db.bike.id.belongs(bikeIds)).select() for row in rows:

[web2py] PYFPDF and printing labels

2013-01-12 Thread Paul Rykiel
Greetings, Has anyone used the PYFPDF library to build and print labels Are there setting to control the label sizes and to skip to print the next label. Please advise --

  1   2   3   >