[web2py] Azure Connection

2019-10-29 Thread Mark Billion
So, my connection string is: db = DAL('mysql://user:p...@my-server.database.windows.net/myDb',pool_size=5). I get no connectivity. Any help would be appreciated! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https

[web2py] ADA DECISION

2019-10-08 Thread Mark Billion
All ~ Long time asker here (thanks Anthony and Massimo for all your patient responses). FWIW, I did want to drop everyone a line about the Dominos Supreme Court appeal (Im a lawyer by trade). The Court of Appeals for the 9th Circuit (it's basically the western quarter of the US per here

Re: [web2py] Re: Classes: Iteration of Row Objects & Updating

2018-06-09 Thread Mark Billion
Anthony -- I havent met you, but I certainly owe you a beer. Thank you for all of your help. On Fri, Jun 8, 2018 at 10:47 PM, Anthony wrote: > On Friday, June 8, 2018 at 5:49:07 PM UTC-4, Mark Billion wrote: >> >> Ive checked the docs and am sure I am missing it, but can

[web2py] Classes: Iteration of Row Objects & Updating

2018-06-08 Thread Mark Billion
Ive checked the docs and am sure I am missing it, but can someone please confirm or deny: If I iterate a row class attribute via another class method, updates applied by that method will will update the underlying row attribute? For example: __init__: self.dbobj = db(db.foo.bar>0).select(

Re: [web2py] Re: auth.messages.subject

2018-01-25 Thread Mark Billion
gt; On Wednesday, January 24, 2018 at 1:47:50 PM UTC-5, Mark Billion wrote: >> >> So, this does not work. Any way to set the subject line? (maybe Im just >> missing it) >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) &g

[web2py] Re: auth.messages.subject

2018-01-24 Thread Mark Billion
Sorry, that covers gen emails not the auth section as far as I can see On Wednesday, January 24, 2018 at 1:50:04 PM UTC-5, Marcelo Huerta wrote: > > El miércoles, 24 de enero de 2018, 15:47:50 (UTC-3), Mark Billion escribió: >> >> So, this does not work. Any way to se

[web2py] auth.messages.subject

2018-01-24 Thread Mark Billion
So, this does not work. Any way to set the subject line? (maybe Im just missing it) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this me

[web2py] Styling the Sign Up Page

2017-08-14 Thread Mark Billion
I have Jquery that works fine to style the user/login page $( document ).ready(function() { $(":submit").addClass( "btn btn-default" ); $(".btn").css('margin-right', '10px'); $(".w2p_fl").attr('align', 'right'); $( "form>table" ).prepend( '' ) }); But I cant for the life of

[web2py] redirect if registration is pending

2017-07-25 Thread Mark Billion
Dumb question and Im sure that there is an answer that Im missing, but when in doubt App requires registration to be approved and if its not, it redirects to the home screen and flashes the standard message. If I want to redirect a login where the user is pending approval to a different pa

[web2py] Jquery Decision Tree

2016-12-08 Thread Mark Billion
Im really looking just for some suggestions of particularly light weight ones -- 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 messa

[web2py] Nginx & The Welcome App

2016-07-13 Thread Mark Billion
Nginx redirects my users from the website to the website/welcome/indexmy app is t4. Ive tried to configure the Web2py sites enabled to fix it, but it fails. Here is the w2p sites enabled fileany thoughts would be much appreciated. server { listen 80; server_n

[web2py] Segfault/Selenium/Web2py/Permissions

2016-07-03 Thread Mark Billion
I have a script that posts data to a third party form via PhantomJS. It runs just fine on selenium in the python shell and when I run it in the W2P shell (python web2py.py -S *app* -M). The problem is that when I call it from the controller via a click, I get this traceback. I am assuming tha

[web2py] dumbest question ever: how do you jump to line in the w2p ide

2016-06-03 Thread Mark Billion
I cant find this anywhere, but Ive seen it somewhere. Say Im editing in the admin application and want to jump to line 1000. Whats the key binding for it? Feel free to heckle as long as you also provide the answer ;) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: Computed DAL Values On Insert

2016-05-09 Thread Mark Billion
Yep On Monday, May 9, 2016 at 12:19:13 PM UTC-4, Niphlod wrote: > > are all of the required fields of "storage_string()" supplied ? > > On Monday, May 9, 2016 at 5:25:21 PM UTC+2, Mark Billion wrote: >> >> When I do an insert the computed values

[web2py] Re: non W2p form insert

2016-05-09 Thread Mark Billion
> > {'somefield1' : 'abcd', 'somefield2' : 'cdef', '*contents*': 'wxyz'} > > trying to do db.sometable.validate_and_insert(**request.vars) > > will give you the exact same error ("Field *contents *does not belong to >

[web2py] Computed DAL Values On Insert

2016-05-09 Thread Mark Billion
When I do an insert the computed values dont updatethoughts? def storage_form_controller(): x = request.vars.client sl_dict = { 'client':request.vars.client, 'kind': request.vars.kind, 'others_with_access': request.vars.others_with_access,

[web2py] non W2p form insert

2016-05-09 Thread Mark Billion
Dumb question and even though I have rtmed I cannot seem to find what I am sure is right in front of me. I have a form that sends back data ordered by table name and I want to do something like validate_and_insert(**request.vars) That being said, this doesnt work Locals: eld : fields :

[web2py] Re: Weird Javascript Behavior -- 2 clicks to fire (Sorry, Dont know where else to turn)

2016-05-02 Thread Mark Billion
stand what you are trying to do but I need to see > more in order to understand when the click event is being applied to the > .iframe_add objects. > > Thanks > Stuart > > On Friday, April 29, 2016 at 1:17:24 PM UTC-7, Mark Billion wrote: >> >> Here's th

[web2py] Weird Javascript Behavior -- 2 clicks to fire (Sorry, Dont know where else to turn)

2016-04-29 Thread Mark Billion
Here's the script. When I click it on load, works like a charm. When I click it via a dynamically created element, the first click sees the actual html shift (kind of stretch and go back). It does however work on the second click consistently. $(document).on('click', '.iframe_add', fun

[web2py] Re: Execution of import statements

2016-04-29 Thread Mark Billion
u have > > > import a > blablabla > import b > blablabla > import a > > the second "import a" statement is executed, but is a no-op. > > On Friday, April 29, 2016 at 1:20:59 AM UTC+2, Mark Billion wrote: >> >> I understand that the whole default.py file

[web2py] Execution of import statements

2016-04-28 Thread Mark Billion
I understand that the whole default.py file is executed on each request to a function internal to it. But does it import if the statement evaluates to false? For example if default.py has: Function x(): If 1==2: Import a Does a get imported every time function x is called? -- Resources:

[web2py] Re: SQLFORM return javascript on accept

2016-04-28 Thread Mark Billion
Thats brilliant, but when I put it in the script in, it doesnt work: ajax_form = SQLFORM(db[field_array[3]], this_page_ajax, deletable=True) if ajax_form.process().accepted: response.js = 'alert("hi");' The form is being called thru a modal and ajax iframe, but even when

[web2py] SQLFORM emulate return false

2016-04-27 Thread Mark Billion
I want to have the SQLFORM submit, validate, and on success do absolutely nothing. It would look like an html event equivalent to: form onsubmit="myFunction(); return false;" The problem is that actually injecting return false into the form means w2p doesnt validate. Is there a simple way

[web2py] Re: Ajax Form Update (and thank you for all the help)

2016-04-27 Thread Mark Billion
way to do this On Monday, April 25, 2016 at 9:41:55 PM UTC-4, Massimo Di Pierro wrote: > > Can you show up some more code. > > On Monday, 25 April 2016 08:51:14 UTC-5, Mark Billion wrote: >> >> I have a form that is accessed through ajax and displayed in a >> m

[web2py] Ajax Form Update (and thank you for all the help)

2016-04-25 Thread Mark Billion
I have a form that is accessed through ajax and displayed in a modalRight now, on success, the modal clears and the parent page is reloaded, which then shows the data that was entered in the table. i.e., ajax_form = SQLFORM(...).process(next = URL('default', page_name)) {{for x in y:}} x

[web2py] Re: Cascade is killing me

2016-04-21 Thread Mark Billion
That fixed it! On Thursday, April 21, 2016 at 3:30:39 PM UTC-4, Anthony wrote: > > Try with a fresh table and see if cascade works. > > On Thursday, April 21, 2016 at 3:27:25 PM UTC-4, Mark Billion wrote: >> >> It was added later. >> >> On Thursday, April 2

[web2py] Re: Cascade is killing me

2016-04-21 Thread Mark Billion
It was added later. On Thursday, April 21, 2016 at 3:23:19 PM UTC-4, Anthony wrote: > > Was Income_Src a reference field when you first created the table, or did > you make that change later? > > On Thursday, April 21, 2016 at 2:16:10 PM UTC-4, Mark Billion wrote: >> >&g

[web2py] Re: Cascade is killing me

2016-04-21 Thread Mark Billion
No, I mean the first one. I delete an income entry and the associated deduction entries still stick around. On Thursday, April 21, 2016 at 2:11:34 PM UTC-4, Leonel Câmara wrote: > > Do you mean you delete something in table "income" and nothing is deleted > in "deductions"? > > Or do you me

[web2py] Cascade is killing me

2016-04-21 Thread Mark Billion
Parent table is income: db.define_table('income', Field('client' , requires=IS_IN_DB(db, db.client.id), writable=False), Field('source', requires=IS_IN_SET(DEBTOR_TOGGLE_NO_BOTH),)) Child Table is deductions: db.define_table('deductions', Field('client' , requires=IS_IN_

Re: [web2py] Re: Bug / Dumb Question a = b= []

2015-12-11 Thread Mark Billion
s if a and b are thought to be different objects. > > Ron > > > On Tuesday, 8 December 2015 07:01:36 UTC-8, Mark Billion wrote: >> >> in python 2.6, I can run a = b = [] and get the expected result. In W2P, >> when I do it, it throws an exception as the list does n

[web2py] Bug / Dumb Question a = b= []

2015-12-08 Thread Mark Billion
in python 2.6, I can run a = b = [] and get the expected result. In W2P, when I do it, it throws an exception as the list does not propagate to both a & b. It would make my code cleaner, but otherwise not a problem. Just wanted to give a shout in case anyone gave a Thanks again for all

[web2py] Nginx Gateway Timeout

2015-11-21 Thread Mark Billion
It takes a while to process certain pdf creation requests and the Nginx server is throwing a 504 error. Its atop ubuntu 14.04 w web2py -- it was set up using the included w2p scripts. I am sure that this is a simple question, but my searching has only located answers about some PHP function...

[web2py] Re: invalid literal for long() with base 10: 'cli_wiki'

2015-11-13 Thread Mark Billion
NM. Im an idiot. On Friday, November 13, 2015 at 3:52:20 PM UTC-5, Mark Billion wrote: > > SQLFORM(db.cli_wiki) throws this error. At the same time, when I use a > different table in its place, all is okthoughts > -- Resources: - http://web2py.com - http://web

[web2py] invalid literal for long() with base 10: 'cli_wiki'

2015-11-13 Thread Mark Billion
SQLFORM(db.cli_wiki) throws this error. At the same time, when I use a different table in its place, all is okthoughts -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] securing download function

2015-11-12 Thread Mark Billion
Im not sure if this is necessary/redundant, but here is my question: Is there any way to check permission for the download -- i.e., the client associated with the file is checked and confirmed prior to the initiation of the dl without having to pass extra vars -- i.e., just using the filename

[web2py] Re: db(db.x.id in [foo, man, chu]).select() does not work

2015-11-12 Thread Mark Billion
Works like a charm. Thanks On Thursday, November 12, 2015 at 11:46:33 AM UTC-5, Anthony wrote: > > db.x.id.belongs([list, of, ids]) > > > > On Thursday, November 12, 2015 at 11:35:48 AM UTC-5, Mark Billion wrote: >> >> I want to select all database rows with ids

[web2py] db(db.x.id in [foo, man, chu]).select() does not work

2015-11-12 Thread Mark Billion
I want to select all database rows with ids in a preset list ... contains grabs everything that is like the list entry -- i.e. .contains(1) will snag records 1, 12, etc. And 'in' obviously doesnt work. Thoughts? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http

[web2py] Re: Way to query from a select object

2015-11-03 Thread Mark Billion
l_rows.find(lambda r: r.primary_residence == > True) > > Anthony > > On Tuesday, November 3, 2015 at 8:53:49 AM UTC-5, Mark Billion wrote: >> >> This seems ugly: >> foo = db(db.xxx.id==x.id).select() >> for a in foo: >> if a.primary_reside

[web2py] Way to query from a select object

2015-11-03 Thread Mark Billion
This seems ugly: foo = db(db.xxx.id==x.id).select() for a in foo: if a.primary_residence == True: nine_b_count = 1 .. Is there a way for me to select only the elements of foo that meet the secondary test. Something like foo.select(a.primary_residence == Tru

[web2py] Re: _onkeyup / ajax call

2015-10-15 Thread Mark Billion
""" %URL('default', 'cred_selector') return '%s%s%s' %(j_query_calls,row_adder, ajax_form) On Wednesday, October 14, 2015 at 8:24:58 PM UTC-4, Dave S wrote: > > > > On Wednesday, October 14, 2015 at 2:30:03

[web2py] Re: _onkeyup / ajax call

2015-10-14 Thread Mark Billion
NM. I injected the jquery into the header. On Wednesday, October 14, 2015 at 2:22:39 PM UTC-4, Mark Billion wrote: > > Im pulling my hair out. . . . > > Im using an inline call to the web2py ajax function via the controller as > below: > > ajax_form.element('#

[web2py] _onkeyup / ajax call

2015-10-14 Thread Mark Billion
Im pulling my hair out. . . . Im using an inline call to the web2py ajax function via the controller as below: ajax_form.element('#Debts_creditor')['_onkeyup'] = "ajax('https:.../t2/default/cred_selector', ['creditor'], 'suggestions');" The goal is for this ajax call to control a div that I a

[web2py] Is This Even Possible: Serve Form Via Ajax

2015-10-07 Thread Mark Billion
** Splits the input "name" attribute up => generates a query => creates sqlform => returns form def ajax_form_creator(): for k,v in request.vars.iteritems(): field_array = k.split('-') this_page_form = db[field_array[3]].id==field_array[1] db[field_array[3]].client

[web2py] Compute on Ajax Update

2015-10-05 Thread Mark Billion
db.define_table('client', Field('d_fn', 'string', length=45, label="""Debtor's First Name"""), Field('d_ln', 'string', length=45, notnull=True, label="""Debtor's Last Name"""), . . . . Field('caption', compute=lambda r: caption(r.d

[web2py] interpolate table name

2015-10-01 Thread Mark Billion
Following up on my last post--this fails: db.%s.validate_and_insert(...) %var_containing_table_name Any thoughts on how to interpolate? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/

[web2py] Re: Any idea about how to interpolate into a dal query string?

2015-10-01 Thread Mark Billion
Works like a charm. Thanks! On Wednesday, September 30, 2015 at 3:17:10 PM UTC-4, Leonel Câmara wrote: > > Use this instead > > query = db[field_array[3]].id ==field_array[1] > db(query).select() > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:/

[web2py] Any idea about how to interpolate into a dal query string?

2015-09-30 Thread Mark Billion
This fails: query = "db.%s.id==%s" %(field_array[3], field_array[1]) db(query).select() Any idea about how to interpolate into a dal query string? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] ajax todo lists

2015-09-29 Thread Mark Billion
Does anyone have a good example out there in W2Pland? Im looking -- 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 yo

[web2py] if form accepts, add variable to session throws 504 error

2015-09-28 Thread Mark Billion
504 Error: if form.accepts(request,session): session.mycli.extend(form.vars.id) redirect(URL('client_edit', vars={'cli':form.vars.id})) No Error: if form.accepts(request,session): #session.mycli.extend(form.vars.id) redirect(URL('client_edit', vars={'cli':fo

Re: [web2py] Re: Nginx / Web2py modules dont reload

2015-09-25 Thread Mark Billion
in a highly concurrent > environment. If the module is in the app modules/ folder, all workers > should update it but something else may be going on. As Leonel says > restarting uwsgi-emperor is the safest thing. > > > On Thursday, 24 September 2015 18:38:32 UTC-5, Mark Billion wro

[web2py] Re: Nginx / Web2py modules dont reload

2015-09-24 Thread Mark Billion
Sadly I've tried that too -- 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 "web2

[web2py] Nginx / Web2py modules dont reload

2015-09-24 Thread Mark Billion
Running w2p on nginx/ubuntu 14.04. When I change a module's code, the changes dont show up when I load the app again (ie a class that returned 2 but now returns 1 still returns 2). Ive turned sendfile off in Nginx and have reloaded the thing over and over. Sometimes it works and sometimes I

Re: [web2py] Re: Exception: Server address not specified

2015-08-04 Thread Mark Billion
int me any output. I have to reload the webapp On Tue, Aug 4, 2015 at 11:19 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > before the mail.send print mail.settings.sender. It is possible this value > is reset somewhere else. It should work > > > On Monday,

[web2py] Exception: Server address not specified

2015-08-03 Thread Mark Billion
Im pulling straight from the book and running on python anywhere, so Im a bit confused: web2py Shell 2.11.2-stable+timestamp.2015.05.30.16.33.24 In [1] : from gluon.tools import Mail In [2] : mail = Mail() In [3] : mail.settings.server = 'smtp.gmail.com:465' In [4] : mail.settings.sender = 'a.

[web2py] Transitioning/Bug/unable to save

2015-06-26 Thread Mark Billion
Seems the easiest way to handle the fillable pdf issue is to move over to rackspace. Ive loaded a server and have w2p up and running. Welcome app works fine and is editable. I moved the entire folder from PA to rackspace, and it loaded up fine. That said, I uploaded a bunch of views, and th

[web2py] Re: fillable pdf forms

2015-06-26 Thread Mark Billion
Di Pierro wrote: > > I looked at the source code of pypdftk and it does not appear to depend on > windows. It does require pdftk installed under /usr/bin/pdftk > > On Thursday, 25 June 2015 15:19:57 UTC-5, Mark Billion wrote: >> >> I would like to fill a form with

[web2py] fillable pdf forms

2015-06-25 Thread Mark Billion
I would like to fill a form with an FDF dict, i.e, form.pdf % {element:data}. I have seen a lot on pypdftk, but I think it requires a MS system as a dependency. Any alternatives? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sour

[web2py] (name 'auth' is not defined)

2015-03-11 Thread Mark Billion
We've been very stable, but this just happened last night. Im guessing its a random error, but wanted to see if anyone had any thoughts. Here's the code . 6. 7. 8. 9. 10. 11. #global route to static images. g_im_handle = '/home/mmb21167/web2py/ba_1_1/applications/welcome/static/%s' @aut

[web2py] Download/Security Issue

2015-01-13 Thread Mark Billion
If I have a page controlled by a function that has access control, do I need to also validate the same at the download stage? For example (in pseudo-code): function x(): 1. Check to see if Mark Billion is the authorized user or redirect to google.com 2. do something 3. return dict(image.file

[web2py] Load() in a page with a form

2015-01-02 Thread Mark Billion
Ive got a page with a form embedded in it. I also have a load call, but that form wont submitit will when i just pull the .load file so I know its not the coding. Thoughts? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Ajax/Updated Form Field

2014-12-30 Thread Mark Billion
ing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. On Tuesday, December 30, 2014 10:46:42 AM UTC-5, Mark Billion wrote: > > I may be an idiot but > > I want to set up a form so that you click to edit, and on focus out, the > data is co

[web2py] Ajax/Updated Form Field

2014-12-30 Thread Mark Billion
I may be an idiot but I want to set up a form so that you click to edit, and on focus out, the data is committed to the DB via Ajax. 1. Im using the inplace_edit(f,v) module from slices: wrapper = DIV() inp = SQLFORM.widgets.string.widget(f,v) lbl = SPAN(inp['_value'],_id='in

Re: [web2py] Re: Dumb Question/Bug

2014-12-26 Thread Mark Billion
Awesome. I really appreciate the help. On Fri, Dec 26, 2014 at 10:13 AM, Anthony wrote: > On Friday, December 26, 2014 9:15:40 AM UTC-5, Mark Billion wrote: >> >> Just two questions for my edification: >> 1. Why did HTTP get grouped into exceptions >> > >

Re: [web2py] Re: Dumb Question/Bug

2014-12-26 Thread Mark Billion
Just two questions for my edification: 1. Why did HTTP get grouped into exceptions 2. Is there a security reason not to catch all non-http exceptions, ie except EXCEPTION On Tue, Dec 23, 2014 at 3:28 PM, Mark Billion wrote: > Thanks guys -- that makes a ton of sense. I really appreciate

Re: [web2py] Re: Dumb Question/Bug

2014-12-23 Thread Mark Billion
gt;> >> are you aware that in web2py any HTTP is a subclass of exception ? Never, >> never, never use an exception without specifying what exception your code >> may raise. >> >> On Tuesday, December 23, 2014 7:34:45 PM UTC+1, Mark Billion wrote: >>> >>

[web2py] Re: Dumb Question/Bug

2014-12-23 Thread Mark Billion
Why are you using an except without specifying the exception? Trying to catch all possible exceptions. On Tuesday, December 23, 2014 1:31:21 PM UTC-5, Leonel Câmara wrote: > > Why are you using an except without specifying the exception? Anyway just > do this: > > @auth.requires_login() > def

[web2py] Dumb Question/Bug

2014-12-23 Thread Mark Billion
Works Just Fine def cli_add(): try: db.client.au_usr.default = auth.user_id except: redirect(URL('index')) form = SQLFORM(db.client, fields = ['d_fn', 'd_ln', 'd_aka', 'd_ss'], labels = {'d_ss': 'Social Security', 'd_aka': 'Any Aliases', 'd_65': 'Older than 65'}).proc

[web2py] Safari/IE User Login Issue

2014-08-15 Thread Mark Billion
All -- Again, I am so grateful for all of your assistance. I have a strange question -- when I log in to my site on chrome, mozilla, & safari handheld, Im just fine. Yet, when I use safari and IE on the site from a desktop, the user registration form simply refuses input . . . until I use the

[web2py] Re: Thank You

2014-08-08 Thread Mark Billion
Exactly! On Thursday, August 7, 2014 4:41:15 PM UTC-4, Derek wrote: > > That's awesome, so it's like bankruptcy for dummies? > > On Thursday, August 7, 2014 5:18:18 AM UTC-7, Mark Billion wrote: >> >> I just finished the first beta of software that automa

[web2py] Thank You

2014-08-07 Thread Mark Billion
I just finished the first beta of software that automates consumer chapter 7 filings...https://mmb21167.pythonanywhere.com/Sharkskin_2_2/default/user/login I wanted to take a moment to thank everyone on this board. I have learned so much and you all cannot know how valuable your insight has be

[web2py] Disabling/Limiting Access To Profile

2014-07-29 Thread Mark Billion
I want to prevent users from accessing their profile and changing data after registration. Is there a way to disable http:///[app]/default/user/profile without disturbing the balance of the user-auth suite? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: SQL Forms Redirect

2014-05-06 Thread Mark Billion
URL() and give it a dictionary: > > URL('album', args=[request.args(0,cast=int), vars=dict(id=myform.vars.id > )]) > > Anthony > > On Tuesday, May 6, 2014 9:13:55 AM UTC-4, Mark Billion wrote: > >> I have an SQLFORM that accepts certain user data, and then

[web2py] Re: Custom Form Widget Question

2014-05-06 Thread Mark Billion
On Saturday, May 3, 2014 3:13:40 PM UTC-5, Mark Billion wrote: >> >> How can I set the width of the dropdown menu for an input? The thing is >> way too long because its trying to be longer than the textsorry, I know >> its dumb, but I cant find anything >> >

[web2py] SQL Forms Redirect

2014-05-06 Thread Mark Billion
I have an SQLFORM that accepts certain user data, and then needs to update the record that was just created. My command reads: form = SQLFORM(db.album).process(next=URL('album', args=[request.args(0,cast=int), *myform.vars.id*])) Both myform.vars.id and form.vars.id fail when included a

[web2py] Custom Form Widget Question

2014-05-03 Thread Mark Billion
How can I set the width of the dropdown menu for an input? The thing is way too long because its trying to be longer than the textsorry, I know its dumb, but I cant find anything -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

[web2py] Re: Line Breaks in DAL Entries

2014-05-01 Thread Mark Billion
7;text', represent=lambda v, r: XML(v.replace('\n', '' > ))) > > or > > Field('myfield', 'text', represent=lambda v, r: PRE(v)) > > Anthony > > On Thursday, May 1, 2014 3:24:16 PM UTC-4, Mark Billion wrote: > >> I

[web2py] Line Breaks in DAL Entries

2014-05-01 Thread Mark Billion
I have a database entry that looks like this when I enter the DB admin: Mark's Restaurant MEAL PLAN NOTICE When it prints, I get: Mark's Restaurant MEAL PLAN NOTICE My problem is that I would like to split the text by line but I cant figure out what the raw symbol is for the break (i.e., \

Re: [web2py] Calling a function from a different controller

2014-04-11 Thread Mark Billion
Thanks! On Friday, April 11, 2014 11:49:30 AM UTC-4, Carlos Cesar Caballero Díaz wrote: > > I think that the function foo(a,b) could be in modules, you will be able > to call it from any place. > > > El 11/04/14 11:36, Mark Billion escribió: > > > This seems lik

[web2py] Calling a function from a different controller

2014-04-11 Thread Mark Billion
This seems like a really dumb question to me, but I cant seem to find an answer. Controllers are 'default.py' and 'worker.py' In worker.py, I want to call foo(x,y), which is a function in default.py. Thoughts on how to do that? -- Resources: - http://web2py.com - http://web2py.com/book (Do

[web2py] Re: Example of web2py integration with an AJAX grid (preferably jquery based) which updates backend db ?

2014-03-07 Thread Mark Billion
I am sure I am an idiot, but when I hit enter to update (ie, petunia to petuniatest), it reverts back to the same old dog name (petunia). def dogs(): db.dogs.dog_name.represent = lambda value, row: DIV(value if value else '-',_class='dog_name', _id=str(row.id)+'.dog_name') g = SQLFORM.

[web2py] Re: Exceedingly Dumb Question about chaining db conditions

2014-02-27 Thread Mark Billion
Thank you! On Thursday, February 27, 2014 1:24:06 PM UTC-5, Leonel Câmara wrote: > > What you're looking for is belongs > > a = db((db.clear.client==req_arg_0) & (!db.clear.Property_Type.belongs([ > 'aa', 'bb', 'cc'])).select() > -- Resources: - http://web2py.com - http://web2py.com/book (Doc

[web2py] Exceedingly Dumb Question about chaining db conditions

2014-02-27 Thread Mark Billion
So Ive got a select request that looks like this: a = db((db.clear.client==req_arg_0) & ((db.clear.Property_Type != 'aa') & (db.clear.Property_Type != 'bb') & (db.clear.Property_Type != 'cc'))).select() And it works just fine. However, when I do: a = db((db.clear.client==req_arg_0) & (db.cl

[web2py] Importing Data / Force Record ID #s To Remain As Specified in the CSV

2014-01-23 Thread Mark Billion
I know that this is a dumb question, but I have a database with static data entry ids 17 to 100. When I download the CSV, it has the x.id field and the corresponding number. However, when I create a new database and upload the data using the db admin, it automatically renumbers these entries.

[web2py] Re: DAL looping update

2014-01-21 Thread Mark Billion
.update(...) > row.update_record() > > The row.update() calls make changes to the Row object itself (but not the > database). Then, .update_record() updates the database with whatever > changes have been made to the Row. > > Anthony > > On Tuesday, January 21, 2014 11:00:10 AM

[web2py] DAL looping update

2014-01-21 Thread Mark Billion
I cannot seem to get this code to run, even though Im almost sure Im right.any thoughts would be appreciated! for r in rows: . . . . . for k, v in {'name': r.name, 'address': r.address . . . }.items(): if v is None: db(db.client.id==r.id).update(**{k:'N

[web2py] Updating DAL elements with a loop

2014-01-21 Thread Mark Billion
I have a database that accepts user data and then repurposes it for use in a different context. The problem is scrubbing for None; I can do it, but its ugly going line by line -- Id rather loop through it but I cant get it to work. Approach #1 for r in rows: . . . . for e in