[web2py] Re: hostmonster, pythonanywhere, or gae for my current situation

2013-04-20 Thread Brian M
Check the docs for Mercurial , it explains why you keep getting that "extra" directory. (The BitBucket 101docs might also be good to review) > clone > > hg clone [OPTION]... SOURCE [DES

[web2py] Scheduler - Recurring task but only during certain hours?

2013-05-03 Thread Brian M
Is there any way to setup a recurring task with the built-in scheduler so that it would say run every 10 minutes between just 8am and 6pm? I know that it is easy enough to setup the every 10 minutes part, but it there any way to restrict the time of day too? ~Brian -- --- You received this

[web2py] Re: Scheduler - Recurring task but only during certain hours?

2013-05-03 Thread Brian M
Thanks Niphlod! I've been doing the first option - just having the task's first step be to check the time and quick return if it is outside of the desired time of day, but that seemed inelegant since it's then hard-coded and more of a hassle to maintain. Maybe I'll have to try out option #2. O

[web2py] Re: Dynamically generating text file that isn't stored?

2013-05-03 Thread Brian M
You can use the csv and cStringIO modules to generate the "file" and then just set the appropriate content type and disposition headers before you return the contents and the user's browser will download the generated file. Take a look at this post for more details: https://groups.google.com/d

[web2py] Re: Anyone got working python-dateutil in web2py app?

2013-06-21 Thread Brian M
I too use relativedelta a lot but hadn't tried rrule() before. However, I just gave it a try and it appeared to work OK. (Tested with current web2py trunk running via rocket) def index(): from dateutil.rrule import * from dateutil.parser import * from datetime import * recur = l

Re: [web2py][share] Select2.js

2013-07-30 Thread Brian M
Nice find! On Tuesday, July 30, 2013 1:26:53 PM UTC-5, Richard wrote: > > Hello, > > I just found this (select2.js) : > http://ivaynberg.github.io/select2/index.html > > A kind of chosen on steroïd... > > It include a Tagging utility that let insert new tag on the fly like > Tag-it but don't see

[web2py] Re: executesql insert multiple rows

2013-08-11 Thread Brian M
Sorry, not totally sure how to fix it, but what you've got now is quite confused. You've got just 2 placeholders in your SQL statement "values(%s, %s)" but 3 in placeholderlist so right there it isn't going to work. Plus, you don't want "values([val1, val2], [val3, val4]) in the final SQL anyway

[web2py] Re: executesql insert multiple rows

2013-08-12 Thread Brian M
Sorry, don't have an install of PostgreSQL handy to try. I think that this likely isn't included in DAL because of differing syntax and ability between the different databases and nobody having volunteered to sort it out and submit a patch. (For example i use MSSQL and such inserts are differen

[web2py] Re: Raspberry Pi and web2py: No 19x.16x.xxx.xx option

2013-09-13 Thread Brian M
Eth0 is the PI's actual network address that can be accessed by other computers. lo is the localhost loopback which every computer has to basically talk to itself. (see https://en.wikipedia.org/wiki/Localhost). In other words if you were on your PC and pointed its browser at http://127.0.0.1:8

[web2py] Re: web2py binary contest

2013-10-18 Thread Brian M
OK, since nobody else seems to be trying and I do use the windows binaries for a work app I gave this a try and didn't seem to have any trouble building the default binary and one with gevent. Niphlod I'll send you an email off-list to see if I did it right. ~Brian On Thursday, October 17, 20

[web2py] Re: web2py binary contest

2013-10-18 Thread Brian M
5 1795 158.9 18122142 Total:406 1796 158.9 18132142 Percentage of the requests served within a certain time (ms) 50% 1813 66% 1839 75% 1854 80% 1863 90% 1886 95% 1901 98% 1917 99% 1921 100% 2142 (longest request) On Friday, October 18, 201

[web2py] Re: web2py binary contest

2013-10-19 Thread Brian M
o inspect your submission later :-P > > On Saturday, October 19, 2013 6:34:57 AM UTC+2, Brian M wrote: >> >> Basic speed comparison between the two suggests that gevent may indeed be >> noticeably faster. (I wouldn't jump to too many conclusions - this is >> totally u

[web2py] Re: web2py binary contest

2013-10-20 Thread Brian M
WhooHoo! :D And thank you Niphlod for all you contribute to the web2py community! On Sunday, October 20, 2013 2:22:29 PM UTC-5, Niphlod wrote: > > @Brian M won the contest. Congrats to him for committing to test out the > recipe and fiddle a little with the source code. > >

Re: [web2py] Re: web2py scheduler not working

2013-10-24 Thread Brian M
@ranjith, I think that you may be confusing the difference between Unix/Linux cron and the "cron" provided by web2py which are two different things. What @Marin is meaning is that you'

[web2py] Re: Strange Issue with Executesql

2013-11-16 Thread Brian M
I use executesql with large tables (multiple 100K rows) and have had no such problems. Are your queries really just select * from table or is there more complicated parameters involved? If it can be reliably reproduced them why not use a monitor to watch what sqlserver is actual doing when it f

[web2py] Re: Strange Issue with Executesql

2013-11-18 Thread Brian M
I was meaning use the SQL server activity monitor to find out exactly what query is being run and how long it is taking. But if you are using SQL server express you won't have that. You can use something like express profile 2.0 which is free though. Being able to see exactly what query is hitti

[web2py] Re: Strange Issue with Executesql

2013-11-19 Thread Brian M
Wow, you actually need to pull 50,000 rows at a time?! Are you sure there isn't some sort of aggregating that couldn't be done at the database level to cut that down? While I work with large tables I have not been retrieving anywhere near that many rows at once. I will give it a shoot and see if

[web2py] Re: Strange Issue with Executesql

2013-11-19 Thread Brian M
dentally altering the value of test under certain conditions. (Yeah been there, done that, wasn't much fun) On Tuesday, November 19, 2013 4:43:14 PM UTC-6, Brian M wrote: > > Wow, you actually need to pull 50,000 rows at a time?! Are you sure there > isn't some sort of aggregating

[web2py] Scheduler - response.render no longer working

2016-10-02 Thread Brian M
OK, so I've had multiple scheduled tasks running for years that use response.render('path/to/template.html', dict(var= 'something')) to help build email bodies and it has been working perfectly. Now when I try to upgrade to the latest web2py trunk (was on 2.13.4 - yeah I'm a bit behind) all tha

[web2py] Under Scheduler request.is_scheduler is None rather than True - Why?

2016-10-02 Thread Brian M
Is there a reason why when something is run under the scheduler request.is_scheduler = None rather than True? When you access request.is_scheduler from outside of the scheduler you get False as one would expect. The current None value seems strange/non-intuitive. #this won't work if request.is_s

[web2py] Re: Under Scheduler request.is_scheduler is None rather than True - Why?

2016-10-03 Thread Brian M
https://github.com/web2py/web2py/issues/1484 On Monday, October 3, 2016 at 4:46:26 AM UTC-5, Niphlod wrote: > > can you please file a bug on https://github.com/web2py/web2py/issues ? > I'd like to keep track of it and fix ASAP > > On Monday, October 3, 2016 at 5:45:21 AM

[web2py] Re: Scheduler - response.render no longer working

2016-10-09 Thread Brian M
t; I'll open an issue and propose a fix. >> >> Anthony >> >> On Monday, October 3, 2016 at 5:48:40 AM UTC-4, Niphlod wrote: >>> >>> hum. Trunk has been recently updated in the management of caching code >>> for controllers and views wond

[web2py] Re: Under Scheduler request.is_scheduler is None rather than True - Why?

2016-10-09 Thread Brian M
(seems to work > after a quick test on Windows). > > Anthony > > On Monday, October 3, 2016 at 5:46:26 AM UTC-4, Niphlod wrote: >> >> can you please file a bug on https://github.com/web2py/web2py/issues ? >> I'd like to keep track of it and fix ASAP >> >

[web2py] Re: Do conditionals short circuit for DAL?

2016-11-26 Thread Brian M
Well even if you're writing the query using the DAL the actual data processing is being done by the database itself so that's where the "short circuiting" would need to happen and is dependent on the database's query optimization. Try running a SQL version of the query directly against the DB a

[web2py] setup_exe.py bbfreeze- Not building working executable

2016-11-30 Thread Brian M
Has anybody built their own Windows executable using extras\build_web2py\setup_exe.py lately? I've copied setup_exe.py and setup_exe.conf to the web2py TLD and ran python setup_exe.py bbfreeze and it builds the binary alright. But then when I actually launch the executable and fire up web2py ev

Re: [web2py] Re: Performance using MSSQL stored procedures

2016-11-30 Thread Brian M
Can you use web2py for a reporting site - sure, a lot of what I do with it is reporting. I've been using DataTables.net which can provide pagination, sorting, search, aggregation and even basic export (via TableTools) for almost free. While it can enhance regular old HTML tables, with large num

[web2py] Javascript functions for Canvas not working

2016-11-30 Thread Brian M
I have created a codepen that draws on the canvas and used a javascript addEventListener to capture the mouse clicks. I think that not working properly is my issue. What would be the proper procedure to grab a codepen sample and serve it up in the framework properly? I am still on the learning

Re: [web2py] Re: https causes site to be in text

2016-12-01 Thread Brian M
The web server block for https probably needs all the same locations and error pages and such as the http server block has for the site to act the same. If those rules created identify the locations of items for the web server allow it to work in http, it only makes sense that the same rules sh

Re: [web2py] Re: Performance using MSSQL stored procedures

2016-12-01 Thread Brian M
What Dave S. said is key > > "*If you had insight into what the users were looking for during their > examination of the data*, you may be able to provide a better query that > could *simplify the data presentation*." Sit down with your users and find out what it is that they *actually* need

[web2py] Re: Javascript functions for Canvas not working

2016-12-02 Thread Brian M
In case other have this sort of a problem where javascript events are affected by the css of bootstrap... the problem was in the css file: bootstrap.min.css somehow the relative position causes the event not to bubble up. How jacked up is that? .col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-

Re: [web2py] Re: Performance using MSSQL stored procedures

2016-12-02 Thread Brian M
https://datatables.net/extensions/scroller/examples/ if you must have huge numbers of rows displayed. On Friday, December 2, 2016 at 2:25:14 PM UTC-6, Dave S wrote: > > On Friday, December 2, 2016 at 12:33:46 AM UTC-8, Gabor Nyul wrote: >> >> Brian, >> >> In fact this is already done. I have a c

[web2py] Re: Difference of two date field in years

2016-12-11 Thread Brian M
Like Anthony said, without seeing your code we can't help. What exactly do you mean by "is not able to recognize date fields as date"? As an alternative to dateutil you could also look into the Pendulum package (https://pendulum.eustace.io/) which makes playing with dates even easier. On Frida

[web2py] Re: Strange Issue with Executesql

2013-11-26 Thread Brian M
Querying out 47K rows is taking 4.5-5.5 seconds on my laptop (and its specs are nothing special). Not sure how the complexity of my query compares to yours but 20-150 seconds seems slow. Heck I can get back over 800K rows in about 75 seconds. BTW, running the same queries in SQL Server Managemen

[web2py] Re: Strange Issue with Executesql

2013-11-27 Thread Brian M
27; why bother with executesql instead of just using the DAL with db(db.table.id > 0).select() - I'm giving the benefit of the doubt that it must actually be more complex. On Wednesday, November 27, 2013 1:28:53 PM UTC-6, Niphlod wrote: > > > > On Wednesday, November 27, 2013 6:48:

[web2py] Re: Cron job every 30 seconds

2013-11-27 Thread Brian M
web2py's scheduler will let you set the repeat period in seconds so you could probably do 30 seconds that way. On Tuesday, November 26, 2013 2:55:16 PM UTC-6, melmg wrote: > > Is is possible to set up a cron job to run every 30 seconds instead of a > minute? I have a function that does an HTTP G

[web2py] LOAD only gives "Loading..." after upgrade

2013-12-16 Thread Brian M
This would seem to be the same issue as https://groups.google.com/d/topic/web2py/kyEYmfQs6L0/discussion but yet the solution offered there (make sure you've got the latest web2py.js) doesn't seem to be working for me. Oddly, I've got another form being loaded with LOAD(ajax=True) on the same p

Re: [web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-17 Thread Brian M
sh demo app to show this. On Tuesday, December 17, 2013 6:26:14 AM UTC-6, Brian M wrote: > > Thanks Massimo I will give that a try. Was using firebug last night but > wasn't seeing any errors or anything. > On Dec 17, 2013 12:53 AM, "Massimo Di Pierro" > wro

[web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-17 Thread Brian M
stuck it at the bottom of views/web2py_ajax.html As far as the jGrowl part being displayed twice, it looks like changing my javascript ajax() call so that it does NOT include an ':eval' argument at the end fixed that. On Tuesday, December 17, 2013 8:09:12 AM UTC-6, Anthony wrote:

[web2py] Re: LOAD only gives "Loading..." after upgrade

2013-12-18 Thread Brian M
Anybody have any ideas? This setup worked under older versions of web2py but not anymore - I assume something with the changes to web2py.js but don't know where. On Tuesday, December 17, 2013 11:26:19 AM UTC-6, Brian M wrote: > > OK, I've got a simple app that sh

[web2py] Re: forgot password not working anymore

2013-12-23 Thread Brian M
I recently experienced something like this as well. Are you trying to do the reset from localhost or remotely? When I experienced this I found that oddly while the forgotten password form would not work when connecting to localhost, if I connected from another computer it worked fine. From loca

[web2py] Scheduler repeat time drift

2014-01-08 Thread Brian M
Is there any way to keep the time at which recurring tasks run from drifting? I've got several daily tasks that over time go from running at say 10am to 10:30am - it seems like each consecutive run is 20 seconds or so behind the previous day's. Is this simply a matter of the next execution time

[web2py] Re: Scheduler repeat time drift

2014-01-08 Thread Brian M
first round and > the START of the next, but from the START time of the first round to the > START time of the next cycle)* > > > > On Wednesday, January 8, 2014 5:10:38 PM UTC+1, Brian M wrote: >> >> Is there any way to keep the time at which recurring tasks run from

[web2py] Can I query muliitple legacy databases?

2014-03-20 Thread Brian M
It works great. I've got reporting sites at work that pull from several different databases using a mix of DAL queries and executesql. Just use the DAL to make the connections to the databases and then query it whichever way best fits your needs! -- Resources: - http://web2py.com - http://web2

[web2py] Re: Can I query muliitple legacy databases?

2014-03-20 Thread Brian M
Setup a connection to each of your databases as shown above - then db1 will represent the connection to the first database, db2 the second and so on - or you can just as easily name the database connections db_customer, db_purchases, db_relatives and so on so the names are a bit more descriptiv

[web2py] Re: Can I query muliitple legacy databases?

2014-03-25 Thread Brian M
Please be sure to read the DAL section of the online web2py book it will explain a lot of this. When you use executesql you can choose how to see the results the as_dict means you can address fields/columns as dict keys or you can also use the fields & colnames options to get objects just like

[web2py] Re: Select statement with MSSQL

2015-12-19 Thread Brian M
You must first tell the DAL about the tables in your database before you can ask it to select data from them. http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Table-constructor On Saturday, December 19, 2015 at 3:39:45 AM UTC-6, sa wrote: > > Hi, > > Can not select

[web2py] Re: daily scheduler task

2016-02-19 Thread Brian M
Oddly enough I actually had this happen this past weekend. I have a daily task that sends plant status update emails and the view template that renders the email body was choking because of an unexpected dividide by zero. The first day after the bad data was entered the scheduled run did simply

[web2py] Re: daily scheduler task

2016-02-20 Thread Brian M
My setup is on Windows with the scheduler running as a service via nssm. I have it set to run every 86400 seconds (24hrs) with infinite number of runs and retries. The timeout is something like 2 or 3 minutes. I am also using the "cron like" option so that it always runs at exactly the same time

[web2py] Re: daily scheduler task

2016-02-20 Thread Brian M
ersion of gluon/scheduler.py and it does appear to fix the problem so after. So if Massimo, Nilphod or another developer can review and add the patch I'm sure at least Alex & I would appreciate it. Brian On Saturday, February 20, 2016 at 8:21:24 PM UTC-6, Brian M wrote: > > My setu

[web2py] Re: daily scheduler task - FIX

2016-02-21 Thread Brian M
Well I was looking at it as the task was still run by the scheduler even if it didn't complete successfully so the run count should go up regardless. If you are not using the prevent drift option then the scheduler bumps forward the next run time whether or not the task was successful so my cha

[web2py] Re: daily scheduler task - FIX

2016-02-21 Thread Brian M
n the times_failed becomes zero and now you're going to calculate incorrect next_run_time values (they'll likely end up in the past) and just end up with your task running extra again. So not quite so simple of a fix as initially On Sunday, February 21, 2016 at 9:44:41 AM UTC-6

[web2py] Re: daily scheduler task - FIX

2016-02-21 Thread Brian M
n the times_failed becomes zero and now you're going to calculate incorrect next_run_time values (they'll likely end up in the past) and just end up with your task running extra again. So not quite so simple of a fix as I initially thought. :\ On Sunday, February 21, 2016 at 9:44:41 AM

[web2py] Restored DB, _enable_record_versioning() and fake migrations?

2016-02-22 Thread Brian M
I seem to have run into a problem with tables I'm using _enable_record_versioning() with. I'm setting up on a new computer and have restored a DB backup to the new computer. Now when I try to run pages that utilize those tables the database is complaining that the _archive tables already exist.

Re: [web2py] Restored DB, _enable_record_versioning() and fake migrations?

2016-02-22 Thread Brian M
6 at 8:39:22 PM UTC-6, Richard wrote: > > If you restore database like for like, why are you bother with > fake_migrate... Just leave everything to migrate=False should be alright if > you dump contains all the tables... > > Richard > > On Mon, Feb 22, 2016 at 4:55 PM, Brian

Re: [web2py] Restored DB, _enable_record_versioning() and fake migrations?

2016-02-22 Thread Brian M
gt; > What is the traceback error message? > > On Mon, Feb 22, 2016 at 9:53 PM, Brian M > > wrote: > >> The restore was done with MS SQL Server's built-in backup & restore so >> yes it has all of the tables and info. The dozens of other tables in my >&

Re: [web2py] Restored DB, _enable_record_versioning() and fake migrations?

2016-02-22 Thread Brian M
gt;is_active='is_active') > > Where I specified the name of the table to use for archiving records... > > You may have a look at your history table(s) and try to set the previous > parameters for each of your instanciation of the

Re: [web2py] Restored DB, _enable_record_versioning() and fake migrations?

2016-02-23 Thread Brian M
>> _enable_record_versioning() for one turn... You try access your app with >> only one table under record versioning to see if it works... Then if this >> work, I would make sure (explicit) what is the name of the archive table to >> see if the issue go aw

Re: [web2py] Restored DB, _enable_record_versioning() and fake migrations?

2016-02-23 Thread Brian M
determine if the issue is coming form > new web2py version or not). > > Or could it be possible that you create the archive table manually back in > time? Or that some file in app/databases/ folder get deleted?? > > Richard > > > > On Tue, Feb 23, 2016 at 11:12 AM, Brian

