Re: [web2py] web2py 2.23.0 released

2022-12-28 Thread Philip Kilner

Hi Massimo,

Thank you very much for this.

I am still using web2py for a critical project, although aiming to 
switch to py4web for new projects sometime early next year, and migrate 
older projects when I am comfortable. It's really good to see web2py 
getting some love in the meantime.


--

PhilK


On 12/27/22 07:26, Massimo Di Pierro wrote:

Hello Everybody,

My apologies for not being as engaged in this group as I used to be.

web2py 2.23.0 was released.

It includes:
- DKIM support to emails
- More configuration options for 2-factor authentication
- Fixed an open redirect vulnerability
- Some bugs fixes.

Thanks everybody who contributed, especially Leonel.

As you noticed the pace of changes in web2py is very slow. Once again 
I recommend that you take a look at py4web, also based on pydal and 
the same template language and helpers as web2py. Yet it is much 
faster and designed from scratch to work with python 3.


Massimo
--
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/84e0b47f-84bc-4b9f-9704-d2fbd96bcf0cn%40googlegroups.com 
.


--
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/38af6fa8-6ab7-570b-d362-3839e05b65d3%40gmail.com.


Re: [web2py] web2py cannot import csv return strings not byte

2021-10-13 Thread Philip Kilner

Hi,

I have just been bitten by the same bug.

Reported as: -

https://github.com/web2py/web2py/issues/2404

Is there any prospect of an updated release with a fix for this? I have 
attempted to use the fixes that Googling the problem suggests, but I'm 
wary of cut and pasting solutions without a deeper understanding of the 
issue.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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/45a3f991-ef7c-ccc6-e95d-9df3f6e87e0e%40gmail.com.


[web2py] request_tenant visibility

2020-05-20 Thread Philip Kilner
Hi,

I have an app using record versioning and multi-tenancy.

The four auth.signature created/modified user/timestamp fields show in 
appadmin, but not in a standard query, as expected.

However, the "request_tenant" field does show in all queries, where it is 
always redundant.

Is this the expected behaviour? (I had expected it to behave as the 
auth.signature fields)

Can it be disabled, so that I don't have to specify fields manually in 
every grid?

--

Cheers,

PhilK


-- 
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/02b59140-9d67-4324-a795-b2cad9ff4fce%40googlegroups.com.


[web2py] Sessions and Ajax / Load

2019-10-25 Thread Philip Kilner
Hi.

I am using sessions and Ajax (via web2py's LOAD), and finding that in the 
main view's code I can call the session as normal, but in the code for the 
component the session is not accessible and the error messages suggest that 
it's a local variable: -

UnboundLocalError: local variable 'session' referenced before assignment

How should I address sessions differently under Ajax?

--

Cheers,

PhilK

-- 
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/961944fc-8747-4e96-bde6-29aa47df50c0%40googlegroups.com.


Re: [web2py] pbkdf2_hmac error on PythonAnywhere

2019-04-02 Thread Philip Kilner
Since I asked the question, the ever-helpful Giles has popped up in the 
forum at PythonAnywhere, and he tells me that they work off images, and 
that mine was an old one - he's organising an update to the latest version, 
which takes Python to 2.7.12,

I suspect that if you are able to check your Python version, you will be at 
2.78 or later - I think I am the exception, by virtue of being on an older 
image.

--

P

-- 
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] pbkdf2_hmac error on PythonAnywhere

2019-04-02 Thread Philip Kilner

Hi,

I've just upgraded web2py to 2.18.4 and auth is throwing: -

 'module' object has no attribute 
'pbkdf2_hmac'


...which I understand is because PythonAnywhere are using Python 2.7.6, 
but "pbkdf2_hmac" was introduced in 2.7.8.


Is this a known issue?

I'm not expecting to be able to ask PythonAnywheere to upgrade, so is 
there a robust workaround for this? (specifically on PythonAnywhere, 
where I have limited control over the Python environment)




--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] web2py IDE

2018-01-24 Thread Philip Kilner

Hi,

On 24/01/18 21:28, Andrea Fae' wrote:
Can you suggest the best free IDE for web2py, with HTML, CSS, Javascript 
and, obviously Python 2?




I've been using Cloud 9 for a while and am happy with it.

I tend to SSH into my own workspace, which required the paid version of 
Cloud 9 - since AWS took them over and created their own cut of Cloud 9 
this is now free. I like it a lot.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] Why doesn't web2py create a PostgreSQL database automatically (curiosity, not criticism)

2017-02-17 Thread Philip Kilner

Hi Tom,

On 17/02/17 00:39, Tom Campbell wrote:

Is there some reason web2py doesn't just create a PostgreSQL database
with a GUID for a name or something? I'm guessing it's a permissions issue.



As Stifan says, you can script this if you are accessing PostgreSQL as a 
user with create db permissions.


Just to add a note of caution though, on a production server - depending 
on your environment/security requirements - you may wish to set up 
web2py to use an account which only has access to the relevant db.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] Upload Video

2016-12-16 Thread Philip Kilner

Hi David,

On 15/12/16 21:50, David wrote:

What does RTFM mean?



Politely rendered, it means "Read the Fine Manual", meaning the info you 
are after is in the book.


:-)

HTH

--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: Does anyone know what happens with site web2py.com?

2016-12-14 Thread Philip Kilner

Hi Massimo,

On 14/12/16 15:52, Massimo Di Pierro wrote:

very strange. I did no maintenance. Perhaps the host did.


Maybe this? : -

http://blog.pythonanywhere.com/146/

HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: Alternative IDEs?

2016-09-19 Thread Philip Kilner

Hi,

On 19/09/16 12:36, Jurgis Pralgauskis wrote:

What are people mostly using for W2P dev?


I'm currently using Atom and Cloud 9.

To be honest, I'm getting on better with Cloud 9, but need to the paid 
version for my use case. It looks as though I will go for that and go 
100% Chromebook soon.


I'd be curious to know if anyone else in the web2py community is going 
this route? (All Chromebook I mean, rather Cloud 9 specifically)



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: One-Step Production Deployment: Who Moved the Cheese?

2016-06-19 Thread Philip Kilner

Hi,

On 19/06/16 00:49, horridohobbyist wrote:

I don't have any experience with nginx. *Do I have learn nginx*, or will
the setup-web2py-nginx-uwsgi-ubuntu.sh script *do everything for me* (I
presume that's what one-step deployment means)?


You can still use Apache - I'm wary of the one-step stuff because I have 
other things on the server that it wants to overwrite, but if you can 
find an old copy of the script it's easy to understand and carry out the 
steps by hand.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] Any body here used pythonanywhere? Question for you.

2016-06-07 Thread Philip Kilner

Hi Steve,

On 07/06/16 08:32, Steve Joe wrote:

Apart from 'welcome' how many web apps can you hostel to a domain name
say, mystyle.com, at max?



I'm reading your question as relating to limits imposed by PA, as 
opposed to resources - is that right?


Web2py counts as a single web app to PA, so you can have as many 
applications under your single web2py instance as you like, subject to 
resource limitations of course, each with its own db and own path under 
your single host name.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: What are the platforms for free web hosting of web2py apps?

2016-03-25 Thread Philip Kilner

Hi Michael,

On 24/03/16 21:23, Michael Beller wrote:

For low volume apps, GAE is also great - I run several apps (really just
simple sites) on GAE for free (but I don't think that supports PHP either).


Happily, GAE does now support PHP: -

https://cloud.google.com/appengine/docs/php/

:-)

HTH

--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] web2py Google Group

2015-05-28 Thread Philip Kilner

Hi Ian,

On 26/05/15 07:19, Ian Ryder wrote:

Is there anything I can do? It's generally holding back our use of
web2py as we effectively don't have access to the community and we're
building a pretty big application using it.



If the web UI frustrates you, I can heartily recommend subscribing via 
email - I do occasionally use the web version, but I find that by 
reading the group traffic in my email (using Gmail + IMAP + Thunderbird 
in my case) gives me much more control of how it is presented, lets me 
see threading properly, keep track, label messages etc. etc. There are 
advantages to both ways of accessing the group, but for me it is 98% 
email, 2% web - if that.


To be honest, because I can also search via TB, I very rarely post - 
it's hard to beat the group to a reply, and someone else has usually 
asked most questions that I have.


When I see people express concern about messages showing up, I quite 
often check to see I have the message in question, and I've tended to 
find my local copy and the web pretty much in sync


HTH - worth a go to see if it works for you, as of course reading a 
message in email will not trip the read status in the web i/f, so I 
don't think you have anything to lose...



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: web2pyslices down

2015-05-13 Thread Philip Kilner

+1

If the original domain is on sale for a sensible sum, it might be worth 
buying and redirecting, but using a sub-domain seems a better solution 
in the long term.



On 11/05/15 10:36, Michele Comitini wrote:

why not using slices.web2py.com ? same 2nd
level domain as web2py and less problems for maintenance...



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: Cloning SQLlite into PostgreSQL

2015-04-08 Thread Philip Kilner

Hi Johann,

Thanks for jumping in - had missed the message.

On 08/04/15 10:10, Johann Spies wrote:

On 2 April 2015 at 13:00, Gael Princivalle mailto:gaelprinciva...@gmail.com>> wrote:

Using UUIDs make the db slower right?

Why? On huge databases the indexing will be slower but queries should
not be slower than systems not using uuid.



Agreed - although in practice any performance issue is negligible in my 
experience. I'm sure it would be measurable with high load / huge data 
sets, but for practical purposes it has not been an issue for me.


(FWIW, this is on Postgres - I don't have any meaningful experience on 
other dbs in this area. MS SQL Server always used to do fine, but I 
wasn't using that with web2py)



http://simononsoftware.com/how-to-store-uuids-in-postgresql/
And you can't store a record like that:
|
my_record =db.my_table(1)
|

Why not? You can do it.  You just use the uuid's when referencing a
record in foreign keys.



I think that the key issue here is that, although things have to be 
handled a little differently (and perhaps in a perfect world we'd have a 
"use GUIDs for IDs globally switch), you do /need/ a GUID if you need to 
avoid collisions.


Plus, with a GUID in your URL as an ID, you don't need to legislate for 
people "walking" your data by incrementing/decrementing IDs...


:-)


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] Database

