[web2py] Re: Load data from sqlite file?

2012-05-11 Thread Brian M
So the user is going to be uploading a .sqlite file which you want to connect to with the DAL and import? You should be able to create a new DAL connection within a controller function or probably better yet a module instead of in a model file (which would have been run too early in the reques

Re: [web2py] Table/grid with checkboxes for selecting records?

2012-05-11 Thread Brian M
idgets for some other fields and then build the check boxes manually as long as I use the same field naming conventions. On Friday, May 11, 2012 5:20:58 PM UTC-5, rochacbruno wrote: > > A working example on plugin BadMin https://github.com/rochacbruno/badmin > > On Fri, May 11, 2012 at 7

Re: [web2py] Table/grid with checkboxes for selecting records?

2012-05-11 Thread Brian M
that if needed). On Friday, May 11, 2012 7:53:51 PM UTC-5, Brian M wrote: > > Thanks Bruno! > > So it looks like building the form myself in HTML is probably the way to > go then. Would be nice to be able to have web2py do the form validation, > but I'll survive. I'm

[web2py] Re: Deploy issue - Apache on Windows - Unable to import driver

2012-05-25 Thread Brian M
Yep, got burned by this when setting up a new server last month. The problem is covered in the pyodbc issue tracker here - http://code.google.com/p/pyodbc/issues/detail?id=126 I ended up grabbing a build from http://www.apachelounge.com/download/additional/ and then all was good. On Friday,

[web2py] Re: windows users... help!

2012-06-08 Thread Brian M
Was going to give this some testing but the MSSQL driver isn't included and sadly my apps rely on SQL Server. I thought the pyodbc driver got added into the build process last month? (see * http://code.google.com/p/web2py/issues/detail?id=101&can=1&q=MSSQL)* ~Brian On Friday, June 8, 2012 11:4

Re: [web2py] Re: File generation using web2py

2013-01-10 Thread Brian M
ot matrix printer, >> which prints only txt files! >> But any way your response did help me very much. >> >> With Regards, >> rahulserver. >> >> On 1 May 2012 02:30, Brian M wrote: >> >>> Yep, it is the web, you can't automatically w

[web2py] Re: Cannot import module 'ldap'

2013-02-05 Thread Brian M
Have you installed python-ldap - http://pypi.python.org/pypi/python-ldap/ ? On Tuesday, February 5, 2013 4:20:05 PM UTC-6, Nicholas Duffy wrote: > > Thanks for the reply Massimo. > > Do you mean the web2py source? Because that is what I am using. I am able > to import other packages that I've in

Re: [web2py] db.executesql(..., as_dict=True) seem buggy

2013-02-08 Thread Brian M
What database are you using? Did it work prior to web2py 2.3.2? The dict keys (field names) are retrieved from the cursor.description provided by the database driver so I suppose it is possible that your driver is changing the case - web2py shouldn't be affecting the case though. I use execut

[web2py] Re: Problem reading xls with xlrd

2013-02-15 Thread Brian M
I'm pretty sure that archivo='/home/lu/web2py/applications/pruebas/uploads/'+form.vars.pago doesn't actually contain the path to your file (and you should also probably be using os.path.join() rather than just concatenating) Here's some old code from an app I had that was allowing upload of exc

[web2py] Re: how to send bulk emails with web2py

2013-03-10 Thread Brian M
Probably best to add the emails to a queue and then let a scheduler task work its way through the queue separate from the controller. You could also make a modified version of web2py's mail class that sends multiple emails per smtp connection to speed things up. On Sunday, March 10, 2013 2:47:

[web2py] LOAD() and auth.requires_login() - Nice "please login" message??

2013-03-27 Thread Brian M
I have a page that is using LOAD() to pull in a form that requires the user to be logged-in (@auth.requires_login()) In previous versions of web2py if the user hadn't yet logged in they'd get the login screen within the LOAD()'s DIV and at least could get an idea of what they needed to do befo

