[web2py] How to restrict file type to pdf

2014-08-06 Thread 'sasogeek' via web2py-users
How can I restrict the uploaded file type to only pdf? I know that with 
images i could use the IS_IMAGE() validator, I don't know how to do same 
for pdf files though. help...?

-- 
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 on heroku getting "InternalError: current transaction is aborted..." Ticket

2014-08-06 Thread Louis Amon
Got the same issue as well.

Apparently the problem has to do with the "UseDatabaseStoredFile" class 
inherited by the "HerokuPostgresAdapter".

It is designed to store the filesystem ("databases" folder and files) in a 
table instead, and was created for GAE but doesn't seem to work on Heroku.

That's about as far as I can go, being a novice and all...

Should I issue a ticket ?

On Thursday, March 13, 2014 4:11:54 PM UTC+1, Chris DeGroot wrote:
>
> That's unfortunate to hear that you haven't resolved it.  I am having the 
> exact same problem.  Locally everything is fine, on Heroku, nothing.
>
> On Thursday, March 13, 2014 11:06:51 AM UTC-4, Ismael Serratos wrote:
>>
>> Nope, in fact I switched to ror :S because I needed to run on heroku ASAP.
>>
>> But I still getting the error on every web2py application I try to deploy 
>> on heroku. If I use postgres locally everything works just fine.
>>
>> On 12/03/2014, at 18:31, Chris DeGroot  wrote:
>>
>> Did you solve this problem?  I have the same issue and the links at then 
>> end don't help.
>>
>> On Friday, December 27, 2013 11:45:24 PM UTC-5, Ismael Serratos wrote:
>>>
>>> Hello everybody, today I tried to push my application to Heroku by using 
>>> the setup-web2py-heroku.sh script. It works fine, but when opening my app I 
>>> get a ticket with this content:
>>>
>>> web2py™Version 2.8.2-stable+timestamp.2013.11.28.13.54.07PythonPython 
>>> 2.7.4: /app/.heroku/python/bin/python (prefix: /app/.heroku/python)
>>> Traceback
>>>
>>> 1.
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>> 7.
>>> 8.
>>> 9.
>>> 10.
>>> 11.
>>> 12.
>>> 13.
>>> 14.
>>> 15.
>>> 16.
>>> 17.
>>> 18.
>>> 19.
>>> 20.
>>> 21.
>>> 22.
>>> 23.
>>> 24.
>>> 25.
>>> 26.
>>> 27.
>>> 28.
>>> 29.
>>> 30.
>>>
>>> Traceback (most recent call last):
>>>   File "/app/gluon/restricted.py", line 217, in restricted
>>> exec ccode in environment
>>>   File "/app/applications/init/models/db.py" 
>>> ,
>>>  line 16, in 
>>> db = get_db(name="HEROKU_POSTGRESQL_RED_URL", pool_size=10)
>>>   File "/app/gluon/contrib/heroku.py", line 26, in get_db
>>> current.session.connect(current.request, current.response, db=db)
>>>   File "/app/gluon/globals.py", line 833, in connect
>>> migrate=table_migrate,
>>>   File "/app/gluon/dal.py", line 8139, in define_table
>>> table = self.lazy_define_table(tablename,*fields,**args)
>>>   File "/app/gluon/dal.py", line 8176, in lazy_define_table
>>> polymodel=polymodel)
>>>   File "/app/gluon/dal.py", line 1056, in create_table
>>> query), table)
>>>   File "/app/gluon/dal.py", line 815, in log
>>> logfile = self.file_open(table._loggername, 'a')
>>>   File "/app/gluon/dal.py", line 4488, in file_open
>>> return DatabaseStoredFile(self.db,filename,mode)
>>>   File "/app/gluon/dal.py", line 4416, in __init__
>>> self.db.executesql(sql)
>>>   File "/app/gluon/dal.py", line 8349, in executesql
>>> adapter.execute(query)
>>>   File "/app/gluon/dal.py", line 1916, in execute
>>> return self.log_execute(*a, **b)
>>>   File "/app/gluon/dal.py", line 1910, in log_execute
>>> ret = self.cursor.execute(command, *a[1:], **b)
>>> InternalError: current transaction is aborted, commands ignored until end 
>>> of transaction block
>>>
>>> I'm getting this ticket with my app and even with a blank copy of web2py 
>>> and the default apps. The admin interface works just fine. What can be the 
>>> cause of this issue?
>>>
>>> *Note: In the traceback I pasted here I did replace the get_db connection 
>>> name to the generated one, but the traceback is basically the same if I use 
>>> the default (none).
>>>
>>> Best regards,
>>>
>>> Ismael Serratos.
>>>
>>>
>>>
>>>  -- 
>> Resources:
>> - http://web2py.com
>> - http://web2py.com/book (Documentation)
>> - http://github.com/web2py/web2py (Source code)
>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/w2RJBqKIwRE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] reLOAD only if modified

2014-08-06 Thread Martin Weissenboeck
What I want:

I use a LOAD helper, which refreshes a page every second. But it would be
better to transfer this page only if it has changed. Anthony wrote on
http://stackoverflow.com/questions/14515313/how-to-modify-web2py-download-function-to-return-304-not-modified-in-case-the
how to change the header. I have added an ETag-field, but it does not seem
to work.

In order to test the idea I wrote:

def mytime():
jetzt=str(request.now)[:19]
mtime = "Mi, 06 Aug 2014 08:11:00 GMT"
response.headers['Last-Modified'] = mtime
response.headers['Pragma'] = 'cache'
response.headers['Cache-Control'] = 'private'
response.headers['ETag'] = "123"
return dict(jetzt=jetzt)

request.now gives the actual time, but if "Last-Modified" and "ETag" are
always the same I think I should see the same time on each call.

Ok, it does not work - what is wrong? Any ideas?

Regards, Martin

-- 
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] Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Dragan Matic
If I do something like this:

new_id = db.table1.insert(...)

and there is a trigger that inserts row in another table (table2) based on 
insert in table1 then the value of new_id is the id that is inserted in 
table2 instead of table1. Is this a bug or a feature? If it is a feature 
how can I get id from table1?

Dragan


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to restrict file type to pdf

2014-08-06 Thread Leonel Câmara
requires = IS_UPLOAD_FILENAME(extension='pdf')

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Leonel Câmara
Check _after_insert it's probably what you want.

http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Niphlod
it doesn't have to do with after_insert . it's something "broken" at 
the backend level. what backend are you using dragan ?

On Wednesday, August 6, 2014 12:24:15 PM UTC+2, Leonel Câmara wrote:
>
> Check _after_insert it's probably what you want.
>
>
> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Dragan Matic
Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
Database drivers available: SQLite(sqlite3), MySQL(pymysql), 
PostgreSQL(pg8000), IMAP(imaplib)

Postgresql 9.3 on linux mint 17. 

trigger is BEFORE_INSERT

On Wednesday, August 6, 2014 12:30:30 PM UTC+2, Niphlod wrote:
>
> it doesn't have to do with after_insert . it's something "broken" at 
> the backend level. what backend are you using dragan ?
>
> On Wednesday, August 6, 2014 12:24:15 PM UTC+2, Leonel Câmara wrote:
>>
>> Check _after_insert it's probably what you want.
>>
>>
>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Dragan Matic
I have found what causes it, in dal.py in PostgreSqlAdapter this method is 
supposed to return last inserted id:

def lastrowid(self,table = None):
self.execute("select lastval()")
return int(self.cursor.fetchone()[0])

This here 
http://stackoverflow.com/questions/17819001/postgres-not-returning-lastval-properly
  
says this the wrong way to ask for ID and that it should be returned this 
way:

insert into table ([columns]) values  ([values]) returning id

So it will return wrong ID everythime there is trigger that inserts 
something else somewhere else. 

I'm sending a bug report 





On Wednesday, August 6, 2014 12:43:38 PM UTC+2, Dragan Matic wrote:
>
> Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
> Database drivers available: SQLite(sqlite3), MySQL(pymysql), 
> PostgreSQL(pg8000), IMAP(imaplib)
>
> Postgresql 9.3 on linux mint 17. 
>
> trigger is BEFORE_INSERT
>
> On Wednesday, August 6, 2014 12:30:30 PM UTC+2, Niphlod wrote:
>>
>> it doesn't have to do with after_insert . it's something "broken" at 
>> the backend level. what backend are you using dragan ?
>>
>> On Wednesday, August 6, 2014 12:24:15 PM UTC+2, Leonel Câmara wrote:
>>>
>>> Check _after_insert it's probably what you want.
>>>
>>>
>>> http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#before-and-after-callbacks
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] web2py with google visualisation app.

2014-08-06 Thread Avi A
Hi,
I just wanted to share  a short video of an app I made.
What it does in short;
I do mobile automated tests locally. I use selenium/appium and applitools 
(awesome startup) which does screenshots comparison for me and when the 
test ends, they send a json with failed/passed counts info.
when tests ends, I post the data to the web2py app, (post api) where i save 
the tests' data, and display it with google visualisation api and allow 
saving the results as a report on excel file, for each given view/filter.
Thank you all for the support, special thanks to Anthony and Niplod.
http://goo.gl/LOaAhs


-- 
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 Forms and Javascript

2014-08-06 Thread Richard Vézina
Ok, so the list is a should be a dropbox in your app where you can pick the
service or the pieces in you invoice? I guess it is now an kind of check
list you receive to create the invoice?

There is a lot of wording in your business you could start by simplifying
all the concept the use and figure out what it refer to in a simple invoice
app, like invoice and item, etc.

To me you need a invoice table structure for your service order, you need
item table for all the service your business provide that will serve as a
lookup table to make sure employee don't spell service or product
differently from time to time. Then you need to a complex form to make all
this working together with consumer table, etc.

Some time you don't want to make a system so custom that only well trained
person can understand. Paper system tend to be not well organize and
thought because relation between stuff wrote there is just the sheet of
paper, no multiplicity and well define relation with the rest of the thing.
Things get added overtime and they just add a check box for instance and
when you try to deconstruct all this you discover that there is many
missleading practices that you should not allow in a computing system. I
would not try to make my system do the exact workflow process then the
paper because it will surely lead to a poor db and app design.

It is difficult to help you with the design because there a lot of work
that I can really do for you (missing info and lack of knowledge of you
organisation). But you should start by create a db schema that is
normalized and follow invoice system best practices before the thinking to
your app. Don't think how you will implement you app at first because it
will bring you to make mistake in you db schema. Once you have a good db
schema (that you can pick on the web directly, they are mostly good because
invoice systeme is a big classic) you can start to implement the app and
start feelling nervous because you don't know how to do it :)

When there is only to find a way to create a complex form, if you ask the
right question here you will get the exact pieces of code you need. There
is also the web2py slices that are really good.

Richard




On Tue, Aug 5, 2014 at 3:27 PM, Jesse Ferguson  wrote:

> The service order on the right is what is completed in the field by the
> techs. (The part they bring me). The form on the left is what our company
> calls a Work-Up. The work up Is created by me by taking the service orders
> information and the information from a rolodex card. The rolodex card (not
> pictured) contains just basic information about the company and location
> (mileage to charge and hours). then i scan them both just as pictured and
> send them to main office.
>
> --
> 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.
>

-- 
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] SQLFORM cache? Cacheable=True?

2014-08-06 Thread LoveWeb2py
Hello,

I'm trying to understand the cacheable=True option. Does this just make the 
database cacheable or does it actually cache it. When I check web2py's 
cache status it says nothing is in the cache so I'm guessing it doesn't 
actually cache anything.

Is it possible to cache a SQLFORM? I'm hoping this will take a load off my 
httpd resources which seem to spike when users access the SQLFORM.

Also, what is the proper way to cache. I've been looking at the web2py 
cheat sheet but its a little confusing for me.

Do I need to put
@cache('key',3600,cache.ram)
@cache('key',3600,cache.disk)

On top of the function?

What is the most memory efficient way of displaying large databases?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM cache? Cacheable=True?

2014-08-06 Thread Niphlod
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=cacheable#Caching-selects

On Wednesday, August 6, 2014 4:19:12 PM UTC+2, LoveWeb2py wrote:
>
> Hello,
>
> I'm trying to understand the cacheable=True option. Does this just make 
> the database cacheable or does it actually cache it. When I check web2py's 
> cache status it says nothing is in the cache so I'm guessing it doesn't 
> actually cache anything.
>
> Is it possible to cache a SQLFORM? I'm hoping this will take a load off my 
> httpd resources which seem to spike when users access the SQLFORM.
>
> Also, what is the proper way to cache. I've been looking at the web2py 
> cheat sheet but its a little confusing for me.
>
> Do I need to put
> @cache('key',3600,cache.ram)
> @cache('key',3600,cache.disk)
>
> On top of the function?
>
> What is the most memory efficient way of displaying large databases?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM cache? Cacheable=True?

2014-08-06 Thread LoveWeb2py
That is the best answer. Sorry about the question. I swear I searched 
through the book before asking, but this really does a nice job of 
explaining it.

Thanks, Niphlod!

On Wednesday, August 6, 2014 10:51:05 AM UTC-4, Niphlod wrote:
>
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=cacheable#Caching-selects
>
> On Wednesday, August 6, 2014 4:19:12 PM UTC+2, LoveWeb2py wrote:
>>
>> Hello,
>>
>> I'm trying to understand the cacheable=True option. Does this just make 
>> the database cacheable or does it actually cache it. When I check web2py's 
>> cache status it says nothing is in the cache so I'm guessing it doesn't 
>> actually cache anything.
>>
>> Is it possible to cache a SQLFORM? I'm hoping this will take a load off 
>> my httpd resources which seem to spike when users access the SQLFORM.
>>
>> Also, what is the proper way to cache. I've been looking at the web2py 
>> cheat sheet but its a little confusing for me.
>>
>> Do I need to put
>> @cache('key',3600,cache.ram)
>> @cache('key',3600,cache.disk)
>>
>> On top of the function?
>>
>> What is the most memory efficient way of displaying large databases?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py vs others. Status of 2014

2014-08-06 Thread Cliff Kachinske
Modernizr?

Do you think that tall corn interferes with the purchase of new equipment? 
Whiskey Tango Foxtrot?