2015-04-06 Thread Philip Kilner

Hi Ron,

On 06/04/15 18:38, Ron Chatterjee wrote:

Also, open source product wouldn't be
as secured as MYSQL since its open source. But I do agree with the rest.



I don't agree that open source products are inherently less secure then 
proprietary ones, but in this case both Postgres and MySQL (and Maria 
DB) are open source - Oracle may play a little fast and loose with it, 
but the sources are still available: -


https://dev.mysql.com/doc/refman/5.1/en/source-installation.html

HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] Database

2015-04-06 Thread Philip Kilner

Hi Derek,

On 06/04/15 17:52, Derek wrote:

I have to take issue with your 'not for production' criticism of sqlite.



OK, but...


https://www.sqlite.org/whentouse.html



...just to be clear, that comment was in the context of web2py use, not 
generally.



It has changed a lot since 2009 and you should really get familiar with
it if you are going to use it.

Also, concerning the data types, SQLITE only supports 4 data types.
NULL, INTEGER, REAL, TEXT, and BLOB. I'm not counting NULL as a data
type, but whatever. If you are going to use SQLITE then you should
understand how it stores data.

http://www.sqlite.org/datatype3.html



Are you suggesting that the notes in the web2py book: -

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

...are in need of updating?

Either way, given the way that web2py handles migrations, I'd rather 
avoid those complexities entirely by using a more robust platform than 
have to familiarise myself with quirks and work around them.



That said, my choice would be Postgres because it is more ANSI compliant
and more predictable. Not to mention that the python bindings for
Postgres are much better than for MySQL.



Both good points, but based on my personal experience of using all three 
databases, the robustness of web2py's migrations is the deciding factor 
for me: -


- SQLite works well when used within its limitations, but in my own 
usage there has always been a superior alternative available, and SQLite 
is the only one of the three where I have ended up with an 
un-salvageable migration. It has only happened a couple of times, but it 
cost me some time.


- MySQL is very robust, but when a migration fails, it can still be time 
consuming.


- Postgres is *extremely* reliable, and I don't think I can recall an 
instance of a migration problem.


Postgres has saved me from myself enough times that I'd always use it 
with web2py when available, but where I've had to use MySQL (at 
PythonAnywhere, and on Google App engine in the form of CloudSQL) it has 
been robust.


There isn't a right or wrong answer to this and both platforms work (as 
does SQLite, with some gotchas), but the OP asked for opinions as to 
which of the two worked better (SQLite was not mentioned by the OP), and 
I hope that our different experiences and perspectives have been useful.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] Database

2015-04-06 Thread Philip Kilner

Hi,

On 05/04/15 12:07, Wellington Faria wrote:

I would like to know wich is better database to use in web2py? Mysql
or postgre?



I would suggest very strongly that Postgres is a better option.

The reason for this is that Postgres runs its migrations (e.g. DDL) 
inside a transaction, so migrations are much more robust. Postgres has 
many advantages over MySQL, and MySQL has a couple of complexities 
(choice of storage engines) that I don't care for, but the robustness of 
migrations is the one that is particular to web2py, given web2py's 
automated migrations.


I see that you have been advised in another response to use SQLite, but 
I would suggest not doing so for two reasons: -
- First, SQLlite is not suitable for production, and it is much better 
practice to develop against the database you intend to deploy on.
- Second, SQLite does not fully migrate existing data when you e.g. 
change the type of a field, which can cause confusion or even scrambled 
data.


SQLlite's accessibility and the fact that it requires no configuration 
make it a great choice to have preconfigured in web2py, but it is not 
the best choice for non-trivial development, and definitely not for 
production.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] AlterEgo

2015-04-02 Thread Philip Kilner

Hi,

Just a quick note to report that AlterEgo is throwing tickets for me: -

http://www.web2py.com/AlterEgo/default/index

HTH

--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: Cloning SQLlite into PostgreSQL

2015-04-02 Thread Philip Kilner

Hi Mirek,

On 02/04/15 09:35, Mirek Zvolský wrote:

But I don't understand, how is it possible?
The id's stay same as in source database ---or--- web2py creates a
mapping based on db model and changes foreign keys with primary keys
together?



New IDs are assigned, so links (e.g. FKs) will be maintained, but the 
actually identifier will change - see: -


http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV--all-tables-at-once-

...and especially the note about duplicate checking using UUIDs and 
"upsert" behaviour.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] rewrite url

2015-04-01 Thread Philip Kilner

Hi Kurt,

On 01/04/15 13:44, Kurt Stieger wrote:

Hi,

I have installed web2py on a webserver with a other webapplication on it.

Is it possible that web2py lives in a subdirectory.

As example the legacy web application hat the url:
http://www.my-fancy-server.com
The web2py application should be reachable for evaluation on:
http://www.my-fancy-server.com/web2py/

I know how to gonfigure the webserver, but what and how must I configure
in web2py?



When you ay that you know how to configure the web-server, am I right in 
thinking that you are configuring the web2py app as a WSGI application?


If so, you will probably want to consider the contents of routes.py and 
add a "path_prefix" corresponding to your WSGIScriptAlias.


There is an example of this in this Stackoverflow post: -

http://stackoverflow.com/questions/16183293/apache-config-for-php-and-web2py

HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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 practices for external form submission?

2015-04-01 Thread Philip Kilner

Hi,

I have a web2py app that sits as a WSGI application within a Wordpress site.

All works well, but I need to have a form in the WP home page that 
submits to an (essentially identical) SQLFORM within the web2py app, and 
displays its errors as if submitted on the web2py page as opposed to the 
WordPress version.


At the moment, the form submits, and I can see all the values in the 
request (including "_formname", but excluding "_formkey" of course), but 
is not processed.


Is there a straightforward and safe way to accept input from this 
external form on the home page and have it processed in the normal way, 
or am I better off scripting the input with validate_and_insert using 
the post_vars, and if necessary writing the errors out to form.errors so 
that they are displayed in the webb2py version?



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] HELP!! One click upgrade failed for pythonanywhere site

2015-01-21 Thread Philip Kilner

Hi,

On 21/01/15 16:13, Omi Chiba wrote:

Hi, I clicked the upload on admin and tried to upgrade from 2.4.6 to
2.9.12. As soon as I clicked I got ticket but cannot see the ticket
because now I get a ticket to see the ticket... It means I cannot open
admin site. My app is still working fine.

I don't where to start to fix. Can you guys help?

I can access web2py folder on pythonanywhere no problem. Worst case, I
can delete it and install new and import app which I backup before upgrade.



I don't know if this is relevant, but I've trie to upgrade from 2.9.11 
to 2.9.12 today in my PythonAnywhere instance, and it's failing with: -


unable to upgrade because "[Errno 2] No such file or directory 
'/home/[accname]/web2py/gluon/dal/__init__.py"


where [accname] is my PytonAnywhere account name.

I've not had time to look into this yet, but I'm not sure why it thinks 
that web2py/gluon/dal is a folder.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: Suggestions for handling "special" html tags in web2py when variables are being processed?

2014-12-07 Thread Philip Kilner

Hi Floyd,

I'm a long-time Zope user, more in the context of Plone than anything 
else of late, but I valued Zope's TTW approach very much, and I'm very 
interested in your problem.


On 05/12/14 11:23, flobro30...@gmail.com wrote:

So maybe this is a severely optimistic idea, maybe more of a mind
experiment...



I don't think it need be as much of a stretch as it might seem at first 
sight.


If you consider web2py's views, with their ability to encompass Python 
code/logic in {{ }} statements as being roughly equivalent to DTML, than 
mapping one to another seems at least possible - although it does of 
course depend on how intricate your DTML logic is.


Although mapping DTML templates onto web2py's views would be a logical 
first step, it would be better to migrate as much of the logic as 
possible to the controller, but in terms of moving from one platform to 
another, that two step process of DTML -> View, then View -> Controller 
would seem to be manageable, subject to the level of complexity of the app.


How practical it would be to perform some sort of mapping in real time 
is something else again - but I'm not sure how necessary that really is, 
if this is a one time exercise, especially since if you are moving away 
from Zope you are also presumably moving away from Zope's ZODB storage, 
so there is more than just the templates to consider.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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: Version 2.9.6 indeed breaks backward compat for some users

2014-09-04 Thread Philip Kilner

Hi Anthony,

On 03/09/14 17:11, Anthony wrote:

I wonder if we should add an option to set that database-wide --
something like DAL(..., case_sensitive_like=False).



+1 from me!


Also, should .startswith and .endswith have a case sensitive option?



+1 again, but much less pressing, at least for me.


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--
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] The Zen of web2py

2014-07-09 Thread Philip Kilner

Hi,

On 09/07/14 13:31, horridohobbyist wrote:

Let's improve web2py's PR. A blast of articles over the next year could
change the fortunes of our favourite web framework.



Good piece, great finish.

I'll take that as a challenge, and see if I can describe my own journey 
from desktop databases to web2py via Zope and Plone as succinctly!


:-)


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray


--
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 CMS

2014-06-04 Thread Philip Kilner
Hi,

+1 for Plone from me, too.

If you only need something lightweight, it may be OTT - but if you need
a mature product that you will not outgrow then Plone is well worth a look.

It's not hard to knit web2py and Plone together - depends what you want
to achieve obviously, but where I've needed both Plone's CMS strengths
and web2py's RDBMS strengths in a single project, I've found it easier
to embed a web2py application in a Plone page than /vice versa/.


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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] How to migrate to UUID references in db without messing up reference fields

2014-05-27 Thread Philip Kilner
Hi Ian,

