[web2py:21273] Re: javascript drawing on background image

2009-05-06 Thread Jurgis
On 6 Geg, 14:48, Horst wrote: > I need to draw some markers interactively onto a background image on a > web site. > No sophistication - just a few dots of configurable pixel size, and > lines (via mouse dragging). just a hint you could use http://processingjs.org/ i saw it used for quite sim

[web2py:21285] Re: weird errors (probably with crud)

2009-05-06 Thread Jurgis
there seems to be crud+auth problem becauase if I not enable auth4crud # crud.settings.auth=auth # (optional) enforces authorization on crud things work nicely On 6 Geg, 16:12, Jurgis Pralgauskis wrote: > Hello, > > I renamed the application folder and start

[web2py:21313] Re: weird errors (probably with crud)

2009-05-06 Thread Jurgis
> Is this trunk or stable? which built date? Version 1.61.4 (2009-04-21 10:02:50) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegrou

[web2py:21315] Re: weird errors (probably with crud)

2009-05-06 Thread Jurgis
by the way, the registration confirmation email contains very incomplete link :/ Click on the link http://...verify_email/6a2cd595-17a1-4044-b5ef-1153e272f78e to verify your email On 6 Geg, 17:03, Jurgis wrote: > there seems to be crud+auth problem > > becauase if I not enable

[web2py:21319] Re: weird errors (probably with crud)

2009-05-06 Thread Jurgis
same if I ask gmail to "show original" (in sender outbox) http://files.akl.lt/users/jurgis/etc/web2py-verify_mail.txt Message-ID: <4a01d963.1c185e0a.16de.4...@mx.google.com> Date: Wed, 06 May 2009 11:39:31 -0700 (PDT) From: laisvosprogra...@gmail.com To: jurgis.pralgaus...@g

[web2py:21321] Re: weird errors (probably with crud)

2009-05-06 Thread Jurgis
one more thing -- I am using Ubuntu 9.04 which aliases python to python2.6, but now I started python2.5 web2py and the behaviour is the same... On 6 Geg, 21:03, Jurgis wrote: > > Is this trunk or stable? which built date? > > Version 1.61.4 (2009-04

[web2py:21418] Re: weird errors (probably with crud)

2009-05-07 Thread Jurgis
orces > but use in controller @auth.requires_login() > things work nicely so why is "crud.settings.auth = auth" needed? On May 6, 9:03 pm, Jurgis wrote: > > Is this trunk or stable? which built date? > > Version 1.61.4 (2009-04-21 10:02:50) --~--~-~--~~-

[web2py:21542] Re: How to dynamically add an HTML Helper instance to a crud form

2009-05-09 Thread Jurgis
maybe mydict['myINPUT'] = myINPUT would help before "return mydict" ? > In the View I want to code something like: > > > {{ =myINPUT }} > > > When I run it, I get a runtime error indicating that the form variable > does not exist. --~--~-~--~~~---~--~

[web2py:22060] Re: "many 2 many" widget for crud?

2009-05-18 Thread Jurgis
> http://www.vimeo.com/2720410 thats quite what I want, but there should be some extra table hiding somewhere? like friendship... (db.person.id==db.friendship.person)&(db.dog.id==db.friendship.dog) how should I get/query the list of the owners, if I have just their names in text field... there

[web2py:22843] Re: web2py and Debian

2009-05-28 Thread Jurgis
> I have packaged > web2py for debian and Ubuntu but don't have a registered status so > can't push them into official repositories. would be cool, if one could download them from some universe place -- maybe web2py.com for the start? :) --~--~-~--~~~---~--~~ You

[web2py] the best place to define custom widgets + extra info for widget

2010-06-26 Thread Jurgis Pralgauskis
? Thanks in advance :) -- Jurgis

[web2py] several crud forms in one page - problems with create/delete (but update is ok)

2010-08-02 Thread Jurgis Pralgauskis
Hi, I have topics, and each topic can have several examples. I try to put all crud forms for those examples in one page. the update works in them, but create and delete - don't :( though delete gives flash'es, that it did it's job... http://code.google.com/p/code-by-example/downloads/list there a

[web2py] is it possible to pass string "C++" as URL argument?

2010-08-05 Thread Jurgis Pralgauskis
Hello, when I construct URL like this URL(r=request, f='some_fun', args =['C++']) it converts 'C++' to '/C%2B%2B' (urllib.quote()) but page shows 'Invalid request' is it possible to have some general escape mechanizm, not to run into similar problems? Thanks in advance

[web2py] Re: is it possible to pass string "C++" as URL argument?

