[web2py] Re: problem with TAG in module

2013-04-04 Thread Ivan Gazzola
Ok

Il giorno giovedì 4 aprile 2013 00:10:02 UTC+2, Massimo Di Pierro ha 
scritto:

 import gluon

 should be

 from gluon import *

 On Wednesday, 3 April 2013 16:06:24 UTC-5, Ivan Gazzola wrote:

 I wrote this module my_util.py:

 #!/usr/bin/env python
 # coding: utf8

 import gluon

 def my_form(form, fields): 
 table = TAG['']() 
 for id, label, controls, help in fields:
 lab1=str(label)
 tmp_label=lab1.partition('')
 lab1=tmp_label[0]+tmp_label[1]+'b'+tmp_label[2]
 tmp_label=lab1.partition('/')
 _label=tmp_label[0]+'/b'+tmp_label[1]+tmp_label[2]
 if string.find(str(controls),'legend')0:
 table.append(controls) 
 else:
 table.append(DIV(XML(_label),'\n', controls,'\n', help,**{
 '_data-role':'fieldcontain','_id':id})+'\n')
 return table
 pass

 If i put the function my_form in controllers it works well.
 But when i try to do:

 from my_util import my_form



 def testi_consensi():
 response.menu=[]
 form = SQLFORM(db.mytable, separator='',showid = False,\
  formstyle=lambda form, fields: form_mia(form, fields
 ), submit_button = 'Nuovo Testo',)
 return dict(form=form)


 i've this error:

 type 'exceptions.NameError' global name 'TAG' is not defined




-- 

--- 
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: scheduler sincronization

2013-04-04 Thread paolo.vall...@gmail.com
Unfortunately I can't install any dbms on that machine, I will make a test
on an other 'similar' machine where I have postgres installed.

 Paolo


2013/4/3 Niphlod niph...@gmail.com

 ok, at least it seems consistent:
 there's:
 - no send_heartbeat(), do_assign_tasks=True line
 - no Inside If, do_assign_tasks=True line
 in all the log.

 PS: I still can't reproduce the erratic behaviour, but a baseline
 question rises: do you get this also using another db engine ?

  --

 ---
 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/u_PgzKLuQmw/unsubscribe?hl=en.
  To unsubscribe from this group and all its topics, send an email to
 web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 

--- 
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: web2py custom reset password urls

2013-04-04 Thread Sebastian Cambeo
thank you, that helped. I now send a custom link which directs to my url.

Also I defined the _next variable of the request_reset_password page 
manually to point to my login page.

-- 

--- 
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] keyword can't be an expression

2013-04-04 Thread Annet
In a function I have the following code:


form.element('input[id=what3]').update(_data-content=My text, 
_data-toggle=popover, _title=, _data-original-title=My title)

This code cannot be saved, it result in a keyword can't be an expression 
error.
data-content, data-toggle and data-original-title are bootstrap attributes 
why can't I use them this way?



Annet

-- 

--- 
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] .sum() and .count() in grid?

2013-04-04 Thread Johann Spies
How would I be able to use a query like this (or the DAL equivalent) to
show the result in a grid?

select so as Journal, SUM(aantal) as Articles
from isi.nr_arts_per_journal
group by Journal
order by Journal

Regars
Johann

-- 
Because experiencing your loyal love is better than life itself,
my lips will praise you.  (Psalm 63:3)

-- 

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

2013-04-04 Thread Francisco Costa
Hi,

I'm going to give a briefly presentation about web2py this Saturday: 
https://tymr.com/event/encontro-python-pt-6-abril-2013-porto/515c6f2a03d36d409716741e

Are there any great slides/presentations out there that I can use or get 
inspiration from?

Francisco Costa
https://tymr.com

-- 

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

2013-04-04 Thread António Ramos
like this one
http://pt.scribd.com/doc/58040260/apostila-web2py-basico
and this one

http://pt.scribd.com/doc/12288297/Web2py-vs-Others

Abraço
António


2013/4/4 Francisco Costa m...@franciscocosta.com

 Hi,

 I'm going to give a briefly presentation about web2py this Saturday:
 https://tymr.com/event/encontro-python-pt-6-abril-2013-porto/515c6f2a03d36d409716741e

 Are there any great slides/presentations out there that I can use or get
 inspiration from?

 Francisco Costa
 https://tymr.com

 --

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




-- 

--- 
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: Using a recursive select but encountered a broken reference

2013-04-04 Thread Tamas
Hello Marin,

sorry for the late reply. I don't have your e-mail (this list doesn't show 
e-mails), but I am also not sure I can provide a lot more extra info on 
this.

Did you manage to look into it? Did you find anything?

Thanks!
Tamas

On Friday, March 8, 2013 4:00:24 PM UTC+1, Marin Pranjić wrote:

 Would you mind emailing me the details?
 I won't promise, but I plan to look into it next week.

 Dana petak, 8. ožujka 2013. 15:49:42 UTC+1, korisnik Tamas napisao je:



 On Friday, March 8, 2013 3:16:25 PM UTC+1, Marin Pranjić wrote:

 True, but... Apache is not raising errors, web2py is. The error message 
 is strange. At least we could have a nicer error if this can't be fixed.
 However in my example, both instances work until i try to log in. I can 
 use the site without database i/o. Both instances work.

 Now, why would web2py (1) raise an exception when working with database 
 (2) because the apache (3) configuration is bad ?

 Sometimes the testing instance fails on login, sometimes it is 
 production instance...

 I'd like to see more about Tamas's problem.


 Well, we're running a very busy WSGI Python sctipt alongside a few web2py 
 instances, and just like with your setup the only error that happens is 
 when we try to log in on a w2p instance that uses the same mysql database 
 as the other WSGI script.

 I've e-mailed Massimo with more details a couple of months ago, and he 
 promised to look into the problem, but he never checked back, and my 
 further inquiries had no answer, so I guess it's not an easy fix :(



-- 

--- 
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: keyword can't be an expression

2013-04-04 Thread Anthony
See the end of this section in the book: 
http://web2py.com/books/default/chapter/29/05#HTML-helpers

Notice that helper attributes are passed as keyword arguments to the 
helper. In some cases, however, attribute names include special characters 
that are not allowed in Python identifiers (e.g., hyphens) and therefore 
cannot be used as keyword argument names. For example:

DIV('text', _data-role='collapsible')

will not work because _data-role includes a hyphen, which will produce a 
Python syntax error.

In such cases, you can instead pass the attributes as a dictionary and make 
use of Python's ** function arguments notation, which map a dictionary of 
(key:value) pairs into a set of keyword arguments:

 print DIV('text', **{'_data-role': 'collapsible'})

div data-role=collapsibletext/div


And specifically for data-* attributes, you can now do:

form.element('input[id=what3]').update(
data={'content':'My text', 'toggle':'popover', 'original-title':'My 
title'}, _title='')

HTML helpers can now take a data argument, which is a dict -- the keys of 
the dict will be transformed into HTML attributes of the form data-[key].

Note, if the helper already has a data argument and you want to add more 
data-* attributes, you would update the data dict itself, as follows:

form.element('input[id=what3]')['data'].update(newattribute='newvalue')

Anthony

On Thursday, April 4, 2013 5:52:34 AM UTC-4, Annet wrote:

 In a function I have the following code:


 form.element('input[id=what3]').update(_data-content=My text, 
 _data-toggle=popover, _title=, _data-original-title=My title)

 This code cannot be saved, it result in a keyword can't be an expression 
 error.
 data-content, data-toggle and data-original-title are bootstrap attributes 
 why can't I use them this way?



 Annet


-- 

--- 
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: .sum() and .count() in grid?

2013-04-04 Thread Niphlod
I'm guessing it will be hard. You'll better code a view and access it as a 
fake table.

PS: you show it in a grid then what record do you want to 
add/edit/delete ?
I'm guessing that this time you want to use the grid just to search, 
orderby and paginate, but there's a LOT of logic inside it for more things 
that needs to be considered.

On Thursday, April 4, 2013 12:23:58 PM UTC+2, Johann Spies wrote:

 How would I be able to use a query like this (or the DAL equivalent) to 
 show the result in a grid?

 select so as Journal, SUM(aantal) as Articles
 from isi.nr_arts_per_journal
 group by Journal
 order by Journal

 Regars
 Johann

 -- 
 Because experiencing your loyal love is better than life itself, 
 my lips will praise you.  (Psalm 63:3)
  

-- 

--- 
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: SmartGrid Add Mode to Call a Function

2013-04-04 Thread Niphlod
the grid exposes several callbacks that you can use to attach your own 
counters .oncreate, onupdate and ondelete

On Thursday, April 4, 2013 4:55:49 AM UTC+2, Dan Kozlowski wrote:

 I have a smartgird that is being used for adds, updates, and deletes and 
 wondering how I can call a function to update a counter in the DB to keep 
 track of how many add, updates and deletes were done in a day.

-- 

--- 
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] StopForumSpam: new plugin available

2013-04-04 Thread Niphlod
good. 
your bayesian watches the body, while stopforumspam inspects usernames, 
emails and ips. 
Don't know how much use can it have to instruct your filter with the 
terms present in username and emails of stopforumspam, but I'm happy that 
at least someone will use the plugin :P

On Thursday, April 4, 2013 12:39:19 AM UTC+2, Ricardo Pedroso wrote:

 On Fri, Mar 29, 2013 at 1:41 AM, Niphlod nip...@gmail.com 
 javascript:wrote:

 Here https://github.com/niphlod/w2p_SFS_plugin

 Ultra-alpha-Release ... expect bugs, api changes and some other 
 intricacies

 PS: if someone wants to chime in to figure out an algorithm to calculate 
 confidence (0-100) based on frequency and last_seen I'm happy to hear its 
 thoughs


 Hi Niphlod,

 I will take a look for sure, because I'm planning using a bayesian spam 
 filtering for comments
 for a personal blog system that I am, slowly, building.
 So I adapt this one https://github.com/jart/redisbayes to be able to use 
 with DAL.

 I can send you the code right know if you want or just wait until I 
 release it ;).

 I take this opportunity to ask people to access my testing server where I 
 have that experimental blog,
 and make some comments to see if training/untraining is working.
 And also, to see if the system can handle some real load.

 http://78.46.172.53:8080/sblog/post/view/first-post-1


 Regards,
 Ricardo



-- 

--- 
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: auth.settings.extra_fields['auth_user']

2013-04-04 Thread Domagoj Kovač
Thanks guys, i solved it other way.

On Thursday, April 4, 2013 3:17:49 AM UTC+2, 黄祥 wrote:

 please try this in your db.py:

 db.define_table('company',
 Field('company_name'),
 Field('website'),
 format='%(company_name)s')

 auth.settings.extra_fields['auth_user']=[
 Field('gender', 'list:string'),
 Field('address', 'text'),
 Field('zip'),
 Field('city'),
 Field('country'),
 Field('phone'),
 Field('company', 'reference company')]

 auth.define_tables(username=False, signature=True)


-- 

--- 
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] Multi-tenany and url routing

2013-04-04 Thread Domagoj Kovač
Hi Guys,

i am new to web2py. I have a problem and i am not sure how to approach it. 
I am working on a multitenant application.

I have two tables:

Tenants

   - id
   - name
   - url_sufix
   - active
   - deleted

Tenans_users

   - tenant_id
   - user_id

in tenants table url_sufix is a url_sufix, for example, my base application 
is on 127.0.0.1.:8000/myapp, and login for the tenant is on 
127.0.0.1.:8000/myapp/url_sufix for example 127.0.0.1.:8000/myapp/tenant_1. 
Lets say we have one user that has two tenants. When user logs in trought 
127.0.0.1.:8000/myapp/tenant_1 he is also logged in 
127.0.0.1.:8000/myapp/tenant_2 because he has two tenants, but if user goes 
to 127.0.0.1.:8000/myapp/tenant_3 he receives the login form and if 
he tries to login, he will receive an error saying credential are wrong. 

I don't need a working code, just an advice how this could be done.


-- 

--- 
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] Matching iterations of a for loop to field names in a table

2013-04-04 Thread David S
I'm very new to web2py and python in general but have a bit of knowledge 
when it comes to C/C++. 