I've spent some time looking at available options, and I think I can
solve my own issues without using UUIDs at all.

I really wanted to continue to use integer IDs, partly because in some
cases these fields are exposed to my users as order/document/transaction
IDs. I also wanted to stay as close to web2py's default way of working,
and use the database platform's own continuous replication, rather than
doing it in a batch.

Using Postgres, the ID fields are are populated by a generator, and
changing the generator DDL to prevent clashing IDs should work for me,
as there will only ever be a small number of instances of the database.

It's actually very easy to do - you can interleave the values, so if you
had two instances of the database, you could have one issue odd nos. and
the other even: -

Instance 1: -

START WITH 1 INCREMENT BY 2

Instance 3: -

START WITH 2 INCREMENT BY 2

Alternatively, you could assign a range to each instance: -

Instance 1: -

START WITH 1 INCREMENT BY 1
MAXVALUE 

Instance 2

START WITH 1 INCREMENT BY 1
MAXVALUE 1

I don't know how useful this will be to you if you are using SQLite, but
you may find that Postgres is a more robust platform for replication, so
it could worth looking into in any event.


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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] How to migrate to UUID references in db without messing up reference fields

2014-05-24 Thread Philip Kilner
Hi Ian,

I see that Massimo has answered you, but on re-reading your question I
wasn't clear quite what you were asking. I have an application that
needs to use UUIDs myself, so thought it worth jumping in.

On 14/05/14 16:44, Ian W. Scott wrote:
> I need to take an existing db and implement a UUID referencing system so
> that I can sync local db's with a central remote version. But I'm
> concerned that this will break reference fields that refer to the newly
> synced rows.
> 

Is this an existing web2py-generated db, or a legacy db? Am assuming the
former, but tell me if I'm wrong...

Do you have existing ID fields which you wish to /convert/ to UUIDs, so
that you are using UUIDs *instead* of IDs?

Or are the IDs exposed in the application, such that you wish to
/supplement/ them with an UUID field to support replication?


> My understanding is that the UUID field is necessary because a csv
> import will assign different row ids to the new entries in the target db
> than the ones they had in the source db (especially if new records have
> been added to the target db in the meantime). The UUID is supposed to
> overcome this, by allowing the db to recognize that rows are equivalent
> even if they have different ids. But in that case, won't reference
> fields in other tables often be pointing to the wrong ID number in the
> target db? (i.e., they'll keep the row ID of the db version in which
> they were created, and if this ID changes in the target db they will
> then be referencing a different record.)
> 

It's the mention of CSV imports that I'm stuck on - is the intention to
use this as your replication mechanism, or are you saying that you are
importing data into each instance of the db, and need to preserve
imported IDs?

I may be misreading you, but I would very strongly recommend the use of
the db's existing native replication mechanism if at all possible. You
don't specify your back-end database, but we've had good results from
Postgres replication, FWIW.


> Sorry if this explanation is overly complicated. I'm just trying to get
> things clear in my own mind.
> 

It does sound complicated, but I'm not 100% certain that I'm clearly
distinguishing between the outcome you want and your thoughts as to how
to achieve it.

FWIW, I have a similar issue, and what I would like to do is use UUID
PKs throughout in web2py, and use the db's *native* replication
mechanism, which should work OOTB with UUID PKs.

Am I right in thinking that this approach would solve your
ID/replication problem, but that your situation is complicated by the
fact that your starting point is an existing app with IDs?

Apologies for bombarding you with questions!


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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 Hosting

2014-05-23 Thread Philip Kilner
Hi,

On 23/05/14 11:07, António Ramos wrote:
> my ping rtt to webfaction account is 60ms
> my ping rtt to digitalOcean account is 85ms
> 

Not sure of the significance of that if we don't know where you're
pinging /from/?

We use Linode for the big stuff and DO for the small stuff, FWIW. I have
nothing but praise for Linode. DO are pretty good, but nowhere near as
polished as Linode, and do not (yet) inspire the confidence that Linode
does.

Two issues with DO that are worth mentioning: -

- No IPv6
This is just slack! It's gone into private beta very recently, I
understand - what I don't understand is why it was not there from day one!

- No swapfile
Can be a gotcha depending on your needs, but easily remedied [1].


[1]
https://www.digitalocean.com/community/articles/how-to-add-swap-on-ubuntu-12-04


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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] Free web2py hosting for a free software web2py application

2014-03-25 Thread Philip Kilner
Hi Pablo,

On 25/03/14 11:14, Pablo Angulo wrote:
> I tried pythonanywhere and it could work, but I'd have to write code to
> mold into the limitations of that hosting and accept that a few things
> wouldn't work: do you still offer your spare hosting space? You'd need
> to install the following packages.
> 
> |sudo apt-get install latex-xcolor texlive-latex-extra
> texlive-fonts-recommended python-numpy python-setuptools python-pysqlite2
> sudo easy_install xlutils|
> 

Yes, no problem - will install the above and come back to you off-list.


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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] Free web2py hosting for a free software web2py application

2014-03-21 Thread Philip Kilner
Hi,

I have spare capacity on a 4Gb London-based Ubuntu 12.04 Linode.

The hosting management is via Virtualmin, so there are facilities for
email etc. etc.

As long as the server load is not going to be insane, I'd be happy to
host free of charge - drop me a note off-list if you'd like to pursue that.


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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] most web2py appliances with appengine wont work out of the box.

2013-12-03 Thread Philip Kilner
Hi,

On 03/12/13 03:16, ID wrote:
> I'm trying to setup web2py on Appengine, admin and example app works
> but, most of the apps under appliances wont work out of the box and
> issues a ticket..  in particular i'm interested to setup a little forum
> with pyforum2, that too does not work and issues a ticket. :(
> 

Can you tell us what error the ticket gives you? There isn't much to go
on, so far.

There is a section in the book on GAE deployment, which may be useful [1].

The biggest difference between AppEngine and other options is the GAE
datastore, which does not support all of the features available to
web2py with an RDBMS. It may be that the appliance you are using is
configured to use an RDBMS, and that you would need to modify it to use
the GAE datastore.

Alternatively, if your issues is related to this, you may find that
using Google's CloudSQL [2] (e.g. MySQL) is a better option for you.

[1]
http://web2py.com/books/default/chapter/29/13/deployment-recipes#Deploying-on-Google-App-Engine

[2] https://developers.google.com/cloud-sql/

HTH


-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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/groups/opt_out.


Re: [web2py] Re: Installing the jqmobile plugin

2013-11-20 Thread Philip Kilner
Hi,

On 20/11/13 11:49, Philip Kilner wrote:
> I'll go open a ticket about
> it as it's a bit of a show-stopper to anyone who is a web2py newbie, or
> who is trying to evaluate web2py for mobile.

Ticket at: -

https://code.google.com/p/web2py/issues/detail?id=1788

HTH


-- 

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray


-- 
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/groups/opt_out.


[web2py] Re: Installing the jqmobile plugin

2013-11-08 Thread Philip Kilner
Hi All,

On 07/11/13 18:30, Philip Kilner wrote:
> Found a note here: -
> 
> https://groups.google.com/forum/#!topic/web2py/W9b3RZBrmYQ
> 
> ...where Massimo says "the posted plugin online is old and broken (I
> need to fix it).now a working version of plugin jquery comes with
> web2py. It is in admin."
> 
> ...which I imagine is out of date, but the link in the UI is to the
> online version, even though there is indeed a version in admin.
> 

Nope, looks like I was wrong about that - the version offered in the
mobile preview page, which links to: -

http://web2py.com/plugins/static/web2py.plugin.jqmobile.w2p

...is very old and flat out does not work, so I think that Massimo's
comment above from March, still applies.

Creating an application, uploading this plugin, and fixing up the
layouts results in a broken application.

Copying the jqmobile-related files from the admin app to the broken app
fixes it - yay!

:-)

Should I open a ticket about this? If so, under web2py, or somewhere else?

I'm happy that I can get on with mobile-ising my app now, but I'm very
curious as to how other people have been installing this plugin?


-- 

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray



-- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-- 
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/groups/opt_out.


[web2py] Re: Installing the jqmobile plugin

2013-11-07 Thread Philip Kilner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

Still digging on this.

On 07/11/13 15:02, Philip Kilner wrote:
> I'm having problems getting this working!
> 
> My steps: -
> - Create new app.
> - Go to admin at /admin/default/site
> - From admin, hit the "Try the mobile interface" link.
> - Download the plugin from the link in the text on the right.

Found a note here: -

https://groups.google.com/forum/#!topic/web2py/W9b3RZBrmYQ

...where Massimo says "the posted plugin online is old and broken (I
need to fix it).now a working version of plugin jquery comes with
web2py. It is in admin."

...which I imagine is out of date, but the link in the UI is to the
online version, even though there is indeed a version in admin.

> - Go to the new app at "/admin/default/design/theapp"
> - Upload the plugin
> - Edit "default/index.html" to extend "plugin_jqmobile/layout.html"
> - Go to "/theapp/default/index"
> 
> ...all of which is very simple - but the page is rendered unstyled.
> 

Not entirely sure what I should be seeing - will compare to the preview
version, which looks fine, but FWIW, I'm getting a 404 on: -

/static/js/modernizr-1.6.min.js

...although looking at the filesystem there is a "modernizr.custom.js"
in static, but not a "modernizr-1.6.min.js". That's not the cause of the
problem, but does suggest to me that I've picked up the wrong version of
the plugin, as the version in admin calls "js/modernizr.custom.js".


- -- 

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- - alasdair gray



