[web2py] New simple application is empty

2019-08-22 Thread pbreit
I tried a "New simple application" and it created the app but the new apps' directory is empty except for "cron" and "process.log". Same for new app wizard. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] invalid function every other page view

2019-08-15 Thread pbreit
Weird situation where I just created a new app from admin and have the simplest app. When a visit the page and continue to refresh, on about every other refresh I get "invalid function". I don't think I'm on any sort of round robin, load balancing. It's very strange. I've reloaded routes, reboo

[web2py] Re: Write a payment gateway for web2py

2019-05-27 Thread pbreit
Does the payment service provide any public documentation? Does this help? https://pycryptodome.readthedocs.io/en/latest/src/cipher/des3.html -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web

[web2py] Re: $50 take a bootstrap and create a web2py app. Anyone interested?

2019-01-19 Thread pbreit
You might have a look at: https://github.com/mdipierro/web2py-appliances/tree/master/ImageGallery https://github.com/mdipierro/web2py-appliances/tree/master/VideoLibrary On Tuesday, January 15, 2019 at 1:21:46 PM UTC-8, Ron Chatterjee wrote: > > I haven't used the app for long time. To get going f

[web2py] Re: Help with deploy with nginx and ubuntu 18.04

2018-12-09 Thread pbreit
I did a clean install today with "fab -H root@#.#.#.# install_web2py" and it installed OK except SSL is not working (spins indefinitely when I try to reach https://34.222.129.121/admin). This is a fresh 18.04 install on Amazon Lightsail. -- Resources: - http://web2py.com - http://web2py.com/bo

[web2py] Re: What are you use with web2py.

2018-11-12 Thread pbreit
The fabfile should work. Do you know what the issue is? I did not see anything here or github about a problem. -- 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)

[web2py] Re: Implementing a chat room?

2018-11-07 Thread pbreit
Have a look at: https://github.com/web2py/web2py/blob/master/gluon/contrib/websocket_messaging.py -- 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 rece

[web2py] Re: web2py 2.17.1

2018-08-24 Thread pbreit
I'm still not sure how to upgrade a git installation. git pull git submodule update --recursive git pull --recurse-submodules ? Maybe that could be added to: https://github.com/web2py/web2py/blob/master/README.markdown -- Resources: - http://web2py.com - http://web2py.com/book (Documentation)

[web2py] Re: update multiple tables from one csv and get row id after update_or_insert

2018-07-31 Thread pbreit
I know db.thing.insert will return the ID of the newly created record and am pretty sure update_or_insert does as well. I'm not exactly sure how you would determine if an update or insert was performed (but perhaps you do not need to know?). http://web2py.com/books/default/chapter/29/06/the-dat

[web2py] Re: Sum/Total of the column values in SQLFROM.grid?

2018-07-25 Thread pbreit
How about JavaScript? https://www.oreilly.com/library/view/javascript-cookbook/9781449390211/ch04s07.html -- 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) ---

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread pbreit
...or Anthony! Thanks, that's good info and reassuring. Safe to assume little/no downside to always double-quoting? -- 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 I

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-25 Thread pbreit
I feel like I've heard before that we no longer need to worry about reserved words which would be awesome. I'm going to try that on my projects and see if I run into any issues. Is this something that Massimo or Giovanni could confirm? -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Dealing with reserved keywords when you change or upgrade your database from SQLite to POSTGRES

2018-07-24 Thread pbreit
Apparently if you are going to use "rname" you may need to surround the column name with single and double quotes which will send the double-quotes to the DB: Field('state', rname='"state"') As an aside, it always seemed to me that a DB access library would be able to be structured in such a w

[web2py] Re: Help a noob - I have run script setup-web2py-nginx-uwsgi-ubuntu.sh, now what?

2018-07-08 Thread pbreit
If you try to access your server in a browser by its numbered IP address (for example: 123.45.67.89) you should see the web2py "Welcome" app. I believe that script sets up an admin user so you can access admin at "https://123.45.67.89/admin"; (with YOUR IP address). On Saturday, July 7, 2018

[web2py] Re: dependencies inside 'static' folder

