Re: [web2py] Re: auth_cas redis session_filename + logout issue

2017-08-24 Thread Mark Graves
. On Fri, Aug 18, 2017 at 12:35 PM, Mark Graves <mgrave...@gmail.com> wrote: > On deeper inspection, the logout issue is strange, and related to the > redis sessions. > > auth.settings.login_form.cas_logout_url > > > is the right URL. If I visit it independently in a bro

[web2py] Re: auth_cas redis session_filename + logout issue

2017-08-18 Thread Mark Graves
sessions are used. They are created when redis sessions are not used. Is that expected behavior? It strikes me as a misconfiguration issue. On Friday, August 18, 2017 at 12:22:40 AM UTC-5, Mark Graves wrote: > > Hey everyone, > > Question / potential bug(s): > > I created the foll

[web2py] auth_cas redis session_filename + logout issue

2017-08-17 Thread Mark Graves
Hey everyone, Question / potential bug(s): I created the following to reproduce: https://bitbucket.org/MarkGraves/web2py_cas Basically, when I run that setup.sh, it sets up two apps and installs redis in virtual environments, copies in web2py, and replaces db.py with the one in the main

[web2py] Re: web2pyslices

2017-03-31 Thread Mark Graves
I'd be happy to convert it to something. I can write a quick scraper which would maintain whatever info is publicly available and upload it as static files to github or something. On Tuesday, March 21, 2017 at 2:53:16 PM UTC-5, Massimo Di Pierro wrote: > > web2pyslices is becoming hard to

[web2py] Re: How to architect a public facing data subset

2017-01-26 Thread Mark Graves
+1 for Leonel On Wednesday, January 25, 2017 at 7:51:49 PM UTC-6, Dave S wrote: > > > > On Wednesday, January 25, 2017 at 4:31:20 PM UTC-8, Leonel Câmara wrote: >> >> web2py permissions not enough? >> >> If not, I guess you could make 2 applications which had 2 different >> users/roles in the

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
gt;> ['', >> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip' >> , >> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', >> '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin' >

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Also, under each please list the output of: import os print os.environ['PYTHONPATH'] import sys print sys.path On Tue, Jan 3, 2017 at 3:58 AM, Mark Graves <mgrave...@gmail.com> wrote: > Wait wait, whats the output of > > which python > > On Tue, Jan 3, 2017 at 3:43 AM

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
Wait wait, whats the output of which python On Tue, Jan 3, 2017 at 3:43 AM, Mark Graves <mgrave...@gmail.com> wrote: > did you try the downloaded via zip version? > > On Mon, Jan 2, 2017 at 9:01 AM, lyn2py <lyn...@gmail.com> wrote: > >> Nope :) >> >>

Re: [web2py] Re: homebrew python not working with web2py

2017-01-03 Thread Mark Graves
did you try the downloaded via zip version? On Mon, Jan 2, 2017 at 9:01 AM, lyn2py <lyn...@gmail.com> wrote: > Nope :) > > On Monday, January 2, 2017 at 10:55:59 AM UTC+8, Mark Graves wrote: >> >> Is it in a virtual environment? >> >> -Mark >> &

Re: [web2py] Re: homebrew python not working with web2py

2017-01-01 Thread Mark Graves
. Both commands are on the same directory. > Secondly, I have tried git clone recursive in a brand new folder, but it's > still the same result. > > On Monday, January 2, 2017 at 9:51:55 AM UTC+8, Mark Graves wrote: >> >> potential quick fix before giving it thought: >>

Re: [web2py] Re: homebrew python not working with web2py

2017-01-01 Thread Mark Graves
at 9:02 AM, lyn2py <lyn...@gmail.com> wrote: > > > On Saturday, December 31, 2016 at 5:06:07 AM UTC+8, Mark Graves wrote: >> >> How did you install web2py? as a zip? via git? >> > > *git clone* > > >> Did you ever pip install gluon? &

[web2py] Re: Updating log on mobile device

2016-12-30 Thread Mark Graves
Or you could always use a websocket but that might be overkill On Thursday, December 29, 2016 at 1:48:06 PM UTC-6, Dave S wrote: > > > > On Thursday, December 29, 2016 at 6:25:09 AM UTC-8, Leonel Câmara wrote: >> >> I'm guessing the log entries have a created_on Field, you can >> periodically

[web2py] Re: auth groups and permission