[web2py] Re: nssm & scheduler seems to be a nobrainer...

2013-04-06 Thread Brian M
Did you get it working? If not I can check how I did it on my server later today On Friday, April 5, 2013 7:35:15 AM UTC-5, Marian wrote: > > Hm maybe I have a hint, I found a failed entry in db.scheduler_run: > > gluon.shell line 137: sys.exit(1). > > When I try to restart the service, I don't

[web2py] Re: How to benchmark my web2py website? I have got scary results :-/

2013-04-06 Thread Brian M
+1 on the quality/speed of the connection you test from making a big difference. I was testing a new server last week and got vastly different results from office #1 vs office #2 because one had a much lower bandwidth and made the server being tested look pathetic. On Saturday, April 6, 2013 8

[web2py] Re: Escaping placeholders for db.executesql in MySQL.

2012-10-10 Thread Brian M
I think that this may be a pymysql issue, with the latest trunk the executesql statement fails when using the included pymysql driver but works fine using the mysqldb driver. On Wednesday, October 10, 2012 8:23:17 PM UTC-5, chris_g wrote: > > I opened the ticket as you suggested and you've confi

[web2py] Re: pep8

2012-10-19 Thread Brian M
Things appear alright after a quick test drive of trunk here. ~Brian On Friday, October 19, 2012 2:31:31 PM UTC-5, Massimo Di Pierro wrote: > > It was pointed out by our friend Andriy that web2py has poor pep8 > compliance. > So we made a huge number of changes to make it more compliant. We chang

[web2py] LOAD() and response.js - characters being escaped??

2012-12-15 Thread Brian M
So I'm finally getting around to moving from web2py v1.99.4 up to trunk. Everything seems to be working pretty well except some javascript stuff within LOAD(). I've got a couple of forms pulled in by LOAD(, ajax=True) and when submitted and processed they return instructions via response.j

[web2py] Re: LOAD() and response.js - characters being escaped??

2012-12-15 Thread Brian M
I'm also noticing that my response.flash is getting escaped as well, so everything reads as Some%20flash%20message :( On Saturday, December 15, 2012 10:56:07 PM UTC-6, Brian M wrote: > > So I'm finally getting around to moving from web2py v1.99.4 up to trunk. > Everything

[web2py] Re: LOAD() and response.js - characters being escaped??

2012-12-16 Thread Brian M
> On Sunday, December 16, 2012 6:04:51 AM UTC+1, Brian M wrote: >> >> I'm also noticing that my response.flash is getting escaped as well, so >> everything reads as Some%20flash%20message :( >> >> On Saturday, December 15, 2012 10:56:07 PM UTC-6, Brian M

[web2py] Re: new book now available in HTML (english, japanese, italian)

2011-12-23 Thread Brian M
Looking good Massimo - thank you so much for making the book available online! I did come across one bug: http://web2py.com/books/default/reference/29/ReportLab results in "invalid function (default/reference)"

[web2py] Re: How to add link for downloading CSV file with specifying filename

2011-12-27 Thread Brian M
Yep, Alan's suggestion is what I use too. See https://groups.google.com/d/topic/web2py/qjTF3_wHlWQ/discussion for some more details on how I do it

[web2py] AttributeError: 'thread._local' object has no attribute '_scheduled'

2011-12-28 Thread Brian M
This is simply a note for anybody else who may come across this error when trying to run web2py's scheduler - it works just fine, provided you actually set it up in your code. (As great as web2py is, it is not psychic) python web2py.py -K myapp ... AttributeError: 'thread._local' object has no a

[web2py] Re: Web2py binary distribution and psycopg2 driver

2012-01-10 Thread Brian M
You should be able to build your own web2py executable using setup_exe.py. I've been able to include pyodbc that way for a project that needed MS SQL access - see no reason it shouldn't also work for the PostrgreSQL driver too. ~Brian