2018-06-28 Thread pbreit
Anthony, et al, with this question and the other similar one in regards to Vue it seems like we need a solid, standard way to implement client-side JavaScript libraries. Are the options pretty much: 1) routes.py and 2) relative URLs? And then where to store the library (ie, in /static or use a

[web2py] Re: How to empty a list after a loop iteration

2018-05-07 Thread pbreit
I'm not sure that's going to work since the list will not persist between page views. Do you want to do something like this using "sessions"? http://web2py.com/books/default/chapter/29/03/overview#Let-s-count -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://g

[web2py] Re: Unable to override Bootstrap in layout.html

2018-05-04 Thread pbreit
I wasn't able to make color work either but background-color did seem to work. Maybe there's a transparency going on or something. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/

[web2py] Re: Unable to override Bootstrap in layout.html

2018-05-03 Thread pbreit
I think the property you want is background-color -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to

[web2py] Re: "Installed applications" list now missing my applications

2018-05-03 Thread pbreit
How are you creating your new apps? How do you start Web2py? The only thing I can think of is that maybe you have a 2nd copy of web2py somewhere? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/

Re: [web2py] Re: How to iterate through column items and display its rows data

2018-05-01 Thread pbreit
I am very sorry, I need to be more careful with my replies. I wasn't sure if random needed to be imported but it looks like it does. So: import random rows = db(db.person.id>0).select() random_number = random.randrange(0, len(rows)) row = rows[random_number] return row -- Resources: - http://

Re: [web2py] Re: How to iterate through column items and display its rows data

2018-04-30 Thread pbreit
Very sorry. Try: random_number = random.randrange(0, len(rows)) On Monday, April 30, 2018 at 8:03:45 PM UTC-7, Maurice Waka wrote: > > I get this error : AttributeError: 'Rows' object has no attribute 'count' > > On Mon, 30 Apr 2018, 22:10 pbreit > > wr

[web2py] Re: VIEW NAME NOT ID

2018-04-30 Thread pbreit
Are you trying to do something like this? http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Grouping-and-counting -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/

[web2py] Re: How to iterate through column items and display its rows data

2018-04-30 Thread pbreit
I would think something like: rows = db(db.person.id>0).select() random_number = random.randrange(0, rows.count()) row = rows[random_number] return row -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google

[web2py] Re: Django to web2py

2018-04-26 Thread pbreit
Probably this is going to involve a lot of manual programming effort by you. While there are similarities between Web2py & Django and they are both python, the way you would program an app is different enough to require re-thinking and re-coding a number of things. Perhaps start with the models

Re: [web2py] Multiple domains nginx/uwsgi?

2018-04-23 Thread pbreit
I was thinking something like that. I occasionally run across the uwsgi "vassals" thing and was wondering if I should be doing that. Just started using Lets Encrypt (with Digital Ocean HowTo) which seems to be working OK. Will see upon renewal. Thx. -- Resources: - http://web2py.com - http://w

[web2py] Multiple domains nginx/uwsgi?

2018-04-23 Thread pbreit
What's the current advice on running multiple domains on one server having setup with this script: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: Problem: Sum total price and total quantity of a product

2018-04-20 Thread pbreit
Something like this? http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#sum--avg--min--max-and-len sum = db(db.product.type=='large').select(sum).first()[sum] count = db(db.product.type=='large').count() On Friday, April 20, 2018 at 12:35:22 PM UTC-7, Ayron Rangel

[web2py] Reverse relationships

2018-04-11 Thread pbreit
It's interesting that Rails & Django have a reverse relationship concept but Web2py apparently does not. Whenever I run into this in the various Rails/Django tutorials I don't understand it and find it confusing. Is that another instance where Massimo spared us from unnecessary complexity? --

[web2py] Re: Decrypt password from auth_user

2018-04-07 Thread pbreit
You don't need to show the "correct" number of s. No one else does so there will not be any confusion. -- 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) ---

[web2py] Re: Decrypt password from auth_user

2018-04-06 Thread pbreit
You cannot. Passwords are actually one-way hashed, not encrypted. This is by design so that the password can never be figure out even if your database and code are compromised. What happens is that the password the user enters is hashed in the same way and the result is compared to what is in t

[web2py] Re: Remove request_reset_password from Auth navmenu

2018-03-22 Thread pbreit
Delete this line in your application: https://github.com/web2py/web2py/blob/master/applications/welcome/views/layout.html#L79 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (

Re: [web2py] Re: Using vue.js as my front end

2018-03-14 Thread pbreit
You might also check: https://github.com/web2py/scaffold -- 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 subscri

Re: [web2py] Re: please help us test trunk web2py

2018-03-02 Thread pbreit
Thanks. I've already cloned. But remained confused how to update correctly. Normally I would just "git pull" but am not sure if I need to do something else to make sure DAL updated, too. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Re: please help us test trunk web2py

2018-02-26 Thread pbreit
Could someone please confirm for me if I can just do a "git pull" or do I need to do something else to make sure I also get latest DAL? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/is

Re: [web2py] Re: code written by Massimo Di Pierro in the web2py video tutorial

2018-02-11 Thread pbreit
I think some of the code may be at Github: https://github.com/mdipierro/web2py-appliances https://github.com/mdipierro/web2py-recipes-source/tree/master/apps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.g

[web2py] Re: web2py IDE

2018-01-24 Thread pbreit
If you just need code formatting/coloring a decent text editor works well enough: VS Code, Atom, Bracket Keep it simple. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Rep

[web2py] Re: manage web2py app

2017-12-14 Thread pbreit
I've just started using the included Fabric fab file (Ubuntu on Digital Ocean & Vultr) which seems to be working well both for initial setup and ongoing deploys. I'd be hesitant to put a repo in Dropbox because I wouldn't want to risk my repo being accidentally modified. Bitbucket offers unlim

Re: [web2py] Re: Web2Py + VueJS SPA (Webpack)

2017-12-07 Thread pbreit
Wouldn't this be just a matter of supplying a "welcome-spa" welcome app/starter with REST "on" and Vue-based (or whatever) views? This doesn't require any changes to core Web2py, does it? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2p

[web2py] Re: About Restful with web2py

2017-12-06 Thread pbreit
What you are doing is different from what the guide shows. If you just want to GET the entries: curl http://127.0.0.1:8000/RT/default/api/entries.json If you want to POST/add a new entry you may need to have authentication: curl --user user:pass -d "f_entry=something" http://127.0.0.1:

Re: [web2py] Re: Web2Py + VueJS SPA (Webpack)

2017-12-06 Thread pbreit
How would the "Browser" install method work? Just a matter of adding those lines to layout.html? Possible to implement this without all the build tools? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.goog

[web2py] Re: Registration & Login through Google

2017-11-17 Thread pbreit
Yep, I will report back my findings. Google authentication has become exceedingly widespread in the business SaaS world. It makes it so much easier for IT admins to control access to tools employees use. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Registration & Login through Google

2017-11-16 Thread pbreit
For Google authentication I don't need Janrain, right? Do I just do an Oauth2 implementation? Is this fairly straightforward? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Legacy table with reserved keyword in column name

2017-10-30 Thread pbreit
Book says check_reserved defaults to None but "welcome" app specifies "all": https://github.com/web2py/web2py/blob/master/applications/welcome/models/db.py#L34 Can I safely switch that to None or ['']? Doesn't/Couldn't the DAL escape everything so this would not ever be an issue? -- Resourc

[web2py] Re: Django guys get a job easily. Why don't web2py guys get a job? How to get a job?

2017-10-24 Thread pbreit
I'd recommend everyone here to at least go through the Django tutorial to at least see how Django does things. -- 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)

[web2py] Re: How can I run multiple applications with multiple domains on nginx?

2017-10-12 Thread pbreit
Is this the best way to set up multiple domains on one server with Nginx or better to set up nginx "sites-available" etc configs? On Saturday, March 23, 2013 at 3:01:38 AM UTC-7, peter wrote: > > Sorry about replying late Tito. I struggled with your problem for quite a > while, and here is a so

[web2py] Re: update_or_insert -- I end up with duplicates

2017-10-08 Thread pbreit
I'm surprised this would be a problem unless you have a very high traffic service or there's something else going on with your code. If it really is a problem, another option you could consider is a new column with enforced uniqueness that stores some sort of mashup of the two fields ( as simpl

Re: [web2py] Re: web2py 2.15.4 is OUT

2017-09-08 Thread pbreit
I don't understand. If I have Web2py installed on my Mac from git clone --recursive https://github.com/web2py/web2py.git What is the proper way to upgrade web2py? Can I do just git pull or do I need to do something like git pull --recurse-submodules ? -- Resources: - http://web2py.com - htt

[web2py] Re: web2py 2.15.4 is OUT

2017-09-07 Thread pbreit
To update can i just do a `git pull` or do I need to do something like `git pull --recurse-submodules` -- 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) --- Yo

[web2py] Re: how to save controller vars into a field?

2017-09-07 Thread pbreit
Are you trying to store the URL of the page the user is currently on? I think you just want to store the URL. There's not just one variable as far as I could tell. So you might have to build it like: bookmark = "%s://%s%s" % (request.env.wsgi_url_scheme, request.env. remote_addr, request.env.req

[web2py] Re: web2py deployment strategies

2017-07-21 Thread pbreit
There are lots of easy ways to optimize for scaling up. Spend your energy on end user functionality until you run into issues. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Web2py like clone in Java?

2017-07-13 Thread pbreit
Check out https://grails.org/ -- 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] Re: Grails for web2py - anyone interested ?

2017-07-13 Thread pbreit
I'm curious what ever happened to this effort? Personally I much prefer the CLI-less approach of web2py. I would much rather just create a file here and there or add a function in a controller file. You get your default view automatically and then can add a view file when appropriate. But I wa

[web2py] Re: How do I get reply from default.py after calling request from ajax

2017-06-15 Thread pbreit
First, I'd advise against doing this, at least initially. Take what Web2py gives you for free and concentrate on your app. 2nd, web2py URLs do not end in ".html" 3rd, i think you would use this for login: http://web2py.com/books/default/chapter/29/09/access-control#Manual-Authentication On T

[web2py] Re: email not sent

2017-05-16 Thread pbreit
Is there some reason you are not setting "sender"? You might need to do this: https://support.google.com/accounts/answer/6010255 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

[web2py] Re: Newbie to Web2Py...Integration with Bootstrap3...PyCharm How-To's

2017-05-16 Thread pbreit
If you're looking to prototype rapidly, forget all that stuff and just build something in a text editor (ie Atom) with the pre-installed Bootstrap. Don't over-complicate it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] Re: Use reserved Keyword 'response'

