Thanks guys, it worked.
Field('personDisplayName', compute=lambda r: "%s %s" % (r['first_name'], r[
'last_name']))
Much appreciated!
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2
I use executesql with large tables (multiple 100K rows) and have had no such
problems.
Are your queries really just select * from table or is there more complicated
parameters involved? If it can be reliably reproduced them why not use a
monitor to watch what sqlserver is actual doing when it f
Thank you Anthony, for your explanation of request.vars as you can see from
my question I just started to learn web2py and something for me they are
not very clear.
On Saturday, 16 November 2013 17:16:24 UTC+10:30, afro wrote:
>
> I have a question, about request.vars what does it do, what it is
book has a chapter "Helping web2py" which should help you help us :)
http://www.web2py.com/books/default/chapter/29/15/helping-web2py
tldr:
tickets are filed via Google Code as "issues"
Code-base is at github
the chapter above has a recommended git workflow.
cheers
Tim
--
Resources:
- http://w
I've been running an old version of web2py with MS-SQL for several years -
no issues and we we use executesql. But we limit it to kicking off a SPROC
or two, that's about it.
I've never dealt with the Express version though - wonder if there's a row
limit or something holding you back.
On Fr
Needs to see findParent
On Saturday, 16 November 2013 15:05:14 UTC-6, Kulvinder Bisla wrote:
>
> I've a function findParent that takes a string, compares it with
> something else in db and returns another string. I wrote this in a .py
> file.
>
> products=db(findParent(db.product_info.source_pla
I've a function findParent that takes a string, compares it with something
else in db and returns another string. I wrote this in a .py file.
products=db(findParent(db.product_info.source_place)==auth.user.place).select()
The problem is, db.product_info.source_place doesn't etract source_place
you're not returning anything from the controller to the view.
def something():
#...should actually return something :-P
return dict(a=collected_values,b=collected_values2, etc etc etc)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.co
deal it in the app itself (SQLFORM without automatic dbio, plus
onvalidation) or with DAL callbacks...
On Saturday, November 16, 2013 9:57:08 PM UTC+1, mweissen wrote:
>
> Let's say I have a table like
>
> db.define_table("phonebook",
> Field("phonenumber", represent=lambda v,r: "secret" if r
My problem was fixed with a patch to change the write to stderr with a
write to LOGGER (as used everywhere else). This patch is now in trunk.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web
>
>
> OK, web2py is back in business. At this point all of the problems are
> with one app that I copied from my web deployment (for some reason I lost
> the local version that synced properly with git when I transitioned from
> windows to mac).
>
So, I just need to fix this one app and rebas
Let's say I have a table like
db.define_table("phonebook",
Field("phonenumber", represent=lambda v,r: "secret" if r.secret==True
else v),
Field("secret","boolean", default=False)
)
The first part is simple: if I want to hide a phonenumber, I have to check
the secret field and instead of t
>
> Further progress. The old windows solution also works on os x. When in
> doubt, reboot. We have no idea why but it is the only way...
>
So, now the pyjokes app works. All of its data is present so we can assume
simple file copy works with the sqlite db's.
I also changed routes.py to p
I created another instance of web2py, installing from sources.
I copied over my 2 applications.
I updated the 3 2.7.4 files (actually a second or third time).
I copied over my router.py.
Now, the admin UI works in its entirety. One step forward.
But, my own applications don't run (welcome does r
Hello,
I am trying to create a function that will send a GET request and then will
go through the response looking for specific data.
When I type in the URL on a Firefox browser, this is the response that I
get (using Firebug):
The function that
I changed the group to 'wheel' to see if that would work. It did not.
That is a very dangerous group, apparently, the group equivalent of root.
Since it didn't work, I'll change back to _www.
I am also going to try to give full privileges to user, another bad thing
to do, but it may help see
Running web2py dev site on local machine for testing purposes. Just did
upgrade in place to 2.7.4 (sort of works but something is always broken in
some mysterious way--never again, I guess. A great idea but only if it
works).
When I did this on my production server, I had to change privileg
Using generic.xml creates a fixed structure. Like in the case of
generic.html, you may need your own view.
So if you have:
def index():
return dict(phonebook = [dict(content=dict(phone=123)),
dict(content=dict(phone=234))])
Make an index.xml with
{{=TAG.phonebook(*[tag.content(tag.phone(c
Have you read this section:
http://web2py.com/books/default/chapter/29/04/the-core#request
request.get_vars includes all variables in the URL query string. For
example, for the URL /myapp/default/myfunc?var1=a&var2=b,
request.get_vars.var1 will be equal to "a" and request.get_vars.var2 will
be
web2py includes a json field type, which automatically converts to and from
JSON, so you can just do:
Field('list1a', 'json')
Then just insert the Python object directly, and it will be converted to
JSON on insert and converted back to Python when selected.
More generally, for other types of s
Hi,
I tried creating a table with border radius but its not working in web2py
however when i tried outside of web2py the border radius is working.
added the below css to web2py.css
.p_t1{
width:100%;
border:10px solid;
border-color:#02046E ;
-moz-border-radius:15px;
-webki
it's still an invalid python syntax.
correction to the above
Field('personDisplayName', compute=lambda r: "%s %s" % (r['first_name'],
r['last_name']))
should work.
>>> record = dict(first_name='john', last_name='foo')
>>> result = lambda r : "%s %s" % (r['first_name'], r['last_name'])
>>> r
The IS_IN_SET validator allows to list the options as a dictionary (
http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=IS_IN_SET
)
Therefore, for an example, you could do:
def index():
options = {'Apple':T('Apple'),'Banana':T('Banana'),'Cherry':T('Cherry')}
form=SQL
no it's not work, the point i want to show in here is at the first time the
code was :
Field('personDisplayName', compute=lambda r: r[first_name] [last_name])
lack of r on [last_name]
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github
doesn't
Field('personDisplayName', compute=lambda r: "%s %s" % (r[first_name],
r[last_name]))
work ?
On Saturday, November 16, 2013 9:21:49 AM UTC+1, Alex Glaros wrote:
>
> I gave up in the model but was successful in the form. Something like:
>
> db.auth_user(fieldID).update_record(person
I want to use the xml-rendering to create something like
123
234
I have tried the following data structure
[dict(content=dict(phone=123)), dict(content=dict(phone=234))]
but the list creates an additional tag
Any ideas?
Regards, Martin
--
Resources:
- http://
Solved it using Pickle.
-Sarbjit
On Saturday, November 16, 2013 2:24:24 PM UTC+5:30, Sarbjit wrote:
>
> I am using the slice from
> http://www.web2pyslices.com/slice/show/1721/google-charts-plugin.
>
> To store the data to be used for plotting in google charts, I am using the
> following :
>
>
Restart web2py. It will ask you for a new password.
On Friday, 15 November 2013 20:06:11 UTC-6, Nicholas Ling wrote:
>
> Hi I could not login as i have forgot my admin password at
> http://127.0.0.1:8000/admin/default/index. How do I continue? Anyway to
> reset this password?
>
> Thanks.
>
--
This is not valid python syntax. Try:
submenu = []
response.menu = [(T('Manage'),URL(),URL(),submenu), ...]
if auth.has_membership('admin'): submenu += [
(T('Users'),URL('cms','users_manage')==URL(),URL('cms',
'users_manage'),[]),
(T('Groups'),URL('cms','groups_manage')==URL()
for learning jquery, ajax and request.vars from examples, i think you can
take a look at web2py appliances : pos online store. and please spend a
time read the book about that too.
ref:
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax
http://web2py.com/books/default/chapter/29/04/th
Please open a ticket. This needs to be implemented.
On Friday, 15 November 2013 11:07:31 UTC-6, DeanK wrote:
>
> So I have a somewhat unique situation where multiple different users will
> be creating separate accounts with unique usernames, using the SAME email
> address. I figured I could mak
I am using the slice from
http://www.web2pyslices.com/slice/show/1721/google-charts-plugin.
To store the data to be used for plotting in google charts, I am using the
following :
To Create :- (Example)
data = [['Year','Sales','Expenses'],["2004",1000,400],["2005",1100,440]]
How I am doing :-
I have a question, about request.vars what does it do, what it is?
I need to understand more the way how the controller works, and where can I
read more about ajax when I want jQuery.ajax to transfer dynamic
content(test, html) to a script running the current page without reloading
it.
--
Reso
Hi I could not login as i have forgot my admin password at
http://127.0.0.1:8000/admin/default/index. How do I continue? Anyway to
reset this password?
Thanks.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://c
I am new to web2py and have what may be a stupid question.
In the application I am designing there are a number of different tables I
have basic SQLforms to manage. I already have access control being enforced
in the controller using the appropriate decorators, but I would like to
further incre
I gave up in the model but was successful in the form. Something like:
db.auth_user(fieldID).update_record(personDisplayName='%(first_name)s
%(last_name)s' % form.vars
thanks for helping me get it
Alex
>
> Field('personDisplayName', default = lambda personDisplayName, field: '%s
> %s'
36 matches
Mail list logo