[web2py] Re: How to select a table and represent the foreign key values

2018-03-29 Thread LoveWeb2py
I found that by adding db.table2.field_1.represent = lambda id, row: db.table1(row.field_1).field_1 db(db.table1).select().render() It accomplishes the task. Thank you so much! On Thursday, March 29, 2018 at 1:56:14 PM UTC-4, LoveWeb2py wrote: > > Thank you so much for your help. > &g

[web2py] Re: How to select a table and represent the foreign key values

2018-03-29 Thread LoveWeb2py
<http://localhost:8000/examples/global/vars/IS_IN_DB>(db,db. > table_1.field_1,'%(field_1)s') > > > > > > On Thursday, March 29, 2018 at 9:29:35 AM UTC-7, LoveWeb2py wrote: >> >> Do I define that in the model.py file? Can I do it before the query? >

[web2py] Re: How to select a table and represent the foreign key values

2018-03-29 Thread LoveWeb2py
') > > > On Thursday, March 29, 2018 at 9:20:34 AM UTC-7, LoveWeb2py wrote: >> >> >> How can I select a foreign key and represent the value? I want to >> represent the entire group and now have to do individual queries for each >> foreign key. Is that p

[web2py] How to select a table and represent the foreign key values

2018-03-29 Thread LoveWeb2py
How can I select a foreign key and represent the value? I want to represent the entire group and now have to do individual queries for each foreign key. Is that possible? db.define_table('table1', Field('field_1'), format='%(field_1)s') db.define_table('table2',

Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread LoveWeb2py
Yeah, docker containers have kibana and a couple other similar web services -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message beca

Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-14 Thread LoveWeb2py
We serve web2py through nginx. I'm curious how django was able to do it. We have multiple apps running in docker containers and want web2py to be the portal. That way we can use auth. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

Re: [web2py] Re: Use web2py as a reverse proxy

2018-02-13 Thread LoveWeb2py
maybe you can start from here: > > https://gist.github.com/manuelep/81ffe8ce57de4dc9b2d80a99c08992cc > > please let me know if you find any interest in it. > > Cheers > > Manuele > > On 13/02/2018 13:10, Anthony wrote: > > On Monday, February 12, 2018 at 9:43:53

[web2py] Use web2py as a reverse proxy

2018-02-12 Thread LoveWeb2py
Django has a reverse proxy module... Wondering if web2py has something similar? https://djangopackages.org/grids/g/reverse-proxy/ I want to make web2py the single interface to multiple applications. Any help is appreciated :) -- Resources: - http://web2py.com - http://web2py.com/book (Document

Re: [web2py] PYTHON 3

2018-02-12 Thread LoveWeb2py
With that said, Thank you for all of your hard work and to all the contributors for making such a wonderful framework. :) On Monday, February 12, 2018 at 3:58:30 PM UTC-5, LoveWeb2py wrote: > > Makes sense, Anthony. Please don't ever call anything web3py. It doesn't > make an

Re: [web2py] PYTHON 3

2018-02-12 Thread LoveWeb2py
Makes sense, Anthony. Please don't ever call anything web3py. It doesn't make any sense and all new users won't understand what it means. If you want to have a brainstorming session I'd be happy to help. I bet all the users on this forum have a lot of great ideas!! On Monday, February 12, 2018

[web2py] PYTHON 3

2018-02-10 Thread LoveWeb2py
Need to know if this is actually going to be happening soon. We're making critical design choices now and will be implementing next month. We currently use web2py, but obviously it doesn't support python3. PS: For the love of all that's holy, please don't name it web3py. Web2py v3 makes m

[web2py] Should I use the menu helper for this?

