According to the book, for what I understand
record = db(db.owner.name=='test').select(db.owner.id).first()
could be shortcut with
record = db.owner(id, name='test')
But the latter return None. How can I shortcut the first statement
properly?
Thank you so very much.
Hi Massimo,
Solved the issue.
The new widget / ajax is looking for a ID in the table. I just added
the id to the view, and it works fine!
regards
Martin
On Thu, Nov 17, 2011 at 2:45 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Can you helps us debug? Use chrome, check out the
This should be absolutely in web2py!
2011/11/18 Massimo Di Pierro massimo.dipie...@gmail.com:
http://jquerymobile.com/blog/2011/11/16/announcing-jquery-mobile-1-0/
--
Profile: http://www.gild.com/compagnucciangelo
Register on Gild: http://www.gild.com/referral/compagnucciangelo
Hello,
I am trying to figure out a way to allow users to register into a
specific group/ membership.
for example:
registration form 1 is for group 1
registration form 2 is for group 2
Thank you,
-Ric
Hi,
I think we found a serious bug (at least, we hope it is not a designed
feature). If you create a simple controller (like test.py) with the
following actions:
def test():
return dict()
@auth.requires_permission('foo bar')
def test2():
return dict()
And a simple view (like test.html)
Hi @all,
I have a small problem with routes.py and the routes_onerror
parameter.
Basically I have one and only application mounted in the webserver
and I'd like to strip the application part from all urls.
Leave alone the redirections for static folder, favicon, robots,
sitemap etc, this is
yes only the default controller is available by default, until I
defined the controllers variable.
What does your /errors/index function look like? Also, is that your exact
routes_onerror? I ask because there is a bug (now fixed in trunk) that
leads to a loop if your routes_onerror path is missing the leading '/'
(i.e., 'errors/index' would create a loop, whereas '/errors/index' would
not).
On Nov 18, 3:31 am, Cahya Dewanta cahya...@gmail.com wrote:
According to the book, for what I understand
record = db(db.owner.name=='test').select(db.owner.id).first()
could be shortcut with
record = db.owner(id, name='test')
record = db.owner(name='test')
# if you want just the id do
On Friday, November 18, 2011 3:31:21 AM UTC-5, Cahya Dewanta wrote:
According to the book, for what I understand
record = db(db.owner.name=='test').select(db.owner.id).first()
could be shortcut with
record = db.owner(id, name='test')
But the latter return None. How can I shortcut the first
Hi Anthony, /errors/index function is a simple:
def index():
#response.status = request.vars.code
return dict(vars=request.vars)
Notice the response.status line commented, it's the one triggering the
loop.
The template is very simple, in fact I simulated all kinds of error
and it gets
Hi,
I think this is due to the fact of using RBAC (role based access control),
which is for very secure applications, large apps are normaly not that much
secured, but there are other solutions like fo example loading those tables
into memory.
Khalil
Hi,
I think this is an administrator's job to affect teams to members but you
can as well create an action that allows a user to choose his team, in both
cases there would be the same registration form.
Khalil
On Nov 18, 2011, at 5:28 AM, Richard Baron Penman wrote:
yes only the default controller is available by default, until I
defined the controllers variable.
Send me your routes.py privately, please.
Hi,
This is why I almost never use shortcuts. When something goes wrong and you
have poeple waiting for you to resolve the problem so they can get back to
work, you always dont have enough attention to decrypt shortcuts.
Khalil
Sure, but if I hit request A in a browser, I do not expect any
decorators on action B to hit the database. Actually, you wouldn't
expect a decorator on action B to be executed at all This would
potentially give lots of nasty side effects..
On Nov 18, 3:35 pm, Khalil KHAMLICHI
I invested a year in a pure GAE (AppEngine) project,
needed to have auth and after much research decided
to switch to web2py. This full stack framework blew me
away! It is so simple and powerful, but it needs learning.
My plan is to switch gradually to web2py because I have
paying customers and
Sorry pressed send button by mistake.
I was saying that I believe auth lives in memory so no db access is
supposed to happen,
and I go back and say that RBAC will need db access all times.
Khalil
On Nov 18, 2011 3:37 PM, Khalil KHAMLICHI khamlichi.kha...@gmail.com
wrote:
I am not an expert in
On Nov 18, 2011, at 7:30 AM, Constantine Vasil wrote:
But the main part is I have to use the native AppEngine Datastore
because my database models and code is optimized and tested
for thousand users for which Datastore is very good - nonSQL
is very quick on this.
The bottom line - how to
But I only expect it to hit the database i.e. execute the permission
check, when I request a protected action in a controller. Not if I
request an unprotected action.
So, using the example above, if I call/request test I DO NOT expect
database avtivity, if I call test2 I DO expect database
Maybe a better example is this:
def index():
# create public index page stuff
return dict(...)
@auth.requires_permission('administrate users')
def admin_users():
# private stuff
return dict(...)
Opening the index page would still hit the database and request
details about the
Further tests reveal that decorators @auth.requires_membership and
@auth.requires_permission do hit the database and @auth.requires_login
does not hit the database. @auth.requires_login probably only checks a
session cookie.
there is not type 'reference:string'. Don't you get a ticket?
On Nov 17, 10:08 am, Cliff cjk...@gmail.com wrote:
grid search fails to find values if
- the field type is reference:string
- the field value contains a space
db.define_table(mytable, Field('silly_strings', 'reference:string))
:-)
On Nov 18, 3:11 am, Ole Martin Maeland olemael...@gmail.com wrote:
Hi Massimo,
Solved the issue.
The new widget / ajax is looking for a ID in the table. I just added
the id to the view, and it works fine!
regards
Martin
On Thu, Nov 17, 2011 at 2:45 PM, Massimo Di Pierro
+dlypka
*
*
I am developing web services for already 7 years (SOAP, REST, XML, etc.)
using .NET. At this time back in the beginning yes it was the most solid
technology to get things working quickly. Now - there are much better
technologies.
So what you are telling is true - I can confirm that.
How? We can upgrade plugin_mobile.
Or are you thinking about something else?
I would like to have a version of admin (or perhaps a better wizard)
based on jquery mobile.
On Nov 18, 4:26 am, Angelo Compagnucci angelo.compagnu...@gmail.com
wrote:
This should be absolutely in web2py!
2011/11/18
This solved it (in models/db.py):
db.executesql('SET SESSION TRANSACTION ISOLATION LEVEL READ
COMMITTED;')
Muchas gracias, nick
On Nov 17, 12:09 pm, John Duddy jdu...@gmail.com wrote:
I think you may have nailed it - my cron does run continuously.
I always commit my transactions. Do you
That is exactly my point, il you go beyond authenticating users, you need
db access to do it.
usualy you dont need RBAC for all your actions. but if you really do, you
can move auth tables to RAM (mysql)
Khalil
+Jonathan Lundell
Thank you. Before to post my question I made
extensive research on this group and web and
most information is dispersed. For example
there are postings about web2py in the trunk
which are addressing these questions but
it is not clear at what stage is this.
On Nov 18, 2011, at 9:25 AM, Constantine Vasil wrote:
Thank you. Before to post my question I made
extensive research on this group and web and
most information is dispersed. For example
there are postings about web2py in the trunk
which are addressing these questions but
it is not clear
Well yes!
Thinking of a sortable list plugin, it should be in jquery for desktop
and automatically switch to jquery mobile if os is_mobile. A sortable
list works very diffrently whith mouse and gestures.
We should have a comprehensive set of pugins covering a wide range of
cases, and each one
Ha ha. :)
How about 'list:string'?
On Nov 18, 11:06 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
there is not type 'reference:string'. Don't you get a ticket?
On Nov 17, 10:08 am, Cliff cjk...@gmail.com wrote:
grid search fails to find values if
- the field type is
http://osjs.0o.no/
php based but should be easy to rewrite in web2py
You have to write the full query
field contains buckle my shoe
On Nov 18, 11:41 am, Cliff cjk...@gmail.com wrote:
Ha ha. :)
How about 'list:string'?
On Nov 18, 11:06 am, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
there is not type 'reference:string'. Don't you get a
I have this extremely efficient object oriented hierarchical
construct (working parallel) under GAE:
class *my_object_Root*(BaseModel):
*total_counter *= db.IntegerProperty()
class *my_object*(db.Model):
*name *= db.StringProperty()
#That's it ! Super fast !
@classmethod
What is the status if current stable release regarding
hybrid GAE + web2py usage? Is this documented somewhere?
Looks like this is a bug. I may have a fix...
Anthony
On Friday, November 18, 2011 9:31:00 AM UTC-5, Niphlod wrote:
Hi Anthony, /errors/index function is a simple:
def index():
#response.status = request.vars.code
return dict(vars=request.vars)
Notice the response.status line
Ah, like grep.
Didn't try that.
On Nov 18, 12:44 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
You have to write the full query
field contains buckle my shoe
On Nov 18, 11:41 am, Cliff cjk...@gmail.com wrote:
Ha ha. :)
How about 'list:string'?
On Nov 18, 11:06 am,
What could I use for make something exactly the same?
Jquery? Ext? and what's the easier to use with web2py??
On Fri, Nov 18, 2011 at 11:42 AM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
http://osjs.0o.no/
php based but should be easy to rewrite in web2py
We alerady have something similar made with web2py:
http://www.skytoop.com/login?_next=/
On Fri, Nov 18, 2011 at 4:42 PM, Ismael Serratos ialejandr...@gmail.comwrote:
What could I use for make something exactly the same?
Jquery? Ext? and what's the easier to use with web2py??
On Fri, Nov
is it practical do make a website that behave like a desktop?
Yes, I want to allow a user to select a team upon registration. Thank you.
Sent from my iPod
On Nov 18, 2011, at 6:50 AM, Khalil KHAMLICHI khamlichi.kha...@gmail.com
wrote:
Hi,
I think this is an administrator's job to affect teams to members but you can
as well create an action that
feel free to suggest anything you want, I'm happy to test it
heavily :D
On 18 Nov, 18:50, Anthony abasta...@gmail.com wrote:
Looks like this is a bug. I may have a fix...
Anthony
On Friday, November 18, 2011 9:31:00 AM UTC-5, Niphlod wrote:
Hi Anthony, /errors/index function is a
See https://groups.google.com/d/topic/web2py-developers/JsY5uO02664/discussion.
On Friday, November 18, 2011 2:20:24 PM UTC-5, Niphlod wrote:
feel free to suggest anything you want, I'm happy to test it
heavily :D
On 18 Nov, 18:50, Anthony abas...@gmail.com wrote:
Looks like this is a
I have upload form, and it's work.
I use example from book.
But file get new name by web2py, can I control this name and how
on other words can I give my name for uploaded file.
Regards
Miroslav
Hi Bruno,
I tried both of these but neither one worked. I just wound up with an
empty table. I wasn't sure why you used Row objects in one list
comprehension and Storage objects in the other, but neither one
produced a list that the table likes. :( Not sure what's going on
there but there were no
DenesL, That works and just what I need. Thank you!
Anthony, I did think that the first argument is the field to return :)
Thank you for the clear explanation.
Khalil, Thanks for the tips. I'd consider that for my projects.
This produces a table with a single column and the rows consisting of
what should have been the header columns followed by the body columns
manifested as rows also.
On Nov 17, 10:25 am, DenesL denes1...@yahoo.ca wrote:
Why not just:
table = TABLE(THEAD(columns), TBODY(raw_rows))
On Nov 16,
In controller I have two functions
def func1():
body of function
return value1
def func2():
body of function
return value2
In EDIT APPLICATION NAME (administrative panel)
I see default.py exposes func1,func2
In my browser I can access to both functions
And I have answer for me
just use extra space :) for hiding
def func1 ():
body of function
return value1
or without extra space is normally visible:
def func2():
body of function
return value2
Miroslav
On Nov 18, 9:35 pm, miroslavgojic miroslavgo...@gmail.com wrote:
In
The extra space method is probably a bug (so don't count on it working in
the future) -- instead, you can start the function name with two
underscores, or make sure the function takes at least one argument (even if
it's a dummy argument that isn't used).
See
I think Bruno's method will create a Rows object, but it might be missing
some metadata about the db and fields that are required by SQLTABLE.
Anthony
On Friday, November 18, 2011 3:31:07 PM UTC-5, David Watson wrote:
Hi Bruno,
I tried both of these but neither one worked. I just wound up
DenesL's method should work as long as you have as_dict=False (the default)
in your call to executesql().
Anthony
On Friday, November 18, 2011 3:33:05 PM UTC-5, David Watson wrote:
This produces a table with a single column and the rows consisting of
what should have been the header columns
web2py renames the file for security purposes, and to enable it to retrieve
the file later via response.download. It encodes the original filename
within the new filename and decodes it upon download. What exactly do you
need to do?
Anthony
On Friday, November 18, 2011 3:03:48 PM UTC-5,
i doubt there is any documentation on the subject per-se. note that the
web2py DAL simply translates the web2py style schema definitions and
queries into raw GAE datastore queries. if you get really bored and read
the DAL you'll see it's just a wrapper around what you already know.
you'll
nothing is preventing you from using memcache in this way in web2py. you
could port the get_profile() method to web2py with no problem
a oft requested by still missing GAE web2py feature is to deal with
hierarchical models and queries since GAE supports them. learning them and
then proposing
I tray both methods, dummy argument and two underscore
The dummy argument can be fanny :) but I chose to use two underscore
(_ + _) = __
Thanks Anthony
Miroslav
On Nov 18, 9:43 pm, Anthony abasta...@gmail.com wrote:
The extra space method is probably a bug (so don't count on it working in
the distinction being made here is that decorators appear to be executed
for methods that are not called during this request. whether or not a
query is run is not really the point, the point is that it seems that code
is being executed that the user never intended.
that said, i don't know
On 18 November 2011 09:00, Rahul rahul.dhak...@gmail.com wrote:
Hi Johan, All,
Sorry but I am not able to get it. With your code above I get
an invalid controller
You are not supposed to use that code exactly as it is. You must adapt it
for your circumstances:
links = [lambda
What I need to do? It is hard to explain but I will tray.
On my faculty I need to setup small web for professors and students.
Professors can upload files (*.pdf, and possibly some *.zip) and they
need to login for putting content - uploading files.
Filter is make like SELECT(OPTION(),OPTION()),
The problem isn't with the decorator per se, but with the condition being
evaluated. If you have:
@auth.requires_permission('read')
def secrets():
etc.
that is equivalent to:
@auth.requires(condition=auth.has_permission('read'))
def secrets():
etc.
In this case, the decorator takes an
I created issue 526 for this (
http://code.google.com/p/web2py/issues/detail?id=526#c0
). I'm not sure how the decorators are implemented, but I think
Anthony's solution using lambda points in the right direction to fix
this.
I've already submitted a patch.
Anthony
On Friday, November 18, 2011 5:00:10 PM UTC-5, Ids wrote:
I created issue 526 for this (
http://code.google.com/p/web2py/issues/detail?id=526#c0
). I'm not sure how the decorators are implemented, but I think
Anthony's solution using lambda points
some questions:
Can I turnoff default changing name with upload function?
Can I before upload start, change file name (rename(from.first.name,
to.second.name)) and than proceed to upload...
User select file for upload, application first give new name to file
and than start upload with new name,
If I put
routes_onerror = [
(r'*/*', r'/myapp/errors/index')
]
Then it allows me to capture
domain/abc
and do what I want according to what is after the slash.
However if I just put
domain it goes to the welcome page.
So if I change routes.py to
routers = dict(
BASE =
I am starting a web2py app and need some help with the high level
design. I am familiar with web2py but how to do what I am after is not
immediately clear.
My app will take jobs submitted by users that will eventually create
CSVs files using a cron script and store them on the server's
You won't be able to restrict access to files in static (they are served
without touching the application code). Instead, check
out http://web2py.com/book/default/chapter/06#Manual-Uploads.
Anthony
On Friday, November 18, 2011 6:14:16 PM UTC-5, Dave wrote:
I am starting a web2py app and need
On Friday, November 18, 2011 5:55:59 PM UTC-5, miroslavgojic wrote:
some questions:
Can I turnoff default changing name with upload function?
I don't think so. As an alternative, process the form with dbio=False so it
doesn't do the upload or database insert, and then manually process the
Thank you!
nothing is preventing you from using memcache in this way in web2py. you
could port the get_profile() method to web2py with no problem
This is a great relief. Actually what is the downside using pure GAE vs.
web2py? What will be missing?
And I suppose I have just to import the
Hi ,
While trying to connect to a mysql server I found that the URI string used
in DAL() was not parsed properly. I have a '@' in my password and gets
parsed first changing the hostname
to some non existent value, I tried escaping the '@' but dosen't work. Did
anyone have this same problem ? If
if the web2py models and raw GAE models are all different models there
should be no problem.
Actually the GAE models will stay the same because all the system is
already tested and working. I decided to move to web2py when I saw it has
auth and I implemented it for 30 minutes including jQuery
there is a trouble setting the visual Eclipse+PyDev debugger to work with
web2py.
I got the Eclipse debugger to come to a breakpoint in
*applications/welcome/models*/db.py
but if I set up a breakpoint in
*applications/welcome/controllers*/default.py
at *index* the debugger does not stops at
Jquery and ajax make it pretty close, I think. Response time, it
seems to me, is the big issue.
Server/network latency can be a problem. Sometimes it just takes a
while for the packets to get through, even though the amount of data
being exchanged is very small.
Of course, you can send a lot
The patch is now in trunk -- please test. If you can, it would be helpful
if you could try it out with different types of rewrite rules. Also, try it
using the parameter-based rewrite system, as well as with no rewrite rules
at all (want to make sure we didn't break anything).
FYI, an easier
This has been fixed in trunk. Please try it out if you can and report back.
Anthony
On Friday, November 18, 2011 5:00:10 PM UTC-5, Ids wrote:
I created issue 526 for this (
http://code.google.com/p/web2py/issues/detail?id=526#c0
). I'm not sure how the decorators are implemented, but I
Hello,
I am trying to figure out a way which I can have a select (drop down menu)
form, where based on the option that is selected the rest of the form
validators change. To try and explain it better here's the example I am
trying to work on.
I am working on a web2py powerdns front end (to
I reed all in online book about upload and forms...
Can I make my upload manually, something like: brows_file -
upload_to_some_folder.
What is happening after I submit button 'upload' - can I have control
on this activity.
I'm new with Web2Py and Python, but on PHP this is no problem, I make
all
77 matches
Mail list logo