[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.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/86e6d37e-0aa1-4d83-848b-370d16dc6788%40googlegroups.com.


[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, 
rebooted server.

https://www.pricetack.com/webhook

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/7be37e13-c75a-416b-a338-0fd502095f9a%40googlegroups.com.


[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/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/76a8bf65-e35f-49bc-a119-6082661892b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 fast, looking for 
> someone to create a template using bootstrap. 
>
> Method to be followed:
>
> http://www.web2pyslices.com/slice/show/1516/adapt-a-css-template-to-web2py-layouthtml
>
> I will need one table that calls on a for loop to upload pics and videos. 
>
> Bootstrap will be provided. 
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
- 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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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-database-abstraction-layer#insert

http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#update_or_insert

https://github.com/web2py/pydal/search?q=update_or_insert_q=update_or_insert

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 way that reserved words would be a non-issue. 
There are quite a few words on the list that I would like to use (ie, 
state, group).

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 at 9:41:30 PM UTC-7, William Chen wrote:
>
> Hi web2py community, I am a complete noob, so bear with me.
>
> I have set up my server on DigitalOcean, set up my SSH and user 
> permissions, and run the following script successfully:
>
> cd ~/
> wget 
> https://raw.githubusercontent.com/web2py/web2py/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh
> chmod +x  setup-web2py-nginx-uwsgi-ubuntu.sh
> sudo ./setup-web2py-nginx-uwsgi-ubuntu.sh
>
>
>
> Now, how do I launch Web2py to be able to access the admin interface from 
> the server IP address? 
>
> Thanks!
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 CDN)? How every thing 
works together with NPM package management?

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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://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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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://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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 <pbreit...@gmail.com > 
> wrote:
>
>> 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.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/ynBOuIdufso/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.

Then the default.py controller file to match the Django routes.

Web2py has a built-in user and authentication feature that works great.

You don't need to build any view templates at first because Web2py will 
automatically display any data your controllers make available to views.

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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://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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 wrote:
>
>
> I am developing an Inventory Control and am having difficulty calculating 
> the sum of the values ​​of a given product type and calculating the 
> quantity of products with the same model
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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?

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 the DB.


On Friday, April 6, 2018 at 9:33:37 AM UTC-7, Luis Sucuc wrote:
>
>
> How can I decrypt a password from the auth_user table?
>
>
> user = db(db.auth_user.id == user_id).select().first()
> print user.password
>
> # --output--
> # 
> pbkdf2(1000,20,sha512)$8d7c80fb77386465$532cd8dd495f703337cf3c261a01801b3155f36c
>
>
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Remove request_reset_password from Auth navmenu

2018-03-23 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 (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 (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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 unlimited free private repos.

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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:8000/RT/default/api/entries.json




On Saturday, December 2, 2017 at 11:27:48 AM UTC-8, Enrique Acosta wrote:
>
> Hello from Cuba,
>
> I followed the guide at 
> http://www.web2pyslices.com/slice/show/1533/restful-api-with-web2py but 
> whe i try to make a post in the webservice curl show me a mistake:
>
> curl -d "f_entry=something" 
> http://127.0.0.1:8000/RT/default/api/entries.json
>
> errorid
>
> The id is autoincrement but the value is an empty string.
>
> I will appreciate if anybody help me,
>
> Best regards, Enrique
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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?




-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 solution.
>
> In the web2py folder have a routes.py like this
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> routes_app=[
>  ('.*://www.site1.com:\w* /$anything','app1'),
> ('.*://site1.com:\w* /$anything','app1'),
>  ('.*://www.site2.com:\w* /$anything','app2'),
> ('.*://site2.com:\w* /$anything','app2')
> ]
>
> Then in the application folder for app1 have something like
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> routes_in = ((r'.*://site1.com:\w* /static/$anything', 
> r'/app1/static/$anything'),
> (r'.*://site1.com:\w* /$anything', r'/app1/default/$anything'),
> (r'.*://www.site1.com:\w* /static/$anything', r'/app1/static/$anything'),
> (r'.*://www.site1.com:\w* /$anything', r'/app1/default/$anything'),)
> routes_out = (('/app1/default/(?P.*)', '/\g'),)
>
>
> and similarly for app2
>
> I hope this helps
>
> Peter
>
>
> On Thursday, 21 March 2013 16:06:46 UTC, Massimo Di Pierro wrote:
>>
>> Yes you can. From the point of nginx treat all domains as one. the use 
>> web2py routes.py to map different domains to different apps.
>>
>> On Monday, 18 March 2013 15:21:25 UTC-5, Tito Garrido wrote:
>>>
>>> Hi Folks,
>>>
>>> I am reading the book section: 
>>> http://web2py.com/books/default/chapter/29/13#Nginx
>>>
>>> But I couldn't figure out how could I setup nginx to serve multiple 
>>> domains pointing to a different application on the same web2py instance.
>>>
>>> Do you have any example?
>>>
>>> like:
>>> mydomain1 -> /home/www-data/web2py/applications/myapp1
>>>
>>> mydomain2 -> /home/www-data/web2py/applications/myapp2
>>>
>>>
>>> Thanks,
>>>
>>> Tito
>>>
>>>
>>> -- 
>>>
>>> Linux User #387870
>>> .
>>>  _/_õ|__|
>>> ..º[ .-.___.-._| . . . .
>>> .__( o)__( o).:___ 
>>>
>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 simple as "%s-%s" % (student.id, assignment.id) ).

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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
- 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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.request_uri)

Kind of ugly. I'm surprised there isn't an env variable of the current 
URL/URI.

http://www.web2py.com/books/default/chapter/29/04/the-core#request

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 was just looking at Grails and from a very first glance saw quite 
some similarities to Web2py.

Massimo, did Grails provide any influence in web2py?

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 Thursday, June 15, 2017 at 12:42:22 AM UTC-7, hardclock wrote:
>
>
> I made a custom signin form using javascript and ajax to check for 
> duplicated user/wrong username-password combination.The ajax request I made 
> is like this
>
> $.ajax({
> url:'../default/signin.html',
> type:'POST',
> data:{
>username:username,
>password:password,
>email:email
> },
> success:function (errorCode) {   //recieve the error code from default.py 
>if( errorCode ==0){  //print error message,stop the submit page
>}else{ //redirect to user's page
> }
> });
> The ajax sends request to the same page,then the deafult/(signin)function 
> will check database for match usn/pssw and return back the error code.
> That was my original approach but I couldn't return back the value to the 
> ajax request.Is there anyway to do it?
> Please excuse the weird text formatting,I copied them directly from the 
> development console.
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 students taking multiple classes but each student would be 
represented multiple times in DB.

I don't think "default=db.classes.id" is going to work.

You could have some controllers like:

def class_list():
  classes = db(db.classes.id>0).select()
  return dict(classes=classes)

def class():
  class = db.classes(request.args(0, cast=int)) or 
redirect(URL('class_list'))
  students = db(db.students.class_id==class.id).select()
  return dict(class=class, students=students)

def attendance():
  db.attendance.update(class_id=request.vars.class_id, 
student_id=request.vars.student_id, Attend=attendance)
  response.flash = 'Attendance recorded'
  redirect URL('class_list', args=[class_id])

Once you get this working, you could investigate an Ajax approach.
  

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 jsut trying to go to one of my tables continuously gave me:
AttributeError: 'Rows' object has no attribute 'fields'



And now I'm also stuck with:
ERROR:Rocket.Errors.Port8000:Socket 127.0.0.1:8000 in use by other process



I never ran into any of these problems before a few months a


-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.
>>
>> I've noticed that I can get it to work if I quickcreate the new app, call 
>> it up in a browser so the initial tables get created, add my own models and 
>> the call it up again.
>>
>
> What did you name your model files?
>
> /dps
>  
>
>>
>>
>> On Monday, April 17, 2017 at 1:29: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 when I create a brand new 
>>>> project from scratch:
>>>>
>>>> OperationalError: table "auth_user" already exists
>>>>
>>>>
>>>> Another error I am getting consistently is:
>>>>
>>>> AttributeError: 'Rows' object has no attribute 'fields'
>>>>
>>>>
>>>
>>> What database?  What does your connection string look like?
>>>  
>>>
>>>> All I am doing is going to /appadmin and trying to view a simple table:
>>>>
>>>> http://127.0.0.1:8000/payouts/appadmin/select/db?query=db.contact.id>0
>>>>
>>>>
>>>> db.define_table('contact',
>>>> Field('user_id', 'reference auth_user', default=auth.user_id),
>>>> Field('name'),
>>>> Field('address'),
>>>> Field('city'),
>>>> Field('province'),
>>>> Field('zip'),
>>>> Field('country'),
>>>> Field('status', default='new'),
>>>> Field('tax_id'),
>>>> Field('phone'),
>>>> Field('entity'),
>>>> Field('business_type'),
>>>> Field('bank_name'),
>>>> Field('bank_id'),
>>>> Field('bank_account_id'),
>>>> Field('bank_currency'),
>>>> auth.signature)
>>>>
>>>>
>>>>
>>>
>>> /dps
>>>  
>>>
>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2017-04-17 Thread pbreit
Sqlite. These are fresh installs with just a table defined and no other 
edits.

I've noticed that I can get it to work if I quickcreate the new app, call 
it up in a browser so the initial tables get created, add my own models and 
the call it up again.


On Monday, April 17, 2017 at 1:29: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 when I create a brand new 
>> project from scratch:
>>
>> OperationalError: table "auth_user" already exists
>>
>>
>> Another error I am getting consistently is:
>>
>> AttributeError: 'Rows' object has no attribute 'fields'
>>
>>
>
> What database?  What does your connection string look like?
>  
>
>> All I am doing is going to /appadmin and trying to view a simple table:
>>
>> http://127.0.0.1:8000/payouts/appadmin/select/db?query=db.contact.id>0
>>
>>
>> db.define_table('contact',
>> Field('user_id', 'reference auth_user', default=auth.user_id),
>> Field('name'),
>> Field('address'),
>> Field('city'),
>> Field('province'),
>> Field('zip'),
>> Field('country'),
>> Field('status', default='new'),
>> Field('tax_id'),
>> Field('phone'),
>> Field('entity'),
>> Field('business_type'),
>> Field('bank_name'),
>> Field('bank_id'),
>> Field('bank_account_id'),
>> Field('bank_currency'),
>> auth.signature)
>>
>>
>>
>
> /dps
>  
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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:

AttributeError: 'Rows' object has no attribute 'fields'


All I am doing is going to /appadmin and trying to view a simple table:

http://127.0.0.1:8000/payouts/appadmin/select/db?query=db.contact.id>0


db.define_table('contact',
Field('user_id', 'reference auth_user', default=auth.user_id),
Field('name'),
Field('address'),
Field('city'),
Field('province'),
Field('zip'),
Field('country'),
Field('status', default='new'),
Field('tax_id'),
Field('phone'),
Field('entity'),
Field('business_type'),
Field('bank_name'),
Field('bank_id'),
Field('bank_account_id'),
Field('bank_currency'),
auth.signature)



-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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?

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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:
- 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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-09-30 Thread pbreit
Sorry, should have been more specific: it was on Mac Sierra.

I ended up uninstalling Homebrew (i had installed python and python3 via 
brew). I think it is working correctly now.

I do recall seeing there might be an issue related to an incompatibility 
with Homebrew, SQLite and/or Mac Sierra. 



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 <pbreit...@gmail.com 
> > wrote:
>
>> 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 "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 it sees it again for some reason. I've tried re-cloning web2py 
>>> from scratch several times. Any ideas?
>>>
>>> If it matters, Mac Sierra, Python 2.7.12.
>>>
>> -- 
>> 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-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 "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 it sees it again for some reason. I've tried re-cloning web2py 
> from scratch several times. Any ideas?
>
> If it matters, Mac Sierra, Python 2.7.12.
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 it sees it again for some reason. I've tried re-cloning web2py 
from scratch several times. Any ideas?

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 for something more robust similar to what you get when you 
> use the admin interface. May be it is possible (I am thinking laud) to move 
> some parts of the Admin to the app and give the translator special rights 
> and a menu item that will be visible only to him. I could then copy the 
> translated language file to the right place.
> Anybody tried it before?
>
> On Monday, September 19, 2016 at 12:43:09 AM UTC+2, icodk wrote:
>>
>> I have a  web2py application, where all  text is in/are: T("text in 
>> English") Now I need to translat it to another language, even found a 
>> person willing to do it. What will be the best way to give him  language 
>> file so he can translate it without giving him access to the administration 
>> of the site ? As to start with, he don't have to see the context 
>> immediately, just to translate most of the easy staff.
>> Thanks
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 
%(link)s para reiniciar su contraseña',
'click to check for upgrades': 'haga clic para buscar actualizaciones',
'client': 'cliente',
'Client IP': 'IP del Cliente',
'Close': 'Cerrar',


On Sunday, September 18, 2016 at 3:43:09 PM UTC-7, icodk wrote:
>
> I have a  web2py application, where all  text is in/are: T("text in 
> English") Now I need to translat it to another language, even found a 
> person willing to do it. What will be the best way to give him  language 
> file so he can translate it without giving him access to the administration 
> of the site ? As to start with, he don't have to see the context 
> immediately, just to translate most of the easy staff.
> Thanks
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 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:
>>
>> 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.comment, 50)
>> db.commit()
>>
>> but getting "IntegrityError: FOREIGN KEY constraint failed" unless I 
>> remove 'reference comment'
>>
>> Is gluon.contrib.populate able to seed a table with a self reference?
>>
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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:
>
> 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.comment, 50)
> db.commit()
>
> but getting "IntegrityError: FOREIGN KEY constraint failed" unless I 
> remove 'reference comment'
>
> Is gluon.contrib.populate able to seed a table with a self reference?
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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, page-1)))}}
{{pass}}