- -- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSe9w3AAoJEMWUtSioA9/pUIoH/j9NcInri2uSvHICNVK95k8y
3q9d+A3GlcViI48V8PEWL/8X6UB38YFmq4KiU6oO1WlUdbiEVZ5li1dY4J6Q053Z
vXygiYJqOYnE5CTwaBwUikIwCl3OVSs+SZ+dxDb4fRu+GZLKlPMCyBkySWMEH6vL
258qTHYAmD+9RHP8QHd2YH9DCykIT1OicAcO7AtjWnx/oed/VTNw182To0fXcGKC
+xsYOWUIrhKWU/Zbbe9bTYLBap2TzuAUpFRX3jITmmw3Se42EhihmcYieKcNqoBD
nTA+Q6zwEvtf7WOUCxdaqVwMwJQjYr+zzyKS+3jndKYpBurRucdxYFgHN6J3o5w=
=4W0B
-END PGP 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/groups/opt_out.


[web2py] Installing the jqmobile plugin

2013-11-07 Thread Philip Kilner
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi All,

I'm having problems getting this working!

My steps: -
- - Create new app.
- - Go to admin at /admin/default/site
- - From admin, hit the "Try the mobile interface" link.
- - Download the plugin from the link in the text on the right.
- - Go to the new app at "/admin/default/design/theapp"
- - Upload the plugin
- - Edit "default/index.html" to extend "plugin_jqmobile/layout.html"
- - Go to "/theapp/default/index"

...all of which is very simple - but the page is rendered unstyled.

What am I missing or doing wrong?



- -- 

Regards,

PhilK


'a bell is a cup...until it is struck'

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSe6uAAAoJEMWUtSioA9/pUOoH/1oDKMszOjSbksub9VWWkHJi
7zRLCoJqNlG+Kdsed3wT8sL8L5TokG2gS01DRkfCBqHX9AgiiNmzRqHZFnxmU9kf
E+PpnY2L/TQnB3NdPZC/rXsfbb0rcBSwcwcsozhzojGuL8ToruhfdYZM69IUMXDn
WurWPZGSAtXJt3JrAhKE9ZMqnxN2YdRV7pGZ4zr+zK99h0DyEn9JN65ZaSejFsBV
1jiGw3lMUVGr36lq9OInucTiS7VnspYudHsccGqxW0/cfp9bgaI/tiEIC3DHaMNd
ue59QX2O8dOkWhUfro8w8K8ZORkI3nw/RvAPJt6kWEUQdLJieTtjJomOlChFh0k=
=Hahx
-END PGP 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/groups/opt_out.


Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-04 Thread Philip Kilner

Hi Arnon,

On 03/05/2013 23:16, Arnon Marcus wrote:

Granted, you could use the ID in a DAL context, in a similar way that
you would use an ORM-class-instance within the ORM context, but there
are other things that an ORM-object can do within an ORM context (aside
from these examples), that an ID or a Rows object can not do in the DAL
context.


OK, well I understand the parts of your reply where you have been 
explicit, but my original point was that: -


	"I truly do not understand what problem the DAL fails to solve, and I 
don't expect to without some much-less-abstract discussion."


...and I'm still none the wiser.

As a database developer with a set-oriented mind-set, the direct mapping 
to the db and explicitness of db I/O (as described by Massimo in his 
recent response) make web2py's approach an elegant and powerful solution 
to managing relational data in a relational manner. Perhaps my RDBMS 
mind-set prevents me from understanding the virtues of what you are 
proposing.


Given the complexities of implementing an ORM (not to mention your 
assertion that it is a "solved problem"), what was your take on the 
suggestion that a sensible approach would be to write an adapter for 
SQLA (or some other ORM) for the DAL?


It's not something that I would use myself, but I can see how it would 
fit into web2py, and surely that would be a more practical approach than 
developing an ORM for web2py from scratch?



--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-03 Thread Philip Kilner

Hi Arnon,

I really don't see that your requirements in this example are not a good 
for web2py's DAL. I'd really like to understand what, if anything, I'm 
missing here.


I'm originally an RDBMS developer, and what I think of as the 
set-oriented approach of web2py's DAL is a much better fit for my mental 
model of what my application is doing. Conversely, I find many ORM 
solutions (and Active Record, come to that) to be an anti-pattern [1].


FWIW, my data is typically consumed by more than one application (e.g. 
not just web2py), and I've tended to let web2py create and manage the 
schema in its own way, and work in the db with views etc. to address 
more complex or performance-critical functions, so perhaps my concerns 
are different to yours. However, the examples you give don't seem to 
take best advantage of the DAL to my eye.


Anthony provided some examples as to how one might do that, but you have 
not responded directly to that post (apologies if I've missed your 
response if it was elsewhere in the thread). I'd like to take the 
liberty of quitting Anthony's responses and asking for your take on them.


On 02/05/13 22:20, Arnon Marcus wrote:

Using the DAL, the best you might get is:
 >>> [city for city in db.City.Country.select() if city.Country.Name ==
''France']
[, ]



Anthony's suggestion: -

>>> db.Country(name='France').City.select()


 >>> europe = Continent(Name='Europe')
 >>> france = Country(Name='France', Continent=europe)
 >>> paris = City(Name='Paris', Country=france)
 >>> nice = City(Name='Nice', Country=france)
 >>>
 >>> europe.Country(Name='France') is france
True

france.City(Name='Paris') is paris

True
 >>> europe.Country(Name='France').City.list
[, ]



Anthony's suggestion: -

>>> europe = db.Continent.insert(Name='Europe')
>>> france = db.Country.insert(Name='France', Continent=europe)
>>> paris = db.City.insert(Name='Paris', Country=france)
>>> nice = db.City.insert(Name='Nice', Country=france)
>>> db.Country(france).City.select()
[, ]


This would be so intuitive and easy to use...



Can you expand on this statement and help me understand how this 
proposed syntax is any more intuitive or simpler than the web2py 
suggestions, which to my eye are clearer by dint of being more explict?


Am I missing something here?

[1] http://seldo.com/weblog/2011/08/11/orm_is_an_antipattern

--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-02 Thread Philip Kilner

Hi,

On 01/05/13 22:27, Cliff Kachinske wrote:

I would propose that the best way to get others on board
would be to channel the energy being burned on this thread into an
implementable design or even a set of specific software requirements or
pseudo code.



+1

This has been a very interesting thread, but the length (and passion!) 
of some of the posts has made it a long hard read, and despite my best 
efforts I truly do not understand what problem the DAL fails to solve, 
and I don't expect to without some much-less-abstract discussion.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-05-02 Thread Philip Kilner

Hi,

On 01/05/13 22:07, Michele Comitini wrote:

Why not write a driver for SQLA that speaks DAL instead of a sql dialect?


+1


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] apache backdoor?

2013-04-29 Thread Philip Kilner

Hi Massimo,

On 29/04/13 17:17, Massimo Di Pierro wrote:

http://apache.slashdot.org/story/13/04/29/1258205/sophisticated-apache-backdoor-in-the-wild



To be fair, following the link, it seems to be more of a cPanel backdoor 
- it doesn't seem that Apache alone is vulnerable, only via cPanel.



I have moved to Nginx already and I am happy. ;-)



I have opted for Virtualmin over cPanel, and I too am happy. ;-)


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Combining inner and left outer joins in a query

2013-04-25 Thread Philip Kilner

Hi Richard,

On 25/04/13 15:35, Richard Vézina wrote:

I think your mistake is the following :

db(where clauses).select(tables and join)



I've not seen it summarised quite like that before - very helpful, thank 
you.


I've got a bit of a mental block about this (as evidenced by the fact 
that when I Googled the problem I found my own mails asking almost the 
same question a couple of years ago!), and have tended to fire up dBVis 
and knock up a view in its visual designer.




So your query should read like this :

rows=db(WHERE CLAUSE IF YOU HAVE SOME OTHER THAN THE
JOIN).select(db.parent.ALL, db.child.ALL, db.grandchild.ALL,
join=db.child.on(db.child.__parent_id==db.parent.id
), left=db.grandchild.on(db.__child.id
==db.grandchild.child___id))



I applied that to my actual tables, and am getting the expected results 
now - thanks again.




--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Combining inner and left outer joins in a query

2013-04-25 Thread Philip Kilner

Hi,

I have three tables, say "parent", "child" and "grandchild", and want to 
do an inner join on parent and child, and left outer join on child & 
grandchild. So, all parents with children, and all grandchildren if they 
exist.


However, I can't accomplish this in a single query, and have been 
staring at it long enough to need some input!


I want to do something like: -

selected=db(db.parent.ALL, db.child.ALL, db.grandchild.ALL,
join=db.child.on(db.child.parent_id==db.parent.id),
left=db.grandchild.on(db.child.id==db.grandchild.child_id)
)

...which isn't right but hopefully gets across what I'm after.

How should I be combining the two types of join?


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: Is there some code reader like source insight for python?

2013-03-22 Thread Philip Kilner

Hi,

On 22/03/13 09:29, Niphlod wrote:

ehm ? what ?



I was intrigued, so had a Google...

The OP seems to want something like this: -

http://www.sourceinsight.com/

...which seems to be inspired by this: -

http://cscope.sourceforge.net/

...which in turn led me to this: -

https://pypi.python.org/pypi/pycscope/

...and this: -

https://code.google.com/p/seascope/

...which was an interesting read over a cup of coffee, but makes me 
wonder why the OP wishes to take this approach, which to my mind is akin 
to wanting an exploded diagram of the gearbox before starting a car.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: web2py redeployment

2013-03-19 Thread Philip Kilner

Hi Niphlod,

On 19/03/13 18:33, Niphlod wrote:

PS: watch out the auth.define_tables(), it defaults on migrate=True and
fake_migrate=False on its own (so tune the parameters accordingly)



D'oh!

I wish I'd known that last week - explains a lot...thanks for sharing!


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: grid/smartgrid searching foreign key tables

2013-03-12 Thread Philip Kilner

Hi Niphlod,

On 12/03/13 08:26, Niphlod wrote:

PS: I remember that some user wanted to put up a nice doc for users (not
developers) facing the grid/smartgrid  never heard of him back :(



That was me!

:-)

I've done some simple notes with screen shots for my client, but need to 
ask people who know the underlying mechanism better than I if I've made 
any errors.