I've got a db setup which needs to pull data from a row in a .csv file and 
put each column in the .csv into the corresponding column in the db. Rather 
than doing this explicitly (there's ~40 columns), I'd like to have each 
iteration of the for loop correspond to one of the columns. Here's what 
I've got so far:

for lines in import_data:
info = lines.split(',')
field_name = 'field1'
db[csv_data].insert(**{field_name:info})

The above puts all the data in 'field1' and not into separate columns, 
close but not quite. I'm thinking some sort of select from the db might 
work. Any ideas or links which might help?

Thanks,
David

-- 

--- 
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: Matching iterations of a for loop to field names in a table

2013-04-04 Thread Massimo Di Pierro
This is automatic:

db[csv_data].import_from_csv_file(open('filename.csv'))



On Wednesday, 3 April 2013 16:40:01 UTC-5, David S wrote:

 I'm very new to web2py and python in general but have a bit of knowledge 
 when it comes to C/C++. 

 I've got a db setup which needs to pull data from a row in a .csv file and 
 put each column in the .csv into the corresponding column in the db. Rather 
 than doing this explicitly (there's ~40 columns), I'd like to have each 
 iteration of the for loop correspond to one of the columns. Here's what 
 I've got so far:

 for lines in import_data:
 info = lines.split(',')
 field_name = 'field1'
 db[csv_data].insert(**{field_name:info})

 The above puts all the data in 'field1' and not into separate columns, 
 close but not quite. I'm thinking some sort of select from the db might 
 work. Any ideas or links which might help?

 Thanks,
 David


-- 

--- 
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] any good open courses with web2py?

2013-04-04 Thread jjg0
Are there any good self paced learning courses on webdev with web2py?  

So far I am enjoying learning how to make websites with web2py.  I don't 
mind spending a little money on courses or learning material, but I really 
only do this as a hobby so I'm not interested in shelling out several grand 
for courses that offer college credits, degrees, certificates, or any of 
those intensive bootcamps.  Looking at other online courses offered that 
aren't in web2py I see some really good ideas for projects I would like to 
be able to build.  One site, for example, had a netflix clone as a final 
project with ruby on rails, complete with commerce and everything you would 
need.  Unfortunately the site was very expensive and not in web2py:(

Playing around with php a while back before I found web2py I remember 
following several teach yourself projects but found them to be incomplete.  
For example, there were a lot of build a blog tutorials but the end result 
was a form to enter blog entries and a page that grabbed entries from the 
db and displayed them.  I didn't like this because the end result was a 
blog you couldn't actually use, there was no search features, no tagging, 
no commenting, no user auth, etc.

I can build simple sites, so I'm not looking for an introductory course. 
For example, the last site I made with web2py was for my friends school 
with the following:
-School information, schedules, location, instructors, etc
-a blog like feature to post upcoming events. I posted links to only future 
events on the front page. This behaved similar to a blog
-a blog for the owner to blog about his school or whatever else he wanted.  
Had an archive dropdown menu, comments were working at one point but 
disabled on request of the owner
-2 forms for people to signup or ask questions. A pdf page can be generated 
based on the information provided, and a link is emailed to the owner.  I 
was originally going to just make a pdf and mail that to the owner as an 
attachment, but I could never get that working

This wasn't too hard to make, but I struggled on a few parts and my code 
may not exactly be best practice.  It would be nice to find tutorials or 
open courses I could follow with more challenging projects to get me making 
more complicated sites and breaking any bad habits I may have picked up.  
Any Suggestions?

Thanks

-- 

--- 
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] REF: Pie/bar Charts

2013-04-04 Thread Teddy Nyambe
whats the easiest way to create a pie/bar chart using web2py/python, i was
attempting to use pycha with cairo/pycairo libraries with very little
success, failed to install pycairo on the mac all the googled exmaples not
working.

Any ideas?

-- 
...
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA

Cell: +260 97 7760473
website: http://www.opensource.org.zm

~/
Human Knowledge belongs to the world! - AntiTrust

Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881

/~

-- 

--- 
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: Pie/bar Charts

2013-04-04 Thread Javier Pepe
Hello

I am use http://pygooglechart.slowchop.com/

Is very simple, create a file, a use then in the view.




On Thu, Apr 4, 2013 at 10:37 AM, Teddy Nyambe software@gmail.comwrote:

 whats the easiest way to create a pie/bar chart using web2py/python, i was
 attempting to use pycha with cairo/pycairo libraries with very little
 success, failed to install pycairo on the mac all the googled exmaples not
 working.

 Any ideas?

 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~

 --

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




-- 

--- 
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: Pie/bar Charts

2013-04-04 Thread António Ramos
D3js is the way to go. Its javascript but hey, its the way to go also.

The best part, and matplotlib is behind this, is interactivity in the
browser.

Apart from other cool stuff

Best



2013/4/4 Javier Pepe javierp...@gmail.com

 Hello

 I am use http://pygooglechart.slowchop.com/

 Is very simple, create a file, a use then in the view.




 On Thu, Apr 4, 2013 at 10:37 AM, Teddy Nyambe software@gmail.comwrote:

 whats the easiest way to create a pie/bar chart using web2py/python, i
 was attempting to use pycha with cairo/pycairo libraries with very little
 success, failed to install pycairo on the mac all the googled exmaples not
 working.

 Any ideas?

 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~

 --

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




  --

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




-- 

--- 
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: Pie/bar Charts

2013-04-04 Thread Teddy Nyambe
pygooglechart looks easy, but have a small issue with web2py.

I did:

easy_install pygooglechart

on the python prompt the module is being imported:

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type help, copyright, credits or license for more information.
 import pygooglechart
 help(pygooglechart)

Help on module pygooglechart:

NAME
pygooglechart - pygooglechart - A complete Python wrapper for the
Google Chart API

FILE

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygooglechart-0.3.0-py2.7.egg/pygooglechart.py


 but under web2py the import is giving the following error:

In [2] : import pygooglechart
Traceback (most recent call last):
  File /Users/teddyl/Documents/src/web2py/gluon/contrib/shell.py, line
234, in run
exec compiled in statement_module.__dict__
  File string, line 1, in module
  File /Users/teddyl/Documents/src/web2py/gluon/custom_import.py, line
81, in custom_importer
raise ImportError, 'Cannot import module %s' % str(e)
ImportError: Cannot import module 'pygooglechart'


Any ideas!?

On Thu, Apr 4, 2013 at 3:42 PM, Javier Pepe javierp...@gmail.com wrote:

 Hello

 I am use http://pygooglechart.slowchop.com/

 Is very simple, create a file, a use then in the view.




 On Thu, Apr 4, 2013 at 10:37 AM, Teddy Nyambe software@gmail.comwrote:

 whats the easiest way to create a pie/bar chart using web2py/python, i
 was attempting to use pycha with cairo/pycairo libraries with very little
 success, failed to install pycairo on the mac all the googled exmaples not
 working.

 Any ideas?

 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~

 --

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




  --

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






-- 
...
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA

Cell: +260 97 7760473
website: http://www.opensource.org.zm

~/
Human Knowledge belongs to the world! - AntiTrust

Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881

/~

-- 

--- 
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: .sum() and .count() in grid?

2013-04-04 Thread Cliff Kachinske
It would be really sweet to do something like

mycrumbtrail = SQLFORM.smartgrid.do_crumbtrail(...

or

myconsole = SQLFORM.smartgrid.do_console(...



On Thursday, April 4, 2013 9:17:11 AM UTC-4, Niphlod wrote:

 I'm guessing it will be hard. You'll better code a view and access it as a 
 fake table.

 PS: you show it in a grid then what record do you want to 
 add/edit/delete ?
 I'm guessing that this time you want to use the grid just to search, 
 orderby and paginate, but there's a LOT of logic inside it for more things 
 that needs to be considered.

 On Thursday, April 4, 2013 12:23:58 PM UTC+2, Johann Spies wrote:

 How would I be able to use a query like this (or the DAL equivalent) to 
 show the result in a grid?

 select so as Journal, SUM(aantal) as Articles
 from isi.nr_arts_per_journal
 group by Journal
 order by Journal

 Regars
 Johann

 -- 
 Because experiencing your loyal love is better than life itself, 
 my lips will praise you.  (Psalm 63:3)
  


-- 

--- 
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: keyword can't be an expression

2013-04-04 Thread Annet
Hi Anthony,

Thanks for the reference and for your extensive explanation how to solve my 
problem. The popover works!

Best regards,

Annet

-- 

--- 
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: Pie/bar Charts

2013-04-04 Thread Teddy Nyambe
Ok looks like i needed to restart web2py!! its ok now.


On Thu, Apr 4, 2013 at 4:07 PM, Teddy Nyambe software@gmail.com wrote:

 pygooglechart looks easy, but have a small issue with web2py.

 I did:

 easy_install pygooglechart

 on the python prompt the module is being imported:

 Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
 [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
 Type help, copyright, credits or license for more information.
  import pygooglechart
  help(pygooglechart)

 Help on module pygooglechart:

 NAME
 pygooglechart - pygooglechart - A complete Python wrapper for the
 Google Chart API

 FILE

 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygooglechart-0.3.0-py2.7.egg/pygooglechart.py


  but under web2py the import is giving the following error:

 In [2] : import pygooglechart
 Traceback (most recent call last):
   File /Users/teddyl/Documents/src/web2py/gluon/contrib/shell.py, line
 234, in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File /Users/teddyl/Documents/src/web2py/gluon/custom_import.py, line
 81, in custom_importer
 raise ImportError, 'Cannot import module %s' % str(e)
 ImportError: Cannot import module 'pygooglechart'


 Any ideas!?

 On Thu, Apr 4, 2013 at 3:42 PM, Javier Pepe javierp...@gmail.com wrote:

 Hello

 I am use http://pygooglechart.slowchop.com/

 Is very simple, create a file, a use then in the view.




 On Thu, Apr 4, 2013 at 10:37 AM, Teddy Nyambe software@gmail.comwrote:

 whats the easiest way to create a pie/bar chart using web2py/python, i
 was attempting to use pycha with cairo/pycairo libraries with very little
 success, failed to install pycairo on the mac all the googled exmaples not
 working.

 Any ideas?

 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he
 is all - Thomas Carlyle 1795-1881

 /~

 --

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




  --

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






 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~




-- 
...
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA

Cell: +260 97 7760473
website: http://www.opensource.org.zm

~/
Human Knowledge belongs to the world! - AntiTrust

Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881

/~

-- 

--- 
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: Pie/bar Charts

2013-04-04 Thread Teddy Nyambe
The image is generated at google.com, what if there is no internet? this is
not good will be operating also in off-line modesbut like the
simplicity.


On Thu, Apr 4, 2013 at 4:16 PM, Teddy Nyambe software@gmail.com wrote:

 Ok looks like i needed to restart web2py!! its ok now.


 On Thu, Apr 4, 2013 at 4:07 PM, Teddy Nyambe software@gmail.comwrote:

 pygooglechart looks easy, but have a small issue with web2py.

 I did:

 easy_install pygooglechart

 on the python prompt the module is being imported:

 Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
 [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
 Type help, copyright, credits or license for more information.
  import pygooglechart
  help(pygooglechart)

 Help on module pygooglechart:

 NAME
 pygooglechart - pygooglechart - A complete Python wrapper for the
 Google Chart API

 FILE

 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygooglechart-0.3.0-py2.7.egg/pygooglechart.py


  but under web2py the import is giving the following error:

 In [2] : import pygooglechart
  Traceback (most recent call last):
   File /Users/teddyl/Documents/src/web2py/gluon/contrib/shell.py, line
 234, in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File /Users/teddyl/Documents/src/web2py/gluon/custom_import.py, line
 81, in custom_importer
 raise ImportError, 'Cannot import module %s' % str(e)
 ImportError: Cannot import module 'pygooglechart'


 Any ideas!?

 On Thu, Apr 4, 2013 at 3:42 PM, Javier Pepe javierp...@gmail.com wrote:

 Hello

 I am use http://pygooglechart.slowchop.com/

 Is very simple, create a file, a use then in the view.




 On Thu, Apr 4, 2013 at 10:37 AM, Teddy Nyambe software@gmail.comwrote:

 whats the easiest way to create a pie/bar chart using web2py/python, i
 was attempting to use pycha with cairo/pycairo libraries with very little
 success, failed to install pycairo on the mac all the googled exmaples not
 working.

 Any ideas?

 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he
 is all - Thomas Carlyle 1795-1881

 /~

 --

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




  --

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






 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~




 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~




-- 
...
Teddy Lubasi Nyambe
Opensource Zambia
Lusaka, ZAMBIA

Cell: +260 97 7760473
website: http://www.opensource.org.zm

~/
Human Knowledge belongs to the world! - AntiTrust

Man is a tool-using animal. Without tools he is nothing, with tools he is
all - Thomas Carlyle 1795-1881

/~

-- 

--- 
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: SmartGrid Add Mode to Call a Function

2013-04-04 Thread Anthony
Another option is to use the DAL callbacks: 
http://web2py.com/books/default/chapter/29/06#before-and-after-callbacks

Anthony

On Thursday, April 4, 2013 9:21:14 AM UTC-4, Niphlod wrote:

 the grid exposes several callbacks that you can use to attach your own 
 counters .oncreate, onupdate and ondelete

 On Thursday, April 4, 2013 4:55:49 AM UTC+2, Dan Kozlowski wrote:

 I have a smartgird that is being used for adds, updates, and deletes and 
 wondering how I can call a function to update a counter in the DB to keep 
 track of how many add, updates and deletes were done in a day.



-- 

--- 
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: EmberJS is the web2py of the client! :)

2013-04-04 Thread Richard Vézina
Alec,

I think you are on a rigth spot about javascript web2py validator that
something that are missing when someone want to transfert some stuff to
client side... Now it requires that we reinvent the wheel... If there were
a way we could reuse the web2py validators definition and use them in a
client side form that kind of auto-submit trougth ajax it could be much
more appealing to brake the web2py workflow (I mean server-side
processing/validation of form)...


Richard


On Thu, Apr 4, 2013 at 1:31 AM, Alec Taylor alec.tayl...@gmail.com wrote:

 On Thu, Apr 4, 2013 at 7:05 AM, Arnon Marcus a.m.mar...@gmail.com wrote:
  I agree that it does seem right now, that the current trend in the
  web-development world, in general, is moving in the direction of
  transferring more and more tasks to the client, as those become more and
  more capable.
 
  But I wouldn't bury web2py just yet... (nor any other server-side
 framework
  for that matter)
 
  As in the WebSockets story, the current temporary Hype is exaggerating
 the
  perception of the long-term eventual-effect. I think server-side
 frameworks
  are here to stay - at least for the foreseeable future - it's not gonna
 be
  an all or nothing transference in all cases, not even in most. It is
 still
  much harder on the client, even with things like Ember - especially
  considering the whole cross-browser/platform story. The whole Google
 thing
  about - everything going to the web... I don't buy it - not yet.
  Google-Docs is an amazing idea in theory - in practice, it's a buggy
 mess
  of crap... (and in Google's own chrome, for f#ck sake...)
 
  Most simple applications, websites, etc. are not as complex as, say, an
  Intranet business applications (such as the one I've been working on for
 the
  past 3 years) - which is a market still dominated by desktop
 applications.
  But yes, the expectations are changing... Slowly...
  I think it's going to be a long and hybrid-ridden transition.
 
  For now, I've seen talks about how to maximize loading time,
  template-rendering can be done on the server, even for desktop usage -
 and
  that's rendering to plain HTML, not a JavaScript Object-Tree - so it can
  still be done in web2py. Once the static HTML loads, the framework then
  kicks-in, and starts climbing and crawling over the DOM, attaching itself
  and building it's JavaScript-Object-Tree and injecting dependencies into
 the
  DOM and such... There are frameworks that go that rout - don't know to
 what
  degree Angular or Ember are in this category, though...
 
  The main incentive here, other than speeding-up loading time, is the
 whole
  SEO story... (search-engine-optimization) Search-engine crawlers/spiders
  need static HTML to search in - if the entire thing is
 Javascript-generated,
  it is virtually unsearchable... And no web-site owner wants that... Only
  Intranet applications don't care about such things...
 
  Then there's this thing about resources, RESTfull'ness and ORMs...
  I think that web2py's models and controllers will remain relevant, as
 there
  is a difference between the model of the data in it's view's usage, and
 the
  model of the data in the database. Most of what the controllers are
 doing in
  web2py, in my experience, apart from querying the DAL, is
 data-manipulation
  - translating one data-model into another, to meet the needs of the views
  for optimal and elegant usage. This role can stay in the server, as in
 some
  cases, much less information has to go through the wire this way. Can
 this
  be done in the client's controllers? Maybe. But I'm not sure it should -
 not
  in all cases. I think it might actually be easier for a client to deal
 with
  a data-model that is already structured in a manner that most fits the
 need
  at hand - and have that be CRUD'ed in that form. A client's MVC component
  shouldn't care how the data is actually stored on the database - it can
  request it's resources in a form that is already pre-transformed and
  structured especially for it's needs.
  So what you can do, is have the starting-point server-side portion of the
  URL of each screen, still be of a web2py controller, which would then
 either
  be transferred via a web2py view if it's a full-refresh/first-time-load,
 or
  as a JSON resource in an AJAX manner is all other cases.
  In both scenarios, the web2py's controller's role would be to query the
 DAL
  and optimally translate the data for the client's screen - for the GET
  method, and do a reverse-translation for the POST one...
 
  So here's what I see:
  I see a diverse web-development world, with varying degrees of
 server-side
  logic usage, in some cases dynamically switching from server to client
 and
  back, based on needs, requirements, trade-offs criteria, and
  target-platforms.

 Not a bad argument Arnon, but you shouldn't discount search scrapers so
 easily.

 I think Google's Search Bot has support AJAX for a good 5 years now.

 Translating between web2py 

Re: [web2py] REF: Pie/bar Charts

2013-04-04 Thread Richard Vézina
better pip install next time...
http://stackoverflow.com/questions/3220404/why-use-pip-over-easy-install

Mainly because you can delete the package...

Richard


On Thu, Apr 4, 2013 at 10:07 AM, Teddy Nyambe software@gmail.comwrote:

 pygooglechart looks easy, but have a small issue with web2py.

 I did:

 easy_install pygooglechart

 on the python prompt the module is being imported:

 Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
 [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
 Type help, copyright, credits or license for more information.
  import pygooglechart
  help(pygooglechart)

 Help on module pygooglechart:

 NAME
 pygooglechart - pygooglechart - A complete Python wrapper for the
 Google Chart API

 FILE

 /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygooglechart-0.3.0-py2.7.egg/pygooglechart.py


  but under web2py the import is giving the following error:

 In [2] : import pygooglechart
 Traceback (most recent call last):
   File /Users/teddyl/Documents/src/web2py/gluon/contrib/shell.py, line
 234, in run
 exec compiled in statement_module.__dict__
   File string, line 1, in module
   File /Users/teddyl/Documents/src/web2py/gluon/custom_import.py, line
 81, in custom_importer
 raise ImportError, 'Cannot import module %s' % str(e)
 ImportError: Cannot import module 'pygooglechart'


 Any ideas!?

 On Thu, Apr 4, 2013 at 3:42 PM, Javier Pepe javierp...@gmail.com wrote:

 Hello

 I am use http://pygooglechart.slowchop.com/

 Is very simple, create a file, a use then in the view.




 On Thu, Apr 4, 2013 at 10:37 AM, Teddy Nyambe software@gmail.comwrote:

 whats the easiest way to create a pie/bar chart using web2py/python, i
 was attempting to use pycha with cairo/pycairo libraries with very little
 success, failed to install pycairo on the mac all the googled exmaples not
 working.

 Any ideas?

 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he
 is all - Thomas Carlyle 1795-1881

 /~

 --

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




  --

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






 --

 ...
 Teddy Lubasi Nyambe
 Opensource Zambia
 Lusaka, ZAMBIA

 Cell: +260 97 7760473
 website: http://www.opensource.org.zm

 ~/
 Human Knowledge belongs to the world! - AntiTrust

 Man is a tool-using animal. Without tools he is nothing, with tools he is
 all - Thomas Carlyle 1795-1881

 /~

 --

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




-- 

--- 
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 delete not deleting

2013-04-04 Thread António Ramos
I´m having the same problem reported here

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



my grid


mytable = SQLFORM.grid( db.t_docs.f_trab_ref==query ,
csv=False,
searchable=False,
maxtextlength=32,
details=False,
editable=False,
create=False,
ui='web2py'
)


i have web2py 2.0.9 on windows 7

Thank you
António

-- 

--- 
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] running a web2py application on different os

2013-04-04 Thread Luis

   
   - Hello web2py users,


Out of convenience, I was copying a web2py application created in Windows 
to my home computer (a mac and a debian vm). When I try to run it, it does 
start well but images cached from openlayers, mainly the background map, 
render with tiles far apart from each other. The application runs well on 
Windows 7, but not on Mac and Linux. The app code is exactly the same (.py, 
html and js). Does anyone have any hints as for where I need to start 
checking? Is is safe to copy entire apps from one OS to another and expect 
it to run well (assuming the db systems and contents are the same)? The 
issue, so far is during the rendering of images (I use Firefox most of the 
time).

Thanks in advance for your time,

Luis

-- 

--- 
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] call delete() on row

2013-04-04 Thread Annet
I have the following function:


rows=db(db.nodeNavbar.nodeID==id).select()
if rows:
for r in rows:
if r.navbarID==VIEWNAVBARID:
view_navbar_delete(id)
if r.navbarID==TEXTNAVBARID:
text_navbar_delete(id)
if r.navbarID==GRAPHICSNAVBARID:
 etc.

After the call to the function:

view_navbar_delete(id)

I want to delete r, can I do:

r.delete()

... or won't that work?


Annet

-- 

--- 
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: running a web2py application on different os

2013-04-04 Thread Niphlod
I doubt it's a web2py problem ... you should check for users hitting the 
same behaviour using openlayers on different OSes ... probably it's a 
matter of css .

On Thursday, April 4, 2013 5:03:37 PM UTC+2, Luis wrote:


- Hello web2py users,


 Out of convenience, I was copying a web2py application created in Windows 
 to my home computer (a mac and a debian vm). When I try to run it, it does 
 start well but images cached from openlayers, mainly the background map, 
 render with tiles far apart from each other. The application runs well on 
 Windows 7, but not on Mac and Linux. The app code is exactly the same (.py, 
 html and js). Does anyone have any hints as for where I need to start 
 checking? Is is safe to copy entire apps from one OS to another and expect 
 it to run well (assuming the db systems and contents are the same)? The 
 issue, so far is during the rendering of images (I use Firefox most of the 
 time).

 Thanks in advance for your time,

 Luis


-- 

--- 
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: web2py dropbox integration

2013-04-04 Thread Yassine Elouri
bump.

On Tuesday, April 2, 2013 4:45:08 PM UTC-7, Yassine Elouri wrote:

 Thanks for the link, but I am not able to get it to work. Maybe I'm doing 
 some thing wrong. Would you please verify this:
 I create the private/dropbox.key file with APP_KEY:APP_SECRET:dropbox
 in models/db.py I have added:
 from gluon.contrib.login_methods.dropbox_account import use_dropbox
 use_dropbox(auth,filename='private/dropbox.key')

 In the default controller, I have this in the index():

 def index():
 client = auth.settings.login_form.client
 return dict(message=T(Welcome  + client.account_info()['display_name'])) 

 When the user is authenticated and redirected to /default/index I get the 
 following error:

 type 'exceptions.AttributeError' 'DropboxAccount' object has no 
 attribute 'client' Version  web2py™ Version 
 2.4.5-stable+timestamp.2013.03.18.22.46.22  Python Python 2.7.3: 
 C:\Python27\python.exe (prefix: C:\Python27)  Traceback 

 1.
 2.
 3.
 4.
 5.
 6.
 7.
 8.
 9.
 10.

 Traceback (most recent call last):
   File C:\Users\Administrator\Documents\web2py\gluon\restricted.py, line 
 212, in restricted
 exec ccode in environment
   File 
 C:/Users/Administrator/Documents/web2py/applications/dropbox/controllers/default.py
  http://localhost:8000/admin/default/edit/dropbox/controllers/default.py, 
 line 73, in module
   File C:\Users\Administrator\Documents\web2py\gluon\globals.py, line 194, 
 in lambda
 self._caller = lambda f: f()
   File 
 C:/Users/Administrator/Documents/web2py/applications/dropbox/controllers/default.py
  http://localhost:8000/admin/default/edit/dropbox/controllers/default.py, 
 line 13, in index
 client = auth.settings.login_form.client
 AttributeError: 'DropboxAccount' object has no attribute 'client'


 I also tried the following:
 client = auth.settings.login_form.get_client()
 But get_client() returns None. 

 On Tuesday, April 2, 2013 2:54:19 PM UTC-7, Massimo Di Pierro wrote:

 Why are you reinventing the wheel?

 look into gluon/contrib/login_methods/dropbox_account.py

 On Tuesday, 2 April 2013 14:40:10 UTC-5, Yassine Elouri wrote:

 I am using web2py v2.4.5 and dropbox v1.5.1 for a project and I get 
 invalid token error. I have a default controller with 3 methods. index() 
 takes the user to the authorization url with a callback to welcome(). This 
 part works fine. When I make a call to the third method userinfo() I get 
 invalid token error. See attached source code.
 Can anyone help me with this? Thank you



-- 

--- 
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: web2py dropbox integration

2013-04-04 Thread Yassine Elouri
bump.

-- 

--- 
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: Matching iterations of a for loop to field names in a table

2013-04-04 Thread David S
I initially tried using that function however import_from_csv_file() 
doesn't work with this file. I also tried using a few lines of code to 
manipulate the data into something import_from_csv_file would like and 
write that to a .csv then try importing it, but had no luck. Below are the 
contents of the file:

A,2,000282,15,r,1:08:34 
PM,2/2/2014,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,,
A,2,000282,15,r,1:08:46 
PM,2/2/2014,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,,
A,3,000282,15,R,1:20:05 
PM,2/2/2014,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,,
A,00012,000282,15,R,1:20:37 
PM,2/2/2014,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,,
A,00056,000282,15,R,1:29:09 
PM,2/2/2014,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,BCC,,,

And, as a note I cannot change the formatting of this .csv file as it is 
being generated by a computer running Windows NT using proprietary 
software. Changing the format would require the that company to rewrite 
part of their software.

On Wednesday, April 3, 2013 5:40:01 PM UTC-4, David S wrote:

 I'm very new to web2py and python in general but have a bit of knowledge 
 when it comes to C/C++. 

 I've got a db setup which needs to pull data from a row in a .csv file and 
 put each column in the .csv into the corresponding column in the db. Rather 
 than doing this explicitly (there's ~40 columns), I'd like to have each 
 iteration of the for loop correspond to one of the columns. Here's what 
 I've got so far:

 for lines in import_data:
 info = lines.split(',')
 field_name = 'field1'
 db[csv_data].insert(**{field_name:info})

 The above puts all the data in 'field1' and not into separate columns, 
 close but not quite. I'm thinking some sort of select from the db might 
 work. Any ideas or links which might help?

 Thanks,
 David


-- 

--- 
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] Web2py youtube videos - better title?

2013-04-04 Thread António Ramos
hello can i suggest a more descriptive title for these videos?

http://www.youtube.com/playlist?list=PL5E2E223FE3777851


I dont want to see all the videos to discover if its contents are
interesting.


best regards

-- 

--- 
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: web2py Talk

2013-04-04 Thread Alan Etkin


 Are there any great slides/presentations out there that I can use or get 
 inspiration from?


Great presentation in spanish although slightly outdated

http://www.slideshare.net/martinpm/web2py-pensando-en-grande-9448110

This is even older, but I would rename it as How do you make a 
presentation of web2py (also in spanish)

http://docs.google.com/present/view?id=dd9bm82g_404c5v965c6

-- 

--- 
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: running a web2py application on different os

2013-04-04 Thread Luis
Thanks. I checked my web2py versions and they are the same. I'll take a 
more careful look at the js within applications.

On Thursday, April 4, 2013 11:23:25 AM UTC-4, Niphlod wrote:

 I doubt it's a web2py problem ... you should check for users hitting the 
 same behaviour using openlayers on different OSes ... probably it's a 
 matter of css .

 On Thursday, April 4, 2013 5:03:37 PM UTC+2, Luis wrote:


- Hello web2py users,


 Out of convenience, I was copying a web2py application created in Windows 
 to my home computer (a mac and a debian vm). When I try to run it, it does 
 start well but images cached from openlayers, mainly the background map, 
 render with tiles far apart from each other. The application runs well on 
 Windows 7, but not on Mac and Linux. The app code is exactly the same (.py, 
 html and js). Does anyone have any hints as for where I need to start 
 checking? Is is safe to copy entire apps from one OS to another and expect 
 it to run well (assuming the db systems and contents are the same)? The 
 issue, so far is during the rendering of images (I use Firefox most of the 
 time).

 Thanks in advance for your time,

 Luis



-- 

--- 
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: EmberJS is the web2py of the client! :)

2013-04-04 Thread Derek
I read that metawidget thing and it seems interesting, can you write more 
about how to get metawidget working with web2py?

On Wednesday, April 3, 2013 10:31:36 PM UTC-7, Alec Taylor wrote:

 On Thu, Apr 4, 2013 at 7:05 AM, Arnon Marcus 
 a.m.m...@gmail.comjavascript: 
 wrote: 
  I agree that it does seem right now, that the current trend in the 
  web-development world, in general, is moving in the direction of 
  transferring more and more tasks to the client, as those become more and 
  more capable. 
  
  But I wouldn't bury web2py just yet... (nor any other server-side 
 framework 
  for that matter) 
  
  As in the WebSockets story, the current temporary Hype is exaggerating 
 the 
  perception of the long-term eventual-effect. I think server-side 
 frameworks 
  are here to stay - at least for the foreseeable future - it's not gonna 
 be 
  an all or nothing transference in all cases, not even in most. It is 
 still 
  much harder on the client, even with things like Ember - especially 
  considering the whole cross-browser/platform story. The whole Google 
 thing 
  about - everything going to the web... I don't buy it - not yet. 
  Google-Docs is an amazing idea in theory - in practice, it's a buggy 
 mess 
  of crap... (and in Google's own chrome, for f#ck sake...) 
  
  Most simple applications, websites, etc. are not as complex as, say, an 
  Intranet business applications (such as the one I've been working on for 
 the 
  past 3 years) - which is a market still dominated by desktop 
 applications. 
  But yes, the expectations are changing... Slowly... 
  I think it's going to be a long and hybrid-ridden transition. 
  
  For now, I've seen talks about how to maximize loading time, 
  template-rendering can be done on the server, even for desktop usage - 
 and 
  that's rendering to plain HTML, not a JavaScript Object-Tree - so it can 
  still be done in web2py. Once the static HTML loads, the framework then 
  kicks-in, and starts climbing and crawling over the DOM, attaching 
 itself 
  and building it's JavaScript-Object-Tree and injecting dependencies into 
 the 
  DOM and such... There are frameworks that go that rout - don't know to 
 what 
  degree Angular or Ember are in this category, though... 
  
  The main incentive here, other than speeding-up loading time, is the 
 whole 
  SEO story... (search-engine-optimization) Search-engine crawlers/spiders 
  need static HTML to search in - if the entire thing is 
 Javascript-generated, 
  it is virtually unsearchable... And no web-site owner wants that... Only 
  Intranet applications don't care about such things... 
  
  Then there's this thing about resources, RESTfull'ness and ORMs... 
  I think that web2py's models and controllers will remain relevant, as 
 there 
  is a difference between the model of the data in it's view's usage, and 
 the 
  model of the data in the database. Most of what the controllers are 
 doing in 
  web2py, in my experience, apart from querying the DAL, is 
 data-manipulation 
  - translating one data-model into another, to meet the needs of the 
 views 
  for optimal and elegant usage. This role can stay in the server, as in 
 some 
  cases, much less information has to go through the wire this way. Can 
 this 
  be done in the client's controllers? Maybe. But I'm not sure it should - 
 not 
  in all cases. I think it might actually be easier for a client to deal 
 with 
  a data-model that is already structured in a manner that most fits the 
 need 
  at hand - and have that be CRUD'ed in that form. A client's MVC 
 component 
  shouldn't care how the data is actually stored on the database - it can 
  request it's resources in a form that is already pre-transformed and 
  structured especially for it's needs. 
  So what you can do, is have the starting-point server-side portion of 
 the 
  URL of each screen, still be of a web2py controller, which would then 
 either 
  be transferred via a web2py view if it's a full-refresh/first-time-load, 
 or 
  as a JSON resource in an AJAX manner is all other cases. 
  In both scenarios, the web2py's controller's role would be to query the 
 DAL 
  and optimally translate the data for the client's screen - for the GET 
  method, and do a reverse-translation for the POST one... 
  
  So here's what I see: 
  I see a diverse web-development world, with varying degrees of 
 server-side 
  logic usage, in some cases dynamically switching from server to client 
 and 
  back, based on needs, requirements, trade-offs criteria, and 
  target-platforms. 

 Not a bad argument Arnon, but you shouldn't discount search scrapers so 
 easily. 

 I think Google's Search Bot has support AJAX for a good 5 years now. 

 Translating between web2py DAL and (for example) AngularJS forms is 
 not completely straightforward. 

 However, with the help of metawidget it is very possible. 

 What would be best is if we had an SQLFORM() style generator in 
 JavaScript; which is completely 

[web2py] Re: Matching iterations of a for loop to field names in a table

2013-04-04 Thread Massimo Di Pierro
Ok you can do:

colnames = ['field1','field2',etc.]
for lines in import_data:
items = lines.split(',')
db[csv_data].insert(**dict((colnames[i],v) for i,v in enumerate(items)))

It may still fail of the data is not in the right format but you can find 
out why.

On Wednesday, 3 April 2013 16:40:01 UTC-5, David S wrote:

 I'm very new to web2py and python in general but have a bit of knowledge 
 when it comes to C/C++. 

 I've got a db setup which needs to pull data from a row in a .csv file and 
 put each column in the .csv into the corresponding column in the db. Rather 
 than doing this explicitly (there's ~40 columns), I'd like to have each 
 iteration of the for loop correspond to one of the columns. Here's what 
 I've got so far:

 for lines in import_data:
 info = lines.split(',')
 field_name = 'field1'
 db[csv_data].insert(**{field_name:info})

 The above puts all the data in 'field1' and not into separate columns, 
 close but not quite. I'm thinking some sort of select from the db might 
 work. Any ideas or links which might help?

 Thanks,
 David


-- 

--- 
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 delete not deleting

2013-04-04 Thread Massimo Di Pierro
Can you please try web2py 2.4.* I believe this was fixed.

On Thursday, 4 April 2013 09:57:35 UTC-5, Ramos wrote:

 I´m having the same problem reported here

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



 my grid 


 mytable = SQLFORM.grid( db.t_docs.f_trab_ref==query , 
 csv=False,  
 searchable=False,
 maxtextlength=32,
 details=False,
 editable=False,
 create=False,
 ui='web2py'
 )  


 i have web2py 2.0.9 on windows 7

 Thank you
 António


-- 

--- 
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: Matching iterations of a for loop to field names in a table

2013-04-04 Thread David S
The data isn't formatted quite right. It's looking like I'll have to format 
the file a little.

As a test, I tried adding the column names to the top of the .csv file and 
import_from_csv_file works. I'm going to make a function to add the column 
names to the first line of the file. 

Thanks for your help!

On Thursday, April 4, 2013 2:05:54 PM UTC-4, Massimo Di Pierro wrote:

 Ok you can do:

 colnames = ['field1','field2',etc.]
 for lines in import_data:
 items = lines.split(',')
 db[csv_data].insert(**dict((colnames[i],v) for i,v in 
 enumerate(items)))

 It may still fail of the data is not in the right format but you can find 
 out why.

 On Wednesday, 3 April 2013 16:40:01 UTC-5, David S wrote:

 I'm very new to web2py and python in general but have a bit of knowledge 
 when it comes to C/C++. 

 I've got a db setup which needs to pull data from a row in a .csv file 
 and put each column in the .csv into the corresponding column in the db. 
 Rather than doing this explicitly (there's ~40 columns), I'd like to have 
 each iteration of the for loop correspond to one of the columns. Here's 
 what I've got so far:

 for lines in import_data:
 info = lines.split(',')
 field_name = 'field1'
 db[csv_data].insert(**{field_name:info})

 The above puts all the data in 'field1' and not into separate columns, 
 close but not quite. I'm thinking some sort of select from the db might 
 work. Any ideas or links which might help?

 Thanks,
 David



-- 

--- 
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: EmberJS is the web2py of the client! :)

2013-04-04 Thread Niphlod
just to clarify on the 


 Not a bad argument Arnon, but you shouldn't discount search scrapers so 
 easily. 

 I think Google's Search Bot has support AJAX for a good 5 years now. 

 part . have you actually tried it ??

search bots (google included) have some ajax support in the sense that if 
you plan it, it works.
Basically if you planned you site to output the data as if it was without 
javascript, it works.
That's FAR from they have ajax support.

They DON'T execute any javascript at all. 

There's a preview app of what google bot will see in your page, try it ^_^

They just follow links that you prepared carefully. The most notable 
example is that if you have e.g. 
 
a href=/shomethefragment.html 
onclick='window.location=http://mysite/app/showmethefragment2.html;'

they'll request showmethefragment.html, while they **should** fetch  
http://mysite/app/showmethefragment2.html;

@all: plan carefully if SEO is important for you. More info at 
https://developers.google.com/webmasters/ajax-crawling/


-- 

--- 
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: EmberJS is the web2py of the client! :)

2013-04-04 Thread Niphlod
PS: ajax is not quite the same as javascript, but the underlying core 
concept of the previous post is valid for both. 

On Thursday, April 4, 2013 11:27:02 PM UTC+2, Niphlod wrote:

 just to clarify on the 


 Not a bad argument Arnon, but you shouldn't discount search scrapers so 
 easily. 

 I think Google's Search Bot has support AJAX for a good 5 years now. 

 part . have you actually tried it ??

 search bots (google included) have some ajax support in the sense that 
 if you plan it, it works.
 Basically if you planned you site to output the data as if it was without 
 javascript, it works.
 That's FAR from they have ajax support.

 They DON'T execute any javascript at all. 

 There's a preview app of what google bot will see in your page, try it 
 ^_^

 They just follow links that you prepared carefully. The most notable 
 example is that if you have e.g. 
  
 a href=/shomethefragment.html onclick='window.location=
 http://mysite/app/showmethefragment2.html;'

 they'll request showmethefragment.html, while they **should** fetch  
 http://mysite/app/showmethefragment2.html;

 @all: plan carefully if SEO is important for you. More info at 
 https://developers.google.com/webmasters/ajax-crawling/




-- 

--- 
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] response.menu links title tag

2013-04-04 Thread BlueShadow
Hi,
when I add normal links to a site I use the A() helper where I can add a 
title tag (_title=) is there a way to add those to my links in the 
response menu?

-- 

--- 
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] scheduler init script