2017-05-12 Thread pbreit
You can return a strong: return res but if you return a dict, it would need to be: return dict(res=res) -- 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) ---

[web2py] Re: Need help with student attendance app

2017-05-06 Thread pbreit
I think you're on the right track. It's a personal thing but I like defining my tables in the singular (ie, class, student, attendence). As Donald indicated, your current model is best suited for each student only being in one class (which is fine for elementary school). It would work for stude

[web2py] Box: Python dictionaries with recursive dot notation access

2017-05-05 Thread pbreit
https://github.com/cdgriffith/Box -- 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 Group

Re: [web2py] Re: table already exists; 'Rows' object has no attribute 'fields'

2017-04-22 Thread pbreit
I reinstalled Mac OS Sierra which appears to have fixed the problems. -- 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 yo

Re: [web2py] Re: table already exists; 'Rows' object has no attribute 'fields'

2017-04-21 Thread pbreit
I'm still experiencing both problems. I cloned web2py from scratch with: git clone --recursive https://github.com/web2py/web2py.git I added my fairly basic table models into models.py. When i run for the very first time I get: OperationalError: table "auth_user" already exists In /appadmin j

[web2py] Re: table already exists; 'Rows' object has no attribute 'fields'

2017-04-18 Thread pbreit
models were in the regular models.py file On Monday, April 17, 2017 at 4:18:26 PM UTC-7, Dave S wrote: > > > > On Monday, April 17, 2017 at 3:58:38 PM UTC-7, pbreit wrote: >> >> Sqlite. These are fresh installs with just a table defined and no other >> edits. >&g

