[web2py] Social media icons.

2013-03-28 Thread Annet
I like the social media icons that come with web2py, are they part of a 
larger set?

I need icons for social media other than facebook, gplus and twitter.


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




[web2py] Re: Using an external lib - Twython

2013-03-28 Thread Annet
Hi Nate,

I am using a module relativedelta and have the following import statement 
in db.py

from applications.init.modules.relativedelta import*

Where init is the name of my application.


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] Using an external lib - Twython

2013-03-28 Thread Nate
Hi

I've used pip to install Twython and it works as advertised.

In web2py
I get an error
 cannot import name Twython

I have installed by hand into the local "modules" folder and get the same 
response

In desperation I tried 

twython = local_import('twython')

Same error.

I wonder if that capital T (Twython) has anything to do with it?

Help much appreciated.

n8

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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] [FYI] Pyodel is now a plugin

2013-03-28 Thread Spring
Hello Alan,

I tried pyodel and faced with the same issue of google login requirement. I 
signed in with google account but redirect to the "Sign in with your google 
account."
 
page, cannot go any further.

In fact my own app is facing the same problem. When at the page of "Sign in 
with your google 
account."
 
only signing with the app creator's google account can pass it. Somehow I 
assume it's because the logging is set to login as app administrator by 
some unknown means. I hope you or someone may come up with a solution.

Regards,
Spring

在 2012年10月18日星期四UTC+8下午11时45分15秒,Alan Etkin写道:
>
> > El jueves, 18 de octubre de 2012 12:29:17 UTC-3, Bill Thayer 
> escribió:Just tried it again. Logged in with my email and password 
> > then 
> > it took me to a blank page with one line on top that says to sign in 
> with google password.
>
> I must admit this is some kind of app issue. However, I have created a 
> fake user and authenticated without a Google account. I'll have to check 
> how GAE handles app users so I can fix this somehow.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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: How to get selective update rows from SQLFROM.grid

2013-03-28 Thread Sarbjit singh
Thanks 黄祥,

Can you please share the code.

-Sarbjit

On Tuesday, March 26, 2013 5:10:20 AM UTC+5:30, 黄祥 wrote:
>
> it can, yesterday i've already tested it, i'll share the code when i'm at 
> the office.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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: IMG in A tag of SQLFORM `submit_button`?

2013-03-28 Thread Anthony
The value of submit_button goes in the "value" attribute of the submit 
 element, so it can only be text, not more HTML elements. If you 
need an alternative to a standard submit button with a text label, you can 
do:

SQLFORM.factory(..., buttons=[list of one or more button elements])

The standard submit button will not appear, and instead the button(s) 
specified in the list will be placed inside a DIV().

I think there are a few ways to get images in submit buttons, including 
 or specifying a 
background image for a standard  button. Google 
it.

Anthony