They are currently embedded in a private site in a wiki page, so will 
need to strip the confidential bits out and put them somewhere I can 
send you a link to.


Realistically, that's more likely to be tomorrow than today, so please 
bear with me a little longer...


;-)


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Web2Py hangs

2013-03-06 Thread Philip Kilner

Hi Demsar,

On 06/03/13 13:16, Demsar wrote:

At this point I restarted it twice and its started to work and, at
least, show Tickets. But theese hangups really worry me :(



Have you made extensive changes to your modal against an SQLite database?

SQLite is very convenient, but has some limitations - for example, it 
cannot change the data type in existing records when you change the model.


See:-
http://www.sqlite.org/faq.html#q11

...for example.

If you are concerned, I would very strongly suggest trying Postgres, 
which is very robust indeed.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Re: SQLFORM.grid in Components oddity

2013-03-06 Thread Philip Kilner

Hi Niphlod,

On 06/03/13 09:19, Niphlod wrote:

Use different formname(s) parameter for each grid. Should solve all the
issues you're seeing.


D'oh!

Sorted - thank you.


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




[web2py] Re: GAE Hosting Issue

2013-03-06 Thread Philip Kilner

Hi Christian,

On 06/03/13 07:42, Christian Foster Howes wrote:

the ticket you linked to looks like it is not failing on the connection,
but rather failing on a query.  these 2 line are of interest to me:

   File "/base/data/home/apps/s~gk-hercules/1.365624770532609305/gluon/dal.py", 
line 4115, in execute
 return self.log_execute(command.decode('utf8'), *a, **b)
   File "/base/data/home/apps/s~gk-hercules/1.365624770532609305/gluon/dal.py", 
line 1703, in log_execute
 ret = self.cursor.execute(*a, **b)



Well spotted - it's spitting out a very wide variety of errors, but I'm 
increasingly leaning to thinking it relates to the failed migration.



any chance you are able to open dal.py and put in some debug logging at those 
lines an run it again? I'm curious what query/command web2py is trying to run 
on the database.  that might open the door to the missing answer!



I'll do that - I've discovered that if I create an empty database via a 
direct connection to CloudSQL and point the DAL at that, the application 
is accessible.


Given GAE's recent issues around resources/latency, I'm beginning to 
think that this is the real issue, and the other factors are simply 
generating spurious errors before it can show me the "real" error.


I'm really anxious to get the migration pickles out of the db that they 
are attempting to manage and into GAE's datastore.


I've had to move the app to conventional hosting, as this has been a 
huge time-sink, so it will be a day or two before I get back to it.




--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




[web2py] Re: SQLFORM.grid in Components oddity

2013-03-05 Thread Philip Kilner

Hi,

It seems that the grids are not isolated from one another within their 
components - calling the insert page seems to create a link to the last 
loaded grid.


Fortunately, I don't need all the power of the grid in every case, so 
I'm going to use something simpler.


Should I report this as a bug or is it a known issue?


--
--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Re: SQLFORM.grid in Components oddity

2013-03-05 Thread Philip Kilner

Hi,

A little more info: -

- The 2nd tab is for "subject areas", and if I inspect the contents of 
this component when first loaded, I see: -


href="/GTRZ/suppliers/supplier_subject_areas.load/new/supplier_subject_area?supplier_id=36&_signature=027901658eab6054de2b5f1ecc9095227d138ec9">


...and ""supplier_subject_areas.load" is the correct component.

- When the "Add" button is clicked, the correct from is displayed, but 
in the relevant place in the source I see: -


href="/GTRZ/suppliers/bookings.load?supplier_id=36&_signature=8d4c78fb3ee0e0dda4ee13fa2705f849ff693faa">


...where "bookings.load" is the /incorrect/ component.

This would seem to explain it - but am I doing something wrong to bring 
this about, or is this a bug?



--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




[web2py] SQLFORM.grid in Components oddity

2013-03-05 Thread Philip Kilner

Hi All,

I'm seeing some odd behaviour, and am trying to work out if it's web2py 
or me that is confused.


I have a page with JQueryUI tabs. The first tab shows a record, the 2nd, 
3rd and 4th tabs show grids from different child tables, each within a 
LOADed component. The templates all use the "load" suffix, all the 
target DIVs are named.


The odd behaviour is that while the view and delete work fine, after 
inserting a child record, the component from a different tab is loaded. 
It is not 100% consistent - it does not happen every time, and when it 
does happen it is not always the same wrong component.


So, on the 2nd tab I might add a record, and after insertion the grid 
from the 4th tab is loaded. A little later, inserting in the 2nd tab 
might load the grid from the 3rd tab.


I'm a bit perplexed as to what to look for here - can anyone suggest any 
clues?



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Book 5th edition out

2013-03-05 Thread Philip Kilner

Hi Massimo,

On 05/03/13 20:48, Massimo Di Pierro wrote:

The fifth edition of the book is out!



Marvellous - Thank You!

(and all the contributors)


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.





Re: [web2py] Re: Dummy Tables for Views and Legacy Tables vs. Audit Trail

2013-03-05 Thread Philip Kilner

Hi Niphlod,

On 05/03/13 13:32, Niphlod wrote:

luckily python is a programming language. :P

|
your_table_name ='norecordversioninghere'
versioning_only_on =[db[t]fort indb ift !=yourtablename]
auth.enable_record_versioning(versioning_only_on)
|



...and luckier still that this list and folks like you help me to use it 
- thank you!


(Had been dimly aware that I'd need to do something like that, but had 
only got to the head scratching stage!)



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: Dummy Tables for Views and Legacy Tables vs. Audit Trail

2013-03-05 Thread Philip Kilner

Hi Niphlod,

On 05/03/13 13:21, Niphlod wrote:

watching at the source code, instead of
auth.enable_record_versioning(db) you can pass a list of tables



Crikey - that'd be a long list here!

Thanks for the pointer - will dig...


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Dummy Tables for Views and Legacy Tables vs. Audit Trail

2013-03-05 Thread Philip Kilner

Hi,

I'm using a dummy table with "migrate=False" against a database view for 
reporting, but I have auditing enabled.


I'm getting the error: -

OperationalError: (1054, "Unknown column 
'request_received_by_month.is_active' in 'field list'")


...which suggestes that web2py expects the audit trail fields here.

Is there a per-table way to disable versioing for a dummy tables, rather 
than add dummy fields to the view?



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Re: GAE Hosting Issue

2013-03-04 Thread Philip Kilner

Hi Christian,

On 05/03/13 06:12, Christian Foster Howes wrote:

hrmmaybe it's time for GAE's next code update.  i frequently notice
a degradation in performance just before they announce a new SDK version.



Interesting observation - will look out for that.


i'm not seeing anything out of the ordinary on my GAE apps right now,
but i do agree that the GAE team is not as transparent as i would like.

i would suggest that you read the logs very carefully - there are lots
of different deadlineexceeded exceptions (literally the same class names
with different paths) and try adding extra logging to see where things
are getting stuck.



Actually, I'm not getting past a db connection so there is nothing in my 
application code to log, and the logged errors accessible in the console 
are very, very varied [1].



i don't know if web2py does automatic migrations on cloudsql, and in
production i always do my SQL by handbut i'm old school and pessimistic.



It does - I did have a failed migration (how I wish their CloudSQL 
offering was based on Postgres!), but the app was buzzing away happily 
with the help of "fake_migrate_all" for a good while after that.


The migration issues is messier than I'd like it to be on the this 
platform (CloudSQL being as fragile as MySQL in that regard, and the 
problem being compounded for me by the lack of tickets and my 
uncertainty as to the fix given that the pickles are in the problem db).


I think perhaps that I too need to take an "old school and pessimistic" 
approach on this platform (and MySQL in general for that matter).


BTW, in case anyone wonders why I'm using "fake_migrate_all" rather than 
a per-table approach, it's because the error I was responding to 
refereed to my (unmodified) auth_user table - I've simply not been able 
to get in to revert that since this happened.



[1] https://code.google.com/p/googleappengine/issues/detail?id=8918

--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE - Datastore and CloudSQL together

2013-03-04 Thread Philip Kilner

Hi Christian,

On 05/03/13 06:07, Christian Foster Howes wrote:

ahh, the connection stuff is in the book:

 #store sessions in the DB
 session.connect(request,response,db = db)

http://web2py.com/books/default/chapter/29/13#Avoid-the-filesystem



D'Oh!

Thanks for the pointer - will go and look again, and see if I can 
resolve how to point the the ticket and web2py_filesystem tables to the 
datastore.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Re: GAE Hosting Issue

2013-03-04 Thread Philip Kilner

Hi,

On 05/03/13 02:05, howesc wrote:

i'm no longer using cloudSQL as i don't need it anymorebut several
months ago when i was using it i got weird and varied problems on GAE
when i had exceeded my billing quota on could SQL.  have you checked
that those SQL instances are running and billing up to date?



I do have billing enabled, but am currently on a (temporarily) free D0 
instance. Interesting that the problem kicked in less than an hour after 
the start of the month though...


Having said that, I'm able to access the db perfectly via dbVisualiser 
to work with it directly.


The majority of the errors suggest it is running out of time or 
resources before it ever makes a db connection.


However, tinkering with a 2nd (empty) db against the same app it did 
briefly burst into life, which made me wonder whether a failed migration 
earlier in the day was involved. I can't see it really, because it never 
seems to get as far as a connection with the production db.


This is in part the reason for my other question about using the 
datastore form web2py's "system" stuff - I found myself wondering how 
e.g. "fake_migrate_all" could work if the pickles were in the affected db.


I have to say, Google seem to be in denial about some of the issues on 
GAE - some people (mostly but not exclusively on Java) have recently 
suffered non-trivia performance / latency / timeout issues, and the 
silence from the App Engine team is deafening...



--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE - Datastore and CloudSQL together

2013-03-04 Thread Philip Kilner

Hi,

On 05/03/13 02:02, howesc wrote:

at one point i was running both together.  i did something like:

db = 
sqldb = 



Got it - had tied that, but...


and then connected tickets and such to db.



...could not work out how to point these "system" tables at the 
alternate DB, given that they are not explicitly defined in the model.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] GAE - Datastore and CloudSQL together

2013-03-04 Thread Philip Kilner

Hi,

Is there a way to use the datastore for the session, filesystem and 
ticket tables, whilst using CloudSQL for the actual db?


Also, having migrated from the datastore to CloudSQL, I am no longer 
getting tickets saved in either - is there anything obvious I can look 
into there? (In the absence of tickets, I have no idea what to look for!)



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] GAE Hosting Issue