2010-08-14 Thread Jurgis Pralgauskis
On Aug 5, 3:41 pm, mdipierro wrote: > the problem is not the escaping (which is correct, + must be escaped) > the problem is thta web2py urls do not allow non-alphanumeric chars. but for arguments there seems to be no need for such restriction, or is there? maybe exception could be mate for "%

[web2py] book: typo + proposal

2010-08-14 Thread Jurgis Pralgauskis
1) at http://web2py.com/book/default/chapter/06#orderby,-groupby,-limitby,-distinct there's said: You can fetch the records sorted by name in reverse order (**notice the tilde**): >>> for row in db().select(db.person.ALL, orderby=db.person.name): print row.name , but I don't see the til

[web2py] recipy to migrate DB to GAE

2010-08-15 Thread Jurgis Pralgauskis
Hello, what's the best way to import my currently sqlite db to GAE? I think for each table: 1) export CSV on nonGAE, 2) then paste it into some form in GAE environment and adapt import_from_csv_file... ? but maybe there are other/better/ready recipies?

[web2py] Re: recipy to migrate DB to GAE

2010-08-17 Thread Jurgis Pralgauskis
not in "id". and I get TypeError: int() argument must be a string or a number, not 'NoneType' And I can't see the uploaded records in appadmin. screenshots, csv and bulkloader.yaml: http://ftp.akl.lt/users/jurgis/etc/db_migrate_web2py-gae/ By the way GAE has "ID&qu

[web2py] patch for auth to work with web2py_component ajaxing

2010-08-20 Thread Jurgis Pralgauskis
hello, by default, if some function needs auth, w2p gives back some text/html: When I work with components ajax way, I don't want my content parts to get mangled with it... 1) if I am not logged in, it would flood my tiny content area with big login page clone :) 2) in my case, I want my current c

[web2py] component_http_referer in request would be usefull for LOAD

2010-08-21 Thread Jurgis Pralgauskis
hello, when using LOAD, I can have several components on one page, but that is a bit of problem, when I need to know, which component called my new request.. in one case I just wanted to return the previous content (which I could get with http_referer in traditional way), but now request.env.http

[web2py] Re: patch for auth to work with web2py_component ajaxing

2010-08-21 Thread Jurgis Pralgauskis
our solution. > > On Aug 20, 3:36 pm, Jurgis Pralgauskis > wrote: > > > > > hello, by default, if some function needs auth, w2p gives back some > > text/html: > > When I work with components ajax way, I don't want my content parts to > > get mangled

[web2py] Re: patch for auth to work with web2py_component ajaxing

2010-08-21 Thread Jurgis Pralgauskis
raight solution but there are recipies: http://forum.jquery.com/topic/centering-an-image-in-the-viewport http://jsbin.com/ilafa/2/edit On Aug 21, 1:49 pm, Jurgis Pralgauskis wrote: > my patch would be litte simpler, > if response.flash would let have clickable links on it, > as now, if I

[web2py] Re: patch for auth to work with web2py_component ajaxing

2010-08-21 Thread Jurgis Pralgauskis
On Aug 21, 3:06 pm, Jurgis Pralgauskis wrote: > one more issue with flash and components, > if the page is scrolled down, user won't see the flash, as it pops > somewhere outside viewport. > > maybe we could ask jquery to pop it inside viewport (or maybe inside > the

[web2py] Re: patch for auth to work with web2py_component ajaxing

2010-08-21 Thread Jurgis Pralgauskis
by the way - FF 3.6.6 seems to ignore request.ajax as it behaves as if I haven't changed user() function at all ??? On Aug 20, 11:36 pm, Jurgis Pralgauskis wrote: > hello, by default, if some function needs auth, w2p gives back some > text/html: > When I work with components aja

[web2py] crud.archive issue with "unique"

2010-08-23 Thread Jurgis Pralgauskis
Hello, if I have "unique" field in mytable. How should crud.archive deal with it? I tried setting it after mytable and mytable_archive declaration, but then it doesn't apply it to mytable... db.mytable.name.unique=True ps.: in http://web2py.com/book/default/chapter/07#Record-Versioning and in

[web2py] importing modules from site-packages on GAE

2010-08-28 Thread Jurgis Pralgauskis
Hello, if I try to import module from web2py/site-packages in GAE env , it can't find it but if I copy it to web2py/ (root) , it is found ok.

[web2py] GAE: recipies to cope with long loading of pages?

2010-08-30 Thread Jurgis Pralgauskis
Hello, I have my beta app http://code.google.com/p/code-by-example/ on http://web2py-gae-test.appspot.com/ which seems to load quite slowly http://ftp.akl.lt/incoming/jurgio/gae-logs.png I also tried logs, http://ftp.akl.lt/incoming/jurgio/cbe.profile.txt but don't see big problems (though i use