2018-02-05 Thread LoveWeb2py
Hello, response.side_menu = [ (T('First Section'), False, URL('#'),[ (SPAN('Section 1a'), False, URL('#'), []), (SPAN('Section 1b'), False, URL('#'), []), ]) ] Which would allow me to use... {{if response.menu:}} {{=MENU(response.menu, _class='sidebar-content', li_cla

[web2py] Re: Switching database backend from sqlite to mysql

2018-02-04 Thread LoveWeb2py
Hi Massimo, Thank you for responding. Do you have an example? I am having the same struggle. Thank you again. On Sunday, February 4, 2018 at 12:46:08 AM UTC-5, Massimo Di Pierro wrote: > > I believe the problem is that pydal is designed to not allow db to be > shared among multiple threads to

[web2py] Re: Switching database backend from sqlite to mysql

2018-02-03 Thread LoveWeb2py
Can you share some of your code from the controller where you're receiving the error? On Friday, February 2, 2018 at 7:31:59 AM UTC-5, jbu...@wgu.edu wrote: > > > I currently have a mysql database that is defined using pydal and used by > several other applications. I am trying to use Web2py to

[web2py] Re: any ideas for printing stdout to the web interface?

2017-10-10 Thread LoveWeb2py
Was looking for something more like this... https://github.com/joewalnes/websocketd I'll give it a try. Thank you all! On Tuesday, October 10, 2017 at 3:13:08 PM UTC-4, Dave S wrote: > > > > On Tuesday, October 10, 2017 at 9:46:33 AM UTC-7, LoveWeb2py wrote: >> >>

[web2py] Re: any ideas for printing stdout to the web interface?

2017-10-10 Thread LoveWeb2py
{{=i}} {{pass}} but I would like to have a way to dynamically print stuff to the web interface. Maybe using ajax? I'm just not sure where to start... On Tuesday, October 10, 2017 at 12:46:33 PM UTC-4, LoveWeb2py wro

[web2py] any ideas for printing stdout to the web interface?

2017-10-10 Thread LoveWeb2py
I run a script that prints to stdout, but I'd like to have a modal popup and have all the information displayed to the user while the script is running. Anyone have any ideas on how to achieve this within web2py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-03 Thread LoveWeb2py
I moved all of the table files to an archive directory and let everything rebuild and it worked great. Thanks, Anthony! Really appreciate the time you take to help us all. On Tuesday, October 3, 2017 at 11:42:47 AM UTC-4, LoveWeb2py wrote: > > I tried just renaming both databases and

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-03 Thread LoveWeb2py
I tried just renaming both databases and still received the same error. On Tuesday, October 3, 2017 at 11:27:53 AM UTC-4, Anthony wrote: > > On Monday, October 2, 2017 at 9:24:29 PM UTC-4, LoveWeb2py wrote: >> >> Still receiving same error... >> > > Maybe you didn&#

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-03 Thread LoveWeb2py
Would it be easier to create a name field instead of a file and then just reference the name ID, and pull the file from the associated table? On Monday, October 2, 2017 at 9:24:29 PM UTC-4, LoveWeb2py wrote: > > Still receiving same error... > > This is my html code: > > I&#x

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-02 Thread LoveWeb2py
ndle the variable redirect(URL('run', args=value), client_side=True) On Monday, October 2, 2017 at 8:48:13 PM UTC-4, LoveWeb2py wrote: > > Okay, just delete the table and then set migrate=True ? > > On Monday, October 2, 2017 at 8:46:21 PM UTC-4, Anthony wrote: >> &g

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-02 Thread LoveWeb2py
Okay, just delete the table and then set migrate=True ? On Monday, October 2, 2017 at 8:46:21 PM UTC-4, Anthony wrote: > > On Monday, October 2, 2017 at 7:57:19 PM UTC-4, LoveWeb2py wrote: >> >> Yes... I believe so. >> >> On Monday, October 2, 2017 at 7:53:13 PM UTC

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-02 Thread LoveWeb2py
Yes... I believe so. On Monday, October 2, 2017 at 7:53:13 PM UTC-4, Anthony wrote: > > Was that field originally a regular reference field and then you changed > it to a list:reference field? > > On Monday, October 2, 2017 at 3:45:38 PM UTC-4, LoveWeb2py wrote: >> >&

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-02 Thread LoveWeb2py
Anyone have feedback? I have been banging my head against this all day... On Sunday, October 1, 2017 at 4:52:39 PM UTC-4, LoveWeb2py wrote: > > Hello, I'm trying to create a simple interface that allows users to select > multiple files and create a name for the bundle. I've f

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-01 Thread LoveWeb2py
raise e if hasattr(table, '_primarykey'): pkdict = dict([ (k[0].name, k[1]) for k in fields if k[0].name in table._primarykey]) On Sunday, October 1, 2017 at 7:05:15 PM UTC-4, LoveWeb2py wrote: > > Traceback > > 1. > 2

[web2py] Re: Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-01 Thread LoveWeb2py
Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "/Users/me/web2py/gluon/restricted.py", line 219, in restricted exec(ccode, environment) File "/Users/me/web-dev/web2py/applications/myapp/controllers/filegroups.py"

[web2py] Insert into reference:list not working - FOREIGN KEY constraint failed field:upload

2017-10-01 Thread LoveWeb2py
Hello, I'm trying to create a simple interface that allows users to select multiple files and create a name for the bundle. I've followed the example in the book but keep getting the same error... FOREIGN KEY constraint failed. When I look in all_files, it has the keys available. I tried foll

[web2py] Re: Making application looks better.

2017-04-16 Thread LoveWeb2py
These are beautiful! We should start a collection of scaffolding templates... On Thursday, April 13, 2017 at 6:38:52 AM UTC-4, akshay0...@gmail.com wrote: > > Hello web2py team, > I just started using web2py for my application. When i am going > deeper with my application, i am facing issu

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2017-03-12 Thread LoveWeb2py
field = sqlrows.db[tablename][fieldname] Variables colname 'my_table.id' Context On Sunday, March 12, 2017 at 8:30:50 PM UTC-4, Anthony wrote: > > On Sunday, March 12, 2017 at 7:27:08 PM UTC-4, LoveWeb2py wrote: >> >> Keep getting this error fo

[web2py] 'Column table.id not found (SQLTABLE)'

2017-03-12 Thread LoveWeb2py
Keep getting this error for all of my tables!! What is going on? What information would be helpful for me to post to get help? -- 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: ERROR: need more than one values to unpack with DATE field

2017-03-12 Thread LoveWeb2py
I have no idea what happened, but I rebuilt all the databases and it's working now. PFM!! Thank you for all of your support. You guys are the best! On Sunday, March 12, 2017 at 6:42:26 PM UTC-4, LoveWeb2py wrote: > > Now I'm getting Column auth_user.id not found on my tables.

[web2py] Re: ERROR: need more than one values to unpack with DATE field

2017-03-12 Thread LoveWeb2py
Now I'm getting Column auth_user.id not found on my tables. It's one of those days... lol Going to try and remove my database and start fresh... :( On Sunday, March 12, 2017 at 4:31:35 PM UTC-4, Dave S wrote: > > > > On Sunday, March 12, 2017 at 11:57:05 AM UTC-7, LoveWeb

[web2py] ERROR: need more than one values to unpack with DATE field

2017-03-12 Thread LoveWeb2py
Hello, I'm getting an error. I have a table and I'm trying to insert this date format: db.define('mytable', Field('game_date', 'date'), migrate=True) db.mytable.insert(game_date='2016-10-25') When I create a single record with that game date I get an error from web2py Query No

[web2py] Re: Can't find controller?

2017-03-10 Thread LoveWeb2py
Slightly embarrassed... I had to reload my web app and it started to work. Not quite sure why yet, but thank you so much for all of your help! On Friday, March 10, 2017 at 8:36:34 PM UTC-5, LoveWeb2py wrote: > > When I use just the IP address I get the pythonanywhere splash screen that

[web2py] Re: Can't find controller?

2017-03-10 Thread LoveWeb2py
When I use just the IP address I get the pythonanywhere splash screen that says Coming soon... On Friday, March 10, 2017 at 8:29:23 PM UTC-5, Dave S wrote: > > > > On Friday, March 10, 2017 at 5:26:15 PM UTC-8, LoveWeb2py wrote: >> >> Hi Anthony! >> >> I&#

[web2py] Re: Can't find controller?

2017-03-10 Thread LoveWeb2py
Hi Anthony! I'm using www.mywebsite.com I can access it just fine when I use localhost:8000 On Friday, March 10, 2017 at 8:06:01 PM UTC-5, Anthony wrote: > > What URL are you using to access that controller? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gi

[web2py] Can't find controller?

2017-03-10 Thread LoveWeb2py
So I have a controller. Let's call it controller_a, and when I try to link to it on my website I get an error that says invalid function (default/controller_a) In my routes, all I have is routers = dict( # base router BASE=dict( default_application='myappname', ), ) I've

[web2py] Re: Custom form errors?

2017-03-06 Thread LoveWeb2py
at 1:31:32 AM UTC-5, LoveWeb2py wrote: > > Thank you, Anthony, but I'm using a custom form via the "user" controller. > > Here is my code > > {{=form.custom.begin}} > > > > > {

[web2py] Re: Custom form errors?

2017-03-06 Thread LoveWeb2py
for a > given field, use form.errors[fieldname]). > > Anthony > > On Tuesday, March 7, 2017 at 12:06:45 AM UTC-5, LoveWeb2py wrote: >> >> Hello, >> >> I have some custom login forms and I'm something like this: >> >> >> {{=form.custom.beg

[web2py] Custom form errors?

2017-03-06 Thread LoveWeb2py
Hello, I have some custom login forms and I'm something like this: {{=form.custom.begin}}Image name: {{=form.custom.widget.name}}Image file: {{=form.custom.widget.file}}Click here to upload: {{=form.custom.submit}}{{=form.custom.end}} How can I check for errors here? I'm lost at where form g

Re: [web2py] nginx + apache + uwsgi -- only index.html loads inside web2py

2017-02-19 Thread LoveWeb2py
7 at 5:26:15 PM UTC-5, Áureo Dias Neto wrote: > > Nginx is a server, and apache too.. Dont need to use the two.. > I was using nginx and uwsgi > > Em 19 de fev de 2017 19:23, "LoveWeb2py" > > escreveu: > >> I think nginx is being used for routing and

Re: [web2py] nginx + apache + uwsgi -- only index.html loads inside web2py

2017-02-19 Thread LoveWeb2py
that forwards port 80 traffic to port 7080 which is hosted by Apache. On Sunday, February 19, 2017 at 5:19:41 PM UTC-5, Áureo Dias Neto wrote: > > Hello > Or you use nginx + uwsgi > Or use apache + wsgi > > Em 19 de fev de 2017 19:18, "LoveWeb2py" > > escreveu: &g

[web2py] nginx + apache + uwsgi -- only index.html loads inside web2py

2017-02-19 Thread LoveWeb2py
Hello, I ran the *setup-web2py-nginx-uwsgi-ubuntu.sh *to get web2py up and running, but i'm running into an odd issue. I'm using 1and1 hosting and they use vhosts. So the setup they're using has nginx on the front end (port 80) and connects to apache over port 7080. Here is my conf file for a

[web2py] Re: Web2py diagram support for PyCharm

2017-01-18 Thread LoveWeb2py
This is an example of what I was referring to: http://www.jetbrains.com/help/pycharm/2016.2/viewing-model-dependency-diagram.html On Thursday, January 19, 2017 at 2:21:57 AM UTC-5, LoveWeb2py wrote: > > Hello, > > I noticed Django has a diagram builder in PyCharm, but web2py does

[web2py] Web2py diagram support for PyCharm

2017-01-18 Thread LoveWeb2py
Hello, I noticed Django has a diagram builder in PyCharm, but web2py does not. It allows you to create a really nice dependency chart. I think something similar would be awesome to have for web2py. Is there a way to do this already or is it on the roadmap at least? Thank you -- Resources: -

[web2py] Re: Best way to validate individual conditional Smartgrid Forms

2017-01-17 Thread LoveWeb2py
Hi Sitfan, I wasn't sure if I could use show_if because I want to evaluate a value IS_IN_SET(['choice_a','choice_b') I'd like to show a file upload field if choice_a is selected and a text field if choice_b is selected. On Wednesday, January 18, 2017 at 2:23:44 AM UTC-5, 黄祥 wrote: > > had you

[web2py] Best way to validate individual conditional Smartgrid Forms

2017-01-17 Thread LoveWeb2py
Hello, I've been trying to string together pieces from the book and multiple forums for working with the SmartGrid edit forms and I'm not sure the best way to validate certain fields... I am currently using jQuery to hide fieldA if fieldB is selected, but I am running into an error with web2p

Re: [web2py] response.flash or session.flash with dict instead of string???

2017-01-09 Thread LoveWeb2py
How did you implement this Ramos? I ended up writing a toastr function in a model file and using that when I needed the flash. Did you just modify the javascript? On Monday, January 9, 2017 at 5:00:50 AM UTC-5, Ramos wrote: > > nice ;) > > 2017-01-08 23:18 GMT+00:00 Anthony >: > >> Try it and se

[web2py] Selecting booleans from sqlite3 database

2017-01-09 Thread LoveWeb2py
Hello, I'm trying to do a simple query against a sqlite3 database where the values are stored as 0's and 1's All i want to do is select all values that are True or False According to the book this should work: db(db.table.field==True).select() and that would return rows however, it's return

Re: [web2py] Custom Response.flash

2017-01-06 Thread LoveWeb2py
ss file to achieve what you want? I mean flash message > is flash message... > > Richard > > On Fri, Jan 6, 2017 at 10:43 AM, LoveWeb2py > wrote: > >> Hello, >> >> I have created my own response.flash >> >> Here is the code: >> >>

[web2py] Custom Response.flash

2017-01-06 Thread LoveWeb2py
Hello, I have created my own response.flash Here is the code: def notification(message, mtype): a = "\n" a += "$(\"notify\").ready(function() {\n" a += "toastr.options.timeOut = 2000; // 1.5s\n" a += "toastr.{mtype}('{message}');\n".format(mtype=mtype, message=message) a +=

[web2py] Re: Trying to port django app to web2py

2017-01-02 Thread LoveWeb2py
rd is a Row object (like a dict) while in Django a > record is an instance of the corresponding class. > > The problem with the latter which motivated web2py is the results of joins > and aggregates? What classes are those rows? In web2py they are always Row > objects. They can

[web2py] Re: Trying to port django app to web2py

2017-01-01 Thread LoveWeb2py
models.BooleanField(default=False)isset = models.BooleanField(default=False)enable = models.BooleanField(default=True)source = models.ForeignKey(Source)* Then I could do something like MyClass.objects Does web2py have a similar function? On Sunday, January 1, 2017 at 2:15:46 P

[web2py] Trying to port django app to web2py

2017-01-01 Thread LoveWeb2py
I'm noticing a lot of different syntax such as the ManyToMany model, self.save(), and general layout difference. Does anyone know if there is a guide to port a django app into web2py or do I just need to learn django a little better? -- Resources: - http://web2py.com - http://web2py.com/book (

[web2py] Possible to change linked_tables to buttons?

2017-01-01 Thread LoveWeb2py
The linked_tables feature in SQLFORM.grid is amazing! I can rename the link by typing plural='My linked table' and "My linked table" shows in SQLFORM.grid Is it possible to convert that to a button? I did not see anything in the book for that. -- Resources: - http://web2py.com - http://web2py

[web2py] Re: Best practice to check for raw_args

2016-12-31 Thread LoveWeb2py
Thank you! On Saturday, December 31, 2016 at 8:56:26 AM UTC-5, Anthony wrote: > > On Friday, December 30, 2016 at 8:26:08 PM UTC-5, LoveWeb2py wrote: >> >> Hi Stifan, >> >> Thank you for replying again. >> >> Is the best way to check for that in the

[web2py] Re: Best practice to check for raw_args

2016-12-30 Thread LoveWeb2py
Hi Stifan, Thank you for replying again. Is the best way to check for that in the controller? The book says it's best to handle calls in the controller, but just confirming on the forum. On Friday, December 30, 2016 at 7:27:00 PM UTC-5, LoveWeb2py wrote: > > Hello, > > I&#x

[web2py] Best practice to check for raw_args

2016-12-30 Thread LoveWeb2py
Hello, I'm wondering if it's better to check for raw_args inside of the controller or in the view and then call another controller based on that. For example: I have: http://127.0.0.1:8000/application/controller/view which returns a SQLFORM.Grid Inside of the grid I now have clickable link

[web2py] Re: Possible to replace value in SQLFORM.grid with a link?

2016-12-30 Thread LoveWeb2py
Figured it out. Had to put it in the model itself. I thought there was a way to override it in the function, but this works great. Thanks! On Friday, December 30, 2016 at 5:24:38 PM UTC-5, LoveWeb2py wrote: > > Hi Stifan, > > Thank you for your quick reply. > > What does .addr

[web2py] Re: Possible to replace value in SQLFORM.grid with a link?

2016-12-30 Thread LoveWeb2py
Hi Stifan, Thank you for your quick reply. What does .address represent here? I'm trying this and it's not working: @auth.requires_login() def sources(): grid = SQLFORM.smartgrid(mydb.table, linked_tables=[mydb.table2]) mydb.table.represent = lambda value, field: \ A(value, _hr

[web2py] Possible to replace value in SQLFORM.grid with a link?

2016-12-30 Thread LoveWeb2py
Instead of creating a button on the right side of the grid, is it possible to replace the text itself as a link in web2py? For example of my table looks like: | Field 1 | Field 2 | Field 3 | Buttons | *Text1*| text | text | text Could I make Text1 a link instead of having to make

[web2py] How to rename linked_tables

2016-12-29 Thread LoveWeb2py
Hello, I'm calling SQLFORM grid like this: grid = SQLFORM.smartgrid(db.table1, linked_tables=[db.table2]) But when SQL Grid renders it creates this Table2s I'd like to rename Table2s to BLAH How could I acommplish this? Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (

[web2py] Any angular templates?

2016-01-22 Thread LoveWeb2py
Has anyone created apps with web2py and angular? I want to use angular's front end and web2py on the backend. Hoping someone has already created a template app. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://

[web2py] Re: Keep old menu in bootstrap 3

2015-09-10 Thread LoveWeb2py
; it's always horizontal. the issue is that bs3 doesn't support nested menus > after the 2nd level. > > On Thursday, September 10, 2015 at 3:08:15 PM UTC+2, LoveWeb2py wrote: >> >> Hello, >> >> I migrated a project from web2py 2.9 to 2.12. I moved over the

[web2py] Keep old menu in bootstrap 3

2015-09-10 Thread LoveWeb2py
Hello, I migrated a project from web2py 2.9 to 2.12. I moved over the css & js files from the bootstrap welcome app, but my menu is really messed up. Is there a way to get it back to the horizontal form? What other information can I provide. What files are necessary to migrate from the older v

[web2py] Re: Display value from reference fields and not ids in SQLFORM.grid

2015-09-04 Thread LoveWeb2py
7;%(field2)s')), migrate=False) in controller: db.table2.field2.represent = lambda s,r: s.field2 grid=SQLFORM.smartgrid(table2) return dict(grid=grid) Hope this helps someone in the future. Time for beer! On Friday, September 4, 2015 at 4:49:31 PM UTC-4, LoveWeb2py wrote: > &

[web2py] Display value from reference fields and not ids in SQLFORM.grid

2015-09-04 Thread LoveWeb2py
I've been struggling with this for hours! db.define_table('table1', Field('field1', 'string'), Field('field2','date'), format='%(field1)s %(field2)s', migrate=False) db.define_table('table2', Field('field1','reference table1'), Field('field2','refe

[web2py] Re: Start web2py with different python version

2015-08-18 Thread LoveWeb2py
FnTjV6iGMTiJEG4THcEanCVyxl1g> > > On Tuesday, 18 August 2015 16:30:29 UTC-5, LoveWeb2py wrote: >> >> Hi Massimo, >> >> Thank you so much for your reply. I checked through all .conf files and >> the only references it makes to any type of python is the wsgi conf

[web2py] Re: Start web2py with different python version

2015-08-18 Thread LoveWeb2py
28 PM UTC-4, Massimo Di Pierro wrote: > > This must be specified in your httpd.conf file somewhere > > On Friday, 14 August 2015 17:25:21 UTC-5, LoveWeb2py wrote: >> >> When I type python web2py.py -S myapp -M the app loads up in python 2.7 >> just fine, but when I typ

[web2py] Re: Start web2py with different python version

2015-08-14 Thread LoveWeb2py
UTC-4, LoveWeb2py wrote: > > I'm currently using web2py with wsgihandler.py > > When I type "python" in my regular environment it starts with python2.7, > but when I start apache using service httpd start web2py defaults to 2.6 > > Is there anyway I can mak

[web2py] Start web2py with different python version

2015-08-14 Thread LoveWeb2py
I'm currently using web2py with wsgihandler.py When I type "python" in my regular environment it starts with python2.7, but when I start apache using service httpd start web2py defaults to 2.6 Is there anyway I can make web2py use 2.7 which has all my modules? -- Resources: - http://web2py.co

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-20 Thread LoveWeb2py
I submitted a pull request. My orders is requesting the user be a manager and not authorized user. On Monday, July 20, 2015 at 6:17:27 AM UTC-4, Massimo Di Pierro wrote: > > If you are logged in, you should be able to see them. > > On Friday, 17 July 2015 03:05:21 UTC-5, Walter Munguia wrote: >>

[web2py] Re: One to many represent as_json

2015-07-16 Thread LoveWeb2py
Any other thoughts on how this could happen? I think I've seen it done before On Tuesday, July 14, 2015 at 5:14:56 PM UTC-4, Dave S wrote: > > > > On Tuesday, July 14, 2015 at 11:29:00 AM UTC-7, Dave S wrote: >> >> >> >> On Tuesday, July 14, 20

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-14 Thread LoveWeb2py
Yes!! I love this so far. I'm working one an online store as well. Yours is much nicer. On Tuesday, July 14, 2015 at 12:47:49 PM UTC-4, Massimo Di Pierro wrote: > > You can try it here: http://experts4solutions.com/estore3 > And it will not charge your credit card (uses Stripe sandbox). > > On Tu

Re: [web2py] Re: One to many represent as_json

2015-07-14 Thread LoveWeb2py
e'), #Field('product_picture_file', 'blob'), migrate=True) On Tuesday, July 14, 2015 at 3:11:18 PM UTC-4, Richard wrote: > > Why not defining a representation for your product_owner field?? > > Field('product_owner', 'reference vendors&#x

[web2py] Re: One to many represent as_json

2015-07-14 Thread LoveWeb2py
works but I'd be happy to learn if there are other ways to achieve > what you're looking for. > > On Tuesday, July 14, 2015 at 6:07:39 PM UTC, LoveWeb2py wrote: >> >> Hello, >> >> My goal is to represent the name instead of the field id here is my model:

[web2py] One to many represent as_json

2015-07-14 Thread LoveWeb2py
Hello, My goal is to represent the name instead of the field id here is my model: db.define_table('vendors', Field('name','string'), Field('vendor_location','string'), format='%(name)s', migrate=True) db.define_table('product', Field('product_code','string'),

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread LoveWeb2py
elper *object > *that > can then be manipulated (rather than producing actual helper *code*), you > can use the parsing functionality of the TAG helper as described here: > http://web2py.com/books/default/chapter/29/05/the-views#Parsing > > Anthony > > On Monday, July 13,

[web2py] Re: Convert forms to html helpers

2015-07-13 Thread LoveWeb2py
Hi Stifan, Thank you for replying. Do you know if there is anything that converts forms automatically? I'd think there would be something to do this by now? On Monday, July 13, 2015 at 7:46:32 AM UTC-4, LoveWeb2py wrote: > > Hello, > > Is there something within web2py t

[web2py] Convert forms to html helpers

2015-07-13 Thread LoveWeb2py
Hello, Is there something within web2py that automatically converts html forms to html HELPER SYNTAX? for example here is my form: Secure Checkout https://js.stripe.com/v2/";> Cardholder Name

[web2py] Re: Layout problem

2015-06-25 Thread LoveWeb2py
Could you share your layout.html or index.html code? On Thursday, June 25, 2015 at 6:26:39 AM UTC-4, Niphlod wrote: > > you're quite obviously missing css and js files serving. > > On Thursday, June 25, 2015 at 10:17:13 AM UTC+2, Chaitu P wrote: >> >> >> Does anyone have idea why web2py defaul

[web2py] Re: Change position of edit button in SQLFORM

2015-06-23 Thread LoveWeb2py
I'll take any ideas at this point lol On Monday, June 22, 2015 at 3:51:50 PM UTC-4, LoveWeb2py wrote: > > I'd really appreciate any help on this. I went through the SQLHTML.py code > and I can see where row_buttons are being assigned, but I'm not sure what I > can c

[web2py] Re: Change position of edit button in SQLFORM

2015-06-22 Thread LoveWeb2py
top and cornerbottom arguments On Monday, June 22, 2015 at 11:26:54 AM UTC-4, LoveWeb2py wrote: > > When I click on "view" a record in the SQLFORM.grid it puts the buttons at > the very top. > > Does web2py have a built-in method of moving the buttons to the

[web2py] Change position of edit button in SQLFORM

2015-06-22 Thread LoveWeb2py
When I click on "view" a record in the SQLFORM.grid it puts the buttons at the very top. Does web2py have a built-in method of moving the buttons to the bottom of the page or do I need to use CSS? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/w

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-11 Thread LoveWeb2py
) > if row.needs_button == 0 else '' > ) > ] > > On Thursday, June 11, 2015 at 12:45:29 AM UTC+2, LoveWeb2py wrote: >> >> I should have been more specific. I meant I want to create a SQLFORM.grid >> button and only have it show if a row.id

[web2py] Re: Show button in SQLFORM only if a value is present?

2015-06-10 Thread LoveWeb2py
I should have been more specific. I meant I want to create a SQLFORM.grid button and only have it show if a row.id value is present On Wednesday, June 10, 2015 at 5:42:33 PM UTC-4, LoveWeb2py wrote: > > I'd like to create a SQLFORM button, but only show the button if a value > is

[web2py] Show button in SQLFORM only if a value is present?

2015-06-10 Thread LoveWeb2py
I'd like to create a SQLFORM button, but only show the button if a value is present in the cell. Is this possible? I'm thinking of creating a function that will check to see if each record has a value present in the field for example: define_table('my_sqldata', Field('name', Fie

Re: [web2py] web2py menu dies?

2015-06-09 Thread LoveWeb2py
in chrome dev tool? > > You must have an error somewhere, a missing lib or something... > > On Tue, Jun 9, 2015 at 1:02 PM, LoveWeb2py > wrote: > >> Sometimes my menu just stops working and users can't click the links. >> >> It's specific to one page t

[web2py] web2py menu dies?

2015-06-09 Thread LoveWeb2py
Sometimes my menu just stops working and users can't click the links. It's specific to one page that uses a modal and bootstrap. Is there any known reasons of why this might be happening and what could I check to troubleshoot? -- Resources: - http://web2py.com - http://web2py.com/book (Documen

[web2py] Re: changing grid formname -- response.flash ?

2015-06-01 Thread LoveWeb2py
case. they logic is unrelated. Something else is > going on. > > On Monday, 1 June 2015 14:21:50 UTC-5, LoveWeb2py wrote: >> >> Hello, >> >> Lets say I have >> >> grid=SQLFORM.smartgrid(db.table, formname="mytablename") >> return d

[web2py] Re: My son made a new web2py logo

2015-06-01 Thread LoveWeb2py
It's a nice logo, Massimo. Maybe it could be re-worked a little? I think the current logo looks more polished. On Monday, June 1, 2015 at 2:06:16 PM UTC-4, Massimo Di Pierro wrote: > > Time to revamp the web site? > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] changing grid formname -- response.flash ?

2015-06-01 Thread LoveWeb2py
Hello, Lets say I have grid=SQLFORM.smartgrid(db.table, formname="mytablename") return dict(grid=grid) When I change the form name do I lose the ability to set response.flash? I changed the formname to one of my grid's and when users add a record now they don't get the response that a record w

[web2py] Re: Select all fields with length > 0?

2015-05-29 Thread LoveWeb2py
Sigh should have thought a little more before posting. Sorry about this This works: db((db.table.field1.id>0)&(db.table.field2!='')).select() On Friday, May 29, 2015 at 6:19:44 PM UTC-4, LoveWeb2py wrote: > > db((db.table.field1.id>0)&(db.table.field2.leng

[web2py] Select all fields with length > 0?

2015-05-29 Thread LoveWeb2py
db((db.table.field1.id>0)&(db.table.field2.length>0)).select() This still returns the whole field. I'm thinking the length takes the length of the entire field. How can I bring back all records that aren't empty for a field For example db.table.field2 row1: has information row2: row3: has in

[web2py] Re: xml view

2015-05-18 Thread LoveWeb2py
This should work: controller: data = db(db.table.id>0).select() return dict(data=data) view: {{=data.xml()}} On Monday, May 18, 2015 at 1:52:31 PM UTC-4, Mirek Zvolský wrote: > > I don't know how to write xml views. > > Basic content: {{from gluon.serializers import > xml}}{{=XML(xml(response.

Re: [web2py] Two SQLFORMs side by side?

2015-05-18 Thread LoveWeb2py
;> author = models.CharField(verbose_name="Name", max_length=255) >> >> >> By the way, this app thats call "web2py.app.dummy.w2p", please be aware >> that it has some nasty nested stuff in it. Once I installed it was crawling >> all ove

Re: [web2py] Two SQLFORMs side by side?

2015-05-14 Thread LoveWeb2py
second issue), 2) When you access the > http://hostname/appname/second_table_form/second_table there is a weird > issue with LOAD... > > I may have more time next week, but for now, I can't help you further... > > Richard > > > On Tue, May 12, 2015 at 11:11 AM, LoveWeb2

Re: [web2py] Two SQLFORMs side by side?

2015-05-12 Thread LoveWeb2py
ing thing > the wrong way basically... add_function is for the main_table which > contains the city name... > > I will send you back the corrected app when I found the issue with the > repeating load... > > Richard > > On Mon, May 11, 2015 at 4:39 PM, LoveWeb2py >

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread LoveWeb2py
No rush, Richard. Thank you for your help I really appreciate it. On Monday, May 11, 2015 at 4:34:14 PM UTC-4, Richard wrote: > > I will try to review it ASAP... > > On Mon, May 11, 2015 at 4:30 PM, LoveWeb2py > wrote: > > Here is my dummy app, Richard. > > > On M

Re: [web2py] Two SQLFORMs side by side?

2015-05-11 Thread LoveWeb2py
new_exp_num=form.vars.exp_num) elif form.errors: response.flash = '' else: response.flash = '' return dict(form=form) Do I need to actually specify the db.table? From the looks of the class I thought it woul

  1   2   3   4   >