On Tuesday, August 5, 2014 3:35:50 AM UTC-4, Joe Barnhart wrote:
>
> I look forward to Massimo's improvements.
>
> One of the continuing thorns in my side is that a significant number of my 
> users are still on XP and IE8 -- about 15% -- and my users are in 
> California.  I can only imagine the ratio would be higher in middle America 
> where the tall corn grows.  I could choose to ignore these users, but they 
> have money to spend and I want to get it.
>
> As we move to more client-heavy designs, it means more javascript and more 
> chances that it won't run in antique computers.  I can't leave 15% of my 
> revenue on the table.  
>
> On the other hand, more and more of my users are on mobile platforms, 
> which fits perfectly with the heavy client approach.
>
> Agh!
>
> -- Joe
>
>
> On Monday, June 9, 2014 5:01:39 AM UTC-7, Ramos wrote:
>>
>> what is the status of the evolution of web2py compared with other, mainly 
>> rails /or django ?
>>
>>
>> which of these including web2py has gain more improvements over the last 
>> year?
>> Does anybody knows?
>> Is still web2py over the others?
>>
>>
>> From the beginning Massimo used the phrase
>> "Ideas we had , ideas we stole"
>>
>> I would like to know if Massimo  is stealing more ideas from others.
>> Also what new "Killer" ideas are we expecting for near future?
>>
>> Regards
>>
>> António
>>  
>

-- 
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] ajax posts text input twice when name and id are identical

2014-08-06 Thread Cliff Kachinske
This is not supposed to happen and I don't know why it did. 

The js looks like this:
 $('#products_on_order').on('click', '.edit_bound_container', function(e){
//alert(this.id);
var container_id = this.id.split('__')[1]
var count_field = 'bound_container_count_edit__' + container_id
var pounds_field = 'bound_container_quantity_packed_edit__' + 
container_id
ajax(
edit_bound_container_url,
[count_field, pounds_field, 'order_id'],
':eval'
) 
});

I thought somehow I had created duplicate input names, but there were none 
that I could find.

Changing the input id so that it is not identical to the input name made 
the problem go away.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to add CSS class to SQLFORM.grid??

2014-08-06 Thread Cliff Kachinske
I would go the other way and override the attributes of the existing 
classes with my own css.  

Just make sure your css loads last.

On Tuesday, August 5, 2014 5:17:42 PM UTC-4, greenpoise wrote:
>
> How can I make use of my own td classes for SQLFORM.grid??
>
> Thanks
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Somewhat confused about the way session is updated when using ajax

2014-08-06 Thread Spokes
I've got a page in which ajax is used to update the main content (a bunch 
of articles), and a variable stored in session is used as an index (let's 
say there are X articles per page, and the first article shown corresponds 
to the current index). Regardless of how far the user has scrolled, the 
value of this session/index variable is shown in *response.toolbar()* as 
"0" unless the page is refreshed, or unless a link is clicked. 

I'm not quite sure how the session variable is being handled. It seems to 
get updated - otherwise, the scrolling functionality would not do anything. 
On the other hand, if I try to access this session variable using something 
other than the ajax calls which update the target div, the value of the 
session appears to be 0.

Can someone give me a quick rundown of how session is being handled when 
used with ajax, and let me know if there's a way to update it without 
refreshing the page? Thank you.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] How do you display created_by and modified_by names and not id's when using lazy tables?

2014-08-06 Thread Michael Beller
When I set lazy_tables=True in the DAL, all my signatures fields show the 
user_id and not the user name.

I also set db.auth_user._format = '%(last_name)s' which I thought would 
force the auth_user definition with lazy tables but my signatures still 
show id's.

Any thoughts on what I'm missing?

Also, if I use lazy_tables=False and still set db.auth_user._format = 
'%(last_name)s' the created_by and modified_by fields in view forms still 
shows the full name which I can override 
with auth.signature.created_by.represent = lambda id: db.auth_user._format 
% db.auth_user[id].  Is that the best way?

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Somewhat confused about the way session is updated when using ajax

2014-08-06 Thread Anthony
The session is handled the same with ajax requests as with any other 
requests. Hard to say what's going on in this case without seeing any code. 
Presumably the DOM element you are checking for the session value is not 
something that is being updated by your Ajax call.

Anthony

On Wednesday, August 6, 2014 6:14:27 PM UTC+2, Spokes wrote:
>
> I've got a page in which ajax is used to update the main content (a bunch 
> of articles), and a variable stored in session is used as an index (let's 
> say there are X articles per page, and the first article shown corresponds 
> to the current index). Regardless of how far the user has scrolled, the 
> value of this session/index variable is shown in *response.toolbar()* as 
> "0" unless the page is refreshed, or unless a link is clicked. 
>
> I'm not quite sure how the session variable is being handled. It seems to 
> get updated - otherwise, the scrolling functionality would not do anything. 
> On the other hand, if I try to access this session variable using something 
> other than the ajax calls which update the target div, the value of the 
> session appears to be 0.
>
> Can someone give me a quick rundown of how session is being handled when 
> used with ajax, and let me know if there's a way to update it without 
> refreshing the page? Thank you.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py with google visualisation app.

2014-08-06 Thread lyn2py
Thank you for sharing the short clip!

I was wondering how you did the auto-loading of the content within each 
drop down menu at the top?
I always thought that to be difficult and have not ventured far in that 
area yet. I hope you can share how you did it! Thanks :)

On Wednesday, August 6, 2014 7:23:56 PM UTC+8, Avi A wrote:
>
> Hi,
> I just wanted to share  a short video of an app I made.
> What it does in short;
> I do mobile automated tests locally. I use selenium/appium and applitools 
> (awesome startup) which does screenshots comparison for me and when the 
> test ends, they send a json with failed/passed counts info.
> when tests end, I post the data to the web2py app, (post api) where i save 
> the tests' data, and display it with google visualisation api and allow 
> saving the results as a report on excel file, for each given view/filter.
> Thank you all for the support, special thanks to Anthony and Niplod.
> http://goo.gl/LOaAhs
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: reLOAD only if modified

2014-08-06 Thread Dave S


On Wednesday, August 6, 2014 2:35:15 AM UTC-7, mweissen wrote:
>
> [...]
> request.now gives the actual time, but if "Last-Modified" and "ETag" are 
> always the same I think I should see the same time on each call.
>
>
I'm confused by this part of your post ...  I think it means

1) request.now is fine, gives the actual time
2) "Last-Modified" wrong, gives actual time instead of coded time.
3) "ETag" wrong, gives actual time instead of "123"

Is that correct?

/dps

 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to restrict file type to pdf

2014-08-06 Thread Dave S

On Wednesday, August 6, 2014 3:09:48 AM UTC-7, Leonel Câmara wrote:
>
> requires = IS_UPLOAD_FILENAME(extension='pdf')
>
>
That would cover the common case where the extension and the filetype 
agree, but to be sure that it is a valid PDF file probably requires a tool 
that reads PDF format and verifies that it is valid.  There should be 
plenty of third-party tools that could be called, but that may be a lengthy 
process that you'd want to hand off to the scheduler.  If you're going to 
do that, then maybe you should add a field 'validated: boolean' to your 
table, set it to false in your upload controller and only set it to true 
when the tool has passed its check  You would then use that field as a 
filter to make the file hidden if not validated, and clean out the entries 
that don't get validated within 24 hours (or even 1 hour).

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: ajax posts text input twice when name and id are identical