[web2py] Re: have you used web2py for teaching?

2010-08-30 Thread Jurgis Pralgauskis
I haven't, but I am going to do it this year. one moment, which I remember from learning myself (PHP in earlier days), is that with web2py templates there is very low (not steep) curve to start simple webdev -- as you can intermix code and html easy. one could not now anything about controllers a

[web2py] Re: GAE: recipies to cope with long loading of pages?

2010-08-30 Thread Jurgis Pralgauskis
30, 10:01 am, mdipierro wrote: > > > > > It is slow. does it contain a lot of code or a lot of DB IO? I cannot > > say without looking at the code. > > > On Aug 30, 9:09 am, Jurgis Pralgauskis > > wrote: > > > > Hello, > > >

[web2py] Re: GAE: recipies to cope with long loading of pages?

2010-08-30 Thread Jurgis Pralgauskis
_id ] On 30 Rugp, 18:01, mdipierro wrote: > It is slow. does it contain a lot of code or a lot of DB IO? I cannot > say without looking at the code. > > On Aug 30, 9:09 am, Jurgis Pralgauskis > wrote: > > > > > Hello, > > > I have my beta apphttp://code.goo

[web2py] Re: GAE: recipies to cope with long loading of pages?

2010-08-30 Thread Jurgis Pralgauskis
I looked around once more http://www.web2py.com/book/default/chapter/04 and found that I could "cache view" * on rockets this seems to have some efect (but profiler won't show them, as it counts just the time it is executed - am I rigth?). * on dev_server this seems quite slower (probably becaus

[web2py] Re: Problems getting my web2py app working on GAE

2010-08-31 Thread Jurgis Pralgauskis
for debugging on GAE try: * with local dev_appserver.py - in terminal (for me even more convenient than tickets) - and also http://localhost:8080/_ah/admin - with real GAE: Dashboard: Main -> Logs for printlike debugging, gae would contaminate generated html. I just made myprint(*args, **kwarg

[web2py] Re: GAE: recipies to cope with long loading of pages?

2010-09-01 Thread Jurgis Pralgauskis
needed to: return response.render( '{{=view}}', dict(view = DIV(...) ) ) and call controller with ".load" extension My silly mistake was to write reQUEST.render at first xD On 31 Rugp, 09:07, Jurgis Pralgauskis wrote: > I looked around once morehttp://www.web2py.com/book/de

[web2py] gae memcace clear?

2010-09-01 Thread Jurgis Pralgauskis
Hello, in http://www.web2py.com/book/default/chapter/04 book says The time_expire can be set to 0 to force a cache refresh and to None to prevent the content from ever expiring. You can clear one or more cache variables with cache.ram.clear(regex='...') does this apply to gae memcache? if memca

[web2py] Re: Error in Rating Plugin????

2010-09-04 Thread Jurgis Pralgauskis
> Now why isn't the rating plugin showing for the other records on the > screen??? the problem for me was, that it's ID was the same for all rating DIVS just make it dependant on the given r.id in plugin code and should work ok sth like div_id = 'rating_%s_%s' % (tablename, record_id) http://cod

[web2py] list:int problems when import/export (esp GAE)

2010-09-06 Thread Jurgis Pralgauskis
hello, I am strugling with list:integer export/import after export->reimport I get web2py list:int ValueError: invalid literal for int() with base 10: '[1, 13, 14]' I use it in my computed field, which returns a list I tried "|%s|" % '|'.join( map(str, the_list) ) but it exports stuff neverthel

[web2py] Re: list:int problems when import/export (esp GAE)

2010-09-06 Thread Jurgis Pralgauskis
s is not > backward compatible because export/import of list: types was not > previously supported. > > On Sep 6, 4:38 am, Jurgis Pralgauskis > wrote: > > > > > > > > > hello, > > > I am strugling with list:integer export/import > > > afte

[web2py] hacking sf menu: how to make it ignore as menu items if they are in some

2010-09-08 Thread Jurgis Pralgauskis
If smb could take a look at https://web2py-gae-test.appspot.com/CodeByExample/default/topic_examples/115002/view I try to trick sf menu to pop up some info for me where user could set his preferences, or see the tree like stuff which involves LI's. but it hijacks my LI's and they become like me

[web2py] tables/selects caching in Storage (for GAE)

2010-09-18 Thread Jurgis Pralgauskis
Hello, I think I got a bit trapped by DAL in GAE :) maybe because of often used db.MyTable[i].somefield /default/topic_examples/27001/view 200 2721ms 5145cpu_ms 2906api_cpu_ms service.call#RPCs real time api time datastore_v3.Get62 712ms 516ms datastore_v3.RunQuery