On Tuesday, March 26, 2013 3:18:32 AM UTC-4, Alec Taylor wrote:
>
> {{=SQLFORM.factory(submit_button=XML(SPAN('hello', 
> IMG(_src=URL('static', 'img/bg.png')}} 
>
> How do I get this to work? 
>
> Thanks for all suggestions, 
>
> Alec Taylor 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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] StopForumSpam: new plugin available

2013-03-28 Thread Niphlod
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

Ideas welcome.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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: Are there any future plans for native social login in auth?

2013-03-28 Thread Niphlod
there's an open feature-request on google code to include sanction in 
web2py.

On Friday, March 29, 2013 12:56:53 AM UTC+1, HittingSmoke wrote:
>
> I know web2py supports Janrain but they charge for what's basically an 
> inert layer of code between your app and the login system. It seems silly 
> to use it.
>
> It would be nice to see these features baked into auth, where one could 
> put in an API key for the most popular social login services (Google/G+, 
> Facebook, Twitter) and have native auth support for them.
>
> Is this a possibility for the future or something that's already been 
> discussed somewhere?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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: Is database on GAE overwritten when re-deploy app via GAE launcher?

2013-03-28 Thread Spring
Thanks for the kind reply, Massimo.

在 2013年3月29日星期五UTC+8上午3时12分13秒,Massimo Di Pierro写道:
>
> it is not overwritten.
>
> On Thursday, 28 March 2013 11:15:05 UTC-5, Spring wrote:
>>
>> Hello there,
>>
>> Logically I think the GAE database should not be overwritten when 
>> re-deploy. Anyone please confirm this? 
>>
>> Thanks.
>>
>> Spring
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from 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: Populating jqGrid Tree with JSON

2013-03-28 Thread Nate
Thanks for all the input. I really read the docs. There were heaps of 
mistakes in my code. Now solved and for what its\worth I append the working 
code. Once again Thanks guys!
VIEW
{{extend 'layout.html'}}
 

 jQuery(document).ready(function(){

 $('#treeGrid').jqGrid({

url: "{{=URL(r=request,f='call',args=['json','treet'])}}",

contentType: "application/json; charset=utf-8",
postData:[],
datatype: "json",
height: "auto",
mType: 'GET',
treeGridModel: 'adjacency',
colNames: [ 'id', 'Prestations', 'neigh'],
colModel: [
{name: 'id', width: 100, key: true, hidden: false},
{name: 'elementName', width: 785, sortable: false},
{name: 'neighbourhood', width: 785, hidden: false}
],
sortname: 'id',
sortorder: "asc",
treeGrid: true,
caption: "Menu",
ExpandColumn: "elementName",
ExpandColClick:true,
jsonReader: { root: "row", cell:'', repeatitems: false, userdata: 
"userdata"},
onSelectRow: function(rowid) {
var row = $(this).getLocalRow(rowid);
// do something with row
alert("Name: " + row.elementName + " Hood: " + row.neighbourhood)
},

autowidth: true
}); 
});






CONTROLLER

@service.json  
def tree():
import json

response.files.append("http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/redmond/jquery-ui.css";)

response.files.append("http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.4.4/css/ui.jqgrid.css";)
response.files.append("http://code.jquery.com/jquery-1.9.1.js";)

response.files.append("http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.js";)

response.files.append("http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.4.4/js/i18n/grid.locale-en.js";)

response.files.append("http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.4.4/js/jquery.jqGrid.src.js";)

rows = db(db.neighbourhood.id > 0).select().as_list()
concat = '{"response":['
seq =1
source = dict()
vals = []
for row in rows:   
row['id'] = seq
extra = {'neighbourhood': row.get('elementName'),}
row.update(extra)
print row
vals.append(row)
seq = seq+1
innerrows = db(db.report.parent == row.get('id')).select().as_list()
for innerrow in innerrows:
innerrow.update(extra)
print innerrow
innerrow['id'] = seq
vals.append(innerrow)
seq = seq+1
return dict(row=vals)

On Thursday, March 28, 2013 6:42:56 AM UTC+11, Willoughby wrote:
>
> Oops - completely missed the 'no javascript' part.
> It would appear it's not loading your jquery/jqgrid scripts.  Are you 
> loading them in layout.html?
> See this:
>
> http://www.trirand.com/jqgridwiki/doku.php?id=wiki:how_to_install
>
> On Monday, March 25, 2013 6:51:10 PM UTC-4, Nate wrote:
>>
>> Nothing in the console. Firebug reports
>>
>> No Javascript on this pageIf  tags have a "type" attribute, it 
>> should equal "text/javascript" or "application/javascript". Also scripts 
>> must be parsable (syntactically correct).
>>
>>
>> On Monday, March 25, 2013 11:15:31 PM UTC+11, Willoughby wrote:
>>>
>>> Do you get any errors in the console? That's the first place I usually 
>>> look...
>>>
>>> On Sunday, March 24, 2013 8:42:45 PM UTC-4, Nate wrote:

 Hi

  I have a controller sending JSON to my view. I cannot get the data 
 into the TreeGrid. The Json is coming down correctly (I placed it manually 
 and it works). Running this code places the JSON on the webpage. 
 Controller 
 and View below.

 Help appreciated.
 Regards
 Nate

 CONTROLLER
 @service.json
 def get_report():
 import json
 
 rows = db(db.neighbourhood.id > 0).select().as_list()
 concat = '{"response":['
 seq =1
 for row in rows:
 row['id'] = seq
 concat = concat + json.dumps(row)+","
 seq = seq+1
 innerrows = db(db.report.parent == 
 row.get('id')).select().as_list()
 for innerrow in innerrows:
 innerrow['id'] = seq
 concat = concat + json.dumps(innerrow) + ","
 seq = seq+1
 concat = concat.strip( ',' )
 concat = concat + ']},grid;'
 return concat


 VIEW
 {{extend 'layout.html'}}