2013-04-04 Thread Yoel Benítez Fonseca

i have found this script in the web:


 /etc/init/web2py-scheluder.conf 
description web2py task scheduler
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown

respawn
exec sudo -u www-data python /home/www-data/web2py/web2py.py -K myapp
==

Is this the best way in ubuntu ?

Is necessary some aditional parameters to respawn ?
--
Yoel Benítez Fonseca
Tel: 573400

--

--- 
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] Do delete of a record appearing in a list:reference cascade?

2013-04-04 Thread Luca
Suppose I have: 

db.define_table('table_a', 
Field('name'),
)

db.define_table('table_b',
Field('my_a', 'list:reference table_a'),
)

I create a row_a in table a, and I put its id as member of the list my_a in 
row_b of table_b. 

Suppose I then delete row_a.  What happens? 

   1. row_b is unaffected
   2. The reference to row_a in field my_a of row_b is removed
   3. row_b is removed
   4. Other?

Many thanks,  Luca

-- 

--- 
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: any good open courses with web2py?

2013-04-04 Thread Luca
I am considering teaching one such class in connection with UCSC in the 
Fall of this year. 
Luca

On Thursday, April 4, 2013 6:37:15 AM UTC-7, jjg0 wrote:

 Are there any good self paced learning courses on webdev with web2py?  

 So far I am enjoying learning how to make websites with web2py.  I don't 
 mind spending a little money on courses or learning material, but I really 
 only do this as a hobby so I'm not interested in shelling out several grand 
 for courses that offer college credits, degrees, certificates, or any of 
 those intensive bootcamps.  Looking at other online courses offered that 
 aren't in web2py I see some really good ideas for projects I would like to 
 be able to build.  One site, for example, had a netflix clone as a final 
 project with ruby on rails, complete with commerce and everything you would 
 need.  Unfortunately the site was very expensive and not in web2py:(

 Playing around with php a while back before I found web2py I remember 
 following several teach yourself projects but found them to be incomplete.  
 For example, there were a lot of build a blog tutorials but the end result 
 was a form to enter blog entries and a page that grabbed entries from the 
 db and displayed them.  I didn't like this because the end result was a 
 blog you couldn't actually use, there was no search features, no tagging, 
 no commenting, no user auth, etc.

 I can build simple sites, so I'm not looking for an introductory course. 
 For example, the last site I made with web2py was for my friends school 
 with the following:
 -School information, schedules, location, instructors, etc
 -a blog like feature to post upcoming events. I posted links to only 
 future events on the front page. This behaved similar to a blog
 -a blog for the owner to blog about his school or whatever else he 
 wanted.  Had an archive dropdown menu, comments were working at one point 
 but disabled on request of the owner
 -2 forms for people to signup or ask questions. A pdf page can be 
 generated based on the information provided, and a link is emailed to the 
 owner.  I was originally going to just make a pdf and mail that to the 
 owner as an attachment, but I could never get that working

 This wasn't too hard to make, but I struggled on a few parts and my code 
 may not exactly be best practice.  It would be nice to find tutorials or 
 open courses I could follow with more challenging projects to get me making 
 more complicated sites and breaking any bad habits I may have picked up.  
 Any Suggestions?

 Thanks


-- 

--- 
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: any good open courses with web2py?

2013-04-04 Thread Arnon Marcus
http://www.youtube.com/playlist?list=PL978B2CE2D788F745

nJoy! :)

