[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] 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] 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] 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] 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: 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] 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] 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] 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] 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] 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] 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 +=

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] 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] 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] 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

[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] 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: 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] 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://

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

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

[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] 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

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-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

[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',

[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] 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
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] "Does not contain" for grid

2014-04-10 Thread LoveWeb2py
Is there a way to search for something that "Does not Contain" on the grid return? I was trying to put something together with wildcards and such, but haven't been able to return results in a certain row that does not contain. For example abcd abcde abcde abcde 1394e lajskl3 djklsajk3 djfl3f

[web2py] Using record_versioning - possible to place links only on right side of grid=SQLFORM?

2014-04-11 Thread LoveWeb2py
Hello, I'd like to just have my links on the right side of the SQLFORM Grid and my buttons on the left and right. I've tried modifying the sqlhtml.py and changing links_placement = 'right', and buttons_placement = 'both', but both the links and buttons still appear. I'm guessing the record vers

[web2py] httpd internal 500 error -- out of the blue just from typing service httpd restart

2014-04-14 Thread LoveWeb2py
I've done this 100 times. service httpd restart and it works fine I am running web2py with python 2.7 and using the wsgihandler.py with apache. I've checked the error logs and it says [warn] Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC

Re: [web2py] httpd internal 500 error -- out of the blue just from typing service httpd restart

2014-04-14 Thread LoveWeb2py
. However, now mysql doesn't work and i'm working on that. On Monday, April 14, 2014 11:57:33 AM UTC-4, marco mansilla wrote: > > El Mon, 14 Apr 2014 11:28:25 -0700 (PDT) > LoveWeb2py > escribió: > > > I've done this 100 times. > > > > service htt

[web2py] Current date/time for datetime field (time is wrong)

2014-04-15 Thread LoveWeb2py
Hello, I love the calendar that pops up in the 'datetime' field with a time/date selector. However, when my customers use it their time is always off. Is there a way to prepopulate the field with the current time, or make a button for them to click which will take their local system time? --

[web2py] errors with input form