Re: [web2py] Web2py binary distribution and psycopg2 driver

2012-01-11 Thread Brian M
I just did a build of trunk with Python 2.7 on Windows 7. Had to grab the windows installers for psycopg2 and py2exe. Worked just fine once I commented out ABOUT from the date_files list (line 75 in setup_exe.py) - apparently that file isn't included anymore. I don't have a PostgreSQL server

Re: [web2py] Re: Questions on the scheduler

2012-02-11 Thread Brian M
Viniciusban - if a scheduler task fails or times out then no it will not be run again unless you change the status back to queued. Guess it is good because it makes you handle possible errors and prevents runaway tasks, but rather annoying during testing since you must reenable after errors or i

[web2py] Re: new feature in trunk...

2012-02-21 Thread Brian M
So if my quick reading of the code is correct this will "expose" a directory listing? Am I close? (Some doc strings would be nice ;-) )

[web2py] Errors creating/reading tickets

2012-03-10 Thread Brian M
This has actually been plaguing me for a while but finally annoyed me enough to ask. I have several web2py (1.99.4) apps running under Apache/2.2.17 (Win32) , mod_wsgi/3.3 and Python/2.6.4. More often than not when an error happens and a ticket is generated, the ticket seems to be corrupt. A

[web2py] Re: Errors creating/reading tickets

2012-03-24 Thread Brian M
FYI Massimo, I sent you some via email on the 14th. On Sunday, March 11, 2012 7:41:14 PM UTC-5, Massimo Di Pierro wrote: > > Please email me one of the tickets that causes the problem and one of the > tickets generated by admin as consequence. > > On Saturday, 10 March 2012 20:48:

[web2py] Ticket nIOError: request data read error (Apache + mod_wsgi)

2012-03-24 Thread Brian M
I'm having problems with my app apparently throwing errors and eventually Apache itself becoming unresponsive. I'm running on Windows with Python 2.6. The (hopefully relevant) part of the error ticket is below (I usually can't view them through the admin app, but maybe that's a separate issue

[web2py] Re: Fake_migrate with auth

2012-03-27 Thread Brian M
you can do auth.define_tables(fake_migrate = True) On Tuesday, March 27, 2012 12:27:21 PM UTC-5, Detectedstealth wrote: > > How do I do a fake_migrate with the auth table so I don't get the following > error? I know the table exists already I just pushed some major changes to my > server and now

[web2py] Re: testing scheduler in windows

2011-09-03 Thread Brian M
The google code repository doesn't appear to have been updated - trunk hasn't changed since Friday night.

[web2py] Re: testing scheduler in windows

2011-09-03 Thread Brian M
OK, finally managed to pull new trunk off of google code. :) Still doesn't seem to be working on Windows. :( 1. The necessary DB tables don't ever seem to get created without user intervention. I had to temporarily edit gluon/scheduler.py to have migrate=True in the __init__ of the

[web2py] Re: testing scheduler in windows

2011-09-04 Thread Brian M
Massimo, Ok here's what I did 1. Delete existing "scheduler" application. 2. Stop web2py (rocket) 3. Edit gluon/scheduler.py and at line 289 replace default = request.current.application with default = None (this is in the table definition of scheduler_task). 4. Start web2py

[web2py] Re: testing scheduler in windows