2014-08-06 Thread Anthony
Can you show the relevant HTML? What does the post data look like?

On Wednesday, August 6, 2014 5:48:33 PM UTC+2, Cliff Kachinske wrote:
>
> This is not supposed to happen and I don't know why it did. 
>
> The js looks like this:
>  $('#products_on_order').on('click', '.edit_bound_container', function(e){
> //alert(this.id);
> var container_id = this.id.split('__')[1]
> var count_field = 'bound_container_count_edit__' + container_id
> var pounds_field = 'bound_container_quantity_packed_edit__' + 
> container_id
> ajax(
> edit_bound_container_url,
> [count_field, pounds_field, 'order_id'],
> ':eval'
> ) 
> });
>
> I thought somehow I had created duplicate input names, but there were none 
> that I could find.
>
> Changing the input id so that it is not identical to the input name made 
> the problem go away.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to add CSS class to SQLFORM.grid??

2014-08-06 Thread Dave S


On Tuesday, August 5, 2014 2:17:42 PM UTC-7, greenpoise wrote:
>
> How can I make use of my own td classes for SQLFORM.grid??
>
> Thanks
>

Does this post help?


(credit to Anthony)

/dps
 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py with google visualisation app.

2014-08-06 Thread Avi A
When ever you change an option in one of the dropdown filtering options 
above, the attached function runs, which sends two of the built in web2py 
Ajax load function, to two different controllers, and the data is rendered 
back on the page:

   
 $(document).ready(function(){
   $("#filter_options").on('change', function(){
  platform=$( "#filter_platform" ).val();
  project=$( "#filter_project" ).val();
  device=$( "#filter_device" ).val();
  milestone=$( "#filter_milestone" ).val();
  env=$( "#filter_env" ).val();
  url_graphs = 'eco_graph.load?platform=' + platform + 
'&project=' + project + '&device=' + device + '&milestone=' + milestone +
   '&env=' + env;
  ajax(url_graphs, '', 'visualization');
  url_tests = 'eco_tests.load?platform=' + platform + 
'&project=' + project + '&device=' + device + '&milestone=' + milestone +
   '&env=' + env;
  ajax(url_tests, '', 'tests_list')


  });


});
  




 

On Wednesday, August 6, 2014 8:51:40 PM UTC+3, lyn2py wrote:
>
> Thank you for sharing the short clip!
>
> I was wondering how you did the auto-loading of the content within each 
> drop down menu at the top?
> I always thought that to be difficult and have not ventured far in that 
> area yet. I hope you can share how you did it! Thanks :)
>
> On Wednesday, August 6, 2014 7:23:56 PM UTC+8, Avi A wrote:
>>
>> Hi,
>> I just wanted to share  a short video of an app I made.
>> What it does in short;
>> I do mobile automated tests locally. I use selenium/appium and applitools 
>> (awesome startup) which does screenshots comparison for me and when the 
>> test ends, they send a json with failed/passed counts info.
>> when tests end, I post the data to the web2py app, (post api) where i 
>> save the tests' data, and display it with google visualisation api and 
>> allow saving the results as a report on excel file, for each given 
>> view/filter.
>> Thank you all for the support, special thanks to Anthony and Niplod.
>> http://goo.gl/LOaAhs
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to add CSS class to SQLFORM.grid??

2014-08-06 Thread greenpoise
I saw that. I think I am going to follow Cliff suggestion. I was thinking 
to use web2py_grid call and just plug in my css that way I dont lose 
anything when there is a version update.

Thanks!



On Wednesday, August 6, 2014 11:13:25 AM UTC-7, Dave S wrote:
>
>
>
> On Tuesday, August 5, 2014 2:17:42 PM UTC-7, greenpoise wrote:
>>
>> How can I make use of my own td classes for SQLFORM.grid??
>>
>> Thanks
>>
>
> Does this post help?
> 
>
> (credit to Anthony)
>
> /dps
>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to add CSS class to SQLFORM.grid??

2014-08-06 Thread greenpoise
thanks!! I will do this




On Wednesday, August 6, 2014 8:57:37 AM UTC-7, Cliff Kachinske wrote:
>
> I would go the other way and override the attributes of the existing 
> classes with my own css.  
>
> Just make sure your css loads last.
>
> On Tuesday, August 5, 2014 5:17:42 PM UTC-4, greenpoise wrote:
>>
>> How can I make use of my own td classes for SQLFORM.grid??
>>
>> Thanks
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Leonel Câmara
I don't think this "bug" is just in PostgreSQL. For instance MSSQL should 
probably use OUTPUT INSERTED.ID to get the id and Oracle can use RETURNING like 
PostgreSQL too.

Basically any kind of lastval variant can be problematic.

 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SQLFORM cache? Cacheable=True?

2014-08-06 Thread Niphlod
we stand on the shoulders of giants documenting web2py ;-P

On Wednesday, August 6, 2014 5:29:00 PM UTC+2, LoveWeb2py wrote:
>
> That is the best answer. Sorry about the question. I swear I searched 
> through the book before asking, but this really does a nice job of 
> explaining it.
>
> Thanks, Niphlod!
>
> On Wednesday, August 6, 2014 10:51:05 AM UTC-4, Niphlod wrote:
>>
>>
>> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=cacheable#Caching-selects
>>
>> On Wednesday, August 6, 2014 4:19:12 PM UTC+2, LoveWeb2py wrote:
>>>
>>> Hello,
>>>
>>> I'm trying to understand the cacheable=True option. Does this just make 
>>> the database cacheable or does it actually cache it. When I check web2py's 
>>> cache status it says nothing is in the cache so I'm guessing it doesn't 
>>> actually cache anything.
>>>
>>> Is it possible to cache a SQLFORM? I'm hoping this will take a load off 
>>> my httpd resources which seem to spike when users access the SQLFORM.
>>>
>>> Also, what is the proper way to cache. I've been looking at the web2py 
>>> cheat sheet but its a little confusing for me.
>>>
>>> Do I need to put
>>> @cache('key',3600,cache.ram)
>>> @cache('key',3600,cache.disk)
>>>
>>> On top of the function?
>>>
>>> What is the most memory efficient way of displaying large databases?
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Is there a way to find ID of inserted row if there is trigger after insert?