2016-12-30 Thread Mark Graves
Depends on workflow, but Stefan was similar to what I was thinking. probably: auth.settings.create_user_groups = None Then after form submission, depending on workflow, algorithmically add the person to the group...eg. if form.vars.is_editor == True:

[web2py] Re: homebrew python not working with web2py

2016-12-30 Thread Mark Graves
How did you install web2py? as a zip? via git? Did you ever pip install gluon? Did you install web2py / python at different times? Can you try under each python version to do: import gluon.widget On Thursday, December 29, 2016 at 11:29:08 PM UTC-6, lyn2py wrote: > > I am not sure if this

[web2py] Re: Deploy with postgresql

2016-12-27 Thread Mark Graves
Hopefully this is solved, but a simple test is to use the original appconfig.ini with storage.sqlite as the connection string. That will tell you if it is a syntax problem, at least. -Mark On Monday, December 26, 2016 at 7:08:23 PM UTC-6, Ben Lawrence wrote: > > seems to be an appconfig

Re: [web2py] Re: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-22 Thread Mark Graves
That is truly strange. Seems to be a distinct confound. Greatly appreciated work. On Tue, Nov 22, 2016 at 7:27 AM, Anthony <abasta...@gmail.com> wrote: > On Tuesday, November 22, 2016 at 8:16:16 AM UTC-5, Mark Graves wrote: >> >> If I'm reading that correctly, doe

Re: [web2py] Re: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-22 Thread Mark Graves
, Anthony <abasta...@gmail.com> wrote: > On Monday, November 21, 2016 at 2:39:21 AM UTC-5, Mark Graves wrote: >> >> This is great news! Thank you for working on this, all of you. >> >> Any ability to check out the errors? >> > > Not that I know of. No

Re: [web2py] Re: web2py react-python

2016-11-21 Thread Mark Graves
One other thing that popped into my head after reading Anthony's points about search engine indexing would be permanent URI views (theoretically), whereas with pure JS apps often my experience has been less than thrilling with the routing capacities. On Mon, Nov 21, 2016 at 3:41 PM, Anthony

Re: [web2py] Re: web2py react-python

2016-11-21 Thread Mark Graves
Way better use case Leonel, thanks =) On Mon, Nov 21, 2016 at 3:44 AM, Leonel Câmara wrote: > José a use case may be for graceful degradation when clients don't have > javascript. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > -

[web2py] Re: 50x performance improvement for web2py in TechEmpower Web Framework Benchmarks

2016-11-20 Thread Mark Graves
This is great news! Thank you for working on this, all of you. Any ability to check out the errors? Would love to know what that was. On Saturday, November 19, 2016 at 2:16:18 PM UTC-6, Massimo Di Pierro wrote: > > Fantastic! Thank you Anthony, Michele, Simone, Richard, Paolo, Giovanni > and

Re: [web2py] web2py react-python

2016-11-20 Thread Mark Graves
nybody tell me one use case or explain when could this pyhon-react > setup make sense? > > Thanks > José L. > > 2016-11-20 10:25 GMT+01:00 Mark Graves <mgrave...@gmail.com>: > >> Hey everyone, >> >> I recently stumbled across this: >> >> https:

[web2py] web2py react-python

2016-11-20 Thread Mark Graves
Hey everyone, I recently stumbled across this: https://github.com/markfinger/python-react/issues/70#issuecomment-254396083 Just thought I'd share for anyone who was looking for something similar -Mark -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Redis Session Auth Issue

2016-08-10 Thread Mark Graves
I'm an idiot. Put session below auth. Ignore. On Wednesday, August 10, 2016 at 8:13:55 PM UTC-5, Mark Graves wrote: > > Hey everyone, > > Having trouble tracking down a bug, looking for a sanity check. > > Somehow, when I turn on redis sessions, auth is not getting updated f

[web2py] Redis Session Auth Issue

2016-08-10 Thread Mark Graves
Hey everyone, Having trouble tracking down a bug, looking for a sanity check. Somehow, when I turn on redis sessions, auth is not getting updated from the session. This behavior manifests itself as a 303 with functions that are decorated with @auth.requires. Basic Workflow: Ajax

[web2py] migrate uwsgi + nginx --> twisted

2016-06-08 Thread Mark Graves
Hey everyone, I am migrating an app from uwsgi + nginx to twisted. I've read the docs and can get it started on my local machine. Now, I'm putting it on a separate box. Does anyone have a service startup script that they would mind sharing? Otherwise, any recommendations for further reading?

