1.
In this Example i need to take the input string from table_1.field_1
and get_or_create a record in table_2 with table_1.field_1 value in
table_2.field_1 and insert the table_2.field_2 refernce in
table_1.field_2:
def get_or_create(table, fields):
logic=reduce(lambda a,b:a&b,[table[k]==field
Hi,
here is the important Code from an Sqlite trigger i use very often, is
this possible with web2py to?
Sqlite:
(SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
LIKE table_1.field_1 )
or i can even do:
(SELECT table_1.field_1 FROM table_1 WHERE '%' || NEW.field_1 || '%'
LIK
The || operator is "concatenate", its like + in python.
On 7 Mai, 16:48, Mengu wrote:
> is || just a string or have any purpose?
>
> On 7 Mayıs, 17:35, AsmanCom wrote:
>
> > Hi,
>
> > here is the important Code from an Sqlite trigger i use very often
7;%').lower().like('%' + find_value +
'%').select(db.table_1.field_1)
Any Idea?
On 7 Mai, 17:03, mdipierro wrote:
> This should work
>
> db("'%' || NEW.field_1 || '%' LIKE
> table_1.field_1").select(db.table_1.field_1)
>
> On M
I´ll try to explain, I need check if any record of a given field is
contained in a string. Is there any solution?
On 7 Mai, 17:03, mdipierro wrote:
> This should work
>
> db("'%' || NEW.field_1 || '%' LIKE
> table_1.field_1").select(db.table_1.field
#x27;%' LIKE table_1.field_1
> > "))._select(db.table_1.field_1)
>
> > Do you get the query you want?
>
> > On May 7, 10:48 am, AsmanCom wrote:
>
> > > It returns nothing... even if I write in the exact value and it should
> > > work like a fu
Hi,
i want to do a simple task:
def function_1():
var_field_1=request.vars.field_1
if var_field_1:
return var_field_1
db.define_table('table_1',
Field('field_1','string' ),
Field('field_2', default=function_1)
#x27;form': form}
>
> I did not test it. But it shows you the key of using onvalidation()
> trick.
>
> Regards,
> Iceberg
>
> On May11, 12:08am, AsmanCom wrote:
>
> > Hi,
>
> > i want to do a simple task:
>
> > def function_1():
> >
@Andrea
Your plugin is absolutely awesome, that´s what i´ve looked for!
Are going to implement further JQGrid functions in the near future?
I would appreciate if the "Subgrid" feature would be implemented in
the plugin:
http://www.trirand.com/blog/jqgrid/jqgrid.html ->"New since beta 3.0"
->"sub
Hi,
i am working with JQGrid plugin too.
Just to get your approach right.. you´ve realised a Master-Detail
function with the JQGrid?
Very nice! May i can use this too.
Is the code(for Controller, View) from your last post working, right
now?
Did you made any changes to the ##model code?
I am try
Could you help me setting this up too?
This is the view:
{{extend 'layout.html'}}
This is the default/test.html template
{{=jqgrid_table}}
jQuery("#grid_id").jqGrid({
onSelectRow: function(postdata) {
web2py_ajax_page('get','/myapp/default/form/'+
(postdata),null,'my_form');
}
ly included the
> onSelectRow event to /models/jqgrid_plugin. The function
> plugin_jqgrid() is where the default jqgrid script is retrieved when
> the {{=plugin_jqgrid(db.table,columns=[...])}} is called. If you do it
> this way you will want to add it to the .jqGrid({ }) parameters not i
estions?
Thank you in advance.
Dieter Asman
On 20 Mai, 15:52, Jason Lotz wrote:
> Try
>
> {{=jqgrid_table}}
>
> jQuery(document).ready(function(){
> jQuery("#grid_id").jqGrid({
> onSelectRow: function(postdata) {
> web2py_ajax_page('get','/myapp/
d").jqGrid({
> onSelectRow: function(postdata) {
> web2py_ajax_page('get','/myapp/default/form/'+(postdata),null,'my_form');}});
>
>
> On 05/20/2010 10:45 PM, AsmanCom wrote:
>
> > Thanks for your effort, but it gives an emp
the form'
return dict(form=form)
On 20 Mai, 16:55, Jason Lotz wrote:
> Are you using the web2py jqgrid_plugin?
>
> http://web2py.com/plugins/default/jqgrid
>
> On 05/20/2010 11:53 PM, AsmanCom wrote:
>
> > can this be caused by the function, which s
0/2010 11:53 PM, AsmanCom wrote:
>
> > can this be caused by the function, which set in /static/
> > plugin_editable_jqgrid/plugin_editable_jqgrid.js ?:
>
> > onSelectRow: function(id){
> > if(id&& lastSel!=''&
my_form');}});
>
> {{=LOAD('default','form',args=1,ajax=True,target='my_form')}}
>
> check out LOAD function dochttp://www.web2py.com/AlterEgo/default/show/252
>
> On 05/21/2010 12:09 AM, AsmanCom wrote:
>
> > Many thanks, it go�s in the right
What about that
http://app.ebansoftware.net/editable_jqgrid/default/show_example
On 29 Mai, 19:21, Yarko Tymciurak wrote:
> btw - trying to wade thru these doesn't seem to point to anything (and
> just makes my head hurt!):
>
> http://www.trirand.com/jqgridwiki/doku.php?id=wiki:navigator&s[]=n
I would like to show Database Fields as Barcharts (widget)
like this:
http://web2py.appspot.com/t3/default/wiki/charts
or better
http://t.wits.sg/jquery-progress-bar/
It should be possible to show more then one barchart per Page, which
can be updated by a Callback (I want to use them in a Grid)
Hi,
a Task Scheduler Plugin would be very nice.
Kindly keep me posted about your progress!
What exactly is the Problem, do you have a traceback?
On 8 Jun., 05:42, Doug Warren wrote:
> So I'm writing a plugin to handle scheduling of tasks with a dynamic
> granularity of a second or less, and I
env(a, import_models=False, c=1, f=1, dir='', extra_request={})
Return web2py execution environment for application (a), controller
(c), function (f). If import_models is True the exec all application
models into the environment.
extra_request allows you to pass along any extra variables to the
re
Hi,
it seems that Client Tools wont work anymore on web2py Version 1.79.2:
Traceback (most recent call last):
File "gluon/restricted.py", line 178, in restricted
File "D:/web2py/applications/clienttools/controllers/default.py",
line 265, in
File "gluon/globals.py", line 96, in
File "D:/
Hi,
I need to retrieve the request.vars from an JavaScript Object.
controller code:
form.append(INPUT( _id="buttonid", _type="button", _class="my_button",
_name="buttonName", _value="Off"))
and then i want to get the value from this, like so:
if request.vars.buttonName == "Off":
do anythin
> On Jun 19, 3:11 am, AsmanCom wrote:
>
> > Hi,
>
> > I need to retrieve the request.vars from an JavaScript Object.
>
> > controller code:
>
> > form.append(INPUT( _id="buttonid", _type="button", _class="my_button",
> > _n
7;On','Off']),
default="Off",
widget=SQLFORM.widgets.radio.widget))
THX
Dieter Asman
On 19 Jun., 12:52, David Marko wrote:
> For the form based applications I like Dojo Toolkit, especially
> declarative mode. See the Checkbox widget
> here:http
Hi,
that could be useful for the unzip part:
http://www.web2py.com/examples/static/epydoc/web2py.gluon.admin-pysrc.html#unzip
And that could be used/customized for the downloading part (Its taken
from the great clienttools module:
http://www.web2pyslices.com/main/slices/take_slice/8):
def _
Hi,
i can make a hidden Field by:
form = SQLFORM.factory(Field("field_name", type="hidden",
default="Off"))
Now the Form is hidden, but the Fieldname is still there, how can I
hide this?
THX
Hi,
I try to get the JQGrid Plugin (http://www.web2py.com/plugins/default/
jqgrid) to work with multiple Databases.
Like this:
db_1 = DAL("sqlite://db1.db")
db_2 = DAL("sqlite://db2.db")
db_3 = DAL("sqlite://db3.db")
plugin_jqgrid(db_1.shout)
But the Grid is empty.
If I do it like that, it
if request.vars.fieldname:
dbset =
db_1(table[request.vars.fieldname]==request.vars.fieldvalue)
else:
dbset = db_1(table.id>0)
But without success.
THX
On Jul 5, 11:00 am, AsmanCom wrote:
> Hi,
>
> I try to get the JQGrid Plugin (http://www.web2py.com/plugins/default/
> jq
THX, that was damn fast!
I´ll try it later and will let you know if it works.
Dieter Asman
On Jul 5, 2:00 pm, mdipierro wrote:
> I have fixed it an uploaded. Please give it a try.
>
> On 5 Lug, 04:07, AsmanCom wrote:
>
> > I´ve elready tried to change the controller/pl
You could have a look at this plugin for for Inline edit with JQGrid
and Web2py:
http://app.ebansoftware.net/editable_jqgrid/default/index
On 5 Jul., 21:25, Johann Spies wrote:
> I am a javascipt and jquery novice and would appreciate some
> information to help me understand how to use a jqgri
y.
Do you know how I can get this to work?
THX
Dieter Asman
On 5 Jul., 14:00, mdipierro wrote:
> I have fixed it an uploaded. Please give it a try.
>
> On 5 Lug, 04:07, AsmanCom wrote:
>
> > I´ve elready tried to change the controller/plugin_jqgrid.py, by
> > replacing
>
Could you advise me a Workaround for that?
THX
Dieter Asman
On 6 Jul., 18:16, mdipierro wrote:
> I see there is a problem. There is no mechanism to pass the database
> via ajax at this time.
>
> On 6 Lug, 10:39, AsmanCom wrote:
>
> > Hi,
>
> > i´ve tried it, but
an un-necessary complication to be implemented in general.
>
> Massimo
>
> On 6 Lug, 11:59, AsmanCom wrote:
>
> > Could you advise me a Workaround for that?
>
> > THX
>
> > Dieter Asman
>
> > On 6 Jul., 18:16, mdipierro wrote:
>
> > > I
Hi,
you have to press enter when you have finished your changes.
Dieter Asman
On 11 Jul., 22:45, Kenneth wrote:
> Hello,
>
> I´m trying to make a editable jqgrid or something like a editable
> jqgrid. It doesn´t have to be a jqgrid.
>
> I have downloaded the plugin from Eban Software but can´t
;
> Massimo
>
> On 6 Lug, 11:59, AsmanCom wrote:
>
> > Could you advise me a Workaround for that?
>
> > THX
>
> > Dieter Asman
>
> > On 6 Jul., 18:16, mdipierro wrote:
>
> > > I see there is a problem. There is no mechanism to pass the dat
Hi,
I would advise to integrate jquery.ui and the ThemeSwitcher widget
(http://docs.jquery.com/UI/Theming/ThemeSwitcher) to make the app
visual appealing vor novices.
THX
Dieter Asman
On Jul 9, 3:34 pm, mdipierro wrote:
> let's consider anewscaffolding app.
>
> What should be in it?
> What sho
llback dont work while downloading the
file...)
- The Download works and shows 100% when completed(but the while 1
loop, which calls the report_hook dont work at all! and i need it to
update the Progress bar... I think?)
+ I need to change the Progressbar callback source when updating DB
after do
)
Best regards,
Dieter Asman
- AsmanCom -
Germany
On 24 Feb., 18:17, Tiago Almeida wrote:
> > for quick development-shots, i need to execute my untouched(may i
> > could change "print" to "return") Python scripts(..with loops) in the
> > Controller.
&
h that output?)
Best regards,
Dieter Asman
- AsmanCom -
Germany
On 24 Feb., 23:09, Tiago Almeida wrote:
> This is nasty as hell but you can redirect stdout to a string. Execute your
> untouched scripts, all they print goes to the string and then, in the web2py
> controller return
ogressbar from my functions (1. donload
text file in %, 2. import text file line by line to the DB in %) to
show the Progress in browser window.
Best regards,
Dieter Asman
- AsmanCom -
Germany
On 24 Feb., 23:01, Dragonfyre13 wrote:
> So, let me make sure I understand this right, you want t
@Thadeus Burgess
If rendering the standard output from scripts is not natively
supported, there must be a better solution than changing the prog.
language.
a real-time logger or something like that.
Best regards,
Dieter Asman
- AsmanCom -
Germany
On 24 Feb., 23:14, Thadeus Burgess wrote
Hi,
any idea how to make the Ext JS Grids woking with WEB2PY?
http://www.extjs.com/deploy/dev/examples/#sample-3
In particular the RESTful Store:
http://www.extjs.com/deploy/dev/examples/restful/restful.html
I think it must be connected to CRUD somehow?
Any Examples to connect such JS Grids to t
ml service to feed the grid data instead.
>
> http://web2py.com/book/default/section/9/2?search=%40service.xmlhttp://www.extjs.com/deploy/dev/examples/grid/xml-grid.html
>
> On Mar 2, 7:35 am, AsmanCom wrote:
>
> > Hi,
>
> > any idea how to make the Ext JS Grids woking w
Hi,
I need some help with plugin_jqgrid:
What I basicaly want to do is steady refreshing the grid with on
loadComplete .trigger("reloadGrid"), how can i pass the var
server_time with the url:'%(callback)s' to the controllers/
plugin_jqgrid/data call?
I need this var in the controller to return da
Anyone? It´s only about passing the var with the URL
THX
Can I include the var server_time in the vars=dict somehow?
THX
to. For example:
> URL(vars=dict(server_time=request.now)) will be
> request.vars.server_time. Is that what you're asking?
>
> On Nov 7, 3:12 am, AsmanCom wrote:
>
> > Can I include the var server_time in the vars=dict somehow?
>
> > THX
>
>
Who can help me with this?
THX
On 8 Nov., 08:04, AsmanCom wrote:
> THX mr.freeze
>
> Yeah request.vars, but the vars=dict is already set in "callback =",
> how can I add the Javascript var to the vars=dict?
>
> On loadComplete: I set the server_time var("last
to. For example:
> URL(vars=dict(server_time=request.now)) will be
> request.vars.server_time. Is that what you're asking?
>
> On Nov 7, 3:12 am, AsmanCom wrote:
>
> > Can I include the var server_time in the vars=dict somehow?
>
> > THX
>
>
Is there no solution to my concerns?
It´s such a pity...
t;""
exposes services. for example:
http:///[app]/default/call/jsonrpc
decorate with @services.jsonrpc the functions to expose
supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv
"""
return dict(grid=plugin_live_grid(db.device))
_
THX
Dieter Asman
On 10 Nov., 15:37, mdipierro wrote:
> Sorry I did not help. I cannot help you because the code you have
> above is incomplete. It opens a """ but never closes so I not
> understand how callback is used. Anyway I assume in the view you have:
>
> {{callback = URL(r=request,c='plugin_jqgrid',f='data',
> vars=dict(tablename=table._tablename,
> columns=','.join(columns),
> fieldname=fieldname or '',
> fieldvalue=fieldvalue,
> ))}}
>
> var server_time="test"
>
> ... jQuery.getJSON('{{=callback}}
> &'server_time='+escape(server_time)) ...
>
> hope this helps.
>
> On Nov 10, 8:24 am, AsmanCom wrote:
>
> > Is there no solution to my concerns?
>
> > It´s such a pity...
>
>
t; replace
>
>
> jQuery(document).ready(function(server_time){jQuery("#%
> (id)s").jqGrid({
> url:'%(callback)s',
>
>
> with
>
>
> jQuery(document).ready(function(server_time){jQuery("#%
> (id)s").jqGrid({
> url:'
By the way, how can i set initially the "var server_time=null;" to a
python readble False?
THX
On 10 Nov., 16:55, mdipierro wrote:
> You need to install firebug and check in the console log what is going
> on.
>
> On Nov 10, 9:53 am, AsmanCom wrote:
>
> > tried
menull" seems wrong? what to do?
THX
On 10 Nov., 16:55, mdipierro wrote:
> You need to install firebug and check in the console log what is going
> on.
>
> On Nov 10, 9:53 am, AsmanCom wrote:
>
> > tried it like this:
>
> > app/models/plugin_jqgrid.py:
>
nd check in the console log what is going
> on.
>
> On Nov 10, 9:53 am, AsmanCom wrote:
>
> > tried it like this:
>
> > app/models/plugin_jqgrid.py:
>
> > var server_time=null;
> > jQuery(document).ready(function(server_time){jQuery("#%
> > (id)s&
I´ve got an Application wich makes (url)callbacks to my web2py app and
All these webhooks have a "Cookie:" header with a value identical to
the browser that caused the request to be initiated.
For for example it calls the web2py Controller with this "Cookie:"
header:
Cookie: session_id_myapp=127.0
BTW why does the callbacks with the cookie header not work with web2py
just like that? Is this some kind of Security Feature of web2py?
Thanks in advance.
Dieter Asman
On 11 Feb., 13:02, AsmanCom wrote:
> I´ve got an Application wich makes (url)callbacks to my web2py app and
> All
First things first, Thanks a bunch for your reply.
"Can you just read the cookie"
Yes: request.cookies
"and match it to a session?"
I would like to, but I do not know how?
"Do these callbacks occur quickly enough that the session has not
expired?"
Yes.
"the callback is not technically "logge
Does nobody know, how to query these two values by the given
session_id (session_id_myapp=127.0.0.1-2b77d424-4e72-4d3f-a0de-
badbcdbe6a30)?
1. is_logged_in (boolean)
2. username or user email (string)
I looked in the book, i´ve searched this group, i´ve searched the web,
but still can´t find any
/is_logged_in by session_id would be a
basic built in functionality...
THX
Dieter Asman
On 13 Feb., 15:54, Massimo Di Pierro
wrote:
> The session it is the name of the sessions file under app/sessions. It
> is a pickle. Try open it and see what is inside.
>
> On Feb 13, 6:43 am, Asm
Why have you chosen Tornado for this "comet sockets" experiment? it´s
Unix only, right?
I'm currently working on a quite similar comet sockets with web2py
Project,
but I attempt to implement this with hookbox.org which could also be
worth a look.
On 13 Feb., 22:41, Massimo Di Pierro
wrote:
> Ri
62 matches
Mail list logo