3)
def login(): return auth.login()
# create view "default/login.html"
def register(): return auth.register()
# create view "default/register.html"
etc etc
function should returns dict objects (then the templates are loaded
afaik). So: def login(): dict(form=auth.login()) etc.
On Apr 2, 6:54 am
Using auth.has_permission for a single record (update, read) is clear
for me but how to check the permission in a form with a list of
records?
def list():
records=db((db.test.id>0)).select()
return dict(records=records)
how to filter only the records with the permission? Do I have to che
Very useful feature (from my point of view) is that you can define
only one template outside the actions - response.view='%s/
default.html' % request.controller - and it becomes the default one
for all actions in a given controller.
On Apr 2, 10:54 am, Kacper Krupa wrote:
> 3)
> def login(): ret
I am working on an extension to auth that allows single signon from
OpenID, Google, Yahoo, AOL, Facebook , MySpace and Windows Live.
It use the RPX service from JanRain and allows consolidation of
different identities as a single user.
RPX has an ajax signin popup. Look here: https://rpxnow.com/
Hello,
I would like to use the excellent template facilities in web2py views
{{}} but save the results to a file rather than present them as a
web page. How would this be possible ?
This is just for one of several views in my application and should
happen always for the one view without the
should be
def index():
rows = (db.mb_posts.board_id==db.mb_boards.id)&
(db.mb_posts.reply_to==0)
mb_posts2 = db.mb_posts.with_alias("mb_posts2")
rows2 = (db.mb_posts2.board_id==db.mb_boards.id)
query = db().select(db.mb_boards.ALL, db.mb_posts.id.count(),
db.mb_posts2.id.count(),
Yes but I am not sure from your question if you want the visitor to
save the file on the client machine or on the server machine. I assume
the former:
def save_file():
filename='bla.html'
response.headers['Content-Disposition']='attachment;
filename="%s"' % filename
return dict(var
This gives you a list of all record you can "read"
db(db.auth_permission.name=="read")&
(db.auth_permission.table_name=="yourtable")&
(db.auth_permission.group_id==db.auth_membership.group_id)&
(db.auth_membership.user_id==auth.user.id)).select
(db.auth_permission.record_id)
record_id=="0" in
Look forward to see this!
On Apr 2, 7:00 am, notabene wrote:
> I am working on an extension to auth that allows single signon from
> OpenID, Google, Yahoo, AOL, Facebook , MySpace and Windows Live.
>
> It use the RPX service from JanRain and allows consolidation of
> different identities as a si
When is the conference? I live about 2hrs outside of Boston in
Connecticut, could possibly make the trip if its not too late.
On Apr 1, 4:50 pm, Tito Garrido wrote:
> LOL!!!
>
>
>
>
>
> On Wed, Apr 1, 2009 at 5:10 PM, Yarko Tymciurak wrote:
> > LOL
>
> > On Wed, Apr 1, 2009 at 2:51 PM, mdipierr
It was April 1st. Everybody got drunk and now nobody remembers
anything about it.
On Apr 2, 9:17 am, Michael wrote:
> When is the conference? I live about 2hrs outside of Boston in
> Connecticut, could possibly make the trip if its not too late.
>
> On Apr 1, 4:50 pm, Tito Garrido wrote:
>
> >
I could create a new auth method that allows:
db(auth.accessible(db.yourtable,"read")&..yourquery..).select
(db.yourtable.ALL)
but it would not work on GAE because of the JOIN. Should I add it
anyway?
Massimo
On Apr 2, 8:54 am, mdipierro wrote:
> This gives you a list of all record you can "r
I would also add e-commerce examples and payment authentication
systems (paypal, google checkout, 3rd party payment). I know what you
are thinking, greedy capitalist...just look at the riots. Given the
current economic environment I think this would be a relevant focus.
Personally, those in my c
Thanks for fast answer.
Such a method would be nice.
Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscri
On Thu, Apr 2, 2009 at 9:39 AM, mdipierro wrote:
>
> I could create a new auth method that allows:
>
> db(auth.accessible(db.yourtable,"read")&..yourquery..).select
> (db.yourtable.ALL)
>
> but it would not work on GAE because of the JOIN. Should I add it
> anyway?
>
h.
>
> Massimo
>
>
On Thu, Apr 2, 2009 at 03:18, mdipierro wrote:
>
> I look forward to this!
>
Sooo great news..
hope thin and very sapid book;
focus litter topic and clean explain, is better ...
> On Apr 1, 1:28 pm, TheDude wrote:
>> (This isn't an April Fool's Joke)
>>
>> So, I've been writing a book for Web2
Steve,
I eventually ran into the problem of having one controller need to use
the partial for another controller. When this happens, you can move
the partial function into a model file. Then, as partials get more
complex, you can abstract most of them out to a view with
response.render(...). F
On Wed, Apr 1, 2009 at 3:28 PM, TheDude wrote:
>
> (This isn't an April Fool's Joke)
>
> So, I've been writing a book for Web2Py, but recently came towards a
> new direction...we already have a great in-depth book writeen by
> Massimo so I was wondering...
>
> Would you guys be interested in a bo
I would avoid using the XML as much as possible since this code
introduces XSS vulnerabilities.
Technically you are not using the partial described above (your are
not calling the _department_view using ajax).
your way of using sub-templates is fine.
Massimo
On Apr 2, 10:45 am, Brian wrote:
how to get an output from SQLTABLE or crud.select in the following
way.
.
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@g
SQLFORM(db.table, row, ..., _id="foo")
On Apr 2, 7:06 pm, phneoix wrote:
> how to get an output from SQLTABLE or crud.select in the following
> way.
> .
>
> thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
this is hilarious! you should make a cartoon out of this (like your
superman!)
On Apr 1, 3:51 pm, mdipierro wrote:
> The new commercial is on TV now:
>
> A kid is playing with a train and says "Hi, I am Ruby on Rails"
> A hot but professionally dressed girl comes in a says: "Hi, I am
> web2py"
>
thanks
On Apr 2, 10:22 pm, Kacper Krupa wrote:
> SQLFORM(db.table, row, ..., _id="foo")
>
> On Apr 2, 7:06 pm, phneoix wrote:
>
> > how to get an output from SQLTABLE or crud.select in the following
> > way.
> > .
>
> > thanks
--~--~-~--~~~---~--~~
Yo
Massimo,
I still get the error:
Traceback (most recent call last):
File "/home/daniel/web2py/gluon/restricted.py", line 98, in
restricted
exec ccode in environment
File "/home/daniel/web2py/applications/community/controllers/
forum.py", line 9, in
File "/home/daniel/web2py/gluon/globals
ry
def index():
rows = (db.mb_posts.board_id==db.mb_boards.id)&
(db.mb_posts.reply_to==0)
mb_posts2 = db.mb_posts.with_alias("mb_posts2")
rows2 = (mb_posts2.board_id==db.mb_boards.id)
query = db().select(db.mb_boards.ALL, db.mb_posts.id.count(),
mb_posts2.id.count(), left=(db.mb_p
SQL Works! However...
{{=board.mb_boards.keys()}}
brings up:
['update_record', 'mb_posts', 'description', 'id', 'name']
As you can see, no mb_posts2 (mb_posts does not contain mb_posts2
either). So, I said to myself may be it's because of the .ALL within
the select. Still no go.
On Apr 2, 2:56
Sorry I did not make that clear. The file should be saved on the
server.
JC
On Apr 2, 2:16 pm, mdipierro wrote:
> Yes but I am not sure from your question if you want the visitor to
> save the file on the client machine or on the server machine. I assume
> the former:
>
> def save_file():
>
what is "board"?
On Apr 2, 5:20 pm, TheDude wrote:
> SQL Works! However...
>
> {{=board.mb_boards.keys()}}
> brings up:
> ['update_record', 'mb_posts', 'description', 'id', 'name']
>
> As you can see, no mb_posts2 (mb_posts does not contain mb_posts2
> either). So, I said to myself may be it's b
open(filename,'wb').save(response.render(view_filename,dict(a=3)))
On Apr 2, 5:22 pm, JC11 wrote:
> Sorry I did not make that clear. The file should be saved on the
> server.
> JC
>
> On Apr 2, 2:16 pm, mdipierro wrote:
>
> > Yes but I am not sure from your question if you want the visitor to
Sorry, it's in my views :)
{{extend 'layout.html'}}
Message Boards
Board
Threads
Posts
Last Topic
{{for board in query:}}
{{=A(board.mb_boards.name, _href=URL(r=request, f='view',
args=board.mb_boards.id))}}{{=board.mb_boards.description}}
{{=board.mb_boards.mb_posts.count()}}
{{=board.mb_boa
http://blip.tv/file/1949388/
ORM Panel w/ Massimo representing web2py DAL.
Other PyCon videos are being linked (nicely) to
http://us.pycon.org/2009/conference/schedule/
but not all yet - you can find the uploaded Pycon files on
http://blip.tvand search for PyCon
If you couldn't attend, or not s
To those of you who attended, and came by to introduce themselves,
thanks! It's great to meet people who you just "see" on the network.
Looking forward to meeting more people at future conferences.
On Apr 2, 6:19 pm, Yarko Tymciurak wrote:
> http://blip.tv/file/1949388/
>
> ORM Panel w/ Massim
I'm having trouble doing a db.table.insert from an external cron on
macosx.
The system cron file
0-59/1 * * * * cd /Users/username/Desktop/appname/web2py && python
web2py.py -R applications/appname/controllers/test.py -C -D 1 >> /tmp/
cron.output 2>&1
The crontab file in appname/cron directory
I do not know if this is related but sqlite that ships on python for
macosx has known bugs. This would not be the only one. You should use
the binary distribution on OSX which does not seem to have these
problems.
On Apr 2, 6:29 pm, seth wrote:
> I'm having trouble doing a db.table.insert from a
this is so true...lol...nice ads hehe
On Apr 1, 3:51 pm, mdipierro wrote:
> The new commercial is on TV now:
>
> A kid is playing with a train and says "Hi, I am Ruby on Rails"
> A hot but professionally dressed girl comes in a says: "Hi, I am
> web2py"
> Kid: "My train has 3 cars. They are call
uhm.. so where are the latest docs? :-P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send e
@Brian
Thanks for your code.
As Massimo described preloading the page is dangerous using xml also this is
SLOW.
By using ajax calls you make a round trip to the server to retrieve the
content needed and replace the innerhtml of a div .
This means the server loads a list of departments quickly.
Then
I saw this at PyCon
http://www.aminus.net/wiki/Okapi
from the creator of cherrypy and the wsgiserver.
I think it would be a very useful addition to the web2py admin
interface (a browser in browser to test various pages). For now it
could be just a link to a static html page in admin|design alth
not sure what you are asking me.
Massimo
On Apr 2, 10:21 pm, Steve Shepherd wrote:
> @Brian
> Thanks for your code.
> As Massimo described preloading the page is dangerous using xml also this is
> SLOW.
> By using ajax calls you make a round trip to the server to retrieve the
> content needed a
39 matches
Mail list logo