-- 

--- 
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: EmberJS is the web2py of the client! :)

2013-04-04 Thread Derek
After writing this, I realized that it's not beyond my grasp to write my 
own wsgi web app, so I'm going that route. 
I've been at it a few days, and I do miss the automatic CSRF and double 
submit that W2P provides. It's also very easy to just add plugins. Still, I 
am having fun writing my own framework. Perhaps one day I'll release it. 
As of now, it just connects via ldap, authorizes users, does sql queries 
(from sql written by hand) and outputs to json. WSGI is a nice PEP and 
makes writing your web apps or frameworks easier.

On Wednesday, April 3, 2013 10:51:52 AM UTC-7, Derek wrote:

 And that's my whole issue with it, is you'd have two MVC frameworks that 
 you'd have to work through, or you have static pages and your controller 
 would just be a link back into the data access layer (DAL).  Now, for 
 Web3py that's maybe all that is needed - create a DAL, authentication, 
 caching of static content and database calls, and no controllers (you'd 
 have routes, but that's it). That way your controllers would be javascript 
 (your javascript framework of choice or just plain javascript) and your 
 views would be the static html (which would essentialy become templates for 
 your controllers). However, if that's all Web3py is going to be, then I 
 could just write my own server using gevent, which would just have 
 different functions for accessing the database and jsonifying / 
 de-jsonifying the data. 

 On Wednesday, April 3, 2013 10:12:52 AM UTC-7, Andrew W wrote:

 Would you use ember with web2py? Why?
 Is having two mvc frameworks at the same time too many?



-- 

--- 
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: Web2py youtube videos - better title?

2013-04-04 Thread Arnon Marcus
It is by a guy who runs this site:
http://codeschool.org/ 

I've watched all his lectures - they are SUPERB (!)
Each module is an extremely well organised course.
He speaks very clearly, uses very clear slides, and the whole experience is 
of a highly-structured top-quality course.

This particulare playlist, is the videos of the module about web-server 
programming.
The firs lecture is about general conceps, and the rest is pure-web2py.

He goes over the basics, then get's just deep and wide enough for the 
viewer to get a clear understanding of we2py's architecture, and how all 
the main pieces work.

-- 

--- 
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: web2py Talk

2013-04-04 Thread Arnon Marcus
This is by far the best course I've seen about web2py :

http://www.youtube.com/playlist?list=PL5E2E223FE3777851

I couldn't find his slides, but you can try to contact the guy who made it 
through his website:
http://codeschool.org/

-- 

--- 
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: Do delete of a record appearing in a list:reference cascade?

2013-04-04 Thread Massimo Di Pierro
In your example when row_a is deleted row_b is unaffected BUT when the form 
is next visualized the link that no longer exists will disappear.

For normal reference the default is ON DELETE CASCADE and linked records 
are deleted. For list:references the linked records are NOT deleted

On Thursday, 4 April 2013 18:12:57 UTC-5, Luca wrote:

 Suppose I have: 

 db.define_table('table_a', 
 Field('name'),
 )

 db.define_table('table_b',
 Field('my_a', 'list:reference table_a'),
 )

 I create a row_a in table a, and I put its id as member of the list my_a 
 in row_b of table_b. 

 Suppose I then delete row_a.  What happens? 

1. row_b is unaffected
2. The reference to row_a in field my_a of row_b is removed
3. row_b is removed
4. Other?

 Many thanks,  Luca



-- 

--- 
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: Just knew about Server-Sent Events and want to share it with you

2013-04-04 Thread Arnon Marcus
Can you post the actual files? The w2p can't be imported to the latest 
web2py...

Also, some questions:

1. The way I understand this, an implementation would be via a 
controller-action that receives the event-stream-request, then responds 
with a 200 OK and that MIME thing, to affirm the connection. But from 
that point onward, new responses should be sent over the same open 
connection. How is the response-object being generated and sent without a 
request? How does it know where to send it to?

2. I would like to make a shared-collaborative view for multiple users, 
that any changed done by one, is reflected automatically in all the others. 
How would I go about doing that? Since web2py executes on each request, I 
would have to hold connection-data of all open-connections, in some 
semi-persistent location - would I have to use some 
external/internal caching? Is there some automatic session-saving already 
built-in web2py that can be useful?

-- 

--- 
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: any good open courses with web2py?

2013-04-04 Thread Massimo Di Pierro
I was supposed to teach one spring but I did not advertise and 
was canceled. If there are at least 7 people committed it can still be 
offered:
http://www.cdm.depaul.edu/ipd/Programs/Pages/WebDevelopmentwithPython.aspx



On Thursday, 4 April 2013 18:30:19 UTC-5, Arnon Marcus wrote:

 http://www.youtube.com/playlist?list=PL978B2CE2D788F745

 nJoy! :)


