3:01:23 AM UTC+2, Henry Nguyen wrote:
>>
>> Niphlod,
>>
>> That does not appear to be the case, either for request.restful()
>> requests or regular controller requests. For example, consider this
>> controller method:
>>
>> def test():
o
store the array value, no?
Henry
On Thursday, October 23, 2014 7:16:00 AM UTC-7, Niphlod wrote:
>
> if the content-type of the POST request is application/json, "mylist"
> would actually be yet parsed into request.post_vars (i.e. you can skip
> body.read())
>
> O
under
request.body.
Thanks for letting me know that request.restful() wouldn't parse it
automatically, Niphlod.
Henry
On Monday, October 13, 2014 12:25:54 PM UTC-7, Niphlod wrote:
>
> you have to code your own methods.
>
> On Sunday, October 12, 2014 11:32:23 PM UTC+2, Henry Nguyen
I have a function in my controller decorated with the @request.restful()
decorator. I would like to be able to accept a JSON array of objects,
[{"id": 1, "new_value": 1},{"id": 2, "new_value": 2}]
, on a POST, PUT, or DELETE. For example, I'd like the client to be able to
update a series of va
authorized.')))
return function(*args, **kwargs)
return check_is_logged_in
@request.restful()
@requires_login
def function():
...
Thanks again for the help, Leonel.
Henry
On Thursday, September 4, 2014 11:22:41 AM UTC-7, Henry Nguyen wrote:
>
> That is definitely a viable option..
That is definitely a viable option... not as clean as the decorator but
certainly functional. Thank you Leonel :)
Henry
On Thursday, September 4, 2014 11:17:47 AM UTC-7, Leonel Câmara wrote:
>
> Ohh, in this case, instead of modifying tools.py I would drop the
> auth.requires_login() decorator
Primarily because I would like to display custom messages sent from the
API, and I want them controllable from the API side. Specifically, our UI
framework has a feature built in which allows us to display custom messages
from the API by specifying the message characteristics in the response
bo
I have a method decorated with the following decorators:
@request.restful()
@auth.requires_login()
On an unauthenticated (non-logged-in) request, I get a 403 response with
"Not authorized" in the response body, per default settings. I would like
to be able to modify this response to be JSON. I
I'm using SQLFORM.grid() to display a list of users from db.auth_user for
an administrative interface. I'd like to display deleted users as well as
active users. Is there any way to modify SQLFORM.grid() to display rows
where is_active == False in addition to where is_active == True? Using
quer
> return db(tb._id==record_id).validate_and_update(**vars)
>
> ask for more details if needed.
>
> On Wednesday, April 16, 2014 8:15:42 PM UTC+2, Henry Nguyen wrote:
>>
>> Simply inserting into the tables blindly was the problem, as Massimo
>> pointed out
. I could write an
>>> inflammatory comment on a website, change the owner to someone else (via
>>> the edit form) and then suddenly that other user is banned...
>>>
>>> On Wednesday, April 9, 2014 2:03:53 PM UTC-7, Massimo Di Pierro wrote:
>>>>
>
ng is, with custom queries you could return just what you want
> (structure-wise), but then you'll have problem parsing those results
> because you can't know at query time what type of data a particular column
> would be. I'd bet its an issue even with NOSQL backend, bu
I have a set of normalized "log" tables consisting of a single "log" table
and multiple "x_log" tables where x is some different log type. The "log"
table contains the data that is shared among all logs such as create_date.
Each "x_log" table contains the data specific to that log type in additi
Our product is using the @request.restful() decorator to specify REST
endpoints for our resources. During testing, I noticed that I can specify a
PUT request var of "id=x" where x is some new id and the id of that row
will change to x. This is even WITH "db.table.id.writable = False."
The PUT
requires_membership("buyers")
> or explicitly
> if auth.has_membership(role="buyers"): ...
>
>
> On Monday, 16 December 2013 21:38:08 UTC-6, Henry Nguyen wrote:
>>
>> Hello,
>>
>> Our product has features which can be enabled o
Hello,
Our product has features which can be enabled or disabled depending on what
the user has purchased. I would like to use the built-in Auth permissions
functionality to achieve this effect. However, I'm not sure of what's the
best way to proceed with its implementation. The two scenarios I
The following is contained under the Reference Manual Chapter 9 under the
Restrictions on Registration section:
If you want to allow people to register and automatically log them in after
> registration but still want to send an email for verification so that they
> cannot login again after
Pythonic this really is but it got the job done. Sessions will
be much cleaner, though, so I'll go with that. Thank you again.
On Sunday, December 8, 2013 9:28:16 AM UTC-8, Jonathan Lundell wrote:
>
> On 8 Dec 2013, at 8:43 AM, Jonathan Lundell >
> wrote:
>
> On 8 Dec 2013, at 1
Hello,
I have an application in which users can have sub_users. Within the app, a
user can select a sub_user, at which point, all controls become targeted to
that selected sub_user. For example, if I select sub_user 1 and then goto
"settings/show_settings.html," I want the show_settings.html to
19 matches
Mail list logo