[web2py] Distributing as a Binary - External Libraries?

2013-12-14 Thread Brando
Let's say I package my app via this method: http://web2py.com/AlterEgo/default/show/270. If my underlying python contains external libraries, will the program work? Let's say I give the app to someone who doesn't have the BeautifulSoup library installed. Am I correct in assuming the program

[web2py] Re: Distributing as a Binary - External Libraries?

2013-12-16 Thread Brando
kage under your app >> modules/ folder, then it will ship with it. >> >> Massimo >> >> >> >> On Saturday, 14 December 2013 19:46:59 UTC-6, Brando wrote: >>> >>> >>> Let's say I package my app via this method: >>> http://web2

[web2py] I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-26 Thread Brando
I've watched every web2py video I could find and read through all the material. Still not getting it. I'm new to web2py and webapps. Here's what I want to do: 1. Have a page to upload multiple configuration files (plaintext.txt) 2. Parse items out of those files and store the results in the

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Brando
Simon, could you share your code or possibly provide a w2p app? Thanks for the reply. On Friday, December 27, 2013 3:29:51 AM UTC-8, Simon Ashley wrote: > > Failing any other replies, this is what we do: > >1. copy the file to the server (read then write; we get the files >first and s

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-27 Thread Brando
I think i'm pretty close to understanding. I still have a few questions here: *1. You need to upload the files to the server, then parse them to get each dict. * The code I have to generate my dictionaries follows this format (let's assume there are 3 different config formats): parse.config_

[web2py] Re: I'm really struggling - Upload file, parse out variables, display in a table.

2013-12-29 Thread Brando
Simon, this is helpful. Thank you. On Friday, December 27, 2013 8:24:27 PM UTC-8, Simon Ashley wrote: > > >1. We just do it in the controller as a function . Try an .insert but >.bulk_insert should be fine for individual records. >2. You may need a path to find the file. > > Fo

[web2py] Using Modules Class - AttributeError: 'Engine' object has no attribute 'form'

2014-01-01 Thread Brando
I'm testing using Classes within my Modules to handle a lot of the heavy lifting. I can't figure out what i'm doing wrong here. I need an adult. #No Model #Controller: devices.py from general import Engine def upload(): page = Engine() form = page.form() return dict(form=form) #

[web2py] Re: Using Modules Class - AttributeError: 'Engine' object has no attribute 'form'

2014-01-01 Thread Brando
Alan, thanks for your response. I fixed that line and still got the error. After I bounced web2py it worked, but started giving me the error again. The ultimate prob was that I didn't include the #!/usr/bin/env python statement at the top of my module. I added the line and all is well. Happ

[web2py] Inserting to db from module. Why do I need to keep restarting Web2py?

2014-01-03 Thread Brando
I have the following code to insert a dictionary into my sqlite db from a module. #!/usr/bin/env python # -*- coding: utf-8 -*- from gluon import current from gluon.dal import DAL, Field from gluon.sqlhtml import SQLFORM from gluon.validators import IS_NOT_EMPTY, IS_EMAIL, IS_LENGTH class Pars

[web2py] Re: Inserting to db from module. Why do I need to keep restarting Web2py?

2014-01-03 Thread Brando
Actually, any changes made to my module file will not be reflected until i restart the web2py.app. On Friday, January 3, 2014 8:14:36 AM UTC-8, Brando wrote: > > I have the following code to insert a dictionary into my sqlite db from a > module. > > #!/usr

[web2py] Re: Inserting to db from module. Why do I need to keep restarting Web2py?

2014-01-03 Thread Brando
er/29/04/the-core#Accessing-the-API-from-Python-modules > . > > Anthony > > On Friday, January 3, 2014 11:14:36 AM UTC-5, Brando wrote: >> >> I have the following code to insert a dictionary into my sqlite db from a >> module. >> >> #!/usr/bin/env pytho

Re: [web2py] Re: Inserting to db from module. Why do I need to keep restarting Web2py?

2014-01-03 Thread Brando
> > Version > > 2.8.2-stable+timestamp.2013.11.28.13.54.07 > (Running on Rocket 1.2.6, Python 2.7.3) > Also, I doubt it's relevant, but I'm using Sublime Text as my IDE. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source cod

Re: [web2py] Re: Inserting to db from module. Why do I need to keep restarting Web2py?

2014-01-04 Thread Brando
Richard, is this feature unreliable at this point or am i using it incorrectly? On Friday, January 3, 2014 12:54:12 PM UTC-8, Brando wrote: > > Version >> >> 2.8.2-stable+timestamp.2013.11.28.13.54.07 >> (Running on Rocket 1.2.6, Python 2.7.3) >> > > >