2014-08-06 Thread Niphlod
not really (scouting through code and docs seems that we're using only for 
postgresql something that isn't that "stable" when triggers are involved), 
but it's anyway fixable.

On Wednesday, August 6, 2014 8:24:24 PM UTC+2, Leonel Câmara wrote:
>
> I don't think this "bug" is just in PostgreSQL. For instance MSSQL should 
> probably use OUTPUT INSERTED.ID to get the id and Oracle can use RETURNING 
> like PostgreSQL too.
>
> Basically any kind of lastval variant can be problematic.
>
>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: ajax posts text input twice when name and id are identical

2014-08-06 Thread Cliff Kachinske
I can do that.

But I discovered it was doing something much more interesting than my 
original diagnosis.

The inputs in question were editable and generated by the controller. As 
such they had an assigned value. When I ajaxed them to the server, 
apparently two copies of the input were sent. One copy had the original 
value and the other had the edited value.

If I would do something like alert($('#the_field').val()); it would alert 
the edited value. So the final work around was to park those values in 
hidden fields and send those across via ajax. Of course that doesn't answer 
why it was happening. And that fixed the problem. I don't know why I 
thought the other work around fixed it unless it was post-lunch fog.

But yes, I will put up the html and the post stream later today.

On Wednesday, August 6, 2014 1:55:21 PM UTC-4, Anthony wrote:
>
> Can you show the relevant HTML? What does the post data look like?
>
> On Wednesday, August 6, 2014 5:48:33 PM UTC+2, Cliff Kachinske wrote:
>>
>> This is not supposed to happen and I don't know why it did. 
>>
>> The js looks like this:
>>  $('#products_on_order').on('click', '.edit_bound_container', function(e
>> ){
>> //alert(this.id);
>> var container_id = this.id.split('__')[1]
>> var count_field = 'bound_container_count_edit__' + container_id
>> var pounds_field = 'bound_container_quantity_packed_edit__' + 
>> container_id
>> ajax(
>> edit_bound_container_url,
>> [count_field, pounds_field, 'order_id'],
>> ':eval'
>> ) 
>> });
>>
>> I thought somehow I had created duplicate input names, but there were 
>> none that I could find.
>>
>> Changing the input id so that it is not identical to the input name made 
>> the problem go away.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Somewhat confused about the way session is updated when using ajax

2014-08-06 Thread Spokes

>
> Presumably the DOM element you are checking for the session value is not 
> something that is being updated by your Ajax call.
>

Sounds plausible - I'll explore this possibility further. Thank you.

On Wednesday, August 6, 2014 12:48:48 PM UTC-5, Anthony wrote:
>
> The session is handled the same with ajax requests as with any other 
> requests. Hard to say what's going on in this case without seeing any code. 
> Presumably the DOM element you are checking for the session value is not 
> something that is being updated by your Ajax call.
>
> Anthony
>
> On Wednesday, August 6, 2014 6:14:27 PM UTC+2, Spokes wrote:
>>
>> I've got a page in which ajax is used to update the main content (a bunch 
>> of articles), and a variable stored in session is used as an index (let's 
>> say there are X articles per page, and the first article shown corresponds 
>> to the current index). Regardless of how far the user has scrolled, the 
>> value of this session/index variable is shown in *response.toolbar()* as 
>> "0" unless the page is refreshed, or unless a link is clicked. 
>>
>> I'm not quite sure how the session variable is being handled. It seems to 
>> get updated - otherwise, the scrolling functionality would not do anything. 
>> On the other hand, if I try to access this session variable using something 
>> other than the ajax calls which update the target div, the value of the 
>> session appears to be 0.
>>
>> Can someone give me a quick rundown of how session is being handled when 
>> used with ajax, and let me know if there's a way to update it without 
>> refreshing the page? Thank you.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Working with MSSQL with codepage other than latin1 or unicode

2014-08-06 Thread Алексей Котряхов
Hello
The first problem was solved by changing URI from mssql to mssql2
Now DB connection as following and no problem with viewing and saving 
strings with cyrillic letters.

dbsol = DAL 
('mssql2://user:password@w2ptkts/SacuraOnline',
 db_codec = 'cp1251', migrate_enabled = False)

But the second problem (save the profile with the Cyrillic alphabet) still 
exist. 
I don't understand why this is happening?

But the second problem (save the profile with the Cyrillic alphabet) still 
exist. 
I do not understand why this is happening? 
Data from the same table, the same connection. 
Maybe in the implementation of saving Profile skipped recoding code pages?

понедельник, 4 августа 2014 г., 14:45:50 UTC+11 пользователь Алексей 
Котряхов написал:
>
>
> Hello web2pyers
>
> I have a problem with encoding when I work with MSSQL with codepage other 
> than latin1 or unicode
> Here is my DB connection
>
> dbsol = DAL 
> ('mssql://user:password@w2ptkts/SacuraOnline',
>  db_codec = 'cp1251', migrate_enabled = False)
>
> I'm successfully read and and view any tables from my DB.
> But when I try to write to my DB, I see strange behavior, like occuring 
> unwanted (or excessive) encoding.
>
> Here is example
>
> Also got an error while saving the profile with Cyrillic letters
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: template de instalação de aplicação web2py no windows

2014-08-06 Thread Hains Hausmann Junior
Hello! 

Many thanks for the reply. 
When I sent the question, did not realize it was the international list of 
web2py. 
Should be sent to "web2py-Brazil" list. 
Sorry. 

Att

Em terça-feira, 5 de agosto de 2014 15h37min15s UTC-3, Dave S escreveu:
>
>
>
> On Monday, August 4, 2014 5:46:45 PM UTC-7, Hains Hausmann Junior wrote:
>>
>> Olá!
>>
>> Estou tentando fazer (ou encontrar um exemplo) um template de um 
>> instalador de aplicações we2py para windows.
>> Quero instalar o web2py, a aplicação desenvolvida (compilada em pyc), e 
>> um servidor web melhor, (exemplo nginx) que não seja o do web2py.
>> Rodar o servidor web com a aplicação web2py como serviço ou rodar de 
>> outra forma em background com um ícone na bandeja do sistema e iniciar 
>> junto com o windows.
>>
>
> I would take a look at the tools used by web2py to make the Windows 
> installation package that you download from web2py.com.   The toolset 
> changed a few months back; there was some discussion of that here and 
> probably more on the web2py developers group.
>
> There are Windows installation packages for Apache; I don't know if NginX 
> has done that yet.  My impression of IIS is that if you already know it, it 
> works fine, but it can be a pain to learn how to set it up.  Rocket might 
> be enough if you can front it with an appropriate process launcher; it's 
> small but I hear that it seems to have plenty of capability in the right 
> environment.
>
> Good luck!
>  
> /dps
>
>
>
>> O inno setup tem resolvido alguns problemas, e provavelmente irá resolver 
>> os outros, mas gostaria da opinião do pessoal,
>> se alguém já fez algo parecido, se tem algumas dicas de de como montar a 
>> stack servidor/app, exemplos de configurações padrões 
>> para casos genérico de sistema CRUD.
>>
>> Quero fazer um instalador para uma aplicação pequena de CRUD 
>> (inicialmente), que vai ser instalado no windows,
>> e usado tanto local como remoto por apenas algum usuários.
>>
>> Se alguém tiver algumas dicas ou exemplo, ficarei agradecido.
>> Att
>> Hains
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to add CSS class to SQLFORM.grid??

2014-08-06 Thread Danel Segarra
I wonder if an update in web2py would affect this?

thanks




On Wednesday, August 6, 2014 8:57:37 AM UTC-7, Cliff Kachinske wrote:
>
> I would go the other way and override the attributes of the existing 
> classes with my own css.  
>
> Just make sure your css loads last.
>
> On Tuesday, August 5, 2014 5:17:42 PM UTC-4, greenpoise wrote:
>>
>> How can I make use of my own td classes for SQLFORM.grid??
>>
>> Thanks
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Somewhat confused about the way session is updated when using ajax

2014-08-06 Thread Spokes
I've been looking into it, and it appears that there is a race condition 
situation going on, in which it takes a little while for the session value 
to be updated, and some other functionality is accessing that value before 
the update is performed. I caught it by accident while debugging using 
javascript's alert() function (as a side effect, the alert was delaying 
things long enough for the session value to get updated, thus making the 
program behave as expected).