2013-03-04 Thread Philip Kilner

Hi All,

I'm developing an app on GAE which has suddenly stopped serving, and 
just wanted to sanity check that other web2py users were not seeing the 
same thing.


The app uses Python 2.7, HRD and CloudSQL. It's a relatively simple 
transactional CRUD app - nothing clever at all from the GAE PoV.


It stopped serving out of the blue (overnight), twelve hours after the 
last deploy, and the error messages it's throwing are very varied - 
"soft memory limit exceeded" (bumped instances from F1 to F2, same 
error, bigger numbers), "deadline exceeded" (setting up loggers or db 
connections) etc. never get as far as my code.


The lack of changes in the app prior to the outage, the essentially 
random nature of the error messages (all of which suggest GAE is running 
out of time or resources in a variety of interesting ways), suggest to 
me that this is a GAE infrastructure problem, but I've yet to find 
anyone else definitively bitten by the same thing (although there is a 
lot of grumbling in the GAE forums about high latency).


I've raised a production issue [1], so far with no response, and have 
moved the app off GAE so that I can carry on working, so the pressure is 
off.


Has anyone else using this combination of GAE facilities (and especially 
CloudSQL) experienced anything similar?


FWIW, my (relatively trivial) apps running purely on the normal HRD 
data-store are running fine.



[1] https://code.google.com/p/googleappengine/issues/detail?id=8918

--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: auth.wiki and the menu

2013-02-28 Thread Philip Kilner

Hi Alan,
On 28/02/13 10:32, Alan Etkin wrote:

Mind that if this is run in the same action as the app wiki, you'll
duplicate the menu item. For solving this, add a conditional statement
to the model so the menu item is appended only if it's not a wiki.



Thanks for responding.

Yes, I think that the least inelegant thing is to ensure that both menu 
options have the same name, and make the non-wiki one conditional on a 
non-wiki controller. Not terribly elegant, but transparent to the user.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] ajax callback not work in form()

2013-02-28 Thread Philip Kilner

Hi,

On 28/02/13 08:13, 黄祥 wrote:

1. if i use sqlform.factory the submit button will be automatic
generated but not used it, isn't it?


You can customise that, as per the custom forms section in the book.


2. if using form custom, the form action can't be modified, because i
want to add and store the user input quantity in the field and it's
prodcut id using callback?


The form will submit to itself (e.g. the controller function behind the 
LOAD), which is what you want if you are suing SQLFORM.



3. if back to ajax again using component , why not using callback in the
a html built in helper, at the first time? like my code above



Prior to your user selecting a quantity and clicking submit, the form 
can be qty. field + button. After the user clicks submit, you can code 
what to display next.


Have you experimented with LOAD and components?


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner

Hi Stifan,

On 28/02/13 07:44, 黄祥 wrote:

a, i c, i get it to use sqlform.factory and if form accepted store it in
session for id and quantity, the main problem is in my view i make a
condition for view as grid or view as list, i don't think it can be done
by sqlform, since the form place is vertical, not horizontal, if you use
the list view. till now everything is work fine, yet i just want to add
the form field so that make the user more convinient if they want to
order more than 1 items.



If you use SQLFORM.factory, pull the resulting form into a table cell 
using a LOADed component and customise the form as documented in the 
book, you can create a form with a qty. input field and a button beside 
it, if that's what you want.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] REF: SQLFORM in HTML

2013-02-27 Thread Philip Kilner

Hi Teddy,

Ignore my last - I'd overlooked that you were using "session=None". I'll 
drink more coffee!


N.B. Using SQLFORM that way turns off some valuable protection.

As your other reply suggests, the lack of a form "action" may be the issue.


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner

Hi,

On 28/02/13 07:28, 黄祥 wrote:

thank you so much for your recommendation, i think sqlform will store it
into database table not in session



It will - but you can use SQLFORM.factory to get the benefit of web2py's 
form processing without using the db: -


http://web2py.com/books/default/chapter/29/07#SQLFORM-without-database-IO

...and script what you do with the data if the form is accepted.


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner

Hi,

On 28/02/13 07:01, 黄祥 wrote:

do you have any hints, correction or suggestion about this things?



I'd very strongly recommend using SQLFORM rather than rolling your own 
forms, and components + LOAD rather than rolling your own Ajax.


Doing this stuff by hand is do-able but fiddly and tedious - that's 
exactly what web2py can save you form if you use its facilities.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] REF: SQLFORM in HTML

2013-02-27 Thread Philip Kilner

Hi Teddy,

On 28/02/13 06:51, Teddy Nyambe wrote:

I am following the book example with modified tables, the form is not
being processed in the controller, what could be wrong with my code below:



I think it's the way you have constructed your form: -


*add_address.html [View]*

{{extend "layout.html"}}

 
 
 Enter street: 
 
 
 Enter suburb: 
 
 
 Enter town: 
 
 
 Enter province: 
 
 
 
 
 
 




See the sections in the book on hidden fields: -

http://web2py.com/books/default/chapter/29/07#Hidden-fields

...and custom forms: -

http://web2py.com/books/default/chapter/29/07#Custom-forms

In your case, I think that the specific problem is the lack of the 
"_formkey" field. You can still customise your form but use 
{{=form.custom.begin}} and {{=form.custom.end}}.




HTH

--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] ajax callback not work in form()

2013-02-27 Thread Philip Kilner

Hi,

On 28/02/13 05:54, 黄祥 wrote:

i've tried to learn ajax callback using form(), but it's not work (no
error occured), did anyone know the solution for this?
thank you very much before



I'm having a little trouble understanding what you are doing here - I 
would definitely use the tools that web2py offers rather than trying to 
bypass them.


In this case you could use a component as described here: -

http://web2py.com/books/default/chapter/29/12#Components

Having said that, in your view you have: -


*#view*
*testing 1** not work no error occured:*
 {{for i,row in enumerate(rows):}}
 {{if i==items_per_page: break}}
 
 {{=SPAN(row.product_name)}}
 
 {{=SPAN(session.order.get(row.id,0),
_id="item%s"%row.id), T(' In Order')}}
 
 {{=form}}
 


...a form per table row and...


*{{=A('Order Now!!!', callback=URL('order_callback',
vars=dict(id=row.id, quantity=request.vars.quantity, action='add')),
target='item%s'%row.id, _title='Add the Order', _class='btn btn-navbar')}}*
**


...your button outside the form - is that intentional?

Web2py provides some very nifty tools for taking the hard work out of 
this - can you help us understand why you don't want to use them?


Your question puts me in mind of the old joke: "If I was going there, I 
wouldn't start from here". Perhaps we could be of more help to you if 
you asked us how we would accomplish these tasks, so that we can suggest 
a web2py-ish approach.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] auth.wiki and the menu

2013-02-27 Thread Philip Kilner

Hi,

I'm using auth.wiki() to document my app, and am failing to understand 
how it interacts with the menu.


I've defined my wiki, and added it to the menu as I would any other 
function. However, when I access it, both the menu defined /within/ the 
wiki and the wiki menu itself appear in the menu after the "help" option.


That's fine, except that my original link to the wiki is redundant - 
what is the intended way (if any) to add the wiki menu as an item in the 
web2py menu?


The book says "Mind that the menu is appended to response.menu. It does 
not replace it. The [wiki] menu item with service functions is added 
automatically.", and this works perfectly when you are in the wiki - my 
issue is how to get the wiki into the top-level menu in the rest of the 
site.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] @auth.requires_login() for every function

2013-02-27 Thread Philip Kilner

Hi All,

This is one of those "I really ought to know this one" things...

I'm used to selectively requiring login, per function.

However, this is too easy to overlook!

Is there a quick way to require login for either every function in a 
given controller, or for the entire app?


(Have scoured the book, but don't think I'm using the right search terms!)



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Performance issues while opening webpage with more than 1 lakh records.....

2013-02-22 Thread Philip Kilner

Hi Niphlod,

On 22/02/13 08:33, Niphlod wrote:

PS: I may be old enough to miss some new-style definitions, but what is
precisely " 1 lakh records" ?



100k - see http://en.wikipedia.org/wiki/Lakh


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Re: Fixing Failed Migrations

2013-02-21 Thread Philip Kilner

Hi Niphlod,

Thanks for the quick reply.

On 21/02/13 13:18, Niphlod wrote:

I'll explain the normal behaviour, don't know if it applies to google
cloud sql.



I think its behaviour is that of MySQL.


web2py receives a request. that request execute models. in models you
have the db definition.



Understood.


If migrations are turned on (migrate=True), web2py compares the current
define_table statements with the .table files stored inside the
/databases/ folder. If a difference is found, it triggers migrations
(column add, drop, etc). If not, it continues.



Got it - so it's not looking at the db (which it assumes matches the 
.table files), just comparing the .table files to the definitions in db.py.



When fake_migrate is turned on(fake_migrate=True), web2py just replaces
all the .table files inside the databases/ folder to match the
define_table statements.



Ahah - I think I see where I misunderstood.

So, if "fake_migrate" brings the .table files into sync with the 
definitions, regardless of the state of the db, what I need to do to get 
back in step is to make the definitions match the /actual/ state of the 
db, or /vice versa/, so that all three elements are in sync?


If so, that's nice and simple!


If migrations are turned off (migrate=False), web2py uses the
define_table statements to build the environment, without checking the
.table files.