[web2py] Re: gae memcace clear?

2010-09-18 Thread Jurgis Pralgauskis
would it be sound to use some cache_db instead of memcache in GAE then? For example if I render a CPU requiring view I want to cache, but I could clear it anytime I like. hm, or could there be a recipy to abandon current memcached object. this would need extra hash table: as if now probably is s

[web2py] Re: tables/selects caching in Storage (for GAE)

2010-09-18 Thread Jurgis Pralgauskis
thing like that is there: > > expiration=3600 # seconds > rows=db(...).select(...,cache=(cache.ram,expiration)) > > reset with > > rows=db(...).select(...,cache=(cache.ram,0)) > > On Sep 18, 5:27 pm, Jurgis Pralgauskis > wrote: > > > Hello, > > > I thi

[web2py] Re: gae memcace clear?

2010-09-22 Thread Jurgis Pralgauskis
>             session.flash += "Ram Cleared " >         if clear_disk: >             cache.disk.clear() >             session.flash += "Disk Cleared" > > On Sep 18, 6:45 pm, Jurgis Pralgauskis > wrote: > > > > > would it be sound to use some cache

[web2py] GAE appadmin weirdness

2010-09-25 Thread Jurgis Pralgauskis
hello I get the same problem for list:string or list:integer on GAE using version 1.85.3 note: I think now, that the way I defined requires here is not needed, but anyway the errorreporting should handle it more fluently :) if from appadmin I try to insert recrod with Field('changed_fields', 'l

[web2py] import_from_csv_file looses reference, if it references the record it belongs to

2010-09-25 Thread Jurgis Pralgauskis
Hello, I have Topics Tree like this db.define_table("Topics", Field("parent_id","reference Topics", label=T("Parent Topic"), #~ widget=my_hierarchical_options_widget, # probably overriden by requires requires=IS_EMPTY_OR(IS_IN_DB(db, 'Topics.id','Topics.n

[web2py] incorrect link path in GAE devserver terminal output

2010-09-25 Thread Jurgis Pralgauskis
http://localhost:8080/stats/ should probably be http://localhost:8080/_ah/stats/ in INFO 2010-09-25 19:01:17,653 recording.py:327] Saved; key: __appstats__:074600, part: 160 bytes, full: 454797 bytes, overhead: 0.084 + 0.415; link: http://localhost:8080/stats/details?time=1285441274663

[web2py] @auth.requires(request.client=='127.0.0.1') doesn't work

2010-09-25 Thread Jurgis Pralgauskis
hello, I followed the example from http://web2py.com/book/default/chapter/08#Decorators @auth.requires(auth.user_id==1 or request.client=='127.0.0.1') def function_six(): return 'you can read secret documents' but it doesn't work -- it asks to login anyway. and just in case I tested with pin

[web2py] Re: incorrect link path in GAE devserver terminal output

2010-09-26 Thread Jurgis Pralgauskis
not sure if this is web2py or gae dev_appserver 1.3.6, but I see this in terminal where I started dev_appserver after each request. On Sep 26, 2:41 am, mdipierro wrote: > where? that is what it is in web2py. > > On Sep 25, 2:22 pm, Jurgis Pralgauskis > wrote: > > > >

[web2py] using appstats: can't understand where .RunQuery occurs

2010-09-26 Thread Jurgis Pralgauskis
Hello, 1) let's say, I want to know, where tese 72 ms are spent. but the last path line shows to the "nonexisting line" "default.py:topic_examples:1659 ()" as default.py has only 1658 lines. how could I understand what it means? @459ms datastore_v3.RunQuery real=72ms api=0ms Request: Query], ..

[web2py] Re: tables/selects caching in Storage (for GAE)

2010-09-26 Thread Jurgis Pralgauskis
atastore.Next mean? On Sep 19, 1:32 am, mdipierro wrote: > Something like that is there: > > expiration=3600 # seconds > rows=db(...).select(...,cache=(cache.ram,expiration)) > > reset with > > rows=db(...).select(...,cache=(cache.ram,0)) > > On Sep 18, 5:27 pm, Jurgi

[web2py] appstats info on frontend pages?

2010-09-28 Thread Jurgis Pralgauskis
Hello, Is it possible to grab the stats for main request function and show them at the end of the page.. or maybe it would be possible via ajax at the end of page if not at the time of request processing. but how to ask gae nicely to give the stats of exactly this request?: - where to get the ke

[web2py] Error pages could show full ticket info at once via ajax

2010-09-28 Thread Jurgis Pralgauskis
Hello, it would probably be few lines of code to call web2py_content(ticket url) on error page, because when there are many errors while debugging - extra clicks get annoying...

[web2py] w2p on GAE complains: PropertyError: Invalid property name '' ??

2010-09-28 Thread Jurgis Pralgauskis
ms.order(order) File "/media/data/veikla/coding/google_appengine/google/appengine/ ext/db/__init__.py", line 2248, in order raise PropertyError('Invalid property name \'%s\'' % property) PropertyError: Invalid property name '' I even don't know which of properties has problems :( my clumsy model is here ctrl+F: "Examples" table ftp://ftp.akl.lt/users/jurgis/web2py/problems/db_snapshot.py

[web2py] Re: w2p on GAE complains: PropertyError: Invalid property name '' ??

2010-09-28 Thread Jurgis Pralgauskis
again I can worke-around with defining db.Examples.tpl_invalidator.requires=IS_EMPTY_OR(IS_IN_SET( [ item.id for item in db().select(db.Examples.ALL) ] ) ) but probably its ineficient or so On Sep 28, 5:10 pm, Jurgis Pralgauskis wrote: > any ideas? > nongae doesn't complain... >

[web2py] Re: please help us test new web site

2010-10-09 Thread Jurgis Pralgauskis
I liked orange collors more :) and the header is quite large to stay forever for my monintor -- there could be option, to make it scroll up. what is the idea of new logo? :) On 9 Spa, 23:07, mdipierro wrote: > New web2py layout: > >    http://web2py.com > > Thanks Bruno and Martin > > New dem