[web2py] Re: table already exists; 'Rows' object has no attribute 'fields'

2017-04-17 Thread pbreit
09 PM UTC-7, Dave S wrote: > > On Sunday, April 16, 2017 at 12:31:04 AM UTC-7, pbreit wrote: >> >> I'm a long time web2py user running into some problems I haven't seen >> before and cannot resolve. >> >> First, I am getting this error a lot even

[web2py] table already exists; 'Rows' object has no attribute 'fields'

2017-04-16 Thread pbreit
I'm a long time web2py user running into some problems I haven't seen before and cannot resolve. First, I am getting this error a lot even when I create a brand new project from scratch: OperationalError: table "auth_user" already exists Another error I am getting consistently is: AttributeE

Re: [web2py] Re: web2py and python3

2017-04-15 Thread pbreit
I love web2py but am excited to hear about your next framework. When do you think we might see a functional/preview? will it be recognizable to web2py users are a big departure? What are you thinking for the front-end, template/views like web2py or something more JavaScript like React/Vue? --

[web2py] Best way to start new project?

2016-10-18 Thread pbreit
What's the best way to start a new project? I'd specifically like something as plain as possible. There are at least 3 "official" options: copy/past welcome, new simple app in admin, new app wizard in admin. Are there any "starters" on github or anything that people recommend? -- Resources: -