{{if len(rows)>=10:}}
{{=A('next', _class='btn', _href=URL(args=(category.name, page+1)))}}
{{pass}}
{{pass}}

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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:}}
{{=A('next', _class='btn', _href=URL(args=(category.name, page+1)))}}
{{pass}}
{{pass}}



On Monday, August 22, 2016 at 7:19:19 AM UTC-7, Annexx Xaar wrote:
>
> Hello sir i have tried all i could, still having errors in the reddit 
> clone application.
> everything works fine except when i 
> implemented  {{=author(user_id)}} under list_posts_by_votes.html
> the errors blows when i click on the author of a comment. it does not 
> dislay the author's name as it showed in the toturial video.
>  
>
>
>
>  here's it
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
>
> Traceback (most recent call last):
>   File "C:\Users\nsikan\Desktop\web2py\gluon\restricted.py", line 227, in 
> restricted
> exec ccode in environment
>   File 
> "C:\Users\nsikan\Desktop\web2py\applications\mydream\views\default/list_posts_by_votes.html",
>  line 117, in 
> NameError: name 'category' is not defined
>
> here's deault.py
> POSTS_PER_PAGE = 10
> def get_category():
> category_name = request.args(0)
> category = db.category(name = category_name)
> if not category:
> session.flash = 'page has not been created'
> redirect(URL('index'))
> return category
>
> def index():
> rows = db(db.category).select()
> return locals()
>
> def create_post():
> category = get_category()
> db.post.category.default = category.id
> form = SQLFORM(db.post).process(next='view_post/[id]')
> return locals()
>
> def edit_post():
> id = request.args(0, cast=int)
> form = SQLFORM(db.post, id).process(next='view_post/[id]')
> return locals()
>
> def list_posts_by_datetime():
> response.view='default/list_posts_by_votes.html'
> category = get_category()
> page = request.args(1, cast=int, default=0)
> start = page * POSTS_PER_PAGE
> stop = start + POSTS_PER_PAGE
> rows = 
> db(db.post.category==category.id).select(orderby=~db.post.created_on, 
> limitby=(start, stop))
> return locals()
> 
> def list_posts_by_votes():
> category = get_category()
> page = request.args(1, cast=int, default=0)
> start = page * POSTS_PER_PAGE
> stop = start + POSTS_PER_PAGE
> rows = db(db.post.category==category.id).select(orderby=~db.post.votes, 
> limitby=(start, stop))
> return locals()
>
> def list_posts_by_author():
> response.view='default/list_posts_by_votes.html'
> user_id = request.args(0, cast=int)
> page = request.args(1, cast=int, default=0)
> start = page * POSTS_PER_PAGE
> stop = start + POSTS_PER_PAGE
> rows = 
> db(db.post.created_by==user_id).select(orderby=~db.post.created_on, 
> limitby=(start, stop))
> return locals()
>
> def view_post():
> id = request.args(0, cast=int)
> post = db.post(id) or redirect(URL('index'))
> comments = db(db.comm.post==post.id
> ).select(orderby=~db.comm.created_on)
> ##TODO
> return locals()
>
> def vote_callback():
> id = request.args(0, cast=int)
> direction = request.args(1)
> ##TODO
> return locals()
>
> def comm_vote_callback():
> id = request.args(0, cast=int)
> direction = request.args(1)
> ##TODO
> return locals()
>
>
> here's lists_posts_by_votes.html
> {{extend 'layout.html'}}
>
> {{if request.function=='list_posts_by_votes':}}
> {{=category.name.title()}}
> {{=A('sort by datetime', _class='btn', _href=URL('list_posts_by_datetime', 
> args=category.name))}}
> {{=A('post a new link', _class='btn btn-primary', _href=URL('create_post', 
> args=category.name))}}
>
> {{elif request.function=='list_posts_by_datetime':}}
> {{=category.name.title()}}
> {{=A('sort by votes', _class='btn', _href=URL('list_posts_by_votes', args=
> category.name))}}
> {{=A('post a new link', _class='btn btn-primary', _href=URL('create_post', 
> args=category.name))}}
> {{else:}}
> {{=author(user_id)}}
> {{pass}}
> 
>
> {{for post in rows:}}
> 
> 
> {{=post.votes}} 
>  {{ =A(post.title,_href=post.url) if post.url else 
> post.title}}
> {{=A('comments', _href=URL('view_post', args=
> post.id))}}
> 
> 
>
> {{pass}}
>
> {{if page>0:}}
> {{=A('previous', _class='btn', _href=URL(args=(category.name, page-1)))}}
> {{pass}}
>
> {{if len(rows)>=10:}}
> {{=A('next', _class='btn', _href=URL(args=(category.name, page+1)))}}
> {{pass}}
>
>
> here's db1.py
> # -*- coding: utf-8 -*-
> # -*- coding: utf-8 -*-
> db.define_table('category', Field('name', requires=(IS_SLUG(), 
> IS_LOWER(),IS_NOT_IN_DB(db, 'category.name'
>
> db.define_table('post',
> Field('category', 'reference category', 
> writable=False, readable=False),
> Field('title', 'string', requires=IS_NOT_EMPTY()),
> Field('url', 

[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"? Thanks.

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] How to convert JSON to Web2py dict?

2016-07-15 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",
 "recipient_id": "564b95645250790600479162",
 "recipient": {
"id": "564b95645250790600479162",
"kyc_level": 0,
"requires_kyc_level": 2,
"remote_id": "rid564b95645250790600479161",
"primary_wallet_id": null,
"status": "active",
"verified": "verified",
"type": "company",
"name": "Beatty-Rowe",
"first_name": "",
"last_name": "",
"email": "shannon_robe...@hotmail.com",
"registration_office": "",
"occupation": "",
"facebook": "",
"revenue": "",
"legal_structure": "",
"industry": "",
"place_of_birth": "",
"nationality": "",
"gender": "",
"country": "US",
"description": "",
"address": "",
"city": "",
"state": "",
"postalcode": "",
"tags": "",
"dob_year": 1938,
"dob_month": 8,
"dob_day": 4,
"ofac_at": 1447794033,
"created_at": 1445917135,
"updated_at": 1447794033,
"accepted_terms": false,
"onboard_step": "step1",
"onboard": "new",
"onboard_at": "",
"restricted_international": false
 },
 "wallet_id": "564b95645250790600479163",
 "ref_id": "1447794020410-169933",
 "currency": "USD",
 "amount": 10401,
 "status": "submitted",
 "source_country": "US",
 "source_currency": "USD",
 "source_amount": 10401,
 "destination_country": "US",
 "destination_currency": "USD",
 "destination_amount": 10401,
 "created_at": 1447767779,
 "updated_at": 1447794020
  },
  {
 "id": "564b95635250790600479142",
 "client_id": "55948892bda24f0c0086b64a",
 "recipient_id": "564b95635250790600479138",
 "recipient": {
"id": "564b95635250790600479138",
"kyc_level": 0,
"requires_kyc_level": 2,
"remote_id": "rid564b95635250790600479137",
"primary_wallet_id": null,
"status": "active",
"verified": "verified",
"type": "individual",
"name": "",
"first_name": "Charlotte",
"last_name": "Lang",
"email": "pattie.ern...@gmail.com",
"registration_office": "",
"occupation": "",
"facebook": "",
"revenue": "",
"legal_structure": "",
"industry": "",
"place_of_birth": "",
"nationality": "",
"gender": "",
"country": "US",
"description": "",
"address": "",
"city": "",
"state": "",
"postalcode": "",
"tags": "",
"dob_year": 1923,
"dob_month": 8,
"dob_day": 24,
"ofac_at": 1447794019,
"created_at": 1432848743,
"updated_at": 1447794019,
"accepted_terms": false,
"onboard_step": "step1",
"onboard": "new",
"onboard_at": "",
"restricted_international": false
 },
 "wallet_id": "564b95635250790600479139",
 "ref_id": "1447794019431-9770701",
 "currency": "USD",
 "amount": 6946,
 "status": "submitted",
 "source_country": "US",
 "source_currency": "USD",
 "source_amount": 6946,
 "destination_country": "US",
 "destination_currency": "USD",
 "destination_amount": 6946,
 "created_at": 1447744994,
 "updated_at": 1447794019
  }
   ]
}


-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 request.vars.orderby == 'size':
orderby = db.property.size
  elif request.vars.orderby == 'rent':
orderby = db.property.rent
  else:
orderby = db.property.location
  properties = db(db.property.id>0).select(orderby=orderby).select()
  return dict(properties=properties)

Then a URL:

http://mysite.com/search?orderby=rent




On Saturday, July 2, 2016 at 4:36:17 AM UTC-7, pbt wrote:
>
> I am new to web2py .Thanks in advance. Please help me doing this. I have 
> multiple tables with one record in each table as shown in the screenshot.I 
> want to sort the tables using different parameters of the table. I want to 
> keep a drop-down to sort records according to rent,size,location,etc...
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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://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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Notification similar to django-notification

2016-06-02 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.plivo.com/v1/Account/%s/Message/'
settings.twilio_send = 
'https://api.twilio.com/2010-04-01/Accounts/%s/Messages'
settings.bandwidth_send = 
'https://api.catapult.inetwork.com/v1/users/%s/messages'
settings.nexmo_send = 
'https://rest.nexmo.com/sms/json?api_key=%s_secret=%s=%s=%s=%s'

if provider=='plivo':
data = json.dumps({'src': src, 'dst': dst, 'text': txt})
url = settings.plivo_send % uname
headers = {'Content-Type': 'application/json',
'Authorization': 'Basic %s' % base64.b64encode('%s:%s' % 
(uname, pword))}

if provider=='twilio':
data = urllib.urlencode({'From': '+%s' % src, 'To': dst, 'Body': 
txt})
url = settings.twilio_send % uname
headers = {'Authorization': 'Basic %s' % base64.b64encode('%s:%s' % 
(uname, pword))}

if provider=='bandwidth':
data = json.dumps({'from': '+%s' % src, 'to': '+%s' % dst, 'text': 
txt})
logger.debug(settings.bandwidth_send % uid)
url = settings.bandwidth_send % uid
headers = {'Content-Type': 'application/json',
'Authorization': 'Basic %s' % base64.b64encode('%s:%s' % 
(uname, pword))}

if provider=='nexmo':
url = settings.nexmo_send % (uid, uname, src, dst, txt)

r = requests.post(url=url, headers=headers, data=data)

return r

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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

2016-05-22 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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 file?  appadmin.py 
>> 
>>  
>>
>
> No, it's the admin app -- so just delete the /applications/admin folder.
>
> Anthony
>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 companies take care of converting 
the transaction from the cardholder's currency to the merchant's currency.

Stripe accepts merchants in 25 countries:
https://stripe.com/global

Stripe has a new project to get make incorporating in the USA cheap and 
easy:
https://stripe.com/atlas

If for whatever reason you don't want to or can't use Stripe, have a look 
at Paymill, "the European Stripe":
https://www.paymill.com/en/faq/which-countries-is-paymill-available-in

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 (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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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_server' % '123'))

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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.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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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 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://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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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://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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: AppConfig and Storage

2016-04-14 Thread pbreit
So what would be the strategy for having config settings for dev and 
production?

Would there be some way to branch on is_local?


On Sunday, July 19, 2015 at 12:06:42 PM UTC-7, Alex wrote:
>
> it's a clear separation of code and configuration. When you deploy the 
> application on a server you usually have a different database connection 
> string (and maybe other different settings as well), usually even multiple 
> setups for dev, test and so on. Without a configuration file you'd have to 
> change the source code on the deployed app.
>
> Am Sonntag, 19. Juli 2015 17:10:30 UTC+2 schrieb ermolaev...@gmail.com:
>>
>> why it better than code in /models/0.py  ?
>> 
>> response.db_cs = 'DB_CONN_STR'
>> or
>> DB_SC = 'DB_CONN_STR'
>> 
>>
>> четверг, 16 июля 2015 г., 5:29:03 UTC+3 пользователь Alex написал:
>>>
>>> thanks for the AppConfig implementation! this is really useful and 
>>> allows easy configuration of db connections. Actually I posted a question 
>>> about this a few years ago - in the meantime I found a workaround but I'll 
>>> change it to AppConfig soon.
>>>
>>> Is this already mentioned in the book somewhere? I couldn't find it.
>>>
>>> Alex
>>>
>>

-- 
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-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


  1   2   3   4   5   6   7   8   9   10   >