[web2py] Re: Weird form issue

2016-06-06 Thread Mark Graves
Hey Jeff, Most likely the date/time format. If you can post a sample sqlite file and SQLGRID code, happy to help. -Mark On Monday, June 6, 2016 at 12:42:16 PM UTC-7, Jeff Riley wrote: > > Sorry quick update. Rows is returning information, so I must have a > problem with my javascript. I

Re: [web2py] Re: Weird form issue

2016-06-05 Thread Mark Graves
t. > > All my best. > > > On Sunday, June 5, 2016 at 6:14:35 PM UTC-5, Mark Graves wrote: > >> Hey Jeff, >> >> It looks like you created a sqlform expecting all fields, then the form >> was expecting all fields back, but you only used some of them in the view, >>

[web2py] Re: Weird form issue

2016-06-05 Thread Mark Graves
Hey Jeff, It looks like you created a sqlform expecting all fields, then the form was expecting all fields back, but you only used some of them in the view, so they were not processed. Specifically, the status field. You could either set the type of the field to hidden and include it or only

Re: [web2py] Re: web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-06-03 Thread Mark Graves
<abasta...@gmail.com> wrote: > On Friday, May 27, 2016 at 5:39:04 AM UTC-4, Mark Graves wrote: >> >> Thank Niphlod and Anthony. >> >> I agree. The technology is not quite mainstream enough to really rely on >> yet. >> > > About a month ago, it

[web2py] Re: Append fields within form, iteratively add fields inside form, List:string append, custom forms

2016-06-02 Thread Mark Graves
Hey Ron, This looks like an architectural issue to me. You have to maintain state somehow for the form2 vars. You can either do this via javascript on the client side, then have only one form server side, which has a dynamic set of fields. If i were to do it this way, I would use a javascript

Re: [web2py] Re: web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-27 Thread Mark Graves
0$ for basic cert for a production site > rather than using letsentcypt. > > > On Thursday, May 26, 2016 at 12:11:29 AM UTC+2, Mark Graves wrote: >> >> Has anyone used LetsEncrypt certificates or followed the instructions >> below with web2py? >> >> &