[web2py] deepcopy( storage ) problem

2010-10-09 Thread Jurgis Pralgauskis
Hello, from copy import deepcopy z = deepcopy( Storage( a=5, c=10) ) Traceback (most recent call last): File "storage_deepcopy.py", line 136, in z = deepcopy( x ) File "/usr/lib/python2.5/copy.py", line 181, in deepcopy rv = reductor(2) TypeError: 'NoneType' object is not callable

[web2py] Re: Packaging web2py for Debian

2010-10-15 Thread Jurgis Pralgauskis
Maybe You could use https://help.launchpad.net/Packaging/SourceBuilds/ if you'd create stable branch on bazar and add packaging recipy like https://code.edge.launchpad.net/~mdipierro/web2py/devel/+new-recipe from https://code.edge.launchpad.net/~mdipierro/web2py/devel (notice code.EDGE.launch...)

[web2py] Re: gae memcace clear?

2010-10-15 Thread Jurgis Pralgauskis
me_get( the_key ), cache_model=cache.ram ) def some_controller(): return sth_time_greedy() and if I need to refresh cached stuff, I do: session.cache_invalidate[the_key]=True On 22 sept., 13:18, Jurgis Pralgauskis wrote: > but as I understand GAE supports only memcache, and no cache.ram or

[web2py:15154] web2py for multi-admin/editors (educational environment)

2009-01-20 Thread Jurgis Pralgauskis
udent as I guess this could be done via T2/T3 but maybe there is some documentation on this -- multieditors/admins (as I didn't find) Thanks in advance -- Jurgis Pralgauskis Don't worry, be happy and make things better ;) --~--~-~--~~~---~--~~ You r

[web2py:15168] Re: web2py for multi-admin/editors (educational environment)

2009-01-20 Thread Jurgis Pralgauskis
ok, I could be a tester :) > I am currently moving some of the T2 functionality into web2py core. > If you want to waif for that (a couple of weeks), that will make it > easier. In fact, I may code this myself since it seems an excellent > idea. --~--~-~--~~~---~--~---

[web2py:16154] how to add text input with highlighting for python ?

2009-02-10 Thread Jurgis Pralgauskis
Hello, I figured out how to highlight the code, which I already have but how to have input box with html highlighting for python? Thanks in advance -- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visie

[web2py:16700] Re: web2py "AJAX" admin editor

2009-02-22 Thread Jurgis Pralgauskis
hings are infinite, the universe and human stupidity, and I'm >> not sure about the former."-Albert Einstein > > > > -- > "Only two things are infinite, the universe and human stupidity, and I'm not > sure about the former."-Albert Einstein > >

[web2py:17381] wsgihandler + apache modwsgi: writeaccess problems

2009-03-03 Thread Jurgis Pralgauskis
quite raw in sys-admin my config's are here ftp://files.akl.lt/users/jurgis/etc/ [Tue Mar 03 12:48:51 2009] [error] WARNING:root:no cache.disk [Tue Mar 03 12:48:51 2009] [error] ERROR:root:Traceback (most recent call last): [Tue Mar 03 12:48:51 2009] [error] File "/home/www/web2py/

[web2py:17568] defining tree structure model problem

