Hi,
Need some help with setting cookies.
While basically setting cookies works, when I add this line :
response.cookies['expires'] = 3600 * 24
returns:
CookieError: Attempt to set a reserved key: expires
Thanks,
Avi.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation
It's OK..
On Monday, December 8, 2014 7:51:39 AM UTC+2, Avi A wrote:
Hi,
On some translations fields I am using Hebrew characters.
While they are displayed OK on the Form view and on the admin db view, on
the view page it self they are rendered as:
'f_category_t':
'\xd7\xa8\xd7\x90\xd7
Hi,
On some translations fields I am using Hebrew characters.
While they are displayed OK on the Form view and on the admin db view, on
the view page it self they are rendered as:
'f_category_t': '\xd7\xa8\xd7\x90\xd7\xa9\xd7\x95\xd7\xa0\xd7\x95\xd7\xaa'}
and Angularjs displays it as jibberish,
Hi,
Is it possible to replace the default signup and login forms with a
customized ajax post? like:
ajax(some_sign_upcontroller.load?email=a...@gmail.comname=namepassword=password,
'', 'welcome')
ajax(some_log_in_controller.load?email=a...@gmail.compassword=somepassword,'',
'welcome again')
-a yourpassword -p 443
then [ctrl]+D to exit.
On Saturday, 8 November 2014 12:22:07 UTC-6, Avi A wrote:
Hi,
Maybe someone can help with that,
how do I start the openshift web2py version localy ?
Also how do I set the admin password? I mean this is what i have on the
parameters_80 file
Hi,
Maybe someone can help with that,
how do I start the openshift web2py version localy ?
Also how do I set the admin password? I mean this is what i have on the
parameters_80 file:
password=pbkdf2(1000,20,sha512)$b7328c..205b
thanks,
Avi.
--
Resources:
- http://web2py.com
- http
Hi,
I need help with something like that: I want to create a simple print app,
where a user picks some options, presses print, it is sent to the
controller, then the controller print the string directly to the printer.
Any suggestions/directions?
Thanks,
Avi.
--
Resources:
- http://web2py.com
javascript to do so, plenty of examples can be found on the web.
Regards
On Sunday, August 10, 2014 1:20:05 PM UTC+2, Avi A wrote:
Hi,
I need help with something like that: I want to create a simple print
app, where a user picks some options, presses print, it is sent to the
controller
I think this is what i need or something similar:
https://pypi.python.org/pypi/pycups
On Sunday, August 10, 2014 3:45:02 PM UTC+3, Avi A wrote:
I want the users to open the app from mobile devices, andriod and ios, and
i want the process to be transparent for them. I mean they shoudn't
Hi,
I just wanted to share a short video of an app I made.
What it does in short;
I do mobile automated tests locally. I use selenium/appium and applitools
(awesome startup) which does screenshots comparison for me and when the
test ends, they send a json with failed/passed counts info.
when
?
I always thought that to be difficult and have not ventured far in that
area yet. I hope you can share how you did it! Thanks :)
On Wednesday, August 6, 2014 7:23:56 PM UTC+8, Avi A wrote:
Hi,
I just wanted to share a short video of an app I made.
What it does in short;
I do mobile
Hi,
I want to pass a dict in ajax function like that:
$(#create_report).click(function(){
url_report = 'eco_reports?graph_data={{=graph_data}}';
ajax(url_report, '', 'save_as_link');
and the controller starts with something like that:
def eco_reports()::
(graph_data):
..
On Monday, June 9, 2014 1:02:00 AM UTC+3, Avi A wrote:
Hi,
I want to pass a dict in ajax function like that:
$(#create_report).click(function(){
url_report = 'eco_reports?graph_data={{=graph_data}}';
ajax(url_report
:16 PM UTC+1, Avi A wrote:
Now I use:
my_tests_list = db((db.t_tests.created_by == auth.user.id)
(db.t_tests.f_test_is_a_clone
== False) ).select()
and the list is still emply.
SELECT t_tests.id, t_tests.f_test_name, t_tests.f_test_project, t_tests.
f_test_platform
(db.t_tests.f_test_is_a_clone != True)
-Mandar
On Thursday, March 27, 2014 1:58:16 AM UTC+5:30, Avi A wrote:
Now I use:
my_tests_list = db((db.t_tests.created_by == auth.user.id)
(db.t_tests.f_test_is_a_clone
== False) ).select()
and the list is still emply.
SELECT t_tests.id
need to fetch False OR NULL records
db(
(db.t_tests.f_test_is_a_clone == False) |
(db.t_tests.f_test_is_a_clone == None)
).select()
or (hidden gem)
db(db.t_tests.f_test_is_a_clone.belongs((False, None),
null=True)).select()
On Thursday, March 27, 2014 12:46:18 PM UTC+1, Avi
the Expression class) but the
latter cannot.
Anthony
On Tuesday, March 25, 2014 8:08:40 PM UTC-4, Avi A wrote:
Hi,
i have a table with a boolean field:
Field('f_test_is_a_clone', type='boolean',
label=T('Test is a clone')),
And this is the query, where I don't want to return cloned
.
On Wednesday, March 26, 2014 8:53:10 PM UTC+2, Avi A wrote:
Thanks you all and for the debugging tip. :)
On Wednesday, March 26, 2014 7:57:28 PM UTC+2, Anthony wrote:
In DAL queries, you must use , |, ==, and ~ rather than and, or,
is, and not. This is because in Python, the former
Hi,
i have a table with a boolean field:
Field('f_test_is_a_clone', type='boolean',
label=T('Test is a clone')),
And this is the query, where I don't want to return cloned tests:
my_tests_list = db((db.t_tests.created_by == auth.user.id) (not db.t_tests
.f_test_is_a_clone)).select()
22, 2014 8:49:11 PM UTC+1, Avi A wrote:
Same.
/models/z_import_catalog.py, line 13, in module
item = db(db.t_items.unfi_product == row[5]).select().first()
NameError: name 'db' is not defined
On Saturday, March 22, 2014 9:20:03 PM UTC+2, Niphlod wrote:
try calling it z_whatever.py
, March 21, 2014 9:28:14 PM UTC+1, Avi A wrote:
Hi,
I'm trying to create a background job/function. I'm locating the file on
the models directory, as I read on the book.
When I try to run the script manually, I get an error saying that db is
not defined.
This is part of the code where I get
Sorry, I'm still getting the same error.
I called that file:
db_wizard_catalog_insert.py , so it's located after the db_wizard.py and I
just run the file.
Is that what you meant?
On Saturday, March 22, 2014 4:05:03 PM UTC+2, Avi A wrote:
Yes I tried that too, it didn't help. but now for some
PM UTC+1, Avi A wrote:
Sorry, I'm still getting the same error.
I called that file:
db_wizard_catalog_insert.py , so it's located after the db_wizard.py and
I just run the file.
Is that what you meant?
On Saturday, March 22, 2014 4:05:03 PM UTC+2, Avi A wrote:
Yes I tried that too
Hi,
I'm trying to create a background job/function. I'm locating the file on
the models directory, as I read on the book.
When I try to run the script manually, I get an error saying that db is not
defined.
This is part of the code where I get the error:
..
..
catalog =
I think that there on the features list, frameworks seekers would love to
hear about the amazing web2py ajax and component functions and all the eco
method as part of the awesome mvc system.
On Wednesday, March 5, 2014 6:23:14 PM UTC+2, Jorge Pereira wrote:
VP vtp2007@... writes:
Hi,
I'm getting on a controller a json response as expected, and I didn't find
a way how to parse it yet:
r = requests.post(url, data=json.dumps(payload), headers=headers)
r.content returns something like that:
{
owner_ids: [
],
labels: [
{
id: 7864106,
created_at:
thanks,
i've tried it but I am not able to parse it:
I tried both:
pivotal = json.loads(r.content)
session.flash(pivotal['url'])
session.flash(pivotal[0].url)
On Tuesday, March 4, 2014 5:18:02 PM UTC+2, Jonathan Lundell wrote:
On 4 Mar 2014, at 5:35 AM, Avi A avia...@gmail.com javascript
I do the same I get:
TypeError: string indices must be integers, not str
On Tuesday, March 4, 2014 3:35:31 PM UTC+2, Avi A wrote:
Hi,
I'm getting on a controller a json response as expected, and I didn't find
a way how to parse it yet:
r = requests.post(url, data=json.dumps(payload
Yes, got it now, many thanks.
On Tuesday, March 4, 2014 7:42:28 PM UTC+2, Jonathan Lundell wrote:
On 4 Mar 2014, at 9:19 AM, Avi A avia...@gmail.com javascript: wrote:
I do the same I get:
TypeError: string indices must be integers, not str
Try catching that exception and printing
Hi,
I need some help with implementing requests library.
What I did:
I have cloned the requests library to my app modules app. (didn't install
anything)
I tried these both options I found, one at a time:
requests = local_import('requests')
from modules import requests
And in both cases I got:
Lol, that works. thanks.
On Monday, March 3, 2014 6:20:55 PM UTC+2, Anthony wrote:
Try just doing:
import requests
Anthony
On Monday, March 3, 2014 11:15:33 AM UTC-5, Avi A wrote:
Hi,
I need some help with implementing requests library.
What I did:
I have cloned the requests library
Hi,
I want to join t_a and t_b:
rows = db(db.t_a.created_by ==
auth.user.id).select(join=db.t_b.on(db.t_a.f_y == db.t_b.id))
that works,
But first I want to filter out t_b, for example: t_b to include only
records where f_x == 3.
what I tried did not work, it just ignored it, nothing was
thanks, yes i just realised i don't need the joint for the filtering.
On Monday, February 24, 2014 4:57:37 PM UTC+2, Anthony wrote:
t_b = db.t_b.f_x ==3
Doesn't look like you do anything with the above. Why not:
rows = db((db.t_a.created_by == auth.user.id) (db.t_b.f_x == 3)).select(
))
return locals()
On Monday, February 24, 2014 5:03:36 PM UTC+2, Avi A wrote:
thanks, yes i just realised i don't need the joint for the filtering.
On Monday, February 24, 2014 4:57:37 PM UTC+2, Anthony wrote:
t_b = db.t_b.f_x ==3
Doesn't look like you do anything with the above. Why
I'll try to filter the t_tests only first.
On Monday, February 24, 2014 4:51:31 PM UTC+2, Avi A wrote:
Hi,
I want to join t_a and t_b:
rows = db(db.t_a.created_by == auth.user.id).select(join=db.t_b.on(db.t_a.f_y
== db.t_b.id))
that works,
But first I want to filter out t_b, for example
= db.t_tests.f_test_milestone ==
request.vars.milestone
graph_query = graph_query (milestone_query)
if request.vars.env !='ALL':
env_query = db.t_tests.f_tests_env == request.vars.env
graph_query = graph_query (env_query)
Many thanks. :).
On Monday, February 24, 2014 4:51:31 PM UTC+2, Avi
, February 22, 2014 3:25:34 PM UTC-5, Avi A wrote:
Great, thanks. the moreover idea is what i was missing. Yeah, I'll
replace the args with vars url, thanks.
On Saturday, February 22, 2014 9:36:58 PM UTC+2, Niphlod wrote:
every
db.table.column == parameter
is something that further
Hi,
Assuming I want to create an ajax query that will filter the results
according to some data in fields:
for example: ajax url: ... eco/1/6/4/5/3
def eco:
my_content = db.table.created_by == auth.user.id
query_a = db.table.field_a == request.args(0)
query_b = db.table.field_b==
PM UTC+1, Avi A wrote:
Hi,
Assuming I want to create an ajax query that will filter the results
according to some data in fields:
for example: ajax url: ... eco/1/6/4/5/3
def eco:
my_content = db.table.created_by == auth.user.id
query_a = db.table.field_a == request.args(0
Hi,
I created a table with a password field.
I got an ajax (web2py component) form where a user fill the password, and
if it's OK, it does something.
It works fine, but the problem is that if I use for example ! in the
password field , the form won't be accepted.
Is there a solution for that? I
with the Ajax call in the browser?
Please show some more code an explain exactly what is happening.
On Sunday, February 16, 2014 5:52:04 AM UTC-5, Avi A wrote:
Hi,
I created a table with a password field.
I got an ajax (web2py component) form where a user fill the password,
and if it's OK, it does
:17 PM UTC+1, Avi A wrote:
All I see is:invalid request
rendered on the #org_form_target
#model
db.define_table('t_orgs',
Field('f_org_name', type='string',
label=T('Organization Name')),
Field('f_org_code', type='password',
label=T('Organization pasword
ReferenceError: encodedURIComponent is not defined
How do I define it? Do I have to import something?
Thanks.
On Sunday, February 16, 2014 3:05:04 PM UTC+2, Avi A wrote:
great, thanks .
On Sunday, February 16, 2014 3:03:40 PM UTC+2, Niphlod wrote:
and what you expected ? :-P
you built
This almost works (no error):
encodeURIComponent (without the d).
But it doesn't find it
On Sunday, February 16, 2014 3:48:22 PM UTC+2, Avi A wrote:
ReferenceError: encodedURIComponent is not defined
How do I define it? Do I have to import something?
Thanks.
On Sunday, February 16
it works. (and not 123!).
On Sunday, February 16, 2014 4:35:55 PM UTC+2, Anthony wrote:
Sorry, should be encodeURIComponent. What do you mean it doesn't find it?
On Sunday, February 16, 2014 8:52:06 AM UTC-5, Avi A wrote:
This almost works (no error):
encodeURIComponent (without the d
Oops. alright, thanks a lot.
On Sunday, February 16, 2014 4:58:06 PM UTC+2, Anthony wrote:
You didn't update your controller code -- request.args(0) should now be
request.vars.code.
On Sunday, February 16, 2014 9:46:47 AM UTC-5, Avi A wrote:
I mean that it displays the searching
Hi,
Assuming different users are adding projects to the t_projects table
which is a referenced field in t_tests table as below:
db.define_table('t_tests',
Field('f_test_name', type='string',
label=T('Test Name')),
Field('f_test_project', type='reference t_projects',
..
great thanks.
On Sunday, February 9, 2014 3:47:44 AM UTC+2, Anthony wrote:
Assuming different users are adding projects to the t_projects table
which is a referenced field in t_tests table as below:
db.define_table('t_tests',
Field('f_test_name', type='string',
label=T('Test
are only converting one of them. You'll need to do some debugging to figure
out exactly which field or fields are generating errors, and then make the
appropriate corrections.
On Sunday, February 2, 2014 4:21:37 PM UTC-5, Avi A wrote:
getting this error:
ValueError: invalid literal for long
t.validate_and_insert(**t._filter_fields(post_params))
else:
raise HTTP(400)
return locals()
On Saturday, February 1, 2014 11:24:02 PM UTC+2, Avi A wrote:
Yes, that's what I want.
I'll give it a try , thanks.
On Saturday, February 1, 2014 10:30:28 PM UTC+2, Anthony wrote
HTTP(400)
return locals()
Apologize for the confusion I made.
Thanks.
On Thursday, January 30, 2014 12:30:52 PM UTC+2, Avi A wrote:
Hi,
I am trying something like that:
#on one local script instance:
import requests
test_params = {'api_key': 'api_key', 'test': 'test', 'f_platform
:
The string field you showed was for f_platform_name, but in your
test_params, you have f_platform, which I assume must be an integer or
reference field (the str(long(obj)) code is only called for id, integer,
and reference type fields in the DAL).
On Friday, January 31, 2014 4:18:53 PM UTC-5, Avi
Alright,
I turned those fields to be strings, also had to modify the DAL and added
(no idea why): , adapter_args=dict(foreign_keys=False),
And now it's working.
Thanks a lot of the support, the teaching and the patient.
On Saturday, February 1, 2014 11:19:36 AM UTC+2, Avi A wrote:
Yes, some
data model and what you're trying to
achieve with the API.
Anthony
On Saturday, February 1, 2014 9:16:09 AM UTC-5, Avi A wrote:
Alright,
I turned those fields to be strings, also had to modify the DAL and added
(no idea why): , adapter_args=dict(foreign_keys=False),
And now it's working
Yes, that's what I want.
I'll give it a try , thanks.
On Saturday, February 1, 2014 10:30:28 PM UTC+2, Anthony wrote:
Without the ability to post data to reference fields it's a problem to
achieve it. just posting the reference data as strings won't allow me to
make these filters, unless I
It's OK thanks.
On Friday, January 31, 2014 7:57:45 PM UTC+2, Massimo Di Pierro wrote:
Please show the model and explain in english what you want to do.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
rest_action = _action().get(method, None)
AttributeError: 'NoneType' object has no attribute 'get'
On Friday, January 31, 2014 2:12:44 PM UTC+2, Anthony wrote:
Yes, now check what is in r.content.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
9:09:21 PM UTC+2, Anthony wrote:
Is that what's in r.content? If so, looks like you didn't add the return
locals() line at the bottom of your api() function.
Anthony
On Friday, January 31, 2014 1:23:53 PM UTC-5, Avi A wrote:
rest_action = _action().get(method, None)
AttributeError
post_params.api_key.
Anthony
On Friday, January 31, 2014 2:20:57 PM UTC-5, Avi A wrote:
I did, but now I see that i didn't put it left enough.
Now the error I get:
if db(db.auth_user.api_key == post_params.api_key).count():
AttributeError: 'dict' object has no attribute 'api_key'
Maybe I
=settings.migrate)
On Friday, January 31, 2014 10:04:05 PM UTC+2, Anthony wrote:
Oops, this:
t.validate_and_insert(t._filter_fields(**post_params))
should be:
t.validate_and_insert(**t._filter_fields(post_params))
Anthony
On Friday, January 31, 2014 2:46:23 PM UTC-5, Avi A wrote
'}
On Friday, January 31, 2014 10:58:11 PM UTC+2, Anthony wrote:
Doesn't look like that's going into a string field. Maybe check the call
being made.
On Friday, January 31, 2014 3:20:51 PM UTC-5, Avi A wrote:
return str(long(obj))
ValueError: invalid literal for long() with base 10
Hi,
Looking at that example:
def POST(table_name,**vars):
return db[table_name].validate_and_insert(**vars)
I'm trying to do something like this:
@request.restful()
def api():
clients = db(db.auth_user).select(db.auth.api_key)
t = db.t_tests_results
def POST(**post_params):
Hi,
I am trying something like that:
#on one local script instance:
import requests
test_params = {'api_key': 'api_key', 'test': 'test', 'f_platform':
'platform', 'f_device': 'device', 'steps': 'steps',
'matches':'matches', 'missmatches': 'missmatches', 'steps':
'steps'}
r =
for the existence of that single key via
a query.
if db(db.auth_user.api_key == post_params.api_key).count():
return t.validate_and_insert(t._filter_fields(**post_params))
Anthony
On Thursday, January 30, 2014 5:30:52 AM UTC-5, Avi A wrote:
Hi,
I am trying something like that:
#on one local
I understand the if, only the .count() I don't understand.
On Thursday, January 30, 2014 5:33:19 PM UTC+2, Avi A wrote:
Sorry for the not working, I thought my mistake would be obvious. On the
console where i sent the post i got Process finished with exit code 0 but
i could not see
AM UTC-5, Avi A wrote:
Sorry for the not working, I thought my mistake would be obvious.
Describing the specific failure often makes it easier to home in on the
source of the problem.
First line: does it mean that this if statement knows to search the
auth.user records till it finds
Actually I do get an error:
rest_action = _action().get(method, None)
AttributeError: 'NoneType' object has no attribute 'get'
On Thursday, January 30, 2014 7:28:23 PM UTC+2, Avi A wrote:
Thanks for the explanation.
It stiil doesn't add records to the table.
Is there any where I can
UTC-5, Avi A wrote:
Hi,
I am trying something like that:
#on one local script instance:
import requests
test_params = {'api_key': 'api_key', 'test': 'test', 'f_platform':
'platform', 'f_device': 'device', 'f_steps': '10',
'f_matches':'7', 'f_missmatches': '3', 'f_missing
what do you mean? How can I check it?
On Thursday, January 30, 2014 8:39:56 PM UTC+2, Anthony wrote:
What does .validate_and_insert return?
On Thursday, January 30, 2014 1:11:18 PM UTC-5, Avi A wrote:
Thank you very much.
No errors now, but still not inserting. I'll give it some more
from the client where you are making the API requests.
Anthony
On Thursday, January 30, 2014 2:29:02 PM UTC-5, Avi A wrote:
what do you mean? How can I check it?
On Thursday, January 30, 2014 8:39:56 PM UTC+2, Anthony wrote:
What does .validate_and_insert return?
On Thursday, January 30
Nothing is returned:
avi@avi-S500CA:~/applitools$ python test_json.py
avi@avi-S500CA:~/applitools$
On Thursday, January 30, 2014 11:42:24 PM UTC+2, Anthony wrote:
Just run your request code from a Python shell and check the value of
r.content.
Anthony
On Thursday, January 30, 2014 4:22
Is that the way to do it?:
filtered_t_a= db.t_a.created_by == auth.user.id
rows = db(filtered_t_a.id== db.t_b.id).select()
for r in rows:
print row.filtered_t_a.name, 'has', row.t_b.description
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
= requests.post('http://127.0.0.1:8000/qatests/api', params=test_params)
and check the value of r.content.
On Thursday, January 30, 2014 4:47:20 PM UTC-5, Avi A wrote:
Nothing is returned:
avi@avi-S500CA:~/applitools$ python test_json.py
avi@avi-S500CA:~/applitools$
On Thursday, January 30, 2014
Hi,
I am trying something like that: (render current api key and update it if
clicking)
on the view:
button type=button id=change_api_keyGet new api key/button
div id= target{{=LOAD('default','api_key.load',ajax=True)}}/div
script type=text/javascript
$(document).ready(function(){
Thanks,
I'm still getting the same error.
On Thursday, January 30, 2014 12:18:35 AM UTC+2, Niphlod wrote:
the syntax is wrong
it's
db(condition).update(column_name=value)
not
db(condition).update(db.table.column_name=value)
On Wednesday, January 29, 2014 11:09:40 PM UTC+1, Avi
db(db.auth_user.id == auth.user.id).update(api_key == uuid.uuid4())
TypeError: update() takes exactly 1 argument (2 given)
On Thursday, January 30, 2014 12:30:04 AM UTC+2, Avi A wrote:
Thanks,
I'm still getting the same error.
On Thursday, January 30, 2014 12:18:35 AM UTC+2, Niphlod
I also get on the error log on the Variables :
).update undefined
On Thursday, January 30, 2014 12:42:03 AM UTC+2, Avi A wrote:
db(db.auth_user.id == auth.user.id).update(api_key == uuid.uuid4())
TypeError: update() takes exactly 1 argument (2 given)
On Thursday, January 30, 2014 12:30
Hi,
Assuming I want to run a testing script locally and send the test results
to a web2py app. Would that be the way to do it?
#local script
import requests
test_results = {'api_key': x, 'Fail': 'etc'}
r = requests.get(somedomain.com/default/api/*get*, params=test_results)
# link
def api():
Hi,
Assuming i got my local version, which I want to upload to the live version.
How do I make the updating without overwritng/updating the db on the live
version?
Thanks.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
upload your applications/yourapp/databases folder.
You really should read about database migrations in the web2py book and
provide more information when asking such questions, ie. the database type,
etc.
Regards
On Sunday, January 12, 2014 11:20:08 AM UTC+1, Avi A wrote:
Hi,
Assuming i got
Hi,
Working on ajax components, I got error/s. It flashes there is an error.
but where can I find the code?
thanks.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report
Good luck :).
On Saturday, January 4, 2014 6:08:38 AM UTC+2, Massimo Di Pierro wrote:
Web2py/me have been nominated for the Edison Award. Please wish web2py
(and me) good luck. :-)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
%20org_code%20%2B%20%22
((adding the encoded or decoded chars + NOT replacing the var with it's
value.)
Thanks.
On Tuesday, December 31, 2013 12:26:43 AM UTC+2, Avi A wrote:
I was in the direction in one of the tries...
Thanks.
On Monday, December 30, 2013 11:17:44 PM UTC+2, Anthony wrote
variable must be done in Javascript, so it would be:
var url = '{{=URL('default', 'org_form_load.load')}}';
$.web2py.component(url + '/' + org_code, 'org_form_target');
Anthony
On Tuesday, December 31, 2013 2:38:37 PM UTC-5, Avi A wrote:
Still stuck with that.
While this is rendered
Hi,
I have this on the view:
div
input name=name onkeyup=ajax('org_form_load.load', ['name'],
'org_form_target') /
/div
div id = org_form_target/div
and something like this on the controller:
def org_form_load():
org_code = request.vars.name
org_code_name =
30, 2013 6:14:57 PM UTC+2, Anthony wrote:
The form is not accepted when it is first created, so you will always get
that error message. Instead, you want:
elif form.errors:
response.flash = 'There was an error..'
Anthony
On Monday, December 30, 2013 10:21:58 AM UTC-5, Avi
, December 30, 2013 12:18:33 PM UTC-5, Avi A wrote:
Thanks,
It solved the error getting after the form is loaded into the page,
but still nothing happen if I submit the form.
This is what I do:
if form.process().accepted:
response.flash = 'Success!'
elif form.errors
How is the name (input value) is passed in this component template/case?
(i click the code and the form won't load into the page.).
On Monday, December 30, 2013 7:49:32 PM UTC+2, Avi A wrote:
Thanks. I will look into it.
Happy new year! and thanks for all the awesome support!
On Monday
). Then
call $.web2py.component() with that URL, and in the org_form_load action,
use request.args(0) instead of request.vars.name.
Anthony
On Monday, December 30, 2013 12:56:19 PM UTC-5, Avi A wrote:
How is the name (input value) is passed in this component
template/case? (i click the code
It works only till the alert...
script
function insert_component(org_code)
{
alert(org_code);
$.web2py.component('%s', 'org_form_target'); % URL('default',
'org_form_load.load/org_code');
}
/script
On Monday, December 30, 2013 8:27:00 PM UTC+2, Avi A wrote:
ok thanks.
On Monday, December 30
within the
{{...}} template delimiters.
Anthony
On Monday, December 30, 2013 3:58:10 PM UTC-5, Avi A wrote:
It works only till the alert...
script
function insert_component(org_code)
{
alert(org_code);
$.web2py.component('%s', 'org_form_target'); % URL('default',
'org_form_load.load
Hi,
I'm doing something like that:
if auth.user:
my_org = db(db.t_org_members.f_org_member ==
auth.user.id).select(db.t_org_members.f_org_rep)
if my_org:
for m in my_org:
my_org_members = db(db.t_org_members.f_org_rep ==
or as locals() and it still renders the last one only.
On Friday, December 27, 2013 8:12:15 PM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 9:53 AM, Avi A avia...@gmail.com javascript: wrote:
Hi,
I'm doing something like that:
if auth.user:
my_org = db(db.t_org_members.f_org_member
Alright, I see what you mean. I'll give it a try. Thanks.
On Friday, December 27, 2013 8:37:55 PM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 10:23 AM, Avi A avia...@gmail.com javascript:
wrote:
Thanks,
I wasn't wrong, this is what I need:
{{for member in org_member_data:}}
what
for case my_org is empty i wrote:
if my_org:
not good enough? (if not empty?)
On Friday, December 27, 2013 8:37:55 PM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 10:23 AM, Avi A avia...@gmail.com javascript:
wrote:
Thanks,
I wasn't wrong, this is what I need:
{{for member
:54:34 PM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 10:53 AM, Avi A avia...@gmail.com javascript:
wrote:
for case my_org is empty i wrote:
if my_org:
not good enough? (if not empty?)
If that happens, what does the view see?
On Friday, December 27, 2013 8:37:55 PM UTC+2
, December 27, 2013 9:14:55 PM UTC+2, Avi A wrote:
user logged in
the view:
if he is in a group:
till now he will see the group members' data and take some action later on.
else:
will sign up for a group.
after page refresh will see the group members' data.
(will have a different page
member.auth_user.email throws the same error.
auth_user.email is defined in the select on the controller, as far as i
understand,
among other fields from the auth user table..
On Saturday, December 28, 2013 12:35:54 AM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 2:20 PM, Avi A avia
/tdtd111/tdtdaviavia4u+1@g.../td
tdfile/tdtdAvi/tdtdAbramovitch/td/tr/tbody/table
On Saturday, December 28, 2013 12:35:54 AM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 2:20 PM, Avi A avia...@gmail.com javascript: wrote:
Now I am able to get the list as you suggested with append.
But i
I created a dict instead of a list and I'm getting there...thanks.
On Saturday, December 28, 2013 12:44:09 AM UTC+2, Jonathan Lundell wrote:
On 27 Dec 2013, at 2:42 PM, Avi A avia...@gmail.com javascript: wrote:
member.auth_user.email throws the same error.
auth_user.email is defined
1 - 100 of 166 matches
Mail list logo