[web2py] Re: web2py + cordova + APIs

2016-10-15 Thread pbreit
Interesting. I'm getting a "Config file not found" ("private/appconfig.ini" missing). -- 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 m

[web2py] Re: vue.js

2016-10-03 Thread pbreit
Massimo has already provided us with an immense treasure but I've always been curious what a Massimo-designed JavaScript framework would look like! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com

Re: [web2py] Re: Fresh install, getting error: table "auth_user" already exists

2016-09-30 Thread pbreit
. On Thursday, September 29, 2016 at 8:35:27 AM UTC-7, Richard wrote: > > Check files owner, should be www-data recursively if you are in prod under > ubuntu... > > On Thu, Sep 29, 2016 at 1:33 AM, pbreit > > wrote: > >> Appears to be a permissions issue as it go

[web2py] Re: Fresh install, getting error: table "auth_user" already exists

2016-09-28 Thread pbreit
Appears to be a permissions issue as it goes away if I start web2py with sudo. On Wednesday, September 28, 2016 at 10:15:18 PM UTC-7, pbreit wrote: > > Weird. I keep getting auth_user already exists errors. I cloned a fresh > web2py from Github (with the --recursive flag), added a &q

[web2py] Fresh install, getting error: table "auth_user" already exists

2016-09-28 Thread pbreit
Weird. I keep getting auth_user already exists errors. I cloned a fresh web2py from Github (with the --recursive flag), added a "New simple application" and upon the very first access of the new app I get that error. I guess what is happening is it creates "sql.log" file in /databases and then

[web2py] Re: Translation best practice

2016-09-19 Thread pbreit
Should be easy to spot a missing ' with any syntax hiliter. On Monday, September 19, 2016 at 2:42:31 PM UTC-7, icodk wrote: > > Thanks This is of corse an option. The problem with sending such a file > is that the translator could forget a ' and this will cause some problems. > I was hoping fo

[web2py] Re: Translation best practice

2016-09-18 Thread pbreit
The English strings get added to the files in the "Languages" directory and so you should just be able to give your translator the appropriate file from that directory. Spanish, for example: 'Clear RAM': 'Limpiar RAM', 'Click on the link %(link)s to reset your password': 'Pulse en el enlace %(

[web2py] Turbolinks?

2016-09-12 Thread pbreit
Does Python or Web2py have anything like Turbolinks? Has anyone used anything like https://github.com/Easyfood/pageAccelerator or http://instantclick.io with web2py with any success? Good idea? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py

[web2py] Re: Problem installing in Macbook