Can you make any recommendations regarding addressing race conditions 
involving updating session with an ajax call?

On Wednesday, August 6, 2014 12:48:48 PM UTC-5, Anthony wrote:
>
> The session is handled the same with ajax requests as with any other 
> requests. Hard to say what's going on in this case without seeing any code. 
> Presumably the DOM element you are checking for the session value is not 
> something that is being updated by your Ajax call.
>
> Anthony
>
> On Wednesday, August 6, 2014 6:14:27 PM UTC+2, Spokes wrote:
>>
>> I've got a page in which ajax is used to update the main content (a bunch 
>> of articles), and a variable stored in session is used as an index (let's 
>> say there are X articles per page, and the first article shown corresponds 
>> to the current index). Regardless of how far the user has scrolled, the 
>> value of this session/index variable is shown in *response.toolbar()* as 
>> "0" unless the page is refreshed, or unless a link is clicked. 
>>
>> I'm not quite sure how the session variable is being handled. It seems to 
>> get updated - otherwise, the scrolling functionality would not do anything. 
>> On the other hand, if I try to access this session variable using something 
>> other than the ajax calls which update the target div, the value of the 
>> session appears to be 0.
>>
>> Can someone give me a quick rundown of how session is being handled when 
>> used with ajax, and let me know if there's a way to update it without 
>> refreshing the page? Thank you.
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: applications/app/languages

2014-08-06 Thread Massimo Di Pierro
Do not know. Anyway, I am fixing the utf8 in trunk.

On Tuesday, 5 August 2014 03:51:52 UTC-5, Carl Hunter Roach wrote:
>
> Each file in applications/app/languages has a line:
> # -*- coding: utf8 -*-
>
> I've had to ammend this to:
> # -*- coding: utf-8 -*-
>
> otherwise an exception is thrown in \Python\lib\encodings\utf_8.py (see 
> below).
>
> utf-8 is the standard term rather than utf8.
>
> My question: does anyone know why all the language files in Web2py are 
> parsed when using GAE Search? It'd be good if I could get the system to 
> skip this step.
>
> Exception stack...
>
>   File 
> "F:\projects\workspace\jupiter\applications\jupiterapi\controllers/default.py",
>  
> line 276, in 
>
>   File "F:\projects\workspace\jupiter\gluon\globals.py", line 385, in 
> 
>
> self._caller = lambda f: f()
>
>   File 
> "F:\projects\workspace\jupiter\applications\jupiterapi\controllers/default.py",
>  
> line 107, in results
>
> options=options)
>
>   File "applications\jupiterapi\modules\indexer\indexer.py", line 42, in 
> searchWithOptions
>
> resultObj = index.search(query)
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\datastore\datastore_rpc.py", 
> line 103, in positional_wrapper
>
> return wrapped(*args, **kwds)
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 2802, in search
>
> return self._NewSearchResults(response, cursor)
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 2678, in _NewSearchResults
>
> result_pb.expression_list(), per_result_cursor))
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 2663, in _NewScoredDocumentFromPb
>
> expressions=_NewFieldsFromPb(expressions), cursor=cursor)
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 1327, in _NewFieldsFromPb
>
> return [_NewFieldFromPb(f) for f in field_list]
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 1140, in _NewFieldFromPb
>
> value = _DecodeValue(_GetValue(pb.value()), val_type)
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 1132, in _DecodeValue
>
> return _DecodeUTF8(pb_value)
>
>   File "C:\Program Files 
> (x86)\Google\google_appengine\google\appengine\api\search\search.py", line 
> 1125, in _DecodeUTF8
>
> return pb_value.decode('utf-8')
>
>   File "C:\Python\lib\encodings\utf_8.py", line 16, in decode
>
> return codecs.utf_8_decode(input, errors, True)
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Somewhat confused about the way session is updated when using ajax

2014-08-06 Thread Anthony
If you are storing sessions in files and not doing session.forget(response) 
anywhere in your code, then there should not be any race conditions, as the 
session files are locked in that case, which serializes all requests 
(including ajax requests).

Anthony

On Wednesday, August 6, 2014 9:30:30 PM UTC+2, Spokes wrote:
>
> I've been looking into it, and it appears that there is a race condition 
> situation going on, in which it takes a little while for the session value 
> to be updated, and some other functionality is accessing that value before 
> the update is performed. I caught it by accident while debugging using 
> javascript's alert() function (as a side effect, the alert was delaying 
> things long enough for the session value to get updated, thus making the 
> program behave as expected).
>
> Can you make any recommendations regarding addressing race conditions 
> involving updating session with an ajax call?
>
> On Wednesday, August 6, 2014 12:48:48 PM UTC-5, Anthony wrote:
>>
>> The session is handled the same with ajax requests as with any other 
>> requests. Hard to say what's going on in this case without seeing any code. 
>> Presumably the DOM element you are checking for the session value is not 
>> something that is being updated by your Ajax call.
>>
>> Anthony
>>
>> On Wednesday, August 6, 2014 6:14:27 PM UTC+2, Spokes wrote:
>>>
>>> I've got a page in which ajax is used to update the main content (a 
>>> bunch of articles), and a variable stored in session is used as an index 
>>> (let's say there are X articles per page, and the first article shown 
>>> corresponds to the current index). Regardless of how far the user has 
>>> scrolled, the value of this session/index variable is shown in 
>>> *response.toolbar()* as "0" unless the page is refreshed, or unless a 
>>> link is clicked. 
>>>
>>> I'm not quite sure how the session variable is being handled. It seems 
>>> to get updated - otherwise, the scrolling functionality would not do 
>>> anything. On the other hand, if I try to access this session variable using 
>>> something other than the ajax calls which update the target div, the value 
>>> of the session appears to be 0.
>>>
>>> Can someone give me a quick rundown of how session is being handled when 
>>> used with ajax, and let me know if there's a way to update it without 
>>> refreshing the page? Thank you.
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Somewhat confused about the way session is updated when using ajax

2014-08-06 Thread Spokes
In that case, I'm really puzzled. Will look into it further. Thank you.

On Wednesday, August 6, 2014 2:42:37 PM UTC-5, Anthony wrote:
>
> If you are storing sessions in files and not doing 
> session.forget(response) anywhere in your code, then there should not be 
> any race conditions, as the session files are locked in that case, which 
> serializes all requests (including ajax requests).
>
> Anthony
>
> On Wednesday, August 6, 2014 9:30:30 PM UTC+2, Spokes wrote:
>>
>> I've been looking into it, and it appears that there is a race condition 
>> situation going on, in which it takes a little while for the session value 
>> to be updated, and some other functionality is accessing that value before 
>> the update is performed. I caught it by accident while debugging using 
>> javascript's alert() function (as a side effect, the alert was delaying 
>> things long enough for the session value to get updated, thus making the 
>> program behave as expected).
>>
>> Can you make any recommendations regarding addressing race conditions 
>> involving updating session with an ajax call?
>>
>> On Wednesday, August 6, 2014 12:48:48 PM UTC-5, Anthony wrote:
>>>
>>> The session is handled the same with ajax requests as with any other 
>>> requests. Hard to say what's going on in this case without seeing any code. 
>>> Presumably the DOM element you are checking for the session value is not 
>>> something that is being updated by your Ajax call.
>>>
>>> Anthony
>>>
>>> On Wednesday, August 6, 2014 6:14:27 PM UTC+2, Spokes wrote:

 I've got a page in which ajax is used to update the main content (a 
 bunch of articles), and a variable stored in session is used as an index 
 (let's say there are X articles per page, and the first article shown 
 corresponds to the current index). Regardless of how far the user has 
 scrolled, the value of this session/index variable is shown in 
 *response.toolbar()* as "0" unless the page is refreshed, or unless a 
 link is clicked. 

 I'm not quite sure how the session variable is being handled. It seems 
 to get updated - otherwise, the scrolling functionality would not do 
 anything. On the other hand, if I try to access this session variable 
 using 
 something other than the ajax calls which update the target div, the value 
 of the session appears to be 0.

 Can someone give me a quick rundown of how session is being handled 
 when used with ajax, and let me know if there's a way to update it without 
 refreshing the page? Thank you.