2014-04-17 Thread LoveWeb2py
I created a search function where users can type in a set of numbers and search for them using: form=FORM('What is your n umber', INPUT(_name='numtofind', INPUT(_type='submit')) if form.accepts(request,session): numtofind = request.vars.numtofind Let's say a users number is "12345" a normal

[web2py] appointment application doesn't work out of box

2014-04-20 Thread LoveWeb2py
Hello, I'm trying to create a website for my Mom that she can use to book appointments. She has a day spa and really could use something like the appointment manager. I have a fresh copy of web2py installed (latest version) and a fresh install of the appointment manager app. I installed the ap

[web2py] Change button to "loading" after clicked

2014-04-23 Thread LoveWeb2py
Hello, I'm using the form=FORM('Search text:', INPUT(_name='texttofind', INPUT(_type='submit')) which generates a button and a search field on a web page when I type {{=form}} How can I change the button to "loading" when a user clicks it I found this documentation on jquery http://getbootstr

[web2py] init.js Images not Loading initially

2014-04-24 Thread LoveWeb2py
Hello, I'm running www.syntheticturfdrs.com I'm using web2py to control the back end and the site is hosted on pythonanywhere. For some reason my images don't load intially, but if I browse to another site (lets say products) and then go back to "welcome" the images load. Does anyone have any

[web2py] Re: init.js Images not Loading initially

2014-04-25 Thread LoveWeb2py
default_application = "syntheticdr" default_controller = "default" default_function = "intro" is my current setup (I've since put in yours) and here is my index function in default.py def index(): return redirect(URL('intro')) Could it be creating some type of loop? On Friday, April 25, 20

[web2py] Re: init.js Images not Loading initially

2014-04-25 Thread LoveWeb2py
That fixed it! I had to reload my web2py instance on pythonanywhere. Thank you so much! On Friday, April 25, 2014 6:32:06 AM UTC-4, Leonel Câmara wrote: > > The images don't seem to be there.I'm getting. > > >1. GET http://www.syntheticturfdrs.com/css/style.css 400 (BAD REQUEST) >skel.mi

[web2py] retrieve records and create SQLFORM?

2014-04-29 Thread LoveWeb2py
Hello, I'm trying to create a search function that allows users to search the database without accessing the SQLFORM. Is there a good way to display multiple results based on the record id? Could I create a unique SQLFORM view just on the record IDs that are retrieved? Basically my search go

Re: [web2py] retrieve records and create SQLFORM?

2014-04-29 Thread LoveWeb2py
want... But if you build this list just > to get the record and want to display them latter you should think to use > SQLFORM.grid that provide all what you want as far as I understand what you > need. > > Richard > > > > On Tue, Apr 29, 2014 at 9:27 AM, LoveWeb2py >

Re: [web2py] retrieve records and create SQLFORM?

2014-04-29 Thread LoveWeb2py
This is so awesome! On Tuesday, April 29, 2014 10:04:40 AM UTC-4, Richard wrote: > > This should return a list of ids : > > [row.id for row in db(SQL WHERE CLAUSE).select(db.table.id)] > > Richard > > > On Tue, Apr 29, 2014 at 10:02 AM, LoveWeb2py > > wrote: > >>

Re: [web2py] retrieve records and create SQLFORM?

2014-04-29 Thread LoveWeb2py
u do and how to acheive it. > > Richard > > > On Tue, Apr 29, 2014 at 10:07 AM, LoveWeb2py > > wrote: > >> Okay i'll give that a try. So I'll iterate through my list first and then >> use that clause? >> >> For id in records: >>

[web2py] Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
Hello, There are many times when I just want to copy the values of one record in my sqlform and create a new record, but modify the content and save it. Is there an easy way to do this with web2py or would I have to write the code? Many thanks -- Resources: - http://web2py.com - http://web2p

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
>> right record >> if k != 'id': >> vals[k] = v >> >> db.t_disziplin.insert(**vals) >> >> rec = db(db.t_disziplin.f_title == recname).select().first() >> rec_id = rec.id >> >> # redirect for edit

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
ler, function, > vars=dict(pass_your_record_vars_here=record_vars1, ...))) to a function > that do what I wrote above... Just pass record value throught vars then > request.vars.field1 request.vars.field2 and assign .default= > request.vars.field1 > > Richard > > > &

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
record or keep it the same if I choose. Does that make sense? On Friday, May 2, 2014 9:57:23 AM UTC-4, LoveWeb2py wrote: > > This is very helpful, Richard. I have about 20 fields so I think I would > have to iterate through the fields and insert the request.vars to the > database. &g

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
> > Is a dict comprehension... > > Then in transitionnal form controller you do something like that : > > def transition_form(): > for f, v in request.vars: > db.table[f].default = v > form = SQLFORM(db.table, ...) > ... > > > Richard >

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
-fields If you think I should upgrade i'll make the change, but if I could stick with 2.3 I would prefer to do so On Friday, May 2, 2014 3:10:15 PM UTC-4, LoveWeb2py wrote: > > for this part: {f: row[f] for f in db.table.fields} > > what do I put for fields... could I just leave

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
this far. However when I try to type vars={f: row[f] for f in db.table.fields})))] I get invalid syntax and the ^ points to the for in the dict comprehension. When I use regular python it works fine. Any thoughts? On Friday, May 2, 2014 3:16:24 PM UTC-4, LoveWeb2py wrote: > > I just realized I mi

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
Okay... I think I see the issue. My web2py is running Python 2.6 and my Interpreter is 2.7. dictionary comprehension changed between those versions. I'm going to try and construct a dict comprehension for 2.6 and try it again. On Friday, May 2, 2014 3:40:53 PM UTC-4, LoveWeb2py wrote: >

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
/stackoverflow.com/questions/1747817/python-create-a-dictionary-with-list-comprehension > > You can adapt > > Richard > > > On Fri, May 2, 2014 at 3:44 PM, LoveWeb2py > > wrote: > >> Okay... I think I see the issue. My web2py is running Python 2.6 and my >> Interp

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-02 Thread LoveWeb2py
Web2py admin console has a red line at for f, v in request.vars: and then says too many values to unpack. my function is def transition_form(): for f, v in request.vars: db.table[f].default = v form = SQLFORM(db.table, user_signature=True) return dict(form=form) Should I have extra v

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
t call last): >> File "", line 1, in >> ValueError: need more than 1 value to unpack >> >>> >> >> Add an "iteritems()" and you're good to go >> >> >>> for k,v in test.iteritems(): >> ... print k,v

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
46:25 AM UTC-4, LoveWeb2py wrote: > > Richard/Niphold, > > Thank you so much. It's almost done. Just getting attribute error now but > I am going to try to fix that with exception handling. > > 'str' object has no attribute 'year' > > I have a m

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
ist')), but I get an error saying table object has no attribute '_formkey' does this mean I need to do some type of form validation? On Monday, May 5, 2014 9:53:38 AM UTC-4, Richard wrote: > > Please show code!! > > Richard > > > On Mon, May 5, 2014 at 8:50 AM

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
Sorry forgot to add .iteritems(): this is the most updated version. On Monday, May 5, 2014 10:01:46 AM UTC-4, LoveWeb2py wrote: > > Hi Richard, > > Here is what I have so far: > > Controllers: > def user_list(): > grid=SQLFORM.smartgrid(db.users, paginate=20, links_pl

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
orm has errors' >else: >response.flash = 'please fill out the form' >return dict(form=form) > > > You need to process the form, see if it validate... You shouldn't have to > insert manually your data if you don't need facy thing and

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
> > > > Avoid using user_signature at the begining, and you can add this more > secure thing latter on. > > Richard > > > > On Mon, May 5, 2014 at 10:40 AM, LoveWeb2py > > wrote: > >> I've read that, Richard. >> >> When using this I g

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
Controllers: @auth.requires_login() def users_list(): grid=SQLFROM.smartgrid(db.users, paginate=20, links_placement='left', links=[dict(header='', body=lambda row: A(I(_class='icon retweet icon-retweet'), _href=URL('transition_form', vars=dict((f, row[f]) for f in db.users.f

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
me of form.vars... I had issue with name collision in > the pass deleting the request.vars after iteratio on it may help. > > Richard > > > On Mon, May 5, 2014 at 11:57 AM, LoveWeb2py > > wrote: > >> Controllers: >> @auth.requires_login() >> def users_

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
ponse.vars = '' if form.process().accepted: response.flash = 'form accepted' redirect(URL('users_list')) elif form.errors: response.flash = 'errors on page' else: response.flash = 'facepalm' return dict(form=form)

Re: [web2py] Re: Create a copy record button in SQLFORM?

2014-05-05 Thread LoveWeb2py
May 5, 2014 12:27:16 PM UTC-4, LoveWeb2py wrote: > > I created a clean function and removed the "for f, v in > request.vars.iteritems():db.users[f].default = v" and the form works fine > and properly redirects upon submit. So it has to be something with the for > l

[web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
I had a list of addresses I was using on my user db and when I switched the field from string to string.list it truncated all of my values. I have over 1000 customers in there. Is there an explanation for this? It cut off the first and last character for example: 123 field road is now 23 field

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
e field type, web2py had > try to make it best to handle the situation... > > Which DBMS do you use? > > If you have the data somewhere else, just reload them. > > Richard > > > > > On Mon, May 5, 2014 at 2:02 PM, LoveWeb2py > > wrote: > >> I had a

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
PM UTC-4, Richard wrote: > > Are you talking about field type or representation or requires that all > differents? > > Without code can't help... > > Sorry. > > Richard > > > On Mon, May 5, 2014 at 2:21 PM, LoveWeb2py > > wrote: > >> I am using

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
tring') > > It truncate the end? > > How do you determine it is truncate? In the grid? If in grid() try to set > greater then 20 to maxtextlength parameters of the grid... > > Richard > > > > > On Mon, May 5, 2014 at 3:34 PM, LoveWeb2py > > wrote: >

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
estart your terminal instance of web2py after change the type of > your field? > > Models get load only when you start the session I think... > > Richard > > > On Mon, May 5, 2014 at 3:51 PM, LoveWeb2py > > wrote: > >> When I connect to my table t

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
Rebooted and the address shows up in one field now (not spread across 10), but it is still truncated. If I switch the field back to string and reboot the ip address appears fine... I really need it in a list form if possible, but if I can't i'll deal with a string -- Resources: - http://web2p

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
and edit? > > On Monday, May 5, 2014 1:05:38 PM UTC-7, LoveWeb2py wrote: >> >> >> Rebooted and the address shows up in one field now (not spread across >> 10), but it is still truncated. If I switch the field back to string and >> reboot the ip address appea

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
and by dropdown I mean clicking the + field that you get when you use the +- list:string field type On Monday, May 5, 2014 4:17:02 PM UTC-4, LoveWeb2py wrote: > > Derek, > > I want to be able to add multiple addresses for one customer using the > dropdown instead of having to cre

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
Richard, This is actually for editing fields that are already in the SQLFORM.grid() I checked my error log and I'm getting Warning: Truncated incorrect DOUBLE value: 'T' ret = self.cursor.execute(*a, **b) Could this be causing it? On Monday, May 5, 2014 4:17:47 PM UTC-4, L

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
have to go now. May help again later. > > Richard > > > On Mon, May 5, 2014 at 4:22 PM, LoveWeb2py > > wrote: > >> Richard, >> >> This is actually for editing fields that are already in the SQLFORM.grid() >> >> I checked my error log and I&#

Re: [web2py] string:list truncated all of my values!! PLEASE HELP

2014-05-05 Thread LoveWeb2py
quot;123 Home St." should be changed to "|123 Home St.|". > > Please try this on a dev copy of the db before messing around with the > production database, though. > > Anthony > > On Monday, May 5, 2014 4:17:02 PM UTC-4, LoveWeb2py wrote: > >> Derek, >

[web2py] Changing auth_membership

2014-05-07 Thread LoveWeb2py
I'm trying to setup auth_membership and I already have quite a few users who have registered. The current schema is user_21, 22, 23 etc... should I just use appadmin to change their role to "Editor", User, etc... or is there a better way to do it? Also, how could I show them their role as read-

[web2py] Re: Changing auth_membership

2014-05-07 Thread LoveWeb2py
UTC-4, Niphlod wrote: > > then create whatever groups you need and associate the users to those > groups. > > On Wednesday, May 7, 2014 2:37:01 PM UTC+2, LoveWeb2py wrote: >> >> I'm trying to setup auth_membership and I already have quite a few users >> who have regis

[web2py] Re: Changing auth_membership

2014-05-07 Thread LoveWeb2py
Would I have to switch to CRUD instead of SQLFORM? On Wednesday, May 7, 2014 11:05:15 AM UTC-4, LoveWeb2py wrote: > > I know this is such a noob question, Niphlod. I'm starting to get a better > feel for it now. I created the groups and started to associate users. > > Two t

[web2py] Re: Changing auth_membership

2014-05-07 Thread LoveWeb2py
Sorry about that guys... finally found the answer: grid = SQLFORM.grid(db.auth_user, editable = auth.has_membership('managers'), deletable = auth.has_membership('managers')) On Wednesday, May 7, 2014 11:38:08 AM UTC-4, LoveWeb2py wrote: > > Would I have to

[web2py] X509 Documentation is wrong

2014-05-08 Thread LoveWeb2py
Book says: from gluon.contrib.login_methods.x509_auth import X509Account auth.settings.actions_disabled=['register','change_password','request_reset_password'] auth.settings.login_form = X509Account() http://web2py.com/books/default/chapter/29/09/access-control#Other-login-methods-and-login-forms

[web2py] color cells based on value in SQLFORM

2014-05-09 Thread LoveWeb2py
Hello, I have a spreadsheet of items and I want to track their inventory based on color (similar to an excel spreadsheet). I have two columns for example: Item, Item_Status The item could be a desk, chair, etc... and for status I have 1 2 or 3. If the status is 1 I would like to make the cell c

[web2py] Re: appointment application doesn't work out of box

2014-05-10 Thread LoveWeb2py
Is there any interest in fixing this app or how I could fix it? On Sunday, April 20, 2014 6:02:03 PM UTC-4, LoveWeb2py wrote: > > Hello, > > I'm trying to create a website for my Mom that she can use to book > appointments. She has a day spa and really could use something lik

Re: [web2py] Re: appointment application doesn't work out of box

2014-05-10 Thread LoveWeb2py
#x27;%t[2:],args=(f, >> form.record.id)))}}]{{pass}}{{pass}} >> >> to this: >> >> {{for f in db.t_appointment._referenced_by:}}{{t=f.tablename}}{{if not >> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f, >> form.record.i

[web2py] Re: color cells based on value in SQLFORM

2014-05-12 Thread LoveWeb2py
green; color:white; padding:5px;} > .Completed {background-color: red; color:white; padding:5px;} > .Deferred {background-color: blue; color:white; padding:5px;} > > I think this is nicer than embedding an if statement with hardcoded styles > in your code. > > > On Friday, Ma

[web2py] Replicate SQL Query WHERE NULL in Web2py

2014-05-13 Thread LoveWeb2py
Hello, How could I replicate this SQL Query in a controller and display a grid? Here is what I'm trying to accomplish: http://stackoverflow.com/questions/15926348/left-join-to-display-records-not-in-right-table Here is the query: SELECT a.* FROM ECRDTL_del AS a LEFT JOIN ECRDTL_edit A

[web2py] How to use modal with an if condition

2014-05-23 Thread LoveWeb2py
Is this possible? I basically want to try and write a function that says if the result == 3: popup a modal box I followed this example: http://getbootstrap.com/2.3.2/javascript.html#modals But I just can't figure out how to make the modal pop up in the same window. I am thinking it will be

[web2py] How to handle \t \r in text area

2014-06-03 Thread LoveWeb2py
I have a large file that starts a new line at every \r I want users to be able to copy and paste their data into the web2py textarea field. When I check the form.vars it does show the \t & \r's in the text, but when I check form.vars.fieldname it strips the r's. How can I iterate through their

[web2py] How to change SQLFORM smartgrid title

2014-06-03 Thread LoveWeb2py
Noob question -- I searched around and couldn't find an answer on how to change the SQLFORM.smartgrid label which displays the name of the database. I know you can set fields in a table by typing label='newName', but how can I change the table name itself so it doesn't display the table name in

[web2py] Re: How to handle \t \r in text area

2014-06-03 Thread LoveWeb2py
I figured out when I type form.vars.fieldname.file it maintains the \r \n, but I haven't tested it on the text area yet. Going to give that a try and hope for the best. Thanks guys On Tuesday, June 3, 2014 4:44:23 AM UTC-4, LoveWeb2py wrote: > > I have a large file that starts a

[web2py] Re: How to change SQLFORM smartgrid title

2014-06-03 Thread LoveWeb2py
exposed using a leading underscore > so they won't conflict with field names. > > On Tuesday, June 3, 2014 9:52:38 AM UTC-4, LoveWeb2py wrote: >> >> Noob question -- I searched around and couldn't find an answer on how to >> change the SQLFORM.smartgrid la

[web2py] how can I insert a list db.table.insert -- It currently shows blank in SQLFORM

2014-06-05 Thread LoveWeb2py
I am assigning another tables id's to a list so I can reference them in my SQLFORM and allow users to click a link that will show them associated records. I have a list with the other tables record ids such as: [1,6] other_tables_id = [1,6] I want to db.current_table.insert(other_tables_id=oth

[web2py] Re: how can I insert a list db.table.insert -- It currently shows blank in SQLFORM

2014-06-05 Thread LoveWeb2py
Please disregard the problem was I'm an idiot. Thank you. On Thursday, June 5, 2014 6:34:36 PM UTC-4, LoveWeb2py wrote: > > I am assigning another tables id's to a list so I can reference them in my > SQLFORM and allow users to click a link that will show them associated >

[web2py] create a link SQLFORM to another table with id.belongs

2014-06-05 Thread LoveWeb2py
I have two tables: table1 & table 2 I compare table 2 events against table 1 and if it matches I insert it into table 2's field called "table2.table1_id" table2.table1_id has thousands of rows that have the row id of table 1 in it in the form of a list. Normally I could use the belongs featu

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-05 Thread LoveWeb2py
This doesn't seem to work for me Fabiano, When I click the button it just keeps table1 on the screen. There has got to be an easier way (I hope) On Thursday, June 5, 2014 7:41:51 PM UTC-4, Fabiano Almeida wrote: > > I use this: > > grid for table1 > def index(): > return dict(grid=SQLFORM.g

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread LoveWeb2py
SQLFORM isn't working for me with new_table = db(db.table1.id.belongs(record_ids)).select() if I do {{=new_table}} in my view I can see the records which belong to record_ids, but if I do: SQLFORM.grid(new_table) return dict(grid=grid) I get an error 'Rows' object has no attribute '_db' --

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread LoveWeb2py
id is a > send var to your view, de second var grid is a local var of your function. > > Then, > in controller use: > grid = SQLFORM.grid(db.new_table) > return dict(grid=grid) > > in the view use: > {{=grid}} > > Fabiano. > > > 2014-06-06 12:45 GMT-03:00

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread LoveWeb2py
That was it! THANK YOU! Why does it work without a signature though? On Friday, June 6, 2014 1:03:35 PM UTC-4, Fabiano Almeida wrote: > > Try: > > grid = SQLFORM.grid(db.table, user_signature=False) > > Em sexta-feira, 6 de junho de 2014 13h10min34s UTC-3, LoveWeb2py escreveu

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-06 Thread LoveWeb2py
Now I get this error when I try to click edit on the query database: invalid literal for int() with base 10: 'edit' I've tried changing signature to false, but I don't think thats the problem. On Friday, June 6, 2014 1:17:39 PM UTC-4, LoveWeb2py wrote: > > yes >

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-09 Thread LoveWeb2py
I use session and try...except to resolve this. > > > > 2014-06-06 15:29 GMT-03:00 Fabiano Almeida >: > >> Show your code >> >> >> 2014-06-06 15:18 GMT-03:00 LoveWeb2py >: >> >> Now I get this error when I try to click edit on the query database: >

  1   2   3   4   >