Understood.


All of this happens for all tables in one request only. If lazy_tables
is turned on instead, migrations occur when the table is accessed inside
your code.

Did I cleared the doubts ?


I think so - if I have it right above!

:-)


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




[web2py] Fixing Failed Migrations

2013-02-21 Thread Philip Kilner

Hi All,

I have a failed migration (on Google Cloud SQL, so MySQL, near enough).

Looking at the web2py boo, it suggests using: -

db.define_table(,migrate=False,fake_migrate=True)

...to find the problem table - done.

I then says "This will rebuild web2py metadata about the table according 
to the table definition.", which suggests to me that the migration 
should run afterwards.


However, the book says "Once successful remove the fake_migrate=True 
attribute." I'm confused by this, as it implies that the "migrate=False" 
should be left in place.


If I do that I can access my table, but if I remove it I get a failed 
migration ticket again,


Can someone clue me in as to the proper sequence, please? Ta!


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: Customising SQLFORM.grid

2013-02-21 Thread Philip Kilner

Hi Niphlod,

On 21/02/13 09:47, Niphlod wrote:

- I'd like to move the pagination control to the top.

Use css rules, or js. Let it be flexible, grid's markup is still
experimental (i.e. could change in future versions)



OK - is there a decent example of this anywhere? Will roll my sleeves up 
if not, but I find CSS a bit of a time-sink, sadly!



- the underneath form is a SQLFORM. formargs, createargs, editargs are
your friends, and formstyle and ui too. Naming conventions are the same
of a SQLFORM. That should not change at all.



Got it - will experiment.


- I'm using jQueryUI, and seem to have something odd going on with
buttons, which are just showing as links. I'd like to work out how to
either show the original style, or the jQueryUI style.

- did you try with ui = 'jquery-ui' ?



Yes, that's what I'm doing - the jQueryUI style kicks in perfectly, 
except for the buttons. I see the text for each as a link, and on some 
rows (!) I see the icons, just no button. Will dig into the CSS and see 
if I can debug that.



- I'd like to write some documentation for the search functionality,
targeted at end users. If I write something, would somebody who knows
the deeper functionality be kind enough to proof-read it for me?

If it's good we can put it also in the book, so yes, someone looking at
it will definitely be found :P



Good stuff - it's for a general audience, so should work for anyone.


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




[web2py] Customising SQLFORM.grid

2013-02-21 Thread Philip Kilner

Hi,

I'm making a lot of use of SQLFORM.grid, which is a great tool, and has 
saved me an enormous amount of time.


Now that I have my application running, I'd like to customise some
aspects of it, and wondered if there was a "howto" somewhere, or if
anyone has any suggestions about the best way to approach specific 
things I'd like to do: -


- I'd like to move the pagination control to the top.

- I'd like some control over form layout, at least wrapping groups of 
fields in field-sets, and ideally tweaking the layout where multiple 
fields would be better on one line. I know I can do this by using 
SQLFORM, just wondered if there was a batter way when working with the 
grid - or can I modify SQLFORM.grid in the same way, perhaps? (Just need 
to understand the naming convention in that case)


- I'm using jQueryUI, and seem to have something odd going on with 
buttons, which are just showing as links. I'd like to work out how to 
either show the original style, or the jQueryUI style.


- I'd like to write some documentation for the search functionality, 
targeted at end users. If I write something, would somebody who knows 
the deeper functionality be kind enough to proof-read it for me?


Grateful for any pointers!


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: Forcing SSL mode (on GAE)

2013-02-06 Thread Philip Kilner

Hi,

On 06/02/13 20:45, howesc wrote:

if you want all requests in SSL it sounds like the best thing to me.



Yes, it's working very well from my PoV - but my needs are very simple 
in that I want to force SSL for everything. I'm used to doing this in 
Apache, so haven't previously had to think about it enforcing it within 
the app.


There was a browser-specific issue where e.g. Firefox worked 
immediately, but Chrome blocked the jQuery scripts from Google's CDN on 
the basis that they were insecure. Changing the link to the scripts to 
https sorted that.



note that on GAE if you want to use SSL and a custom domain you have to
purchase additional add-ons to the GAE service.  https on the
appspot.com domain is free.



Understood - I'm happy withe the appspot.com URL, FWIW.


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] Forcing SSL mode (on GAE)

2013-02-05 Thread Philip Kilner

Hi All,

Am just about to test using "request.requires_https()" to force my GAE 
sessions into SSL mode.


Is this the best way to do it (a) generally or (b) on GAE in particular?


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Interesting about JSON license...

2013-01-30 Thread Philip Kilner

Hi Angelo,

On 30/01/13 10:31, Angelo Compagnucci wrote:

Please see in Debian the software Douglas Crockford has polluted with
that clause!

http://codesearch.debian.net/search?q=The+Software+shall+be+used+for+Good%2C+not+Evil

Very sad ...



I agree, but this: -

http://dev.hasenj.org/post/3272592502

...made me laugh!

:-)


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner

Hi Alan,

On 30/01/13 13:43, Alan Etkin wrote:

 > I had understood that web2py detected the server automagically (for mail
 > as it does for the db) so IOW I believe that "server='gae'" is set in
 > code, and my working hypothesis is that it is this detection which is
 > somehow failing.

Now I've read the book :P . And it states that for GAE you should, as
Niphlod posted, set the settings.server option



Ahah - searching for that string, I find it here: -

http://web2py.com/books/default/chapter/29/08?search=mail.settings.server

...but I was looking here: -

http://web2py.com/books/default/chapter/29/13#Deploying-on-Google-App-Engine


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner

Hi Niphlod,

On 30/01/13 13:09, Niphlod wrote:

try with

mail.settings.server = 'gae'



Aargh!

That did it, and Googling that line took me straight to: -

http://stackoverflow.com/questions/2656068/sending-email-from-an-web2py-on-gae

...which I should have found at 8:30 this morning if my Google-Fu hadn't 
been on the fritz!


Those two options are working for me with the same conditional logic as 
applies to the database section at the top of db.py: -


if not request.env.web2py_runtime_gae:
## if NOT running on Google App Engine use sockets
mail.settings.server = 'smtp.gmail.com:587'
else:
## connect use GAE
mail.settings.server = 'gae'

I've gone back over my process, and I suspect that the accounts on GAE 
that I've already set up were set up before I changed the auth 
configuration, so the confusion has been entirely on my part.


I'm curious, though - given that the database switch is handled 
automagically in the script, is there a reason that the mail 
configuration should not also be handled conditionally, as above? My app 
is targeted at GAE, but I am also testing RDBMS back-ends as a fall 
back, so I'm switching back and forth all the time.


I'm so used to web2py looking after the db for me that I'm spoiled!

:-)

Thanks Alan and Niphlod!


--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner

Hi Alan,

On 30/01/13 12:53, Alan Etkin wrote:

I may be wrong, but It seems to me that when creating the mail object in
the model, you need to pass explicitly the server='gae' argument. (the
class docstring says it so in trunk at least)

Perhaps you can test that mail.settings.server is 'gae' before your app
sends the email. Otherwise, web2py will other send method.



I had understood that web2py detected the server automagically (for mail 
as it does for the db) so IOW I believe that "server='gae'" is set in 
code, and my working hypothesis is that it is this detection which is 
somehow failing. I'll go read the docs again, as I've been staring at 
this and repeatedly retesting for longer than is good for me.


Will keep plugging away - Thanks again for helping me think this one 
through...



--

Regards,

PhilK


'a bell is a cup...until it is struck'https://gk-hercules

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner

Hi,

On 30/01/13 12:31, Philip Kilner wrote:

The more I think about it the more I wonder if the use of the router is
an issue



Just to close the loop on that, disabling routing made no difference.

I've just created a clean app to test, with the following settings for 
auth and mail: -


## configure email
mail = auth.settings.mailer
mail.settings.server = 'smtp.gmail.com:587'
mail.settings.sender = 'phil.kil...@gmail.com'
mail.settings.login = 'phil.kil...@gmail.com:myappspecificpassword'

## configure auth policy
auth.settings.registration_requires_verification = True
auth.settings.registration_requires_approval = False
auth.settings.reset_password_requires_verification = True

...and retested with the same results - SMTP sending under pure web2py 
is fine, but not under the GAE dev server or GAE production server.



--

Regards,

PhilK


e: p...@xfr.co.uk - m: 07775 796 747

'work as if you lived in the early days of a better nation'
- alasdair gray

--

--- 
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/groups/opt_out.




Re: [web2py] Re: GAE Email Sending Issue

2013-01-30 Thread Philip Kilner

Hi Alan,

Thanks for responding!

On 30/01/13 12:01, Alan Etkin wrote:

Have you updated your app's code before the issue?



Yes, I'm in the process of commissioning this app, and have had to make 
many changes to the model as I import real world data, but none in the 
relevant period to the application itself.


The issue affects another web2py+GAE app that I've been working on (same 
pattern, sends locally under web2py, but not locally under GAE 
devserver, or remotely under GAE), but the only change that I've made at 
the web2py level (as apposed to individual apps) is to implement routing 
- I'm going to try without routing and see if that makes a difference.



It migh help if you could post the relevant part of the app that handles
sending the email. If you did not make code changes or updated web2py,
I'd say it's most surely related to changes made on GAE itself.



In terms of the mail sending, this is web2py's account management 
mechanism, completely unmodified - I'm only looking to create accounts 
and reset passwords.


I've tested mail sending: -
- Running pure web2py locally: works
- Running the GAE Development server locally: fails
- Running on GAE remotely: fails

...so I think it's related to the GAE mail send mechanism, rather than 
GAE's infrastructure (because it fails locally on the GAE dev server) or 
an issue with my application as such (because that works locally other 
than under the GAE dev server).