[web2py] web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-25 Thread Mark Graves
Has anyone used LetsEncrypt certificates or followed the instructions below with web2py? https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-14-04 https://www.nginx.com/blog/free-certificates-lets-encrypt-and-nginx/ What are your thoughts of the

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Ah! Of course. Thanks Anthony! I knew it was something dumb i did =) -Mark On Wed, Apr 6, 2016 at 11:35 AM, Anthony wrote: > table = db.auth_user >> fields = ['id','first_name'] >> fields.append('test_field_1') >> >> query = table.id > 0 >> >> row =

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
;:{"hello":False}, "second_bool":False} return response.json(profile) This returns the following JSON response: {"second_bool": false, "auth_fields": {"_extra": {"test_field_1": "T", "first_name": "Corinne&

Re: [web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Hey Anthony and Richard, Yes you are both correct. I am attempting to create a usable JSON object. The confounding details from what I can tell are: 1.) the offending method is defined in a model file, which returns a dictionary, which is then json serialized via

[web2py] auth_user extra fields + row.to_dict()

2016-04-06 Thread Mark Graves
Hey everyone, I saw a random bug in an app I'm working on, and I was wondering what the correct approach is. I have auth.settings.extra_fields["auth_user"] = [LIST_OF_FIELDS] later, I select that row and get it as a dict: row = db(db.auth_user.id == user_id).select().first().as_dict() then I

[web2py] Re: constraints

2016-02-28 Thread Mark Graves
db.define_table('table_1_name', Field('field_1_name','string')) db.define_table('table_2_name', Field('table_1_reference_field','reference table_1_name')) It looks like you defined the field as an integer field and then are attempting to redefine it as a reference field. -Mark On

Re: [web2py] Re: web2py on AWS

2016-01-24 Thread Mark Graves
Can you do ps -aux and see whether you can see rocket listening on port 80? -Mark On Mon, Jan 25, 2016 at 12:44 AM, Dave S <snidely@gmail.com> wrote: > > > On Saturday, January 23, 2016 at 12:58:25 PM UTC-8, Mark Graves wrote: >> >> Re reading your answer,

[web2py] Re: web2py on AWS

2016-01-23 Thread Mark Graves
Re reading your answer, check the access logs. See if rocket is getting overwhelmed by robots or other spam traffic. consider installing ip tables if thats the case or use nginx. -Mark On Saturday, January 23, 2016 at 1:46:56 AM UTC-6, Dave S wrote: > > I'm trying to set up a demo on an AWS

[web2py] Re: web2py on AWS

2016-01-23 Thread Mark Graves
Hey Dave, Any reason why you are choosing to use the rocket server and manual install? I usually use the scripts from github as follows: (configurable, but ubuntu is easiest) 1. Create new ubuntu micro box. 2. ssh into box 3. wget

Re: [web2py] Re: multiple auth instances for one app

2015-12-22 Thread Mark Graves
XkPjiojqTOIJ > > > On Saturday, December 19, 2015 at 4:03:45 AM UTC-5, Mark Graves wrote: >> >> Hey everyone. >> >> Interesting question here. >> >> Has anyone ever used two instances of auth in the same app, on two >> separate databases: >> >> e

Re: [web2py] Re: multiple auth instances for one app

2015-12-22 Thread Mark Graves
a reasonable use case for this. Tell us more. >> >> >> On Saturday, 19 December 2015 03:03:45 UTC-6, Mark Graves wrote: >>> >>> Hey everyone. >>> >>> Interesting question here. >>> >>> Has anyone ever used two instances of auth in

Re: [web2py] Re: multiple auth instances for one app

2015-12-21 Thread Mark Graves
015 03:03:45 UTC-6, Mark Graves wrote: >> >> Hey everyone. >> >> Interesting question here. >> >> Has anyone ever used two instances of auth in the same app, on two >> separate databases: >> >> eg. >> >> db1 = DAL() >> db2 = DAL(

[web2py] multiple auth instances for one app

2015-12-19 Thread Mark Graves
Hey everyone. Interesting question here. Has anyone ever used two instances of auth in the same app, on two separate databases: eg. db1 = DAL() db2 = DAL() auth1 = Auth(db1) auth2 = Auth(db2) Would that run into any thread safety issues? -Mark -- Resources: - http://web2py.com -

Re: [web2py] SELinux and web2py

2015-12-11 Thread Mark Graves
ect_r:etc_t /etc/passwd > > Sorry in french : > https://fr.wikipedia.org/wiki/SELinux > > I check english one and there where not this example... > > Then I don't know how you chage these exented attribute, there surely > other exented command for that > > :D > > Rich

Re: [web2py] SELinux and web2py

2015-12-10 Thread Mark Graves
Same permissions =( On Thu, Dec 10, 2015 at 7:05 PM, Mark Graves <mgrave...@gmail.com> wrote: > Its centos. I'll check that now. Its owned by apache > > On Thu, Dec 10, 2015 at 7:04 PM, Richard Vézina < > ml.richard.vez...@gmail.com> wrote: > >> with ubuntu

[web2py] SELinux and web2py

2015-12-10 Thread Mark Graves
Has anyone got any experience with selinux file permissions and web2py? Somehow my sessions are not writing for the admin app but they are for the welcome app... -Mark -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] SELinux and web2py

2015-12-10 Thread Mark Graves
na < > ml.richard.vez...@gmail.com> wrote: > >> Have you look to the welcome app user? >> >> ls -al >> >> Then >> >> chown -Rf same_welcome_app_user:same_welcome_app_user >> >> Richard >> >> On Thu, Dec 10, 2015 at 7:50

[web2py] aws s3 uploadfs

2015-12-09 Thread Mark Graves
Hey everyone, I've got an odd issue I've been experiencing. I uploaded about 10k files through the DAL into my local filesystem. Then, I s3synced them, and mounted the s3 to the uploadfs for the DAL field. The bucket and permissions for the keys and configuration works, because I accessed

[web2py] Re: aws s3 uploadfs

2015-12-09 Thread Mark Graves
Interesting update. I used the same code from the command line, it worked. Copied and pasted inside web2py, it stopped working with 403. On Wednesday, December 9, 2015 at 5:26:52 PM UTC-6, Mark Graves wrote: > > Hey everyone, > > I've got an odd issue I've been experiencing. &g

[web2py] Re: Embed pdf and file download

2015-11-28 Thread Mark Graves
I would personally use pdf.js. Does that meet your needs? -Mark On Thursday, November 26, 2015 at 3:01:50 PM UTC-6, Gael Princivalle wrote: > > Dear Leonel thanks a lot. > > I've tried also with stream without success. >

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-28 Thread Mark Graves
Still have not figured this out. Trying a different approach, but I suspect it was Massimo's hunch. If I locally upload the files without and uploadfs, then I s3sync the files up to my s3bucket and set the uploadfs to that bucket after, will web2py find them automatically? I know i could dig

Re: [web2py] Re: New Web2py Materialize CSS Welcome app scaffold

2015-11-28 Thread Mark Graves
wrote: > Good work Mark! > > Did you check if the SQLFORM and other web2py forms are still working > after disabling bootstrapcss? > > Thanks > > > On Friday, 13 November 2015 22:55:56 UTC+5, Mark Graves wrote: >> >> Hey everyone, >> >&

Re: [web2py] Re: Embed pdf and file download

2015-11-28 Thread Mark Graves
https://bitbucket.org/MarkGraves/web2py_pdf_view Here's a really basic example of pdf.js integration. Basically, all I did was drop in pdf.js and then return it as a stream via ajax. -Mark On Sat, Nov 28, 2015 at 2:50 PM, Gael Princivalle wrote: > Leonel, if you

[web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Mark Graves
Code available @ https://github.com/gravesmedical/migration Its just a series of scripts that gets run in the order they are in the scripts directory. -Mark On Sunday, November 22, 2015 at 8:58:05 PM UTC-6, Mark Graves wrote: > > Are there any caveats to know about running applic

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-25 Thread Mark Graves
d link which I store in the database >> to make my life easier. >> >> Anyone have any experience with that? >> >> On Mon, Nov 23, 2015 at 6:06 AM, Anthony <abasta...@gmail.com> wrote: >> >>> What does the code look like? Are you calling db.commit() at any point?

Re: [web2py] Re: web2py / pydal returning id 1 in postgres

2015-11-24 Thread Mark Graves
sta...@gmail.com> wrote: > What does the code look like? Are you calling db.commit() at any point? > > > On Sunday, November 22, 2015 at 9:58:05 PM UTC-5, Mark Graves wrote: >> >> Are there any caveats to know about running applications in shell mode >> (e.g. transaction

[web2py] web2py / pydal returning id 1 in postgres

2015-11-22 Thread Mark Graves
Are there any caveats to know about running applications in shell mode (e.g. transactions / returning id)? I'm running a middleware migration script to migrate someone off an old database to a new one. When I run a db.table.validate_and_insert() it keeps returning me id 1. This is yielding a

Re: [web2py] Re: Appconfig cast boolean

2015-11-19 Thread Mark Graves
I just tried to reproduce your error and could not. Judging from the error, are you sure you are passing in the string 'auth.create_user_groups' and not auth.create_user_groups as a variable? On Thu, Nov 19, 2015 at 9:32 PM, 黄祥 wrote: > tested it. return an

Re: [web2py] Re: Appconfig cast boolean

2015-11-19 Thread Mark Graves
st = lambda value: bool(int(value) ) ) > > but it returns an error when i set the value in privates/appconfig.ini > into 1 > > any idea? > > thanks n best regards, > stifan > > > On Friday, November 20, 2015 at 11:36:33 AM UTC+7, Mark Graves wrote: >> >&

Re: [web2py] Re: Appconfig cast boolean

2015-11-19 Thread Mark Graves
It appears that auth.settings.create_user_groups takes either False or the string that formats the user group creation message. So you'll need to provide a string format representation ie '%(id)s' as is shown in the error. However that won't convert to a boolean, so your cast function will fail.

Re: [web2py] Re: Appconfig cast boolean

2015-11-19 Thread Mark Graves
Also: auth.settings.create_user_groups = myconf.take('auth.create_user_groups', cast=lambda value: bool(int(value))) On Thu, Nov 19, 2015 at 10:53 PM, Mark Graves <mgrave...@gmail.com> wrote: > Can you reproduce this error in a fresh welcome app? > > Then you can send ju

Re: [web2py] New Web2py Materialize CSS Welcome app scaffold

2015-11-13 Thread Mark Graves
chard > > On Fri, Nov 13, 2015 at 12:55 PM, Mark Graves <mgrave...@gmail.com> wrote: > >> Hey everyone, >> >> I just put up a new web2py welcome scaffold app based on materializecss. >> >> The repository is available at: >> >&

[web2py] New Web2py Materialize CSS Welcome app scaffold

2015-11-13 Thread Mark Graves
Hey everyone, I just put up a new web2py welcome scaffold app based on materializecss. The repository is available at: https://bitbucket.org/MarkGraves/welcome_materialize/ You can preview it at: https://gravesmedical.pythonanywhere.com/welcome/ There are definitely some issues, but I

Re: [web2py] Re: Web2py / Pydal Time Fields

2015-11-11 Thread Mark Graves
What about changing the format specification to allow for the format so you could still have the time there. The only problem I thought I saw is that stripping off ms is built into a number of pydal adapters (I think -- might be wrong) With that, it would in theory allow backward compatibility

Re: [web2py] Web2py / Pydal Time Fields

2015-11-10 Thread Mark Graves
No, thankfully everything was done in one timezone =) On Tue, Nov 10, 2015 at 8:53 AM, Manuele Pesenti <manuele.pese...@gmail.com> wrote: > Il 10/11/15 10:39, Mark Graves ha scritto: > > I ended up converting to Decimal and then working from there. > ok, not so far from my app

Re: [web2py] Web2py / Pydal Time Fields

2015-11-10 Thread Mark Graves
I ended up converting to Decimal and then working from there. On Tue, Nov 10, 2015 at 1:18 AM, Manuele Pesenti <manuele.pese...@gmail.com> wrote: > Il 05/11/15 06:53, Mark Graves ha scritto: > > Hey everyone, > > > > I find myself in the need for microsecond level pr

[web2py] Web2py / Pydal Time Fields

2015-11-04 Thread Mark Graves
Hey everyone, I find myself in the need for microsecond level precision for time fields where I am querying over those fields regularly. As I dug into pydal and web2py's internals, I noticed that it seems to be convention that times are truncated to H:M:S I'm aware I can easily store as a

[web2py] Re: Web2py celery plugin

2015-10-04 Thread Mark Graves
Luis, I've never personally used celery to queue tasks to execute in a web2py environment. I found myself in a similar situation recently and just used a cron task running a python script in the web2py environment from the command line. Is there a particular reason this workflow would not

Re: [web2py] Re: Web2py celery plugin

2015-10-04 Thread Mark Graves
er. > > Your approach sounds really nice, but exactly how you run a cron task > inside web2py environment? you start the web2py client with the console > option and there execute the task? may you give me an example of this? > > > El domingo, 4 de octubre de 2015, 8:31:20 (

Re: [web2py] Re: storing blob field on s3

2015-09-07 Thread Mark Graves
pip install fs > > Then on model: > > import fs.s3fs > myfs = fs.s3fs.S3FS(bucket, prefix, aws_access_key, aws_secret_key) > db.define_table('image',Field('image','upload',uploadfs = myfs)) > > which is what you suggest basically. Should work our of the box. > > >

[web2py] storing blob field on s3

2015-09-06 Thread Mark Graves
Hey everyone, Quick question. Is there a quick workaround for storing a blob db field on s3? Would it work to set uploadfs = S3FS(bucket)? Or would I have to change it to an upload type field and then set the uploadfs for the uploadfield? -Mark -- Resources: - http://web2py.com -

[web2py] 2 New NoSQL database adapters

2015-08-14 Thread Mark Graves
Hey everyone, I have two new databases that I've been toying with that I'd like to implement as database adapters. I have written nothing yet web2py / pydal specific...all just python. I was looking around for info on constructing and contributing new adapters. Is there a best practices guide

Re: [web2py] Re: Appconfig cast boolean

2015-08-13 Thread Mark Graves
Set migrate = (Empty string) = False On Aug 13, 2015, at 8:58 AM, ermolaev.icrea...@gmail.com wrote: I talk about it! If in .ini file: migrate = False it conderted to string too and is True in python code! понедельник, 3 августа 2015 г., 3:51:52 UTC+3 пользователь Mark Graves

[web2py] Re: Appconfig cast boolean

2015-08-09 Thread Mark Graves
, Mark Graves wrote: Should've thought of that. Nice to confirm intended behavior. I guess I could have done bool(mc) = myconf.take('db.migrate',cast = int) On Monday, August 3, 2015 at 6:22:09 AM UTC-5, Anthony wrote: Therefore: mc = myconf.take('db.migrate',cast=lambda value: bool(int(value

Re: [web2py] can web2py be used as a static website generator?

2015-08-07 Thread Mark Graves
Hello, I realize this is a bit of an old thread, but I figured I'd post an answer anyway as I came up with this same problem recently. For development, sometimes I create static sites before I get into the dynamic interaction. I handled this case with a simple routes.py in the web2py folder

[web2py] Re: Appconfig cast boolean

2015-08-03 Thread Mark Graves
Should've thought of that. Nice to confirm intended behavior. I guess I could have done bool(mc) = myconf.take('db.migrate',cast = int) On Monday, August 3, 2015 at 6:22:09 AM UTC-5, Anthony wrote: Therefore: mc = myconf.take('db.migrate',cast=lambda value: bool(int(value))) Anthony On

[web2py] Appconfig cast boolean

2015-08-02 Thread Mark Graves
What is the proper syntax for appconfig.ini if the cast is a boolean. With a fresh install of web2py source, appconfig.ini contents: ; App configuration ; db configuration [db] uri = sqlite://storage.sqlite migrate = 0 pool_size = 1 ; smtp address and credentials [smtp]

[web2py] Re: Docker Based Work Flow -- Web2py Needs Something Like This

2015-07-20 Thread Mark Graves
Anyone who is interested in getting this up and running, please email me privately and we can talk. On Wednesday, May 20, 2015 at 8:03:14 PM UTC-5, jjs0sbw wrote: https://opbeat.com/ -- Joe Simpson “Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt

[web2py] Re: list:reference with SQLFORM.grid

2015-05-24 Thread Mark Graves
I seem to be having the same problem. On Sunday, May 24, 2015 at 6:58:26 PM UTC-5, villas wrote: Hi All, Can someone see what the problem is please? db.define_table('tag', Field('name')) db.define_table('test',Field('name'),Field('tags','list:reference tag')) def test():

[web2py] Caching Architecture Question

2015-04-25 Thread Mark Graves
Hey everyone, Question on cacheing app architecture. I have some selects I would like to cache for speedup, specifically in redis, but on a more abstract level, I have a question. I have modularized most of my functions so I can efficiently iterate the application, and can unit test

[web2py] Re: database chema recommendations needed

2015-04-25 Thread Mark Graves
Hey John, Welcome to the community. I'm not sure I understand your requirements exactly, but here is my thoughts on a schema: For the initial MVP, I usually like to keep the amount of tables to a minimum, then as I figure out the common queries I can separate them out into multiple tables.

[web2py] Re: database chema recommendations needed

2015-04-25 Thread Mark Graves
One more thing, if you are worried about the speed, you can always cache the results in memory. On Tuesday, April 21, 2015 at 10:05:32 AM UTC-5, John wrote: New to programming and web2py. Been dabbling in web design for a while, building sites with wordpress, plugging things in. My first

[web2py] AWS S3 SSLv3 Deprecation

2015-04-15 Thread Mark Graves
Hey everyone, I realize this is more of a server administration question than web2py in specific, but I want to make sure I cover all my bases, I recently received an email from AWS about their deprecation of SSLv3 in connecting to S3. I have an app deployed behind nginx, but the only ssl

Re: [web2py] Re: AWS S3 SSLv3 Deprecation

2015-04-15 Thread Mark Graves
Thank you! Mark Graves On Apr 15, 2015, at 5:42 PM, Niphlod niph...@gmail.com wrote: the problem would arise only if you connect to S3 to fetch whatever is stored there AND you use a library that allows ONLY SSLv3. Since most of python modules manage other https algorithms without issues

Re: [web2py] Re: Thread safety and importing db, response, session

2015-04-09 Thread Mark Graves
Thanks Anthony, Sorry, I was a bit delirious writing that =) -Mark On Thu, Apr 9, 2015 at 6:47 AM, Anthony abasta...@gmail.com wrote: Sure, that's how Auth and Crud work. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Thread safety and importing db, response, session

2015-04-08 Thread Mark Graves
: in a controller: from applications.MY_APPLICATION_NAME.modules.SOME_MODULE_NAME import foo x = foo(db,argument) ? On Monday, December 15, 2014 at 3:26:15 PM UTC-6, Anthony wrote: Yes, that should do it. Anthony On Monday, December 15, 2014 3:35:01 PM UTC-5, Mark Graves wrote: Thanks Anthony

[web2py] py.test database issues

2015-03-03 Thread Mark Graves
I've been encountering some strange issues that I have never seen before. I'm running some a complete regression suite on an application. It's pretty long running, in the current iteration. (over 400 seconds). This includes a number of browser automation tasks using python and selenium. For

Re: [web2py] Re: py.test database issues

2015-03-03 Thread Mark Graves
. On Tuesday, 3 March 2015 09:21:46 UTC-6, Mark Graves wrote: I've been encountering some strange issues that I have never seen before. I'm running some a complete regression suite on an application. It's pretty long running, in the current iteration. (over 400 seconds). This includes a number

Re: [web2py] Re: Testing and web2py - especially appadmin

2015-02-19 Thread Mark Graves
You may also consider pytest bdd. Its a pytest plugin that brings in BDD gherkin syntax and executable specifications. A nice complement/alternative to behave. On Thursday, February 19, 2015 at 9:29:19 AM UTC-6, Richard wrote: Thanks! You maybe right about TDD being less applicable web

[web2py] Re: Testing and web2py - especially appadmin

2015-02-16 Thread Mark Graves
James, Thank you for bringing up this very important issue. I have been setting up a continuous integration environment using open source software (Jenkins) as well as some tutorials, in the manner of the ruby koans package. If you're interested, there are 3 repos right now (They are very

[web2py] Re: Thread safety and importing db, response, session

2014-12-15 Thread Mark Graves
15, 2014 9:23:42 AM UTC-6, Anthony wrote: You can also just import current in the module and then refer to it directly within your function (i.e., no need to pass current as an argument to the function). Anthony On Sunday, December 14, 2014 11:07:48 PM UTC-5, Mark Graves wrote: Right, I

[web2py] Thread safety and importing db, response, session

2014-12-14 Thread Mark Graves
Hey everyone, I could use a sanity check here from the community. In a controller I get a record, then, I want to pass do some database calls from a module. It seems that the least code I could write would be in models: from gluon import current current.db = db Then in the module at the top

[web2py] Re: Thread safety and importing db, response, session

2014-12-14 Thread Mark Graves
://www.web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules You cannot assign the thread local object to a top-level variable in the module, as it will only be assigned once upon first import. Anthony On Sunday, December 14, 2014 7:32:29 PM UTC-5, Mark Graves wrote: Hey

[web2py] Re: Returning a token for Android app authentication

2014-10-10 Thread Mark Graves
Did you ever finish this? I implemented something similar. I'd love to collaborate and get a repo up for working with mobile devices with web2py as an app back end. On Sunday, January 6, 2013 11:43:05 AM UTC-6, dlypka wrote: If you mimic the same http traffic that a browser would generate,

Re: [web2py] Re: SQLFORM uploads with uploadfs and Amazon S3

2014-10-08 Thread Mark Graves
That is precisely what I was envisioning. Perhaps this is a better discussion for the developer group? On Tue, Oct 7, 2014 at 12:29 PM, Leonel Câmara leonelcam...@gmail.com wrote: I think Mark has a point. The way Set.delete_uploaded_files is defined right now forces you to implement a

Re: [web2py] Re: SQLFORM uploads with uploadfs and Amazon S3

2014-10-07 Thread Mark Graves
massimo.dipie...@gmail.com wrote: you say it is not removing. Do you expect it to delete the files? On Friday, 3 October 2014 16:31:28 UTC-5, Mark Graves wrote: Hey Everyone, Does anyone have experience using SQLFORM with Amazon S3 for upload fields? My standard SQLFORM(db.table,record

[web2py] SQLFORM uploads with uploadfs and Amazon S3

2014-10-03 Thread Mark Graves
Hey Everyone, Does anyone have experience using SQLFORM with Amazon S3 for upload fields? My standard SQLFORM(db.table,record) is not removing the S3 object for the uploaded file. It is properly uploading the file and getting the obfuscated filename. Is there another argument I'm missing or

[web2py] Seeking Experienced web2py Functional Tester

2014-08-13 Thread Mark Graves
Hey everyone! We are looking for a functional test script to be written for a web2py application for a small fee. We will provide a test environment, user access control list, list of URL's, expected results, and actual results. Results are behavioral in nature and will include modals. We

[web2py] AJAX and sessions

2014-06-21 Thread Mark Graves
Hey Everyone, I have a question about session.forget(response) I've got an application to filter an inventory across multiple categories. Each filter works independently, however, one appears buggy. It sends data on keyup. As long as this data is entered in slow enough, the filters update

  1   2   >