>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py with google visualisation app.

2014-08-06 Thread lyn2py
Thank you! I will explore this in the next app!

On Thursday, August 7, 2014 2:15:57 AM UTC+8, Avi A wrote:
>
> When ever you change an option in one of the dropdown filtering options 
> above, the attached function runs, which sends two of the built in web2py 
> Ajax load function, to two different controllers, and the data is rendered 
> back on the page:
>
>
>  $(document).ready(function(){
>$("#filter_options").on('change', function(){
>   platform=$( "#filter_platform" ).val();
>   project=$( "#filter_project" ).val();
>   device=$( "#filter_device" ).val();
>   milestone=$( "#filter_milestone" ).val();
>   env=$( "#filter_env" ).val();
>   url_graphs = 'eco_graph.load?platform=' + platform + 
> '&project=' + project + '&device=' + device + '&milestone=' + milestone + 
> '&env=' + env;
>   ajax(url_graphs, '', 'visualization');
>   url_tests = 'eco_tests.load?platform=' + platform + 
> '&project=' + project + '&device=' + device + '&milestone=' + milestone +
> '&env=' + env;
>   ajax(url_tests, '', 'tests_list')
>
>   });
>
> });
>   
>
>
>
>
>  
>
> On Wednesday, August 6, 2014 8:51:40 PM UTC+3, lyn2py wrote:
>>
>> Thank you for sharing the short clip!
>>
>> I was wondering how you did the auto-loading of the content within each 
>> drop down menu at the top?
>> I always thought that to be difficult and have not ventured far in that 
>> area yet. I hope you can share how you did it! Thanks :)
>>
>> On Wednesday, August 6, 2014 7:23:56 PM UTC+8, Avi A wrote:
>>>
>>> Hi,
>>> I just wanted to share  a short video of an app I made.
>>> What it does in short;
>>> I do mobile automated tests locally. I use selenium/appium and 
>>> applitools (awesome startup) which does screenshots comparison for me and 
>>> when the test ends, they send a json with failed/passed counts info.
>>> when tests end, I post the data to the web2py app, (post api) where i 
>>> save the tests' data, and display it with google visualisation api and 
>>> allow saving the results as a report on excel file, for each given 
>>> view/filter.
>>> Thank you all for the support, special thanks to Anthony and Niplod.
>>> http://goo.gl/LOaAhs
>>>
>>>
>>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How to add CSS class to SQLFORM.grid??

2014-08-06 Thread Dave S


On Wednesday, August 6, 2014 11:20:33 AM UTC-7, greenpoise wrote:
>
> I saw that. I think I am going to follow Cliff suggestion. I was thinking 
> to use web2py_grid call and just plug in my css that way I dont lose 
> anything when there is a version update.
>
> Thanks!
>
>
web2py generally maintains backwards compatability.  What sort of version 
update are you expecting to break this?

/dps

 

>
>
> On Wednesday, August 6, 2014 11:13:25 AM UTC-7, Dave S wrote:
>>
>>
>>
>> On Tuesday, August 5, 2014 2:17:42 PM UTC-7, greenpoise wrote:
>>>
>>> How can I make use of my own td classes for SQLFORM.grid??
>>>
>>> Thanks
>>>
>>
>> Does this post help?
>> 
>>
>> (credit to Anthony)
>>
>> /dps
>>  
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Bare Login using API key

2014-08-06 Thread Massimo Di Pierro
You will find those parameters hashed in 
request.env.HTTP_AUTHORIZATION
(this puzzles me because it is supposed to 
be request.env.http_authorization) in web2py.

Anyway, this method of authentication is discouraged for security reasons 
and most browsers including Chrome and IE strip the from the URL:
http://support.microsoft.com/default.aspx?scid=kb;%5bLN%5d;834489

On Tuesday, 5 August 2014 21:39:10 UTC-5, lyn2py wrote:
>
> Hi Massimo, in case you missed this, this is a call out, I hope you can 
> shed some light on this.
>
> If I would like to do something like:
>
> http://api_key:api_secret@some_url.com/default/call/jsonrpc
>
>
>
> On Thursday, July 31, 2014 2:19:36 PM UTC+8, lyn2py wrote:
>>
>> Thanks Leonel! I just thought that web2py had something like that already 
>> in place, perhaps needed to add a correct decorator, and I didn't need to 
>> reinvent the wheel.
>>
>> Sidenote to Massimo: What do you think of the idea? Have a decorator to 
>> check for a special field or fields (API key related, like API key, API 
>> secret) in order to get a particular / restricted access to the API calls.
>>
>>
>>
>> On Thursday, July 31, 2014 2:06:21 AM UTC+8, Leonel Câmara wrote:
>>>
>>> An easy way would be to have your default.py/call function check the 
>>> API key and raise HTTP(403) if it's not valid. You could subclass Auth, 
>>> make your own basic_login using the API key, use that as the Auth for your 
>>> application, and then use auth.requires_login() in call, but it seems 
>>> unnecessarily complicated for this.
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: Working with MSSQL with codepage other than latin1 or unicode

2014-08-06 Thread Massimo Di Pierro
Before we look into something else can you check the encoding declared in 
your layout.html? It should be utf8


On Wednesday, 6 August 2014 02:09:26 UTC-5, Алексей Котряхов wrote:
>
> Hello
> The first problem was solved by changing URI from mssql to mssql2
> Now DB connection as following and no problem with viewing and saving 
> strings with cyrillic letters.
>
> dbsol = DAL 
> ('mssql2://user:password@w2ptkts/SacuraOnline',
>  db_codec = 'cp1251', migrate_enabled = False)
>
> But the second problem (save the profile with the Cyrillic alphabet) still 
> exist. 
> I don't understand why this is happening?
>
> But the second problem (save the profile with the Cyrillic alphabet) still 
> exist. 
> I do not understand why this is happening? 
> Data from the same table, the same connection. 
> Maybe in the implementation of saving Profile skipped recoding code pages?
>
> понедельник, 4 августа 2014 г., 14:45:50 UTC+11 пользователь Алексей 
> Котряхов написал:
>>
>>
>> Hello web2pyers
>>
>> I have a problem with encoding when I work with MSSQL with codepage other 
>> than latin1 or unicode
>> Here is my DB connection
>>
>> dbsol = DAL 
>> ('mssql://user:password@w2ptkts/SacuraOnline',
>>  db_codec = 'cp1251', migrate_enabled = False)
>>
>> I'm successfully read and and view any tables from my DB.
>> But when I try to write to my DB, I see strange behavior, like occuring 
>> unwanted (or excessive) encoding.
>>
>> Here is example
>>
>> Also got an error while saving the profile with Cyrillic letters
>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py vs others. Status of 2014