2011-09-04 Thread Brian M
Massimo, I ran a second test, this time putting back in my previous migrate = True change so that the database tables would get created. Then I did a second run that looked somewhat more promising but still ultimately did not work. Again it started up a bunch of new processes - after the firs

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
I just put together an Ubuntu VM to test in and yeah, the scheduler doesn't work quite right there either. First off it appears that the DB tables don't get defined there either without intervention -- I changed migrate=False to migrate=True on line 265 and then running *python web2py.py -K sc

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
I found that under linux I was able to get the scheduler to successfully run a task by making sure os.environ['WEB2PY-PATH'] was defined. What I did was edit gluon/scheduler.py and change lines 61-62 from if 'WEB2PY_PATH' in os.environ: sys.path.append(os.environ['WEB2PY_PATH']) to if 'WEB2P

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
OK, I've got the scheduler reliably (I think) working now under Linux - I just changed my patch mentioned above a bit to make it so that WEB2PY_PATH would work even if you didn't launch from the same folder as web2py is in. At line 61, replace: if 'WEB2PY_PATH' in os.environ: sys.path.appen

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
OK, I've managed get the scheduler to partially work under windows. I had to add if __name__ == '__main__': to web2py.py right before actually starting web2py (line 19). This appears to have solved the problem of web2py starting over and over again, now when I run python web2py.py -K scheduler

Re: [web2py] Re: testing scheduler in windows

2011-09-05 Thread Brian M
I think I've got the scheduler sorted out for windows (other than a lack of debug messages from the workers, suspect it's due to a lack of os.fork()). My TypeError: demo1() keywords must be strings was fixed with http://stackoverflow.com/questions/956867/how-to-get-string-objects-instead-unico

[web2py] Re: deploying web2py on IIS

2011-09-06 Thread Brian M
Perhaps check out web2pyslices.com -- http://www.web2pyslices.com/slices/take_slice/128 "Install web2py on Windows with IIS" I haven't tried it (I just use the built-in rocket server or apache + mod_wsgi even on windows) Good Luck ~Brian

[web2py] Trunk - rev 894137606632 breaks web2py!

2011-09-11 Thread Brian M
Massimo, The change made to gluon/compileapp.py in rev 894137606632appears to breakboth web2py under worth Windows 7 and Ubuntu 11.04. The failure is such that a ticket is immediately created and when yo

[web2py] Re: Import/execute sql file

2011-10-10 Thread Brian M
Try opening your file, reading its contents and then having db.executesql() execute what was read. Should work assuming the file's contents can be run by psycopg2 (i.e some special psql stuff might not work) #untested code f = open('/path/to/file.sql', 'r') db.executesql(f.read())

[web2py] Re: serving a zip file

2011-10-13 Thread Brian M
I wrote a controller a few weeks ago that does this. Takes in big dataset and splits it into multiple CSV files bundled into a zip, all using cStringIO Here's part of it. -- if record_count > 1000: #split into chunks of 500 each and bundle up in a zip file

[web2py] Re: Error: Start as Windows Service

2011-10-20 Thread Brian M
Check that you've got the pywin32 module installed. http://pypi.python.org/pypi/pywin32/214 ~Brian

[web2py] PATCH(?) DAL with MSSQL and windows authentication