As I read it, the error indicates that the mail is being sent over SMTP 
(so fails as no sockets on GAE), but looking at the code in tools.py, it 
seems that the GAE server should be detected, and its own mail mechanism 
used - so my hypothesis is that for some reason that detection is not 
firing. However, I'm really not that comfortable deep in the gluon code, 
so am not 100% confident of that.


The more I think about it the more I wonder if the use of the router is 
an issue - that's something that I'm doing differently in these two 
apps, something that changed in the relevant period and something at the 
web2py rather than app level.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




[web2py] GAE Email Sending Issue

2013-01-30 Thread Philip Kilner

Hi All,

Am trying to resolve an issue with sending email on App Engine.

My application throws an "Unable to send email" error, and the logged 
error is: -


2013-01-30 09:06:16.409 Mail.send failure:The API package 
'remote_socket' or call 'Resolve()' was not found.


Running locally mail is sent fine, but running under the local GAE 
development server or on GAE itself the send fails.


Looking at the logs, the exception is caught in gluon/tools.py at line 
686, and looking at the code it seems that my app may trying to use the 
"normal" method of sending mail, rather than GAE's own.


Unfortunately, this was working a couple of days ago (accounts created 
and mail sent both in testing and production), and I'm not aware of any 
change which could have triggered this issue, so I'm having trouble 
figuring out where to start troubleshooting this.


Can anyone clue me in as to what is going on here?

I'd be particularly grateful if anyone can comment on whether my 
hypothesis that my web2py app is not  using GAE's mail sending tools is 
correct!



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--

--- 
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/groups/opt_out.




Re: [web2py] Re: autoroutes.py and static files on GAE

2013-01-24 Thread Philip Kilner

Hi Jonathan,

On 24/01/13 15:27, Jonathan Lundell wrote:

Have you disabled static file mapping in app.yaml?



I hadn't, no - only the app name and the Python version are changed there.


--

Regards,

PhilK


'a bell is a cup...until it is struck'

--





[web2py] Re: autoroutes.py and static files on GAE

2013-01-24 Thread Philip Kilner

Hi,

I couldn't make any sense of the issue with autoroutes.py, so had a look 
in the cookbook, only to find that the functionality I was after (map a 
host-name to an app) is in the "normal" parameter-based router, and have 
tested and confirmed that this works as expected on GAE.


If I can help test the original issue with autoroutes.py, please let me 
know (app not in production for a while yet, so can experiment), but I'm 
happily using the parameter based router now and all is well, so this is 
mainly just a note for anyone who hits the same issue as me.


If anyone else does have the same issue with autoroutes.py, please let 
me know and I'll raise I ticket - I won't otherwise as I'm not 100% sure 
that the issue is a bug in the first place.



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--





[web2py] autoroutes.py and static files on GAE

2013-01-24 Thread Philip Kilner

Hi All,

I'm deploying an app to GAE, and am exploring the routing options.

Because my needs are simple (just need to map to app based on hostname) 
auroroutes.py would be my preferred option.


I've used auroroutes.py before behind Apachge without problems, but on 
GAE my pages work but the CSS, JS and images from /static are not shown. 
Without routing, the app works as expected.


Can anyone clue me in as to how to troubleshoot this, or confirm that it 
is / is not working for them?



--

Regards,

PhilK


'a bell is a cup...until it is struck'

--





[web2py] Re: How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi Margaret,

On Monday, 17 September 2012 21:36:47 UTC+1, greaneym wrote:
>
> Here is a copy of my model, controller and view files where I got it to 
> work.
>

Great, thanks - just what I needed.
 

> You need to obtain a key from google because if more than a default number
> of people visit your site, you will have to pay them for the use. I forget 
> what is that specific rule, but you can read their policy.
>
>
This is going to be the sticking point, I think.

The issue is that the plugin appears to use the Google Maps v2 API, but 
this is deprecated and new keys are not available (although existing 
keys continue to work).

--

Cheers, 

PhilK

-- 





[web2py] Re: How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi,

Having dug a bit deeper into the options available, it doesn't look like 
much of a chore to roll my own Google Maps integration. 

Looking at my choices this one: -

http://code.google.com/p/jquery-ui-map/ 

...looked promising, but i wondered what others were using?

However, I'm now curious about the status of plugin_wiki - I was surprised 
when I clicked on the link to the Mercurial repository for plugin_wiki to 
see if I could check out an updated version to be be taken to: -

http://code.google.com/p/cube2py/ 

...which seems to be an earlier version.

Can I ask if there is a more current version of plugin_wiki than that 
available for download?


--

Cheers,

PhilK

-- 





[web2py] How to use maps in plugin_wiki

2012-09-17 Thread Philip Kilner
Hi,

I'd like to embed a map in a view, and am trying to use plugin_wiki.

I have plugin_wiki installed, and when I use a simpler function, like the 
YouTube example: -

{{=plugin_wiki.widget('youtube',code='l7AWnfFRc7g')}}


...all is well.

However, if I try to embed a map, I get a ticket with: -

Traceback (most recent call last):
  File "/home/philk/web2py/gluon/restricted.py", line 209, in restricted
exec ccode in environment
  File "/home/philk/web2py/applications/myapp/views/property/index.html", line 
151, in 
AttributeError: 'PluginWiki' object has no attribute 'map'

Can anyone clue me in as to what I'm  missing?

N.B. I'm new to plugins (most of my apps a re simple CRUD), so I may well 
have overlooked something fundamental.

Also, when I get it working I'm a bit confused about the need for an API 
key - the book says "key is the google map api key (default works for 
127.0.0.1)", but first of all I don't see a default key, and secondly I see 
from the docs at: -

https://developers.google.com/maps/signup

...that the version that needed an API key is deprecated, so I'm concerned 
that the map plugin itself may be updated.

What would really help me out would be a downloadable app that contained a 
worked example, if there is such a thing.

---

Cheers,

PhilK








-- 





[web2py] Accessing id in SQLFORM.process()

2012-09-05 Thread Philip Kilner
Hi,

I'm trying to wean myself of CRUD and am doing an insert with 
SQLFORM.process().

I want to redirect on success to view the newly inserted record.

How can I access the ID of the new record in this context? 

Hoped I could do something like: -

SQLFORM(db.t_account).process(next=URL(c='account',f='index', 
args=['t_account', id]))

--

Cheers,

PhilK

-- 





Re: [web2py] New HackerNews discussion about python frameworks - web2py is not getting enough love

2012-03-28 Thread Philip Kilner

Hi,

On 28/03/2012 15:08, nick name wrote:

Come say the good things you have to say about web2py on
http://news.ycombinator.com/item?id=3765610


Late catching up here because I've been following that!

Had to call the Django guy out on his (completely unsupported) statement 
that web2py is "a fundamentally incorrect way to approach web 
development", a statement that he made *AFTER* admitting that he'd never 
used it!


Not being a fan of flame-wars, I try to restrict myself to establishing 
whether people who criticise web2py have actually used it - so far 100% 
of critics that I've encountered have /not/ used it, which I think 
speaks volumes...




--

Regards,

PhilK


'a bell is a cup...until it is struck'



Re: [web2py] Installing PIL for creating thumbnails in windows7 environment

2012-03-13 Thread Philip Kilner

Hi Praveen,

On Tue 13 Mar 2012 17:25:54 GMT, praveen krishna wrote:
I treid to install from http://www.pythonware.com/products/pil/ 
 but it is asking to register 
python 2.7 I tried to register using the script given in link 
http://effbot.org/zone/python-register.htm but it is giving an error

*** Unable to register!
*** You probably have another Python installation!
and in set up file of PIL it asking to enter python directory and 
installation directory I tried to paste the directory but I am unable 
to do so.Is it possible after registering the python 2.7?




Are you running the source version of web2py, or have you downloaded 
the Windows distribution?


If you are using the Windows version, its built-in Python interpreter 
will not be registered with the system such that the PIL installer can 
find it.


You will probably find things simpler in the long run if you use the 
source version. If you do, you will need the PIL windows installer that 
matches the version of Python that you have installed.


HTH


--

Regards,

PhilK


'a bell is a cup...until it is struck'




Re: [web2py] Re: Resources for setting up for development

2012-01-16 Thread Philip Kilner

Hi,

On 16/01/2012 01:25, pbreit wrote:

My sense is that few Python programmers use IDEs (I don't know any that
do). If it's a brief talk, I'd suggest just using the file system and a
good text editor and moving quickly to some of the great features of
Web2py. If someone complains about code completion, you can say it's
possible (with Anthony's suggestion) and move on.


Yes - Anthony's suggestion is close to what I use (I seem to have a long 
explicit list, but the effect is the same).


I don't want to get hung up on this because it's trivial, really - it's 
just that the "magic import" thing is where people seem to focus, and 
since this is related I didn't want to pass on out of date info or 
contradict the consensus as to what is best practice.



--

Regards,

PhilK


'a bell is a cup...until it is struck'



Re: [web2py] Re: Resources for setting up for development

2012-01-15 Thread Philip Kilner

Hi Alan,

On Sun 15 Jan 2012 12:37:26 GMT, Alan Etkin wrote:

An open source integrated software for development with RAD and
support for web2py is being developed by M. Reingart here:
http://code.google.com/p/rad2py .He participates in this group, so
maybe he can explain in more detail the features of the project.



Thanks for that - definitely worth a mention.

However, what I'm more focused on is being able to point people using 
their existing development tools towards some docs that they'll 
understand.


I have a couple of files (one for models, one for controllers), with a 
great long list of imports and what have you to support the editing 
process, and I import from those files. It works fine for me, but it's 
not pretty, and it rather undermines Massimo's statement in the book 
that "web2py is trying to avoid the annoying characteristic of other 
frameworks that force the developer to import the same modules at the 
top of every model and controller" if I'm doing exactly that to support 
editing, even if the code is "dead" in production!


In reality, I've been asked to give a short informal talk to a friendly 
group, but the intemperate nature of some of the negative comments 
about web2py makes me feel like an ambassador for web2py venturing into 
potentially hostile territory...




  1   2   >