hidden for security purpose...
BTW you can fork the repository in Web2py's applications forlder and give
a try to the latest version in a few minutes
Le vendredi 6 juin 2014 00:33:22 UTC+2, Derek a écrit :
looks neat, your demo login and password is hidden though
On Thursday, June 5, 2014
I'm using an ajax call to default.py controller. The default.py sets a
session variable. Paraphrased, it looks like this:
# model
if not session.myvars:
session.myvars = dict(
somevar=dict(),
othervar=dict(),
...
)
# view
script
...
ajax({{=
I'm using an ajax call to default.py controller. The default.py sets a
session variable. Paraphrased, it looks like this:
# model
if not session.myvars:
session.myvars = dict(
somevar=dict(),
othervar=dict(),
...
)
# view
script
...
ajax({{=
the scheduler doesn't need a decorator... for your own organization you
can,e.g., put all the functions in one model file, or use comments ^_^
with
web2py.py -a yourpassword -K appname -X
you can start in one command the webserver and the scheduler processes.
On Thursday, June 5, 2014
My application has select/option dropdown - which contains lots of entries
(one has about 200 entries, other about 3000 - yes three thousand)
I was wondering if there is a way to use HTML5 datalist widget to make the
selection user friendly.
I'm on web2py 2.9.5, and using new style Virtual fields.
Virtual field shows up OK in the table view, but :
1. It does not appear at all when I click on View button
2. are not used for default search
Any workarounds ?
-Mandar
--
Resources:
- http://web2py.com
- http://web2py.com/book
Virtual field shows up OK in the table view, but :
1. It does not appear at all when I click on View button
By default, virtual fields don't show up in readonly forms, but you can
list them in the fields argument. To pass the fields argument to the
view form when using the grid, you can
Thank you, Michael.
However, it appears that in the steps you've discussed, you're using the
compute field to store the original filename in the table, or to store
other information in the table. However, I am interested simply in changing
the name of the file that is uploaded to the server.
Just to be clear, when you delete session.myvars[somevar], you are sure
session.myvars still contains other dictionaries and is not at this point
an empty dictionary (which would trigger the model code to refill it)?
On Friday, June 6, 2014 3:46:11 AM UTC-4, weheh wrote:
I'm using an ajax
You can set the represent attribute for the fields you would like to
format.
Anthony
On Friday, June 6, 2014 1:31:06 AM UTC-4, Sarbjit wrote:
Hi,
I am using GRID in my application, my requirement is that I want to
display the field value in different color (RED/GREEN) OR I want to display
Fair question. Dunno the answer. It was just an example. The real
application is that I'm filling the dict with other stuff. It's keeping
track of the state of my GUI -- active tabs and stuff. So in that case, the
empty session.myvar condition would not be triggered. In any event, I have
a
You said the dict gets deleted temporarily? How temporarily? How are you
checking that? Is it only deleted during the current request? If so, sounds
like for some reason the session isn't getting saved. Are you using the
default file based sessions?
On Friday, June 6, 2014 9:08:38 AM UTC-4,
Thanks Anthony,
Can you please provide a small example.
On Friday, June 6, 2014 6:03:29 PM UTC+5:30, Anthony wrote:
You can set the represent attribute for the fields you would like to
format.
Anthony
On Friday, June 6, 2014 1:31:06 AM UTC-4, Sarbjit wrote:
Hi,
I am using GRID in my
db.define_table('mytable',
Field('Product_SignOff',
represent=lambda v, r: SPAN(v, _class='green' if v ==
'Yes' else 'red')),
...)
On Friday, June 6, 2014 9:52:58 AM UTC-4, Sarbjit wrote:
Thanks Anthony,
Can you please provide a small
Il 03/06/14 22:12, Massimo Di Pierro ha scritto:
Could you post some screenshots?
what about a demo site?
http://manuele.pythonanywhere.com/demo_plugin_datatables
you can browse the 2 pages linked in the Examples menu.
Cheers
M.
--
Resources:
- http://web2py.com
- http://web2py.com/book
Il 03/06/14 22:12, Massimo Di Pierro ha scritto:
Could you post some screenshots?
ok here they are:
https://www.dropbox.com/s/razmyp3f1qpsfik/Screenshot%202014-06-06%2016.53.11.png
https://www.dropbox.com/s/w10yzfziqlrx0gk/Screenshot%202014-06-06%2016.53.55.png
Cheers
M.
--
Resources:
-
SQLFORM isn't working for me with
new_table = db(db.table1.id.belongs(record_ids)).select()
if I do {{=new_table}} in my view I can see the records which belong to
record_ids, but if I do:
SQLFORM.grid(new_table)
return dict(grid=grid)
I get an error 'Rows' object has no attribute '_db'
Hi,
You send var grid (see: return dict(grid=grid)). The first var grid is a
send var to your view, de second var grid is a local var of your function.
Then,
in controller use:
grid = SQLFORM.grid(db.new_table)
return dict(grid=grid)
in the view use:
{{=grid}}
Fabiano.
2014-06-06 12:45
Hi Fabiano,
I actually was already using grid= SQLFORM.grid(db.new_table). That is when
I get the error.
If I do grid='' to test it and just return the table without SQLFORM I can
see it in the view, but when I apply SQLFORM I get the error 'Rows' object
has no attribute '_db'.
I'm guessing
Try:
grid = SQLFORM.grid(db.table, user_signature=False)
Em sexta-feira, 6 de junho de 2014 13h10min34s UTC-3, LoveWeb2py escreveu:
Hi Fabiano,
I actually was already using grid= SQLFORM.grid(db.new_table). That is
when I get the error.
If I do grid='' to test it and just return the
How do you define tables?
2014-06-06 14:03 GMT-03:00 Fabiano Almeida fabi...@techno7.com.br:
Try:
grid = SQLFORM.grid(db.table, user_signature=False)
Em sexta-feira, 6 de junho de 2014 13h10min34s UTC-3, LoveWeb2py escreveu:
Hi Fabiano,
I actually was already using grid=
That was it! THANK YOU! Why does it work without a signature though?
On Friday, June 6, 2014 1:03:35 PM UTC-4, Fabiano Almeida wrote:
Try:
grid = SQLFORM.grid(db.table, user_signature=False)
Em sexta-feira, 6 de junho de 2014 13h10min34s UTC-3, LoveWeb2py escreveu:
Hi Fabiano,
I
Are you logged in your app?
2014-06-06 14:07 GMT-03:00 LoveWeb2py atayloru...@gmail.com:
That was it! THANK YOU! Why does it work without a signature though?
On Friday, June 6, 2014 1:03:35 PM UTC-4, Fabiano Almeida wrote:
Try:
grid = SQLFORM.grid(db.table, user_signature=False)
Em
yes
On Fri, Jun 6, 2014 at 1:09 PM, Fabiano Almeida fabi...@techno7.com.br
wrote:
Are you logged in your app?
2014-06-06 14:07 GMT-03:00 LoveWeb2py atayloru...@gmail.com:
That was it! THANK YOU! Why does it work without a signature though?
On Friday, June 6, 2014 1:03:35 PM UTC-4,
Now I get this error when I try to click edit on the query database:
type 'exceptions.ValueError' invalid literal for int() with base 10:
'edit'
I've tried changing signature to false, but I don't think thats the problem.
On Friday, June 6, 2014 1:17:39 PM UTC-4, LoveWeb2py wrote:
yes
On
Show your code
2014-06-06 15:18 GMT-03:00 LoveWeb2py atayloru...@gmail.com:
Now I get this error when I try to click edit on the query database:
type 'exceptions.ValueError' invalid literal for int() with base 10:
'edit'
I've tried changing signature to false, but I don't think thats the
you'd have to code your own widget, that is not that difficult.
That being said, it's a taddle bit foolish wanting to inject 3k options in
a page: datalist is cool over the standard select, but it doesn't cut
the weight of the markup.
I'd go with select2 and items loaded via ajax, so you can
I'm have a few things that need clarification and am also experiencing some
odd behavior with the scheduler. I'm using my app's db instance (mysql) for
the scheduler.
at the bottom of scheduler.py:
from gluon.scheduler import Scheduler
scheduler = Scheduler(db,heartbeat=3)
I start my
type 'exceptions.ValueError' invalid literal for int() with base 10:
'edit'
In some part of your code has converting string to numeric type. Probably
you should be picking up the URL argument and doing the conversion, but
when you edit the registry of URL arguments are changed.
In my example, I
another way around :
if table.Product_SignOff == 'Yes':
table.Product_SignOff.represent = lambda Product_SignOff, field:
SPAN(Product_SignOff, _class = 'text-error')
elif table.Product_SignOff == 'No':
table.Product_SignOff.represent = lambda Product_SignOff, field:
SPAN(Product_SignOff,
another way around :
if table.Product_SignOff == 'Yes':
table.Product_SignOff.represent = lambda Product_SignOff, field:
SPAN(Product_SignOff, _class = 'text-error')
elif table.Product_SignOff == 'No':
table.Product_SignOff.represent = lambda Product_SignOff, field:
how to restrict user in sql smart grid for parent table to do not add
record. but that same user can add record in child table.
query = ( ( db.parentr.id = 0))
grid = SQLFORM.smartgrid(db.parent,linked_tables=['child'], csv=False
,fields=fields, constraints = dict(tracker = query),
Hi,
I have configured SSO on Apache 2.4 and can read the username with
request.env['remote_user'].
How can I now configure restricted access to methods?
I need some methods to be available only to the users of specific
ActiveDirectory groups, like
@auth.requires_membership('ad group')
is it
Hello to the community.
I want to share with you a simple tool I created to extend the capabilities
of completion of the DAL code. So far I've only tested PyCham. Experiment
with other IDEs and tell me.
Given the dynamic nature of Python and how web2py defines the tables, it
becomes
It is quite helpful for me, I read it and like the way it explains things.
But why is it called 'old'? The techniques are no longer ideal or it just
stop updating?
I wish there is such a new web2py blog.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
Hi
I am trying to create and add a custom authentication method and
incorporate it into web2py.
Here is my authentication method:
import win32security
import pywintypes
def auth_local(username, password):
try:
token = win32security.LogonUser(Username=username,
Hello has anyone succeeded getting Janrain to work properly on web2py 2.9.5
?
I have done as explained in the online book, but it doesn't seem to work,
my page is appearing blank, without login logos.
Please if you have succeed, I'd be glad to know how.
--
Resources:
- http://web2py.com
-
When using SQLFORM, is it possible to check for certain input and change it
before it is being stored in db?
--
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 Issues)
I know the field id is autoincrement, but I need other field besides the
id, because I'm trying to use MongoDB and the field id that created is like
'{ _id : { $oid : 539139c0dfe28529f6fb72cb}'.
Then have to create other autoincrement field besides the id.
Anybody can help?
--
Resources:
-
I am writing a callback function after update on scheduler_task. then i am
printing set which we are getting in that callback function.
set values are printed when scheduler_task.status change to 'ASSIGNED' and
'RUNNING'. but when scheduler_task.status changes to 'TIMEOUT' or
'COMPLETE' set is
Hi, I'm using web2py quite a while now, and I am still pleased with it's
functionality.
Recently I started to use record versioning and found, that joins with
versioned tables do not work anymore:
Here's the example (using the app welcome):
Hi ,
So the situation is this:
I have table for posts - Only the user posted a message may see it
and then table for shared_posts - The user created a post may enter
user_ids here, and those users may also see the post
I don't want to add record for each share, so shared posts is defined
like
i am using sql smqrt grid.I have parent table and child table. i want to
restrict user to add record for parent table but that same user can add
records in child table.
query = ( ( db.parent.id = 0))
grid = SQLFORM.smartgrid(db.parent,linked_tables=['child'], constraints =
dict(tracker =
I am writing after update callback function on scheduler_task table when
task status changes. i am getting values in dbset of callback function when
status changes to ASSIGNED AND RUNNNG but when status changes to TIMEOUT
and COMPLETED dbset doenot contain any value .
def
Aloha is there a solution that allows you to run the web2py in a sub
directory? I've looked through the books blogs and can't find a straight
forward solution with either routes.py or in apache.
Thanks,
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
-
db.define_table('music',
Field('name',required=True),
Field('filename','upload',required=True),
auth.signature)
applications/audio/models/db_audio.py
echo
response.menu = [('Home',0,URL('index'))]
# allows to browser, search, and upload new
Hi,
does anyone know how to solve the loading... issue?
After updating web2py from 2.5.1 to current I get 'loading...' instead of
list of files.
I already tried:
- Replacing .js files with the new ones
- change order of including files in web2py_ajax.html
- exchanging gluon/compileapp.py
a, that's what i'm lacked off, not created the css classes for green and
red classes. thank you so much, anthony.
btw, the piece of code above is not completed, here is the complete code :
e.g.
def on_define_product(table):
if 'product' in request.function :
if table.signoff == 'No':
i think you can achieve it using form.validate :
e.g.
def booking():
form = SQLFORM(db.booking_header)
if form.validate():
db.booking_header.insert(booking_date = form.vars.booking_date,
buyer = form.vars.buyer,
had you try using onvalidation or form.validate()?
ref:
http://web2py.com/books/default/chapter/29/07/forms-and-validators
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
-
please check this discussion
https://groups.google.com/forum/#!topic/web2py/ARfF_QZk2tw
best regards,
stifan
--
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 Issues)
please do with dict for create :
e.g.
def grid():
query = ( ( db.parent.id = 0))
create = dict(parent = False, child = True)
grid = SQLFORM.smartgrid(db.parent,linked_tables=['child'], constraints
= dict(tracker = query), paginate=15 ) ,
editable=auth.has_membership('editor_group'),
please take a look at this disccussion :
https://groups.google.com/forum/#!topic/web2py/B1l_RfCYpXA
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list
e.g. for view
*views/default/index.html*
{{extend 'layout.html'}}
{{=grid}}
--
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 Issues)
---
You received this message
54 matches
Mail list logo