[web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I'm trying to use jQuery-File-Uploadto implement multiple file uploads. I'm using this tutorial as well as this sample app HERE

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
t; 0: > > files = request.vars['up_files'] > if not isinstance(files, list): > files = [files] > > for f in files: > print f.filename > up_file = db.uploads.up_file.store(f, f.filename) > i = db.upl

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
] > > for f in files: > print f.filename > up_file = db.uploads.up_file.store(f, f.filename) > i = db.uploads.insert(notes=request.vars.notes, > up_file=up_file,filename=f.filename, username = auth.user.email, up_date= > datetime.date

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, i stripped out a variable or two, but it appears to work great. I'm getting a crazy twitch trying to figure out a javascript/ajax solution for this. I second the idea of building this into Web2py, I would be more than happy to contribute, but I'm just starting out with web2py and I wou

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Calvin, I'm getting this error when I select only 1 file to upload: Traceback (most recent call last): File "/Volumes/BrandonsData/Google Drive/web2py/web2py.app/Contents/Resources/gluon/restricted.py", line 217, in restricted File "/Volumes/BrandonsData/Google Drive/web2py/web2py.app/Conte

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I removed that if loop completely and it works fine now: def submit(): import datetime form = FORM(LABEL("File(s):"), INPUT(_name='up_files', _type='file', _multiple=''), BR(),INPUT(_type='submit')) # if hasattr(request.vars, 'up_files'): # form.process() if form.accepts(request.v

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
I'm working on that now. if anyone beats me to it please post the solution. On Wednesday, January 8, 2014 11:23:21 AM UTC-8, Dave S wrote: > > On Wednesday, January 8, 2014 11:07:03 AM UTC-8, Brando wrote: >> >> I removed that if loop completely and it works fine now: &g

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
This works, added the requires statement for form validation: def submit(): import datetime form = FORM(LABEL("File(s):"), INPUT(_name='up_files', _type='file', _multiple='', requires=IS_NOT_EMPTY()), BR(),INPUT(_type='submit')) if form.accepts(request.vars, formname="form"):

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-08 Thread Brando
Question, how could I make it so I don't have to click the submit button. How could i make it to where they choose the files and it auto submits it? On Wednesday, January 8, 2014 11:35:44 AM UTC-8, Brando wrote: > > This works, added the requires statement for form validation: >

Re: [web2py] Multiple Uploads using jQuery-File-Upload: Javascript/CSS Conflict?

2014-01-09 Thread Brando
Calvin, I have a few other things I want to work out, but I'm going to start a new thread with a more relevant title. On Thursday, January 9, 2014 10:10:04 AM UTC-8, Calvin Morrison wrote: > > Brando, > > Thanks for working this out! > > it would be good to make a we

[web2py] Multiple File Upload Form Works! - Need Help with validation for multiple files

2014-01-09 Thread Brando
Thanks to Calvin Morrison's excellent work here is a really simple solution to uploading multiple items. I need help validating multiple files. I can upload one .txt file without issue; however, if i choose more than one it will not pass validation. Can someone tell me what kind of loop or f

[web2py] Re: Multiple File Upload Form Works! - Need Help with validation for multiple files

2014-01-10 Thread Brando
split('.')[-1] if extension_file == [csv|txt] passed_validation.append(file) return passed_validation Thoughts? On Thursday, January 9, 2014 2:57:40 PM UTC-8, Brando wrote: > > Thanks to Calvin Morrison's excellent work here is a really simple >

[web2py] Re: Multiple File Upload Form Works! - Need Help with validation for multiple files

2014-01-10 Thread Brando
Success! Here is how you can validate all files in a multiple file upload. In this example if one document does not validate then the entire validation fails. You could easily just drop the files that don't validate and only let the accepted files through for processing. *If anyone has a m

[web2py] Storing lots of txt files: Database or Filesystem? Advantages/Disadvantages

2014-01-13 Thread Brando
- The files will not be larger than say 200kb, but there will be lots of them(1000's). - Users will need to download the original file. - The files will be parsed on the initial upload, but I don't expect to touch the files much after that. - The files will have sensiti

[web2py] Need a Web2py tutor/mentor.

2014-01-13 Thread Brando
I don't know anyone who builds webapps with python. I've watched A LOT of videos and read A LOT of posts about web2py. I've got the basics down and have built a couple of basic apps using web2py. I'd like to find a tutor/mentor who could spend a couple of hours with me (skype/google hangout

[web2py] Re: Storing lots of txt files: Database or Filesystem? Advantages/Disadvantages

2014-01-14 Thread Brando
Stifan, that is great info. pulling from the filesystem is much faster. I think i'm going to go this route. Thanks! On Monday, January 13, 2014 7:15:22 PM UTC-8, 黄祥 wrote: > > please check this discussion. > https://groups.google.com/forum/#!topic/web2py/t83nQfT24gE > > best regards, > stifa

[web2py] track_changes is Broken? I keep having to restart web2py

2014-02-12 Thread Brando
I've put the following in my model: from gluon.custom_import import track_changes track_changes(True) and all modules i am working with are in the "modules" folder within the app. The last thread I read on here says that this functionality isn't working. Is that the case? Development is ta

[web2py] Re: track_changes is Broken? I keep having to restart web2py

2014-02-12 Thread Brando
I consolidated all of my different modules to 1 module file and it is now working. On Wednesday, February 12, 2014 4:08:04 PM UTC-8, Brando wrote: > > I've put the following in my model: > > from gluon.custom_import import track_changes > track_changes(True) >

Re: [web2py] Re: track_changes is Broken? I keep having to restart web2py

2014-02-13 Thread Brando
2.8.2 stable, OSX, web2py.app On Wednesday, February 12, 2014 6:11:55 PM UTC-8, Richard wrote: > > Brando, which version of web2py you experiment this issue? > > Richard > > > On Wed, Feb 12, 2014 at 9:06 PM, Brando >wrote: > >> I consolidated all of my d

[web2py] Pack on OSX, Import on Windows bug (binary only)

2014-02-18 Thread Brando
Ticket ID 127.0.0.1.2014-02-18.20-21-14.5e42032d-3fa0-4fc5-8a93-9ca1ef22e89f No module named html Version web2py™ Version 2.8.2-stable+timestamp.2013.11.28.13.54.07 Python Python 2.7.5: \\vmware-host\Shared Folders\Desktop\web2py\web2py.exe (prefix: C:\Python27) Traceback 1. 2. 3. 4. 5. 6. 7. 8

[web2py] Re: Pack on OSX, Import on Windows bug (binary only)

2014-02-19 Thread Brando
N > > or > > from gluon.html import FORM, INPUT, LABEL, OPTION, SELECT, BUTTON > > because html is not in path. gluon is. > > On Tuesday, 18 February 2014 20:08:09 UTC-6, Brando wrote: >> >> Ticket ID >> 127.0.0.1.2014-02-18.20-21-14.5e42032d-3fa0-4fc5-8a

[web2py] License? Is it ok to distribute commerciallly without restriction?

2014-02-19 Thread Brando
I'm new to licensing and I want to make sure I stay within license scope: Here's what I want to do: Distribute a stand-alone app that uses the built in rocket server and sqlite db. I plan on building the app so that there is no start-up dialogjust launch the app and it opens the login pag

[web2py] Updating a distributed web2py app.

2014-02-19 Thread Brando
I assume this is a dumb question, but here goes.If I distribute my web2py app what is the best way to push updates to my clients that are spread out all over the place? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

[web2py] Re: Updating a distributed web2py app.

2014-02-19 Thread Brando
Updating would happen have to happen over the WAN. I would prefer to update realtime/in the background (like chrome). Is this possible? On Wednesday, February 19, 2014 8:34:56 AM UTC-8, 黄祥 wrote: > > if the client is not same network (lan), i think you can pack web2py app > and upload it on

[web2py] Re: Updating a distributed web2py app.

2014-02-21 Thread Brando
Thanks for the feedback. On Wednesday, February 19, 2014 2:29:06 PM UTC-8, Niphlod wrote: > > Did it with a bit of turnarounds, but it's pretty solid. > Check out > https://github.com/niphlod/w2p_tvseries/blob/master/private/w2p_tvseries_installer.py > > a tiddle bit of tl/dr: > - somewhere o

[web2py] Represent: List indexing problem.

2014-02-24 Thread Brando
I am parsing data out of files and inputting this data into a sqlite db. One file may have multiple username entries. The data looks something like this: [['tom', 324],['dick', 246],['harry', 112]] The first item in each list is obviously the name. The second line is the line number (i used

[web2py] Re: Represent: List indexing problem.

2014-02-24 Thread Brando
I solved this by inserting the data as json. This line now returns '324'. Field('username', represent = lambda x, row: x[0][1]), -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

[web2py] Formatting JSON objects with XML() -TypeError: is not JSON serializable

2014-02-24 Thread Brando
I have json data that looks like this: [['tom', 324],['dick', 246],['harry', 112]] I want to be able to display html like follows: Line: 324 - tom Line: 246 - dick Line: 112 - harry SoI made a function to reformat my data and use represent to run the data through the function: Field('use

[web2py] Re: Formatting JSON objects with XML() -TypeError: is not JSON serializable

2014-02-24 Thread Brando
ctly produced that error, and can you show the rest of the > traceback details? > > On Monday, February 24, 2014 10:04:09 PM UTC-5, Brando wrote: >> >> I have json data that looks like this: >> >> [['tom', 324],['dick', 246],['harry',

[web2py] Re: Formatting JSON objects with XML() -TypeError: is not JSON serializable

2014-02-25 Thread Brando
Sorry...This should have read: Line: 324 ~ tom Line: 246 ~ dick Line: 112 ~ harry also, I am displaying this info in a SQLFORM.grid -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

[web2py] Re: Formatting JSON objects with XML() -TypeError: is not JSON serializable

2014-02-25 Thread Brando
Anthony, I got this figured out. I had a syntax error on my side. Thanks as always. On Tuesday, February 25, 2014 4:25:14 AM UTC-8, Anthony wrote: > > Yes, but what code is running that produces the error? Can we see the > relevant controller and/or view code? Also, did you edit the tracebac

[web2py] Want to use Bootstrap 3. Should I wait? Timeframe?

2014-03-12 Thread Brando
I'm about to start changing my styles to use Bootstrap 3, but I don't know if i should just wait until the official update comes that has it baked in. Is Bootstrap 3 integration going to happen in the next few months? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Bootstrap3 package - help to test

2014-03-13 Thread Brando
Just found this Post. Thanks Paolo. I'll move my app over to this template and report any issues I find. On Monday, December 23, 2013 12:20:48 PM UTC-8, Paolo Caruccio wrote: > > I just completed a package that applies the bootstrap3 style to some > web2py elements - the current version cov

[web2py] Re: Want to use Bootstrap 3. Should I wait? Timeframe?

2014-03-13 Thread Brando
I just found Paolo's post about bootstrap3 here. https://groups.google.com/forum/#!topic/web2py/oSABtjmnYM0 I'll give that a try. On Wednesday, March 12, 2014 1:30:01 PM UTC-7, Brando wrote: > > I'm about to start changing my styles to use Bootstrap 3, but I don'

[web2py] Re: Bootstrap3 package - help to test

2014-03-14 Thread Brando
Paolo, I got everything moved over. So far no problems. I'm trying to figure out the best way to style a SQLFORM.grid without using custom js. What is the easiest way to style the SQLFORM.grid with bootstrap3? On Thursday, March 13, 2014 8:59:07 AM UTC-7, Brando wrote: > > Just

[web2py] Need a developer. Seattle Wa

2014-04-03 Thread Brando
It's pretty easy to find Django developers out there; however, I can't seem to find web2py devs. I have an upcoming project to build an app for data entry and report generation for security audits (penetration testing). I need a developer who can help me build out the code base and is familiar

[web2py] CouchDB driver & No Tables/FIELDS?

2014-04-21 Thread Brando
I want to use CouchDB for an upcoming project. I know that i'm supposed to install a couchdb driver, but i have no idea where to get the driver from and where exactly it needs to be installed. Also, I'm assuming since couch is a document database that it will be unnecessary for me to define ta

[web2py] Re: CouchDB driver & No Tables/FIELDS?

2014-04-22 Thread Brando
pecify tables) but it > is not supported by the web2py DAL (although there is some untested > experimental code related to Couch in there). > > > > On Tuesday, 22 April 2014 00:23:51 UTC-5, Brando wrote: >> >> I want to use CouchDB for an upcoming project. I kno

[web2py] Re: CouchDB driver & No Tables/FIELDS?

2014-04-22 Thread Brando
2 more questions 1. I'm assuming the couchdb library I want to use needs to live in the "modules" folder? 2. What is the best way to bundle couch with web2py so I can distribute everything together? On Tuesday, April 22, 2014 9:28:12 AM UTC-7, Brando wrote: > > What about

[web2py] OAuth - Can Users Authenticate without an Internet connection?

2014-04-30 Thread Brando
I want to use OAuth + Google and want to know if things will work if a node is offline. My app model is as follows. I will have about 15 laptops in the field. Each laptop will have a local copy of the app installed. The laptop may/may not have Internet access. I plan on using Couchbase for the

Re: [web2py] OAuth - Can Users Authenticate without an Internet connection?

2014-05-01 Thread Brando
two at the time. On Wednesday, April 30, 2014 1:46:01 PM UTC-7, yamandu wrote: > > If each node must authenticate with OAuth with it will requires internet > connection. > Give a look here: https://developers.google.com/accounts/docs/OAuth2 > > > 2014-04-30 16:30 GMT-0

Re: [web2py] OAuth - Can Users Authenticate without an Internet connection?

2014-05-01 Thread Brando
u have > connection. So each local application will have a copy. > > > > 2014-05-01 12:22 GMT-03:00 Brando >: > >> What are my options if I want users to be able to login with or without >> an internet connection and still be able to centrally control >>