[web2py] DAL connection to MSSQL

2016-04-04 Thread Brian M
I think db._tables only lists the tables you have defined within the DAL rather than going to the database itself and listing any tables that are there independent of the DAL (for example if you are connecting to a database that wasn't created through the DAL). Have you defined any tables withi

[web2py] Re: DAL connection to MSSQL

2016-04-06 Thread Brian M
You can do it but you must tell the DAL that the table exists. It won't just discovered existing tables for itself. -- 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 Is

[web2py] Caching DAL Selects - only cache.ram works?

2018-04-03 Thread Brian M
I've been playing with caching and looking through the mailing list and have a bit of confusion about whether or not you can actually cache DAL Selects with anything other than cache.ram due to issues with what can/cannot be pickled. When I use db(...).select(...,cache=(cache.disk, 300), cache

[web2py] Re: Caching DAL Selects - only cache.ram works?

2018-04-03 Thread Brian M
:55 PM UTC-4, Anthony wrote: >> >> It should work. Could be a bug specific to using pyodbc. Have you tried >> it with other databases/drivers? Feel free to file a PyDAL issue. >> >> Anthony >> >> On Tuesday, April 3, 2018 at 12:40:50 PM UTC-4, Brian M wrote: &

[web2py] Re: Caching DAL Selects - only cache.ram works?

2018-04-06 Thread Brian M
So it caching selects to disk or redis supposed to only work if you have uniquely named fields? It doesn't seem to make a difference if I set cachable=True or not. On Tuesday, April 3, 2018 at 5:15:25 PM UTC-5, Brian M wrote: > > Further investigation shows that cache.redis plays

[web2py] Re: 'Column table.id not found (SQLTABLE)'

2018-04-20 Thread Brian M
Thank you for mentioning this - just wasted an hour plus trying to figure out why my code had stopped working only to find that it was because I'd done pip install pydal for something else and foolishly not used a venv. Uninstalled pydal and everything was good again. So warning to others, avoi

[web2py] Re: Caching DAL Selects - only cache.ram works?

2018-04-26 Thread Brian M
Brown', 1, u'Snoopy')) While running DISKCache_Working multiple times works just fine. The difference seems to be that the version that fails ends up with two "id" and two "name" fields while the version that works has all unique field names. pet_owners : pe

[web2py] Python 3 - Traceback problems

2019-02-01 Thread Brian M
So I'm trying to finally move my web2py apps over to Python 3.7 before Python 2.7 reaches EOL and, while for the most part they're working fine, I am finding that when there is a problem the web2py Error ticket is just about useless (doesn't tell you where the error actually occurs) because web

[web2py] Web2py with python3: difference in error reporting

2019-02-05 Thread Brian M
Reported the same a few days ago but have heard nothing. :( https://groups.google.com/forum/m/#!topic/web2py/dTsDZJ8jhyg -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Repo

[web2py] Python 3 - Traceback problems

2019-02-14 Thread Brian M
Am I really the only one having this problem? Having the error ticket system not work seems like a pretty significant obstacle to using web2py with python 3.7 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://cod

[web2py] Re: Python 3 - Traceback problems

2019-02-16 Thread Brian M
Looks like if you use the latest git version then the error tickets work as expected. On Friday, February 15, 2019 at 10:04:50 AM UTC-6, Kevin Keller wrote: > > Is there any update to this? > > On Friday, 1 February 2019 17:21:40 UTC+1, Brian M wrote: >> >> So I

[web2py] Best approach to using the DAL with external data sources that will go into multiple tables?

2014-04-08 Thread Brian M
Assuming each source needs the same data fields, how about just using one table and including an extra field to specify which source each record came from? Or if you really want a separate table for each timeseries, you could look into using table inheritance. http://web2py.com/books/default/cha

[web2py] great news: Sphinx Documentation

2014-04-13 Thread Brian M
Great job niphlod! -- 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 "web2py-user

[web2py] query DAL

2014-04-28 Thread Brian M
Are you sure that your situation table doesn't have some more fields? Fernando has three entries in situation so how do you know which one is the "last" one? Are you just going to assume that the highest situation.id is the last one or is there a timestamp in there or some sort of "active" flag

[web2py] Re: query DAL

2014-05-01 Thread Brian M
The database view trick would work. Or how about adding a "current" flag and whenever you do a situation update/insert you set the new record's current flag to true and those of all that person's other situation records to false. You could either do it in web2py or with a database trigger. Seems

[web2py] Re: Sending Emails HTMLemails with CSS

2014-05-07 Thread Brian M
Was actually looking at this today and there are a couple of CSS Inliners written in Python that could perhaps be integrated in your workflow. Haven't tried them yet but here are two. http://pythonhosted.org/pynliner/ https://pypi.python.org/pypi/premailer/ On Tuesday, May 6, 2014 2:35:18 PM UT

Re: [web2py] web2py conference - online talks

2014-05-15 Thread Brian M
Massimo, any chance of you posting a tutorial/how to of your setup? :) -- 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 y

Re: [web2py] Custom Auth

2014-05-27 Thread Brian M
Greg, I know this is an old thread, but did you ever come up with a solution? I've got an asp.Net app that I'd be nice to be able to authenticate against. Thanks Brian On Wednesday, October 9, 2013 9:22:07 PM UTC-5, GregD wrote: > > We have to use tables from sql server (aspnet_user and aspnet_

[web2py] Ubuntu 14.04 Setup Script with Apache - Issues?

2014-06-18 Thread Brian M
Anybody else tried setting things up on Ubuntu 14.04 using scripts/setup-web2py-ubuntu.sh? I tried it this evening and ran into multiple issues 1) The generated sites-available/default configuration file must be linked to sites-enabled/default.conf or else it doesn't actually get used and all

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-18 Thread Brian M
Here's how I'm doing it in an app. I'm not using grid or smartgrid but rather a datatables.net table where each row has a linked edit button. There may be other (better?) ways to do it but this works for me. Each record includes: {{=A(edit_icon, _href=URL(r=request,f='edit_item', args=[record_i

[web2py] Re: CSS and graphics not loading in admin interface (lighttpd)

2014-06-19 Thread Brian M
It may be that response.static_version is enabled but the web server is not setup to handle the resulting URL. Try using your browser's developer tools to see what the URL for the missing files is; if it includes /static/_#.#/some/file.CSS this is your problem. See the deployment section of the

[web2py] Re: Ubuntu 14.04 Setup Script with Apache - Issues?

2014-06-20 Thread Brian M
ssues might need addressing. Brian On Wednesday, June 18, 2014 10:08:33 PM UTC-5, Brian M wrote: > > Anybody else tried setting things up on Ubuntu 14.04 using > scripts/setup-web2py-ubuntu.sh? I tried it this evening and ran into > multiple issues > 1) The generated sit

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-22 Thread Brian M
Tomeu, At the moment I'm just letting datatables.net enhance a plain html table for me. One of these days I'll probably get around to giving it a json datasource but so far it hasn't been a priority for my usage. As a bonus, here's some of how to update the datatables.net display after using t

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-23 Thread Brian M
Looks like the new datatables.net v1.10 has a new API so there are now probably better ways to do this than I showed. On Monday, June 23, 2014 4:51:53 AM UTC-5, Tomeu Roig wrote: > > Thanks Brian > > El lunes, 23 de junio de 2014 03:56:32 UTC+2, Brian M escribió: >> >> To

[web2py] Re: Ubuntu 14.04 Setup Script with Apache - Issues?

2014-06-24 Thread Brian M
x27;m going to spin up a server with a > different OS to avoid the issues. Thanks > > On Wednesday, June 18, 2014 11:08:33 PM UTC-4, Brian M wrote: >> >> Anybody else tried setting things up on Ubuntu 14.04 using >> scripts/setup-web2py-ubuntu.sh? I tried it this evening and

[web2py] Re: update database right from view?

2014-07-10 Thread Brian M
Maria, if you really want to you can build the entire form in the view with good old HTML. 1. An example set of "sentence", "meaning" and word "forms" may be helpful - sounds like you're probably doing some sort of translation thing or maybe it is a quiz? 2. You'll need to add tag

[web2py] Re: Web2py Deployment Script for Ubuntu 14.04

2014-07-18 Thread Brian M
I posted about this a couple weeks ago along with what worked for me ,,https://groups.google.com/forum/#!searchin/web2py/Apache$20Ubuntu%7Csort:date/web2py/o6OGQRQTN6Y/oJJQMGChgpcJ On Friday, July 18, 2014 7:14:18 AM UTC-5, Auden RovelleQuartz wrote: > > This recipe which had worked: > > { > One

[web2py] Re: Accesing table from external database

2014-09-17 Thread Brian M
What do you mean by "external database"? Are you actually meaning a legacy database that the DAL didn't create itself? You can certainly connect web2py to such a database through the DAL or even just using db.executesql(). If you need to get a list of valid options for your combobox you can do

[web2py] Re: Accesing table from external database

2014-09-19 Thread Brian M
José, Just because the database was not created by web2py does not automatically mean that you cannot access it through the DAL. As long as the table you want to get at has an auto-increment integer primary key field you can define that table through the DAL - even if the identity field is not

[web2py] Re: Web2py, Apache and Ubuntu 14.04

2014-10-05 Thread Brian M
What exactly happens when you try to access your pages? Are you getting 404 responses or something else? Besides checking the apache error logs take a quick look at the access logs to make sure there isn't a bad rewrite rule causing you headaches - I seem to remember that's how I tasked down s

[web2py] Re: Web2py, Apache and Ubuntu 14.04

2014-10-07 Thread Brian M
rewrites anything to https >- In consequence of the misconfiguration of the firewall port 443 was >closed. > > > I am not sure whether it's a good idea to make every web2py request an > https request. But this should be discussed by the experts. > >

[web2py] Re: Running multiple lines of SQL in executesql

2015-03-10 Thread Brian M
Actually just surround your big long multi line SQL statement with triple quotes and it will work fine. I do that all the time. No need for the \ at each line break then either. You can declare and set your @variables all within one executesql query too. On Tuesday, March 10, 2015 at 2:36:28 PM

Re: [web2py] Re: Running multiple lines of SQL in executesql

2015-03-11 Thread Brian M
Strange. Does that same query work if you enter it directly in your DB's interface? I'm guessing from the link you provided that you're using MySQL; I've only done it with MS SQL and SQLite but I'd think that the triple quoting technique should work with other databases too. On Wednesday, March

[web2py] Re: Web2py: Create a CSV file to download for an executesql result

2015-03-28 Thread Brian M
Here's an old post with the solution that I use for this https://groups.google.com/d/msg/web2py/4QhEULmJ8YE/aNBcJv81RocJ Yep, I've got a processing app that spits out all sorts of csv files based on data gathered from multiple sources. Here's a little helper function I use def csv_export(recor

[web2py] Re: mod_wsgi errors -- dead in the water

2015-03-30 Thread Brian M
I also run with the apache + mod_wsgi combo on windows and see this error a lot. Never have been able to figure out a cause other than the client disconnecting like niphlod mentioned. If it is something else that can actually be fixed I'd love to know. Not sure if it matters but I see it predom

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-03-31 Thread Brian M
Mine shows this for a css file HTTP/1.1 200 OK Date: Tue, 31 Mar 2015 21:30:03 GMT Server: Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.2 Content-Length: 2961 X-Powered-By: web2py Last-Modified: Sat, 15 Mar 2014 03:13:58 GMT Pragma: cache Cache-Control: private X-UA-Compatible: IE=edge Keep-Alive

[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain

2015-04-02 Thread Brian M
I think that Weheh may be on to something. I had been using Apache 2.2.22 and just grabbed a fresh copy of 2.2.29 from Apache Lounge and tried it out on my desktop and it appears that static files are now being served directly by Apache rather

[web2py] Re: Autoincrement which resets each month (not primary id)

2017-03-05 Thread Brian M
First of all, at the risk of asking a silly question - is there actually a reason to store this secondary ID in the database rather than just have it calculated on the fly as-needed using a virtual field? Assuming that you've got a created_date field already in the table that'll give you the mon

[web2py] TABLE and TBODY helpers add TR innapropriately

2017-04-06 Thread Brian M
I am trying to build a table from a joined set of db tables and need to do quite a bit of processing to make the links and buttons in each row. Making the code readable is important to me so I do not want to put one giant long line of code to do everything and make it impossible for another pers

[web2py] Re: TABLE and TBODY helpers add TR innapropriately

2017-04-07 Thread Brian M
Anthony, this is what I was looking for. Thanks! I am trying not to build the html myself and use the helpers instead. I am going for readability and ease of use for others to modify later. In all the examples in the book nowhere did it show the append and insert for the HTML helpers I looked at

[web2py] Re: TABLE and TBODY helpers add TR innapropriately

2017-04-07 Thread Brian M
Leonel thanks for your help. I did need to put everything in the XML the way I was doing it because otherwise it all gets escaped. But that is because I was basically converting everything to a string first which is not what I wanted so you were right and I was confused. As far as why not put

[web2py] Re: web2py behind IIS - 404 File or Directory Not Found.

2017-04-07 Thread Brian M
I cannot truly help, but I do use IIS and have found that it can be cantankerous. I would suggest simply trying to get a static file from web2py then you can work on the IIS settings to allow certain types of files that it might be blocking. The 404 on a new IIS installation simply means you ha

<    1   2   3   4   >