[web2py] Re: plugin_lazy_options widget

2014-08-14 Thread Jesse Ferguson
OK so I could never figure out how to use this widget on itself, I ruptured a few brain cells in the process and just decided to learn jquery. In case anyone is ever in my position here is my working solution 1)scrap the second lazy_options_widget and just use the default web2py select

[web2py] Re: plugin_lazy_options widget

2014-08-12 Thread Jesse Ferguson
I've tried everything, I'm sure its just something easy I'm missing or its possibly just some needed javascript to trigger the ajax call. Anyone out there wanna take a look, maybe give me a hint? http://dev.s-cubism.com/plugin_lazy_options_widget -- Resources: - http://web2py.com -

[web2py] Re: plugin_lazy_options widget

2014-08-12 Thread Jesse Ferguson
Here is an example of what I'm trying to do... Don't forget to install the plugins *IN CONTROLLER* def index(): form = SQLFORM(db.product) if form.accepts(request.vars, session): session.flash = 'submitted %s' % form.vars redirect(URL('index')) return

[web2py] plugin_lazy_options widget

2014-08-07 Thread Jesse Ferguson
Can you use the plugin_lazy_options_widget on itself? For example, db.service_order.so_company.widget = suggest_widget(db.company.company_name, id_field=db.company.id, limitby=(0, 10), min_length=1) Below Works Just fine db.service_order.so_location.widget = lazy_options_widget(

[web2py] Re: plugin_lazy_options widget

2014-08-07 Thread Jesse Ferguson
The first two args for the widget seem to reference the fields class suggest_selected in the source of the plugin they are referred to as on_key and off_key. There is also a trigger option however I cant figure out what that does... -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Web2py Forms and Javascript

2014-08-05 Thread Jesse Ferguson
I am working to move the company from paper to electronic, I work in a remote office and have to fax all of this right now. basic workflow: Service Orders Created in the field at Job site get delivered to me every day. I take the service order and create a workup (basically an invoice)

Re: [web2py] Web2py Forms and Javascript

2014-08-05 Thread Jesse Ferguson
The service order on the right is what is completed in the field by the techs. (The part they bring me). The form on the left is what our company calls a Work-Up. The work up Is created by me by taking the service orders information and the information from a rolodex card. The rolodex card (not

[web2py] Help me stop bashing me head on keyboard...

2014-07-24 Thread Jesse Ferguson
I have a Form that will submit to multiple tables, most items reference items.. For the life of me I cannot figure out how to make the form item not a select box (default behavior). I would like a input/suggest input field and if the input is not in db I would like to add it to DB. If it is in

[web2py] Re: Help me stop bashing me head on keyboard...

2014-07-24 Thread Jesse Ferguson
Thanks Anthony, I just didn't know what search terms to use, this video http://www.tellmehow.nl/video.html someone linked is the functionality I am looking for. However It looks like some of the attempts are pretty outdated so I will attempt to re-write something. If successful I will share

[web2py] Re: Help me stop bashing me head on keyboard...

2014-07-24 Thread Jesse Ferguson
I actually went that route and then realized it would only work for one field, I would Like to have a few fields with the autocomplete/add, I would also like the form to have some conditional select boxes, and some fields that would be auto-filled if some condition is met... I'm starting to

[web2py] Re: Help me stop bashing me head on keyboard...

2014-07-24 Thread Jesse Ferguson
On Thursday, July 24, 2014 6:12:43 PM UTC-7, Anthony wrote:def myfunction(): if request.post_vars._autocomplete_name_aux and not request.post_vars. category: request.post_vars.category = db.category.insert(name=request. post_vars._autocomplete_name_aux) return

[web2py] Re: Help me stop bashing me head on keyboard...

2014-07-24 Thread Jesse Ferguson
Oh and the conditional problem is that I would like to populate items, Like if you chose a city that's in the database it would auto populate the state input because the city table has a reference to the state.. I would also like to keep the auto-complete functionality (if not in db add to db)

[web2py] Web2py Forms and Javascript

2014-07-18 Thread Jesse Ferguson
but I'm working on it :)) Thanks in advance! Jesse Ferguson EXAMPLE MODEL db.define_table('invoice', Field('price_list', 'integer'), Field('account_code','string'), Field('company', 'string'), Field('attn', 'string'), Field('customer_order_number', 'string'), Field

Re: [web2py] Web2py Forms and Javascript

2014-07-18 Thread Jesse Ferguson
I think this would work better however I am not sure about the items.. is the item_entry table how its normally done? Examples online vary... A completed Service order would have multiple Item_entry references... Just doesn't seem like the right way to do it.. db.define_table('company',

[web2py] routes.py confusion

2014-05-26 Thread Jesse Ferguson
I deployed my app using the nginx script and created a routes.py file like so: # -*- coding: utf-8 -*- routers = dict( BASE = dict( default_application='myapp', ) ) However when i go to mywebsite.com i get invalid request but mywebsite.com/myapp loads the

[web2py] Re: routes.py confusion

2014-05-26 Thread Jesse Ferguson
It seems to be working now... I guess it just takes a while to kick in?? -- 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

[web2py] Ajax LOAD

2014-05-20 Thread Jesse Ferguson
Im trying to wrap my head around web2py and AJAX, I can use it to load a page.html however Its a little unclear to me when or how to use the page.load. For example, say I have a table of database items and I want to check that table every x amount of seconds and add a new trtdelement/td/tr but

[web2py] Re: Ajax LOAD

2014-05-20 Thread Jesse Ferguson
In the long run i would like to do something like http://blockchain.info/ 's main page and have a semi live feed of database items that are added and removed depending on what the controller returns -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Ajax LOAD

2014-05-20 Thread Jesse Ferguson
I Think the way to go about this would be to have the .load file a js script that gets the current list of items on the table, then compare that list to the one returned and remove the items if they are not in the list and then add the items that are in the list does that sound sane? --

[web2py] Re: Live data

2014-05-17 Thread Jesse Ferguson
Brilliant! I skipped that part of the book thinking it was about loading in java helpers or extending web2py somehow... Just read the LOAD docs and i think it is exactly what I needed. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Live data

2014-05-16 Thread Jesse Ferguson
I'm building a single page app with a lot of data from the database displayed, I would like to have it auto-refresh or update the tables with the newest information. Its not time critical (ie it doesnt need to be instantanous maybe every 60secs) What are my options? AJAX timebased

[web2py] Re: list:reference

2014-05-13 Thread Jesse Ferguson
anthony copy Mandar's Code exactly and then jus go and add a few parents then try to add a child with two parents, you will encounter this error.. Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last): File C:\Users\User\Desktop\web2py\gluon\restricted.py,

[web2py] Re: list:reference

2014-05-13 Thread Jesse Ferguson
On Tuesday, May 13, 2014 12:52:24 PM UTC-7, Jesse Ferguson wrote: anthony copy Mandar's Code exactly and then jus go and add a few parents then try to add a child with two parents, you will encounter this error.. Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback

[web2py] Re: list:reference

2014-05-12 Thread Jesse Ferguson
I FIgured it out, I was missing the field name when trying to add values i was doing row.update(data) instead of row.update(posts=data) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: list:reference

2014-05-12 Thread Jesse Ferguson
ok so it actually doesnt work which is really strange. it works on console however when i do it in a scheduled task it jacks up the database somehow, i think I may be inserting the references incorrectly... I will investigate this tonight and try to give everyone an answer -- Resources:

[web2py] Re: list:reference

2014-05-12 Thread Jesse Ferguson
https://groups.google.com/forum/#!searchin/web2py/list$3Areference/web2py/pXBj0EhX3iA/vamglS5txQsJ seems this may be a bug in web2py... Does anyone know if this bugfix is still only in trunk or if it has been put into stable? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] list:reference

2014-05-11 Thread Jesse Ferguson
how can i add a reference in code? I have a scheduled task and i want to update a field to reference 10 most current posts db.define_table('daily', Field('example'), Field('datetime'), Field('current', 'boolean') Field('posts','list:reference post'), )

Re: [web2py] Re: Web2py gevent-socketio

2014-05-04 Thread Jesse Ferguson
Thank you Ricardo, I watched videos and read into the docs of everything you listed, Only thing I am bit unclear on is WSGI, If Im understanding correctly its really just a Middleware that sits between a Sever and a python Framework. However Im a bit confused How the stack works when

Re: [web2py] Re: Web2py gevent-socketio

2014-05-04 Thread Jesse Ferguson
ah yes i keep forgetting that pep333 i believe -- 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

[web2py] Re: Web2py gevent-socketio

2014-05-03 Thread Jesse Ferguson
OK so I've been reading/researching and I'm still trying to wrap my head around how the above code works, First let me define what I *think* is going on, The script imports socket.io modules needed and the imports web2py's wsgibase... SocketIOServer (('0.0.0.0', 8080), wsgibase,

[web2py] Web2py gevent-socketio

2014-04-27 Thread Jesse Ferguson
I'm trying to learn how to use websocket-io and the only thing I could find about using it with web2py is here : https://groups.google.com/forum/#!newtopic/web2py/web2py/nJmML_jeZfc I can get the example working, however I dont really understand whats going on with run_iochat.py from

Re: [web2py] Re: list:reference painfull to fill

2013-12-13 Thread Jesse Ferguson
sorry to hop in and ask a silly question but, when you say init the js on the field how is that supposed to be done in web2py? Is it done in the view? would it be ideal to put the js in the template and then pass params? any named optional attribute is passed to the form tag for

[web2py] reference field or add if not in db

2013-12-09 Thread Jesse Ferguson
Is there a way to do this using a autocomplete field? would i put the logic in a custom validator? or is there a easier better way? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] reference field or add if not in db

2013-12-09 Thread Jesse Ferguson
more like it is now (plus and minus next to input) however i would like it to be a drop down of referenced items... for the life of me i cannot figure out how to have both. On Mon, Dec 9, 2013 at 12:16 PM, Jesse Ferguson ifl...@gmail.comjavascript: wrote: Is there a way to do

[web2py] custom chosen.jquery.js widget

2013-12-09 Thread Jesse Ferguson
How would i Implement a custom widget using this http://harvesthq.github.io/chosen/? Or is there an easier way to use this? I assume I can probably just pass the table rows and use something like {{response.files.insert( ALL THE REQUIRED JS STUFF HERE ) {{=form.custom.begin}} select

[web2py] Re: custom chosen.jquery.js widget

2013-12-09 Thread Jesse Ferguson
Ok so that didn't work so great... now I am trying to use this slice as a template to make a widget: http://www.web2pyslices.com/slice/show/1411/widgets-widgets-widgets anyone know of any tutorials that would a novice like myself? -- Resources: - http://web2py.com -

[web2py] Re: Online classes

2013-12-04 Thread Jesse Ferguson
I have watched the first few videos and they are so helpful for a beginner like myself, I would like to thank you for these! I would also like to request that you share the source code, I have been using the videos as reference and its a pain to try to find the parts that explained xyz

[web2py] Re: one to many tables in views

2013-12-03 Thread Jesse Ferguson
}} On Monday, December 2, 2013 9:20:38 PM UTC-8, Jesse Ferguson wrote: I have two tables set up and i want to show the TimeCard with all the entries for said time card however im unsure of how to create such a view... CONTOLLER: def timecard_index(): tcrows =db(db.timecard).select(orderby

[web2py] one to many tables in views

2013-12-02 Thread Jesse Ferguson
I have two tables set up and i want to show the TimeCard with all the entries for said time card however im unsure of how to create such a view... CONTOLLER: def timecard_index(): tcrows =db(db.timecard).select(orderby=~db.timecard.tc_date) tcinputs

[web2py] Re: SQLFORM not validating!

2013-11-30 Thread Jesse Ferguson
I will check out your suggestions, however for now i have solved like this SOLVED WITH THIS: db.define_table('timecard', Field('tc_date','date'), Field('employee', 'reference employee',requires=IS_IN_DB(db,'employee.id','%(fname)s %(lname)s')),

[web2py] SQLFORM not validating!

2013-11-29 Thread Jesse Ferguson
ok im going crazy here... Ive tried every example or solution i can find and nothing works for me...I am trying to build a Time Card app so i can keep track of employees time cards and I want to make sure only one card per employee per day can be submitted... So the two fields need to validate

[web2py] Re: Formatting the Time Field

2013-11-27 Thread Jesse Ferguson
OK I figured it out! {{include 'web2py_ajax.html'}} script jQuery.timeEntry.setDefaults({show24Hours: false, showSeconds: false, timeSteps:[1,30,1]}); /script -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Formatting the Time Field

2013-11-27 Thread Jesse Ferguson
ok so the format now looks Great on the form however on submitting it i get this type 'exceptions.ValueError' invalid literal for int() with base 10: '00PM' It seems like its trying to store the value 00PM as mins which should be an integer... however i was under the impression that the dal

[web2py] Formatting the Time Field

2013-11-26 Thread Jesse Ferguson
Having a hard time figuring out this one and after googling my eyeballs off Im here to beg for someone to throw me a bone, here is my code: MODEL: db.define_table('timecard_entry', Field('timecard', 'reference timecard', readable=False, writable=False,),