2016-08-28 Thread pbreit
Are you running these commands from the command line: http://web2py.com/books/default/chapter/29/04/the-core#Command-line-options -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/

[web2py] Re: Can gluon.contrib.populate work with self reference?

2016-08-22 Thread pbreit
Well, just removing the db.commit() made it work as well except that it doesn't populate the self referencing field. if db(db.comment).count()<2: populate(db.comment, 30) On Monday, August 22, 2016 at 9:09:45 PM UTC-7, pbreit wrote: > > I fixed by specifying: > > if

[web2py] Re: Can gluon.contrib.populate work with self reference?

2016-08-22 Thread pbreit
I fixed by specifying: if db(db.comment).count()<2: import random for i in range(1,20): populate(db.comment, 1, contents={'parent_comment': i}) db.commit() On Monday, August 22, 2016 at 8:47:48 PM UTC-7, pbreit wrote: > > Trying to populate: > >

[web2py] Can gluon.contrib.populate work with self reference?

2016-08-22 Thread pbreit
Trying to populate: db.define_table('comment', Field('post_id', 'reference post'), Field('parent_comment', 'reference comment'), Field('body', 'text', requires=IS_NOT_EMPTY()), Field('votes', 'integer'), auth.signature) with: if db(db.comment).count()<2: populate(db.comm

[web2py] Re: NameError: name 'category' is not defined (reddit clone application)

2016-08-22 Thread pbreit
The paging includes references to "category" except when viewing posts by author, there is no category. A quick fix would be to skip the paging when listing by author: {{if request.function!='list_posts_by_author':}} {{if page>0:}} {{=A('previous', _class='btn', _href=URL(args=(category.name, pa

[web2py] Re: IMPORTANT - WEB2PY CONSULTING

2016-08-22 Thread pbreit
A quick fix is to remove the paging links for the function " list_posts_by_author" at the bottom since they are using category: {{if request.function!='list_posts_by_author':}} {{if page>0:}} {{=A('previous', _class='btn', _href=URL(args=(category.name, page-1)))}} {{pass}} {{if len(rows)>=10:}

[web2py] Reddit clone source code?

2016-08-22 Thread pbreit
Is the Reddit Clone source code from the Vimeo videos (https://vimeo.com/104823162) available anywhere? I saw the Reddit app in the "appliances" source: https://github.com/mdipierro/web2py-appliances But it's quite a bit different. Or does anyone know if a good Reddit and/or HackerNews "clone"?

[web2py] How to convert JSON to Web2py dict?

2016-07-14 Thread pbreit
I can't seem to figure out how to convert the JSON that I'm getting back from an API call to a Web2py dict that I can use in a view like I do a set of rows from a DB query. { "data": [ { "id": "564b95645250790600479164", "client_id": "55948892bda24f0c0086b64a",

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread pbreit
I think the path to web2py is typically specified in the uwsgi ini file. Something like: pythonpath = /home/www-data/web2py/ Even if you don't use it, the install script can be helpful to look at: https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh -- Resour

[web2py] Re: Nginx & The Welcome App

2016-07-13 Thread pbreit
Yeah, I think either need to rename your app directory "init" or add a routes.py file in your web2py directory with: routers = dict( BASE = dict(default_application='myapp'),) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

[web2py] Re: Sort multiple tables

2016-07-03 Thread pbreit
We might need to see some of your code, specifically your models. Why do you have multiple tables? I could see you having one table called "property" such as: db.define_table('property', Field('location'), Field('size'), Field('rent')) And then in your controller: def search(): if requ

[web2py] Re: Login through modal

2016-06-28 Thread pbreit
You should be able to put the Web2py login form on a modal using something like: def mylogin(): return dict(form=auth.login()) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Re: Use reserved keywords of mysql

2016-06-28 Thread pbreit
Does the new DAL relax the reserved SQL words limitation? -- 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 subscr

[web2py] Re: Pulling hair out on REST Example

2016-06-16 Thread pbreit
How about trying some code more like in the book: @request.restful() def api(): response.view = 'generic.json' def GET(): return dict(account = db.account(1359)) return locals() Then just hit http://localhost:8000/myapp/default/api in your browser -- Resources: - http://web2

[web2py] Re: Notification similar to django-notification

2016-06-01 Thread pbreit
There's a facility for sending email: http://web2py.com/books/default/chapter/29/08#Sending-emails Here is my code that sends SMSes through 4 services: def send_sms(provider, src, dst, txt, uid, uname, pword): import urllib, json, base64, requests settings.plivo_send = 'https://api.pliv

[web2py] Re: auth.signature and Format ....issue

2016-06-01 Thread pbreit
You might try: Field('work_position', 'reference work_position', label=T('Profession')), -- 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 th

[web2py] Re: How to edit the menu bar so as to remove profile and name in front of welcome in the dropdown?

2016-05-21 Thread pbreit
That's the type of thing that it seems like it should be in the app, not the framework? -- 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

[web2py] Advice on handling positive and negative decimals?

2016-05-19 Thread pbreit
What's the prevailing best practice for storing financial debits and credits in the DB? 1 table of both or 2 tables (1 for each)? 1 column of positive and negative values or 2 columns (amount and type)? store as integers (cents) or decimals (dollars)? -- Resources: - http://web2py.com - http://

[web2py] Re: web2py 2.14.6 is OUT

2016-05-16 Thread pbreit
If you delete admin app can you still access appadmin? What would the "running locally and ssh tunneling" look like? On Friday, May 13, 2016 at 12:45:13 PM UTC-7, Anthony wrote: > > On Friday, May 13, 2016 at 3:40:37 PM UTC-4, Alex Glaros wrote: >> >> how to delete? >> >> do I just delete this f

[web2py] Re: How to add payment integration in web2py?

2016-04-26 Thread pbreit
In the US and most of the world, debit cards can be processed just like credit cards through Stripe and other processors. Not sure what net banking is with respect to payments. Stripe merchants can accept payments from pretty much ever credit/debit card and currency in the world. The card compa

[web2py] Re: How to add payment integration in web2py?

2016-04-25 Thread pbreit
I'd say go review the documentation of Stripe or PayMill. You put some JavaScript on your payment page. The form submits a "token" to your server which you POST to Stripe/Paymill to process the payment. It's all pretty easy. -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[web2py] Re: web2py.com down?

2016-04-24 Thread pbreit
working now On Sunday, April 24, 2016 at 8:06:04 AM UTC-7, pbreit wrote: > > I'm getting the PythonAnywhere "Error code: 502-loadbalancer" and no site > since last night. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] web2py.com down?

2016-04-24 Thread pbreit
I'm getting the PythonAnywhere "Error code: 502-loadbalancer" and no site since last night. -- 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

[web2py] Re: AppConfig and Storage

2016-04-16 Thread pbreit
Two more questions: It would seem "take" is preferred since there's some sort of performance caching? Is there any reason to do "get"? Can appconfig params be strings with interpolation? Ex: [url] local_server = http://127.0.0.1/%s/details And then in code: requests.get(myconf.take('local_ser

[web2py] Re: AppConfig and Storage

2016-04-16 Thread pbreit
Here's what I ended up with: ``` import os config_path = os.path.join(request.folder, 'private') if request.is_local: myconf = AppConfig('%s/appconfig-dev.ini' % config_path, reload=True) else: myconf = AppConfig('%s/appconfig.ini' % config_path, reload=False) ``` -- Resources: - http://

[web2py] Re: AppConfig and Storage

2016-04-15 Thread pbreit
Even better would be some sort of inheritance so you only end up overriding a handful of settings in production. Was this intended for that or should I be looking elsewhere? On Friday, April 15, 2016 at 8:25:54 AM UTC-7, pbreit wrote: > > But is there a good or proscribed way to use App

[web2py] Re: AppConfig and Storage

2016-04-15 Thread pbreit
But is there a good or proscribed way to use AppConfig for Dev and Prod settings? If I do JSON can I do something like: { "dev": { "db": sqlite } "live": { "db": postgres } } and then something like: if is_local: myconf = AppConfig(reload=True)['dev'] -- Resources: - http:/

  1   2   3   4   5   6   7   8   9   10   >