-- 

--- 
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] Server-Sent Events

2013-04-04 Thread Arnon Marcus
The only thread on this in this group has been deleted.

I have a few questions:

1. The way I understand this, an implementation would be via a 
controller-action that receives the event-stream-request, then responds 
with a 200 OK and that MIME thing, to affirm the connection. But from 
that point onward, new responses should be sent over the same open 
connection. How is the response-object being generated and sent without a 
request? How does it know where to send it to?

2. I would like to make a shared-collaborative view for multiple users, 
that any changed done by one, is reflected automatically in all the others. 
How would I go about doing that? Since web2py executes on each request, I 
would have to hold connection-data of all open-connections, in some 
semi-persistent location - would I have to use some 
external/internal caching? Is there some automatic session-saving already 
built-in web2py that can be useful?

-- 

--- 
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: Server-Sent Events

2013-04-04 Thread Derek
1. How? Usually by a yield somewhere. Where? The already existing open 
connection knows where.
2. Slow down there, you're overthinking it. Web2py comes with this.

Look at web2py/gluon*/contrib/*comet_messaging.py

And...

watch this video by Bruno Rocha

http://vimeo.com/18399381

On Thursday, April 4, 2013 5:29:56 PM UTC-7, Arnon Marcus wrote:

 The only thread on this in this group has been deleted.

 I have a few questions:

 1. The way I understand this, an implementation would be via a 
 controller-action that receives the event-stream-request, then responds 
 with a 200 OK and that MIME thing, to affirm the connection. But from 
 that point onward, new responses should be sent over the same open 
 connection. How is the response-object being generated and sent without a 
 request? How does it know where to send it to?

 2. I would like to make a shared-collaborative view for multiple users, 
 that any changed done by one, is reflected automatically in all the others. 
 How would I go about doing that? Since web2py executes on each request, I 
 would have to hold connection-data of all open-connections, in some 
 semi-persistent location - would I have to use some 
 external/internal caching? Is there some automatic session-saving already 
 built-in web2py that can be useful?


-- 

--- 
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] list:string type field is empty value on edit page

2013-04-04 Thread 黄祥
hi,

is it normal for list:string type field is empty when on editing page?

e.g.
db.define_table('contact',
*Field('salutation'),*
Field('first_name'),
Field('last_name'),
*Field('gender', 'list:string'),*
Field('birthday', 'date'),
Field('job_title'),
Field('address', 'text'),
Field('zip'),
Field('city'),
Field('country'),
Field('phone'),
Field('fax'),
Field('email'),
*Field('account', 'reference account'),*
format='%(first_name)s %(last_name)s')

*db.contact.salutation.requires=IS_IN_SET(['Mr.', 'Mrs.', 'Ms.'])*
db.contact.first_name.requires=IS_NOT_EMPTY()
db.contact.last_name.requires=IS_NOT_EMPTY()
*db.contact.gender.requires=IS_IN_SET(['Male', 'Female'])*
db.contact.job_title.requires=IS_NOT_EMPTY()
db.contact.address.requires=IS_NOT_EMPTY()
db.contact.zip.requires=IS_MATCH('^\d{5,5}$',
 error_message='not a zip code')
db.contact.city.requires=IS_NOT_EMPTY()
db.contact.country.requires=IS_NOT_EMPTY()
db.contact.phone.requires=IS_NOT_EMPTY()
db.contact.email.requires=[IS_EMAIL(), 
   IS_NOT_IN_DB(db, 'contact.email')]
*db.contact.account.requires=IS_IN_DB(db, db.account.id, '%(account_name)s')
*

i make 3 different field type (bold) that contain drop down in the form 
view. why the value is always empty for the list:string type when i'm on 
the editing page? is it possible for not empty for list:string type in 
editing page?
any idea or explaination about this?

thank you so much before

-- 

--- 
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] another scheduler Q

2013-04-04 Thread Yoel Benítez Fonseca

i have this setup:

2 severs with the same web2py  app installed, each of then run a 
scheluder worker


the problem is that only one of then get jobs, and in 
db.scheluder_worker the one with do all the work is the only with true 
in is_ticker field, i just the 2 of em cooperate and pickup the 
available jobs.


P.D: got them in diferent's groups and randomly assing task to the 
groups.


--
Yoel Benítez Fonseca
Tel: 573400

--

--- 
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: running a web2py application on different os

2013-04-04 Thread Luis
It turned out that the 2.12 version of openlayers was giving me issues with 
rendering default base map tiles. I switched to 2.11 and problem solved.

On Thursday, April 4, 2013 1:27:21 PM UTC-4, Luis wrote:

 Thanks. I checked my web2py versions and they are the same. I'll take a 
 more careful look at the js within applications.

 On Thursday, April 4, 2013 11:23:25 AM UTC-4, Niphlod wrote:

 I doubt it's a web2py problem ... you should check for users hitting the 
 same behaviour using openlayers on different OSes ... probably it's a 
 matter of css .

 On Thursday, April 4, 2013 5:03:37 PM UTC+2, Luis wrote:


- Hello web2py users,


 Out of convenience, I was copying a web2py application created in 
 Windows to my home computer (a mac and a debian vm). When I try to run it, 
 it does start well but images cached from openlayers, mainly the background 
 map, render with tiles far apart from each other. The application runs well 
 on Windows 7, but not on Mac and Linux. The app code is exactly the same 
 (.py, html and js). Does anyone have any hints as for where I need to start 
 checking? Is is safe to copy entire apps from one OS to another and expect 
 it to run well (assuming the db systems and contents are the same)? The 
 issue, so far is during the rendering of images (I use Firefox most of the 
 time).

 Thanks in advance for your time,

 Luis



-- 

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