2009-03-05 Thread Jurgis Pralgauskis
t create table, then alter it but I am too busy to experiment and too used to plain sql:\ Thanks in advance :) -- Jurgis Pralgauskis Don't worry, be happy and make things better ;) http://sagemath.visiems.lt --~--~-~--~~~---~--~~ You received this message b

[web2py:17920] Re: defining tree structure model problem

2009-03-12 Thread Jurgis Pralgauskis
d("parentID", "reference TreeStructure")) > > Massimo > > On Mar 5, 4:40 pm, DenesL wrote: >> db.define_table("TreeStructure", >>       SQLField("name", "string",notnull=True, default=None), >>       SQLField("

[web2py:17925] how to set which application is default?

2009-03-12 Thread Jurgis Pralgauskis
hello, now default app is welcome so http://mysite.net opens http://mysite.net/welcome/default/index where is the place to change this? thanks -- Jurgis Pralgauskis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[web2py:20430] problem with datetime type (misleading msg "SyntaxError: invalid table name")

2009-04-24 Thread Jurgis Pralgauskis
and don't get the error, if I do db.define_table("items", SQLField("progwww", "string", ), SQLField("importance", "integer"), SQLField("about", "text", ),

[web2py:20477] Re: problem with datetime type (misleading msg "SyntaxError: invalid table name")

2009-04-24 Thread Jurgis Pralgauskis
ind this in examples.. (again thanks in advance:) > On Apr 24, 9:53 am, Wes James wrote: >> On Fri, Apr 24, 2009 at 7:39 AM, Jurgis Pralgauskis >> >> wrote: >> >> > hello, >> >> >> >> >> >> > and don't ge

[web2py:21274] weird errors (probably with crud)

2009-05-06 Thread Jurgis Pralgauskis
r: 'NoneType' object has no attribute 'replace' after I surround the place of error with try/except print str(e), I get error again http://files.akl.lt/users/jurgis/etc/web2py-weirderror.html You can find the app (this is just first steps) for download http://files.akl.lt/users

[web2py:21628] how to add custom field to SQLFORM

2009-05-11 Thread Jurgis Pralgauskis
Hello, I want to use customised dropdown field in my app, but dont want to to duplicate the code.. my dropdown has the tree structure in it like in http://groups.google.com/group/web2py/browse_thread/thread/7091d1d67e28a914/c7df08450949c0e8 I found I could use form.components[0].append(myfiel

[web2py:21797] reusing table structure (extending)

2009-05-13 Thread Jurgis Pralgauskis
Hello, I want to achieve sth similar to http://sqlobject.org/Inheritance.html but probably simpler: my pattern in few apps is: I have some table, with info which can change freequently I want to have full history of it + some metadata: so I want 2 tables: 1) standart 2) history = standardt+[use

[web2py:21798] how to make CRUD select show foreign values?

2009-05-13 Thread Jurgis Pralgauskis
hello, now in table (select) view and record (reed) view only values from current table are shown but in record (update) view the foreign table values are in dropdown box I'd like to see theese foreign values in table (select) and record (reed) views... (automatically using crud) would it be

[web2py:22029] "many 2 many" widget for crud?

2009-05-17 Thread Jurgis Pralgauskis
Hello, I'm making an app, where "many 2 many" happens quite often: It's a list of programs (similar to apt database, but also for windows), and there fields: depends (on a set of other programs) env (some set of win/linux/mac) used_for (tags: math, education, geometry) tutorials (set of links)

[web2py:22963] extending profile with extra fields?

2009-05-31 Thread Jurgis Pralgauskis
Hello, I want persons while registering to enter more data, than default auth asks... what would be the best ways to "append" those fields to the profile (table called "persons" if I remember correctly)? probably I could do this dynamically, after the table "persons" is created importing auth...

[web2py] Re: SQLFORM grid shows reference id instead of name

2013-03-31 Thread Jurgis Pralgauskis
I made help'er function to generate representation def ref_repr(reffered_table): return lambda foreign_key, self: reffered_table[foreign_key].name so you can add representation this way: Even when using the following it does not show the country name. > Field('shipping_country','referenc

[web2py] hook to add record in referenced table from current record edit?

2013-04-01 Thread Jurgis Pralgauskis
Hi, Django has it this way ( via "+" ) https://docs.djangoproject.com/en/dev/_images/admin10.png it opens in popup windown and after adding, refreshes dropdown.. What's the best way to hook it in web2py (appadmin or any SQLFORM)? -- --- You received this message because you are subscribed to

[web2py] many2one (reference) vs one2many (list: reference)

2013-04-01 Thread Jurgis Pralgauskis
Hi, list:reference is more human understandable... and traditional reference - more geek understandable :) if I use list:reference - because multiselect dropdown is what I need/like, how can I change the representation in appadmin grid and dropdown widget to show name not ID? what can be

[web2py] applying _format explicitly: "%(field)s..." vs lambda?

2013-04-02 Thread Jurgis Pralgauskis
Hi, lets say I have: db.define_table('Person', Field('name', 'string'), format="%(name)s" # or could be # format=lambda self: self.name or "Anonymous" ) whats the best way to apply format if I don't know which way format was specified? for string: db.Shops._format % db.Perso

[web2py] grid with left join example causes err "keyword can't be an expression"

2013-04-05 Thread Jurgis Pralgauskis
local)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File "/home/jurgis/web2py/gluon/restricted.py", line 211, in restricted ccode = compile2(code, layer) File "/home/jurgis/web2py/gluon/restricted.py", line 194, in compile2 return compil

[web2py] Re: .sum() and .count() in grid?

2013-04-05 Thread Jurgis Pralgauskis
> > You'll better code a view and access it as a "fake table". > are there examplses of this? Is it possible to show virtual fields in grid (in appadmin they don't show up)? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscri

[web2py] Re: any good open courses with web2py?

2013-04-06 Thread Jurgis Pralgauskis
I enjoyed the style of http://killer-web-development.com/section/1/3 :) 2013 m. balandis 4 d., ketvirtadienis 16:37:15 UTC+3, jjg0 rašė: > > Are there any good self paced learning courses on webdev with web2py? > > So far I am enjoying learning how to make websites with web2py. I don't > mind

[web2py] representing nested subqueries results in one page (grid)

2013-04-08 Thread Jurgis Pralgauskis
Hi, can this be accomplished with some grid? http://i.stack.imgur.com/Eirfv.png [image: http://i.stack.imgur.com/Eirfv.png] I thougth over a bit: a) with grid - I can construct sequence of joins-- just the parents (Author/Book/Story..) would be repeated for each line (and then might be hidden

[web2py] Re: representing nested subqueries results in one page (grid)

2013-04-08 Thread Jurgis Pralgauskis
/SQLFORM>.grid(db.grandparent, links=[dict(header='children', body=lambda row: get_children_grid(db.grandparent, row))]) if query else None but then I'd like to get rid of all the headers/export options... 2013 m. balandis 8 d., pirmadienis 17:21:35 UTC+3, Jurgis Pralgauskis r

[web2py] Re: representing nested subqueries results in one page (grid)