2014-08-06 Thread Massimo Di Pierro
Very true.

On Tuesday, 5 August 2014 02:35:50 UTC-5, Joe Barnhart wrote:
>
> I look forward to Massimo's improvements.
>
> One of the continuing thorns in my side is that a significant number of my 
> users are still on XP and IE8 -- about 15% -- and my users are in 
> California.  I can only imagine the ratio would be higher in middle America 
> where the tall corn grows.  I could choose to ignore these users, but they 
> have money to spend and I want to get it.
>
> As we move to more client-heavy designs, it means more javascript and more 
> chances that it won't run in antique computers.  I can't leave 15% of my 
> revenue on the table.  
>
> On the other hand, more and more of my users are on mobile platforms, 
> which fits perfectly with the heavy client approach.
>
> Agh!
>
> -- Joe
>
>
> On Monday, June 9, 2014 5:01:39 AM UTC-7, Ramos wrote:
>>
>> what is the status of the evolution of web2py compared with other, mainly 
>> rails /or django ?
>>
>>
>> which of these including web2py has gain more improvements over the last 
>> year?
>> Does anybody knows?
>> Is still web2py over the others?
>>
>>
>> From the beginning Massimo used the phrase
>> "Ideas we had , ideas we stole"
>>
>> I would like to know if Massimo  is stealing more ideas from others.
>> Also what new "Killer" ideas are we expecting for near future?
>>
>> Regards
>>
>> António
>>  
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: How do you display created_by and modified_by names and not id's when using lazy tables?

2014-08-06 Thread Cliff Kachinske
Put the represent in the controller.

On Wednesday, August 6, 2014 1:36:51 PM UTC-4, Michael Beller wrote:
>
> When I set lazy_tables=True in the DAL, all my signatures fields show the 
> user_id and not the user name.
>
> I also set db.auth_user._format = '%(last_name)s' which I thought would 
> force the auth_user definition with lazy tables but my signatures still 
> show id's.
>
> Any thoughts on what I'm missing?
>
> Also, if I use lazy_tables=False and still set db.auth_user._format = 
> '%(last_name)s' the created_by and modified_by fields in view forms still 
> shows the full name which I can override 
> with auth.signature.created_by.represent = lambda id: db.auth_user._format 
> % db.auth_user[id].  Is that the best way?
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: scheduler new feature: task dependencies

2014-08-06 Thread Andrew W
Sounds great.  Looking forward to testing it out.  Thanks
Andrew W

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: web2py vs others. Status of 2014

2014-08-06 Thread Dave S


On Wednesday, August 6, 2014 8:35:06 AM UTC-7, Cliff Kachinske wrote:
>
> Modernizr?
>
> Do you think that tall corn interferes with the purchase of new equipment? 
> Whiskey Tango Foxtrot?
>
>
Tall corn is often grown by people who don't jump on the bleeding edge.  
Some of them don't even jump on the bandwagon.

"it ain't broke 'til you run out of baling wire."

/dps

 

> On Tuesday, August 5, 2014 3:35:50 AM UTC-4, Joe Barnhart wrote:
>>
>> I look forward to Massimo's improvements.
>>
>> One of the continuing thorns in my side is that a significant number of 
>> my users are still on XP and IE8 -- about 15% -- and my users are in 
>> California.  I can only imagine the ratio would be higher in middle America 
>> where the tall corn grows.  I could choose to ignore these users, but they 
>> have money to spend and I want to get it.
>>
>> As we move to more client-heavy designs, it means more javascript and 
>> more chances that it won't run in antique computers.  I can't leave 15% of 
>> my revenue on the table.  
>>
>> On the other hand, more and more of my users are on mobile platforms, 
>> which fits perfectly with the heavy client approach.
>>
>> Agh!
>>
>> -- Joe
>>
>>
>> On Monday, June 9, 2014 5:01:39 AM UTC-7, Ramos wrote:
>>>
>>> what is the status of the evolution of web2py compared with other, 
>>> mainly rails /or django ?
>>>
>>>
>>> which of these including web2py has gain more improvements over the last 
>>> year?
>>> Does anybody knows?
>>> Is still web2py over the others?
>>>
>>>
>>> From the beginning Massimo used the phrase
>>> "Ideas we had , ideas we stole"
>>>
>>> I would like to know if Massimo  is stealing more ideas from others.
>>> Also what new "Killer" ideas are we expecting for near future?
>>>
>>> Regards
>>>
>>> António
>>>  
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: scheduler new feature: task dependencies

2014-08-06 Thread Andrew W
P.S.  Although I expect they are not the same thing, I am interested to see 
how this dependency feature may be used to implement the workflow ideas 
expressed in:
https://groups.google.com/forum/#!searchin/web2py/workflow/web2py/0z1BysNp8Gc/aQFdaBqymE8J
 
 
 

On Thursday, August 7, 2014 7:28:11 AM UTC+10, Andrew W wrote:

> Sounds great.  Looking forward to testing it out.  Thanks
> Andrew W

-- 
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] reLOAD only if the content has changed (2)

2014-08-06 Thread Martin Weissenboeck
Dave told me that my explanation was not clear. Let me try it in other
words. What I want is a program which periodically reloads a page (I think
using LOAD is the best way), but only if I allow it.

My idea was that the header parts "Last-Modified" and/or "ETag" could do
the job. Therefore I wrote the program in two steps:

(1) A controller without any response header modification. It shows the
actual time and reloads once a second - everything is fine.

The functions:

def mytime():
jetzt=str(request.now)[:19]
return dict(jetzt=jetzt)

def init():
return dict()

-

The views:

mytime.load:
{{=jetzt}}

init.html:
{{extend 'layout.html'}}
{{=LOAD(f="mytime.load", ajax=True, timeout=1000, times="infinity")}}



(2) Now I want to simulate an unchanged page. Anthony wrote on
http://stackoverflow.com/questions/14515313/how-to-modify-web2py-download-function-to-return-304-not-modified-in-case-the
how to change the header. I add the response.headers-lines with a *constant
*"Last-Modified" time and/or a *constant *"ETag" (I think every value is
allowed here). My hope has been that these modifications *would prevent a
reload* of the page. If this would be correct I would always see the same
time. But it did not work, regardless of the header modifications the page
reloads again once a second.

def mytime():
jetzt=str(request.now)[:19]
mtime = "Mi, 06 Aug 2014 08:11:00 GMT" # always the same time!

*response.headers['Last-Modified'] = mtime*

*response.headers['Pragma'] = 'cache'response.headers['Cache-*
*Control'] = 'private' response.headers['ETag'] = "123" # any value,
constant*
return dict(jetzt=jetzt)


My primary problem is: the LOAD helper (or an other command?) asks the
server periodically if there is a new content - and the server should
reload the page under program control.

Is it possible to solve it using the response headers?

The purpose of the request.now call is only to show whether the page
reloads or not.

Regards, Martin

-

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