2011-11-01 Thread Brian M
While trying to answer a question on StackOverflow (http://stackoverflow.com/questions/7962840/web2py-ms-sql-server-2008-r2-ldap-authentication-helloworld-application) I found the potential need for a patch to dal.py. The DAL works just fine if you want to connect to MSSQL using SQL Server's a

[web2py] Re: PATCH(?) DAL with MSSQL and windows authentication

2011-11-02 Thread Brian M
Sorry Massimo, my regex foo isn't too good today. I'm not sure what connection string syntax you're expecting with your regex patch. I've tried the following connection strings but always get a 'User required' exception. db = DAL('mssql://:@Server/database_name?Trusted_Conection=Yes') db = DA

[web2py] Re: StringIO.StringIO + csv.writer puts a bunch of empty lines at the start of generated CSV

2011-11-16 Thread Brian M
Another way around this would be to generate the csv file in the controller instead of in the view. Set the appropriate headers and the simply return outfile.getvalue() from the controller and your browser will download the csv file generated in the controller.

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-03 Thread Brian M
I've used a jQuery plugin called jQuery.query that can manipulate URLs. If memory serves correct you do something along the lines of $.query.set('var', value) to set querystring values. And $.query.get('var') to retrieve. Sadly the jQuery team seems to have taken down the jQuery plugins site a

[web2py] Re: Pass multiple arguments to URL through javascript

2011-12-04 Thread Brian M
Vineet, My copy of jQuery.query.js is attached - I'm assuming since it's released under the WTFPL the author won't mind :D You may also want to look at these: http://stackoverflow.com/questions/2053157/how-to-use-jquery-to-manipulate-the-querystring http://stackoverflow.com/questions/4344405/jqu

[web2py] Re: csv export compressed

2011-12-06 Thread Brian M
I posted on this a while back - see https://groups.google.com/forum/?pli=1#!searchin/web2py/csv$20zip/web2py/qjTF3_wHlWQ/_FFWt0Jc8C4J

[web2py] Re: upload an excel sheet to be added to the system

2011-02-02 Thread Brian M
Neveen, I've got a mini app that I upload excel files to for later parsing, here's now I do it. Getting the file would probably be even easier if you used an upload field in the DB & CRUD forms. def excel_uploader(): response.subtitle = "Upload excel file " from gluon.sqlhtml import for

[web2py] Re: web2py as service - error

2011-02-08 Thread Brian M
Do you have the python win32 extensions installed? I know that messed me up the first time I tried to install as a service.

[web2py] onvalidation missing id field

2011-02-13 Thread Brian M
OK, so I'm wanting to calculate values for a few fields when a SQLFORM record update is accepted. My understanding is that I should use onvalidation = calculation_function but I'm finding that within my onvalidation function form.vars does not include the id field which I need to know in order

[web2py] Re: onvalidation missing id field

2011-02-13 Thread Brian M
Ah, form.record.id that works - Thanks!

Re: [web2py] Re: function in query

2011-02-15 Thread Brian M
If you're going to be searching based on the difference between date1 and date2 why not just include the difference in the DB itself with a computed field? (http://www.web2py.com/book/default/chapter/06#Computed-Fields)

[web2py] Re: GSoC

2011-02-17 Thread Brian M
Include a built-in widget like the options_with_add_link slice (http://web2pyslices.com/main/slices/take_slice/11) to allow one to quickly add a new record into to a referenced table without having to go to a separate screen. Perhaps it's not glamorous but its presence might make adoption easi

[web2py] Re: GSoC

2011-02-20 Thread Brian M
Eh, why wait for someone else to make a widget - wrote a slice for my version http://web2pyslices.com/main/slices/take_slice/121

[web2py] New Widget and Slice - SELECT_OR_ADD_OPTION

2011-02-20 Thread Brian M
I've created a widget to augment the IS_IN_DB select widget with the ability to add a new option record within a dialog on the same page. Check it out; feedback is welcome. http://web2pyslices.com/main/slices/take_slice/121 ~Brian

[web2py] Re: Sqlite3 error

2011-02-20 Thread Brian M
What version of python are you using? That looks like you don't have the sqlite3 module though it is built-in to python 2.5 and later.

[web2py] Re: New Widget and Slice - SELECT_OR_ADD_OPTION

2011-02-20 Thread Brian M
You could absolutely pull in the jqueryUI stuff from a local copy in your static folder. Then in your controller use something like: response.files.append(r=request, c="static", f="jqueryui/1.8.9/jquery-ui.js")response.files.append(r=request, c="static", f="jqueryui/1.8.9/themes/smoothness/jqu

[web2py] Re: Date intervals split

2011-02-21 Thread Brian M
Let web2py do its magic. Give each of those date input fields an _id and _class="date" The _class="date" will make web2py automatically assign the date selector widget to the field (and that widget needs the _id to work). Then when processing the form, use form.vars.Fin instead of request.va

[web2py] Re: Date intervals split

2011-02-21 Thread Brian M
You may want to look at the python-dateutil module from http://niemeyer.net/python-dateutil it makes it easy to do date manipulation like adding/subtracting days, weeks, months, etc. The _class part just makes a handy datepicker widget appear in the UI. The important part is to use form.vars i

[web2py] Re: How to manipulate default tables and use them with powertable

2011-02-21 Thread Brian M
Try something like this. (Untested but should be close) form = SQLFORM.factory(Field("category",label="Book Category", requires=IS_IN_DB(db.category, 'category.id', 'category.name', error_message="Please pick a category from the list"))) if form.accepts(request.vars, session, keepvalues=True):

[web2py] Re: How to manipulate default tables and use them with powertable

2011-02-21 Thread Brian M
Correction should be requires=IS_IN_DB(db(db.category.id>0),...) not requires=IS_IN_DB(db.category,...) form = SQLFORM.factory(Field("category",label="Book Category", requires=IS_IN_DB(db(db.category.id>0), 'category.id', 'category.name', error_message="Please pick a category from the list"))

[web2py] Re: save file

2011-02-21 Thread Brian M
Check the code shown here >> https://groups.google.com/d/msg/web2py/Kr-CBSeal_E/UVpKuaTbbqwJ for a sample of how to do an upload separate from a DB table.

[web2py] Re: Date intervals split

2011-02-22 Thread Brian M
I don't think that web2py will recognize the HTML5 _type="date" yet though you could certainly leave it there for your users with an HTML5 compliant browser. Web2py knows which from.vars should be a python date object because of the requires=IS_DATE() in the form field declaration

Re: [web2py] Re: How to manipulate default tables and use them with powertable

2011-02-23 Thread Brian M
If you want to show the book's category in the heading, then you need to look up the corresponding category's record from the DB and pass it into your view. As far as the default, maybe just put it in the else clause of the form.accepts. Something like this (not tested): form = SQLFORM.facto

[web2py] Re: How to accept credit card payments (video)

2011-03-06 Thread Brian M
Yeah, I'm no PCI expert, but I'm pretty sure that storing the credit card number in the DB (un-encrypted/un-masked) is a no-no and in the very least is a bad idea. But Massimo's just illustrating how to use Authorize.Net For those who are interested in PCI-DSS https://www.pcisecuritystandards.o

[web2py] Re: some functionality to mix html and {{python expression}} is broken since 1.92.3, even back to 1.91.6

2011-03-07 Thread Brian M
Well you're missing a closing ) in this line - the A() is closed but the LI( is not: {{ myli = LI(A(myrow['strRegionNameRendered'], _href="#") }} Why not simplify your template down a bit - Having your LI's inside a DIV seems a bit odd. {{myUL = UL(_id="dhtmlgoodies_tree", _class="dhtmlgoodie

[web2py] Re: Cron not running/starting on windows

2011-03-09 Thread Brian M
I don't think cron works when running as a Windows service - at least it didn't in the past https://groups.google.com/forum/#!searchin/web2py/windows$20cron/web2py/OX7pXEGlSGM/hkspXZWKV1gJ I ended up just using a scheduled task that used wget to fetch certain controllers I wanted to run regular

[web2py] Re: What's the best way to backup/restore a web2py app

2011-03-14 Thread Brian M
Ack, Massimo's been spying on me and knows my workflow! :-) Dropbox is very nice for while you're developing & using different computers. As others have said, only works well if you're using sqlite or are just worried about the code & not the db. If you want to backup your database too you'll p

[web2py] How to build windows binary yourself?

2011-03-19 Thread Brian M
I was going to take a shot at building my own windows exe version of web2py and see if I could get pyodbc included, but ran into a problem. I started out with the source distribution of web2py 1.94.5. and then ran > python setup_exe.py web2py Everything seems to start building OK until it begi

[web2py] Re: How to build windows binary yourself?

2011-03-20 Thread Brian M
OK, I've got a version that appears to build successfully - had to re-write the code to gather the list of data_files - reglob() didn't return files in expected format. It's working but currently is including a bunch of windows API files in the dist directory, so it would NOT be appropriate for

Re: [web2py] Re: How to build windows binary yourself?

2011-03-20 Thread Brian M
Thanks Praneeth, looks like what your script builds & what I've got going produce pretty much the same output (once I comment out the few extra modules you've got that I don't). 1) I notice you're using shutil to just copy the applications directory rather than passing the correct tuples to dat

[web2py] Re: How to build windows binary yourself?

2011-03-27 Thread Brian M
Massimo, I'll be emailing you a revised script based off of Praneeth's standalone_exe.py shortly. I decided to make it a bit more interactive Features: 1) Creates web2py.exe with py2exe 2) Offers to remove the Windows DLLs that py2exe includes but are likely to have licensing issues. 3) Offers

[web2py] Re: How to build windows binary yourself?

2011-03-27 Thread Brian M
http://code.google.com/p/web2py/issues/detail?id=224 Issue created so this doesn't get lost. (script is attached if anyone wants it)

[web2py] Any way to prompt for password for sensitive pages?

2011-04-15 Thread Brian M
Is there any easy way to re-prompt the user for their password before displaying certain sensitive pages? Here's what I'm thinking - the user logs in with auth and has access to most features of the site. But, when they go to a more important page they're first asked to re-enter their password -

[web2py] Re: Any way to prompt for password for sensitive pages?

2011-04-16 Thread Brian M
Perfect, that's just what I was looking for!

[web2py] Re: how to parse rawsql results?

2011-04-23 Thread Brian M
Try this to convert that inner tuple into a dict the row[0][0] but with a name for your field - makes your code more readable (to me anyway): rows = db.executesql("SELECT count(1) as the_count FROM autos WHERE autos.out=?", ('T'), True) #moved the ='T' into a parameter print rows[0]['the_count']

[web2py] Re: How to search by date?

2011-04-26 Thread Brian M
Tell web2py that those fields are supposed to be dates and it'll take care of the date format for you. Here's a form I use for finding stats between two dates, should be easy enough to modify for your purposes form = FORM(TABLE(TR(TD("First Date:"), TD(

[web2py] Re: Filtering by date range (SQL date tye)

2011-04-26 Thread Brian M
Also try the dateutil module from http://niemeyer.net/python-dateutil examples: >>> NOW = datetime.now() >>> NOW+relativedelta(months=+1, weeks=+1) datetime.datetime(2003, 10, 24, 20, 54, 47, 282310) >>> relativedelta(datetime(2003, 10, 24, 10, 0), TODAY) relativedelta(months=+1, days=+7, hours=

Re: [web2py] Re: Install in hostgator

2011-05-18 Thread Brian M
Yep it'll work similar on hostgator - tried it out a few months back just to see if I could get it working, haven't actually deployed anything useful but it appears to run ok. I recall that an appropriate version of Python & flup were already installed on my hostgator shared box. I did my insta

[web2py] db.table.insert() doesn't always validate data types? (Bug?)

2011-05-24 Thread Brian M
I just found what might be a bug, when using db.table.insert(field = value) it appears that the type of value isn't checked against the declared type of field. So for example you can declare a field to be of the date type, but then insert a record with a non-date value (at least in sqlite). I w

Re: [web2py] slices and generic.load

2011-06-30 Thread Brian M
Thanks for pointing this out Anthony - I'll try to find time to update my slice & demo app soon. ~Brian

Re: [web2py] slices and generic.load

2011-06-30 Thread Brian M
Both slice & bitbucket repo should be fixed to work with web2py 1.97.1 now - Thanks Richard for pointing this out and Anthony for helping to explain the problem. Let me know if there are more issues. ~Brian

[web2py] auth with OpenID - auth.environment.URL(...) error

2011-07-09 Thread Brian M
So I thought I'd mess around with using OpenID for authentication and followed the info Will provided in an older post. Unfortunately, I'm getting an error: Traceback (most recent call last): File "C:\Users\Brian\Documents\developmen

[web2py] Re: auth with OpenID - auth.environment.URL(...) error

2011-07-10 Thread Brian M
Bingo - I'll start an issue over in google code & submit the patch. Thanks Anthony!

[web2py] Re: web2py deployement on windows

2011-07-12 Thread Brian M
You can run web2py as a windows service too http://web2py.com/book/default/chapter/11#Start-as-Windows-Service ~Brian

[web2py] Re: any windows user want to help with this...

2011-07-21 Thread Brian M
Massimo, What specifically are you looking for? All that is needed is to use the already included setup_exe.py The new setup_exe.py from issue 224 which was merged in April (rev 216a13ba21a1

[web2py] Any LDAP auth users out there?

2011-07-27 Thread Brian M
Anybody out there use the contributed ldap_auth? I've got a strange problem where it'll work just fine from my dev box on one subnet but not on the production server which is on another subnet (and the same subnet as the LDAP server). Anybody have any ideas about what could be going on? ~Bria

Re: [web2py] Any LDAP auth users out there?

2011-07-27 Thread Brian M
Hmm not certain server is on 10.0.0.x ldap_auth works from 10.0.1.x but not from 10.0.0.x Unfortunately I'm not an expert on ActiveDirectory/LDAP so I don't know for sure how ours is setup.

Re: [web2py] Any LDAP auth users out there?

2011-07-28 Thread Brian M
Web2py always says invalid login. Running the same steps in plain python gives an exception saying the user lookup cannot be performed without a valid binding which would mean it is not accepting the username and password provided. But again the exact same code works fine from the other subnet.

[web2py] Re: Problem installing web2py as a service

2011-08-01 Thread Brian M
Have you tried using the source version instead of the exe? I've got the source version running as a service on 2 machines. It may be that the exe is missing something that's required for running web2py as a service. (If you do try from source, make sure you also install the win32 python ext

Re: [web2py] Any LDAP auth users out there?

2011-08-03 Thread Brian M
BINGO - ldap.set_option(ldap.OPT_REFERRALS, 0) seems to have done it. Thank You!

[web2py] Rocket - Static Files length error

2011-08-08 Thread Brian M
I've got a web2py app that has started to behave oddly - suddenly static files aren't loading reliably. In Chrome's developer tools it appears that rocket is returning a correct content-length but then not actually providing any content. I'm running web2py v1.97.1 from source on Windows. Any i

[web2py] Re: testing scheduler in windows

2011-08-30 Thread Brian M
Similar results with a fresh install of Python 2.7.2 I don't think this is just due to a bad python install.

[web2py] Re: testing scheduler in windows

2011-08-31 Thread Brian M
OK, just pulled from trunk and trying with Python 2.6.4 on win7 - still no luck though the traceback seems slightly different now. C:\Users\Brian\Documents\development\web2py\google hg repo>python trunk/gluon/me ta_scheduler.py thumnew task starting task Traceback (most recent call last): Fi

[web2py] Re: mssql connect

2011-08-31 Thread Brian M
What version of python are you using? Have you installed the matching pyodbc version from http://code.google.com/p/pyodbc/? ~Brian

[web2py] Re: testing scheduler in windows

2011-08-31 Thread Brian M
Yes, Massimo got meta_scheduler.py working but fixing the actual scheduler is going to take more time & effort. Unfortunately on Windows you can't just pass functions from the main process to the process that runs tasks like you can on Linux. Massimo put a brief post over on the web2py-develo

Re: [web2py] Re: testing scheduler in windows

2011-09-01 Thread Brian M
Isn't that pretty much what we're supposed to be seeing? Every few heartbeats it recognizes a task that needs running, starts it and reports back when complete? C:\Users\Brian\Documents\development\web2py\google hg repo>python trunk/gluon/me ta_scheduler.py thumnew task starting task task st

[web2py] Re: mssql connect

2011-09-01 Thread Brian M
Glad you got it working! :)

<    1   2   3   4   >