2013-04-08 Thread Jurgis Pralgauskis
and still would like to be able to load it more interactivelly with smartgird. now if I try smartgrid SQLFORM .smartgrid(db.grandparent, linked_tables=['parent', 'child'], links=[dict(header='children', body=lambda row: get_

[web2py] Re: representing nested subqueries results in one page (grid)

2013-04-08 Thread Jurgis Pralgauskis
> > grid and smartgrid are not the best way to achieve what you are trying to > do. Well, this is really a tree structure, but grid gives me rough & easy way to achieve this :) http://galvosukykla.lt/failai//tmp/nested_tables_grid.png For my app this kind of view is OK for workflow... ***

[web2py] Re: Tree view, Rendering

2013-04-08 Thread Jurgis Pralgauskis
I stumbled upon this post as I am having a bit similar issue but I try to represent stuf with nested-grid (if can call so) https://groups.google.com/forum/?fromgroups=#!topic/web2py/fmyLPCsaoIo maybe You'll have suggestions from your experience (better post in my thread, Thanks : ) 2012 m. bala

[web2py] Re: hook to add record in referenced table from current record edit?

2013-04-14 Thread Jurgis Pralgauskis
ril 1, 2013 11:28:46 AM UTC+2, Jurgis Pralgauskis wrote: >> >> >> Hi, Django has it this way ( via "+" ) >> https://docs.djangoproject.com/en/dev/_images/admin10.png >> it opens in popup windown and after adding, refreshes dropdown.. >>

[web2py] Re: representing nested subqueries results in one page (grid)

2013-04-14 Thread Jurgis Pralgauskis
After some experiments I settled with simple grid ftp://ftp.akl.lt/users/jurgis/web2py/images/grid_for_nested_tables.png You can also see 4 extra headers which mean tables, that are nested. I used jQuery to make repeating table-rows invisible and incorporate extra headers but this could be

[web2py] Re: Nested table-queries

2013-04-14 Thread Jurgis Pralgauskis
I had some simiar sounding issues + some solution https://groups.google.com/forum/?fromgroups=#!topic/web2py/fmyLPCsaoIo but now I don't have time to examine your problem... 2013 m. balandis 14 d., sekmadienis 19:47:46 UTC+3, D. rašė: > > Dear Community, > > I just started with web2py and ran in

[web2py] can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-14 Thread Jurgis Pralgauskis
Hi, you can check the issue here https://jurgis.pythonanywhere.com/apskaitele/default/create_product/ press the "*+*" alongside "Category Id", which should show a dialog, which was loaded directly but with ajax_trap Submit does not react anyhow... - where's the rub? If I load it with aja

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-14 Thread Jurgis Pralgauskis
create product > form DOM. > > Anthony > > > On Sunday, April 14, 2013 6:56:44 PM UTC-4, Jurgis Pralgauskis wrote: >> >> Hi, >> >> you can check the issue here >> >> https://jurgis.pythonanywhere.**com/apskaitele/default/create_**product/<http

[web2py] Lazy_LOAD (with trigger binding)?

2013-04-15 Thread Jurgis Pralgauskis
Hi, in some cases it would be nice to have ajax LOAD on trigger/event instead of onload... just adding some trigger_init_js parameter/code ... which binds web2py_component calling to the event. before doing it myselft, wanted to ask, maybe it is already done -- Jurgis Pralgauskis tel: 8-616

[web2py] Re: new feature in trunk, for teachers mostly

2012-12-22 Thread Jurgis Pralgauskis
How can I setup EMAIL_SERVER to use gmail? default is: EMAIL_SERVER = 'localhost' and what is the meaning of EMAIL_LOGIN = None ? Thanks in advance :) 2012 m. kovas 27 d., antradienis 06:32:31 UTC+3, Massimo Di Pierro rašė: > > edit applications/admin/models/0.py and set > > MULTI_USER_MODE =

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-15 Thread Jurgis Pralgauskis
The forms are nested in the source code (presumably your LOAD is inserted > within the body of the main form). Looks like jQuery UI moves the inner > form to a different part of the DOM, but notice that the re-located form > DOM no longer includes a element. Because of that, the > web2py_trap_form

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-15 Thread Jurgis Pralgauskis
> The forms are nested in the source code (presumably your LOAD is inserted >>> within the body of the main form). Looks like jQuery UI moves the inner >>> form to a different part of the DOM, but notice that the re-located form >>> DOM no longer includes a element. Because of that, the >>> web2py

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-15 Thread Jurgis Pralgauskis
group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Jurgis Pralgauskis tel: 8-616 77613; Don't worry, be happy and make things better ;) http://galvosukykla.lt -- --

Re: [web2py] Re: Nested table-queries

2013-04-15 Thread Jurgis Pralgauskis
c, visit > https://groups.google.com/d/topic/web2py/o6_wQZ_HBgM/unsubscribe?hl=en. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- Jurgis

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-15 Thread Jurgis Pralgauskis
> The problem may be related to the interaction between jQuery UI .dialog() > and the web2py component (I don't know enough about jQuery UI dialog to > track it down, though). seems not the case, I made more experiments You can customize the parameters *ajax* and *jqueryUIdialog* lets say:

[web2py] Multiple/Nested tables in SQLFORM.factory (with same fieldnames)?

2013-04-15 Thread Jurgis Pralgauskis
book has exapmple "One form for multiple tables" http://web2py.com/books/default/chapter/29/7#One-form-for-multiple-tables But also states: This only works when the tables don't have field names in common. Can this be overcome with easy hooks? -- --- You received this message because you a

[web2py] Re: Multiple/Nested tables in SQLFORM.factory (with same fieldnames)?

2013-04-15 Thread Jurgis Pralgauskis
The id's in form have table names as well... maybe some proxy, which would prepend table names to field _name, and on submit, group fields by tables and strip table names, before processing each table individually? 2013 m. balandis 16 d., antradienis 03:02:42 UTC+3, Jurgis Pralgauskis

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-15 Thread Jurgis Pralgauskis
PLEASE ignore previous message (code was still inconsistent, but UI is not the cause of problem) the cause was that the "+" button had a class "w2p_trap" (copied from grid without suspicion that class name can have effect..) but it caused the mystic happen :)... -- --- You received this me

Re: [web2py] Re: can't submit form: when LOAD'ed(...., ajax=False, ajax_trap=True)

2013-04-15 Thread Jurgis Pralgauskis
Loading via ajax now works with dialog and without it :) https://jurgis.pythonanywhere.com/apskaitele/default/create_product?ajax=1&jqueryUIdialog=1 https://jurgis.pythonanywhere.com/apskaitele/default/create_product?ajax=1&jqueryUIdialog=0 -- --- You received this message because you are subsc

  1   2   >