Re: [web2py] Mixing/supporting CMS with Web2py

2011-11-03 Thread Phyo Arkar
We really need a CMS/Blog that the developer really cares ., It have a lot of potential to become top CMS/Blog. Due to the fact of web2py's Single step deployment , many not-so-technical users will want to adopt it . If theres a stable , active CMS , developed using Web2py , it will change the fut

[web2py] Re: Missing my posts - Anyone else losing posts

2011-11-03 Thread BrendanC
Ignore my previous qn - they just showed up again - so it's probably some sort of refresh issue with my broswer settings.

[web2py] Missing my posts - Anyone else losing posts

2011-11-03 Thread BrendanC
I've posted 2 messages over the past few days - one of which had several replies - now I can't find any of these messages. Any Ideas what's happening here? TIA BrendanC

[web2py] Re: LDAP: Mapping additional AD fields to Auth_user

2011-11-03 Thread Omi Chiba
Um.. maybe I need to edit Auth class in tooks.py. I'm not sure. On Nov 3, 6:45 pm, Omi Chiba wrote: > In auth_user, I created additional field called 'office' by following > code > >  ## additonal fields > auth.settings.extra_fields['auth_user']= [ >   Field('office')] > > Now, I want to map the

[web2py] Re: ASK Web2py Groups: Clarification on decimal type field

2011-11-03 Thread Pystar
Another Question: what is the performance drawback in using IS_IN_DB() validator in a form? From what I understand, web2py checks if the query passes against the database before doing a database insert or any other action. I would like to know if there would be a performance degrade as the number o

[web2py] Re: ASK Web2py Groups: Clarification on decimal type field

2011-11-03 Thread Pystar
Thanks Max On Nov 4, 4:07 am, Massimo Di Pierro wrote: > I always use request.now.I think of utfnow as a utility in case there > ar multiple servers in different dimezones. > > On Nov 3, 9:46 pm, Pystar wrote: > > > > > > > > > I have another question, > > Whats the best way to get the time to u

[web2py] Re: lexical scanner

2011-11-03 Thread lucas
yes, working perfectly, beautiful. thank you much. lucas

[web2py] Re: lexical scanner

2011-11-03 Thread lucas
yes, working perfectly, beautiful. thank you much. lucas

Re: [web2py] Re: error when upgraded to v1.99

2011-11-03 Thread Richard Baron Penman
from trunk, now a different error: Traceback (most recent call last): File "/web2py/helpdesk/gluon/restricted.py", line 204, in restricted exec ccode in environment File "/web2py/helpdesk/applications/helpdesk/controllers/default.py:index", line 11, in File "applications/helpdesk/module

[web2py] Re: ASK Web2py Groups: Clarification on decimal type field

2011-11-03 Thread Massimo Di Pierro
I always use request.now.I think of utfnow as a utility in case there ar multiple servers in different dimezones. On Nov 3, 9:46 pm, Pystar wrote: > I have another question, > Whats the best way to get the time to use for a time stamp field in a > database insert? request.utcnow? I would like to

[web2py] Re: ASK Web2py Groups: Clarification on decimal type field

2011-11-03 Thread Massimo Di Pierro
n is the precision. It is important to know how many digits store else the db does not know how long the field should be. Are you going to handle more than one trillion? On Nov 3, 9:41 pm, Pystar wrote: > I would like some clarification on the Decimal type field in DAL. From > the book, in the co

Re: [web2py] sqlform.grid

2011-11-03 Thread Nik Go
If you wish to use the icons from the CSS templates just add: SPAN(_class='check icon') like this custom button: links = [lambda row: A(SPAN(_class='check icon') ,'Byte Me' ,_class='button' ,_title='Byte Me' ,_href=URL(args=["view", db.person, row.id]) )] Read the On Saturday, October 2

[web2py] Re: gae ReferenceProperty

2011-11-03 Thread howesc
is it even supported to just throw a semi-random type into the Field() call? i did this to use the geo point property type: from gluon.dal import SQLCustomType from google.appengine.ext.db import GeoPtProperty db._adapter.types['geopt'] = GeoPtProperty geo_point = SQLCustomType( # GAE GeoPt

[web2py] Re: ASK Web2py Groups: Clarification on decimal type field

2011-11-03 Thread Pystar
I have another question, Whats the best way to get the time to use for a time stamp field in a database insert? request.utcnow? I would like to do time comparisons between when a record was inserted into a database and the present time, so would request.utcnow suffice? and if it would, how do I get

[web2py] ASK Web2py Groups: Clarification on decimal type field

2011-11-03 Thread Pystar
I would like some clarification on the Decimal type field in DAL. From the book, in the complete signature for Decimal type is "decimal(n,m)" where; n -- total number of digits m -- total number of digits after the decimal point if I am to specify a decimal type field that has 4 digits after the de

Re: [web2py] Re: Custom search_widget SQLFORM.grid

2011-11-03 Thread Jim Steil
Thanks Massimo. I will do so tomorrow and send you the results. -Jim On 11/3/2011 8:00 PM, Massimo Di Pierro wrote: Please make sure you apply your change to the latest sqlhtml.py (I modified it this afternoon) and send me the whole modified file or a patch file. massimo On Nov 3, 4:26 p

Re: [web2py] Re: A SQLFORM.grid question

2011-11-03 Thread Mike Veltman
First thank you for the help, its really appreciated. Well, I create setup's for deployments of systems. :) My goal is: 1) To have a view that does not show the id's but the names of the joins 2) To be able to add a new record preferable with as defaults the same lvsize_id, and storagemap_id an

Re: [web2py] GAE & Python 2.7

2011-11-03 Thread Jonathan Lundell
On Nov 3, 2011, at 11:21 AM, howesc wrote: > i'm not smart enough to know the difference between CGI and WSGI, but i have > inserted custom WSGI middleware on GAE before web2py successfully. (perhaps > because web2py is using CGI it was harder than i expected) > > i am interested in 2.7 and co

[web2py] GAE & Python 2.7

2011-11-03 Thread Jonathan Lundell
There's now a new version of app.example.yaml in the trunk. If you're working with the Google App Engine, read on. GAE has been evolving a bit, and now supports Python 2.7 (vs 2.5). The new app.example.yaml is configured to use Python 2.7 and support concurrent requests. It can be modified in (

[web2py] Re: error when upgraded to v1.99

2011-11-03 Thread Massimo Di Pierro
Try the latest trunk. On Nov 3, 6:53 pm, Plumo wrote: > db.define_table('user_profile', >     Field('name'), >     Field('user', gae.UserProperty()), >     Field('email'), >     Field('active', 'boolean'), >     Field('role_worker', 'boolean'), >     Field('role_facilitator', 'boolean'), >     Fi

[web2py] Re: gae ReferenceProperty

2011-11-03 Thread Massimo Di Pierro
I need your help debugging this. In File "C:\iargu\gluon\dal.py", line 3464, in insert tmp = table._tableobj(**dfields) what's dfields when the error occurs? Massimo On Nov 3, 6:11 pm, Murray3 wrote: > sorry for delayed response, I now get the following when I used latest > dal.py > from

[web2py] plugin_wiki star rating widget

2011-11-03 Thread Christopher Kenley
Hello, Has anyone been able to successfully use this widget across multiple pages? I thought I had this running successfully when I had used it on one page, and it was successfully writing to the plugin_wiki_rating tables. However, after adding it to a second page (using a different record ID), th

[web2py] Re: Custom search_widget SQLFORM.grid

2011-11-03 Thread Massimo Di Pierro
Please make sure you apply your change to the latest sqlhtml.py (I modified it this afternoon) and send me the whole modified file or a patch file. massimo On Nov 3, 4:26 pm, Jim Steil wrote: > Ok - no replies so I went about this myself and am trying to come up > with a solution. > > First off,

[web2py] Re: auth_user represent

2011-11-03 Thread Anthony
On Thursday, November 3, 2011 8:31:10 PM UTC-4, Bianca Cadaveri wrote: > > Thank you very much to both of you. > > Is this way to write formats specific to Web2py : '%(first_name) % > (last_name) (%(id))' ? > > I have never met before "%" followed by "()". > > It means : write "first_name last_

[web2py] Re: auth_user represent

2011-11-03 Thread Bianca Cadaveri
Thank you very much to both of you. Is this way to write formats specific to Web2py : '%(first_name) % (last_name) (%(id))' ? I have never met before "%" followed by "()". It means : write "first_name last_name" corresponding to "id", right ? BC On 3 nov, 22:40, Anthony wrote: > If you specif

[web2py] Re: HTML Helpers - Position Dependency Gotcha

2011-11-03 Thread Anthony
This is not unique to web2py helpers or web2py in general. In Python, all positional arguments must come before any keyword arguments. On Thursday, November 3, 2011 6:05:03 PM UTC-4, BrendanC wrote: > > HTML Helpers - Position Dependency Gotcha > > I'm posting this as it might help others and it

[web2py] Re: error when upgraded to v1.99

2011-11-03 Thread Plumo
db.define_table('user_profile', Field('name'), Field('user', gae.UserProperty()), Field('email'), Field('active', 'boolean'), Field('role_worker', 'boolean'), Field('role_facilitator', 'boolean'), Field('role_admin', 'boolean'), )

[web2py] LDAP: Mapping additional AD fields to Auth_user

2011-11-03 Thread Omi Chiba
In auth_user, I created additional field called 'office' by following code ## additonal fields auth.settings.extra_fields['auth_user']= [ Field('office')] Now, I want to map the field value from AD. The field name is "initials". (I know it's strange but other fields was taken for other purpose

[web2py] Re: lexical scanner

2011-11-03 Thread Limedrop
if you use the web2py Storage class: context = Storage() context.auth = auth render(content=content, context=context) or in raw python: context = {} context['auth'] = auth render(content=content, context=context) On Nov 3, 8:43 pm, lucas wrote: > ok, something more complicated now. > > i hav

[web2py] Re: upload

2011-11-03 Thread lucas
ok, that is much clearer and makes total sense now. all the dots connected and i got it working great. yes, the manual is not entirely clear on that and i am sorry for not getting it. thank you so much for the detailed explanation. lucas

[web2py] Re: Typo in web2py Book - A GET requst to

2011-11-03 Thread António Ramos
Also This is done using URL *patters*. Em 3 de novembro de 2011 23:26, António Ramos escreveu: > Also in Restful Web Services > > the function expect the correct arguments (un-named *argeuments* parsed by > > > > Em 3 de novembro de 2011 23:23, António Ramos escreveu: > > Also >> >> In our e

[web2py] Re: Typo in web2py Book - A GET requst to

2011-11-03 Thread António Ramos
Also in Restful Web Services the function expect the correct arguments (un-named *argeuments* parsed by Em 3 de novembro de 2011 23:23, António Ramos escreveu: > Also > > In our example we used an action called api but this is not a *requriement > * > > Em 3 de novembro de 2011 23:21, António

[web2py] Re: Typo in web2py Book - A GET requst to

2011-11-03 Thread António Ramos
Also In our example we used an action called api but this is not a *requriement* Em 3 de novembro de 2011 23:21, António Ramos escreveu: > also in Restful Web Services > > indicates a request for *a* the information associated to person > > > > Em 3 de novembro de 2011 23:20, António Ramos e

[web2py] Re: Typo in web2py Book - A GET requst to

2011-11-03 Thread António Ramos
also in Restful Web Services indicates a request for *a* the information associated to person Em 3 de novembro de 2011 23:20, António Ramos escreveu: > Please check in > RESTful Web Services > > > A GET requst to >

[web2py] Typo in web2py Book - A GET requst to

2011-11-03 Thread António Ramos
Please check in RESTful Web Services A GET requst to

[web2py] Re: gae ReferenceProperty

2011-11-03 Thread Murray3
sorry for delayed response, I now get the following when I used latest dal.py from trunk: Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\ext \admin\__init__.py", line 295, in post exec(compiled_code, globals()) File "", line 21, in Fil

[web2py] Switch Edit and View link in grid using lambda

2011-11-03 Thread Omi Chiba
I have a 'Edit' link in my grid. Now I want to display 'View' if row.FFHZS > 0. Something like... links = [lambda row: A(if row.FFHZS>0:'Edit' else: 'View'),_href=URL("default","next", args=[row.FFDNO]))] Is any one know correct syntax ? Current controller ---

[web2py] HTML Helpers - Position Dependency Gotcha

2011-11-03 Thread BrendanC
HTML Helpers - Position Dependency Gotcha I'm posting this as it might help others and it took me a while to figure out the cause of some syntax errors I was getting with the HTML helpers. (In my case the problem surfaced in a much more complex statement so the underlying problem was somewhat h

[web2py] Re: What's the best way to paginate without SQLFORM.gird ?

2011-11-03 Thread pbreit
The book includes a simple example: http://web2py.com/book/default/chapter/12#Pagination

[web2py] Re: auth_user represent

2011-11-03 Thread Anthony
If you specifically want the username from the auth_user table: db(db.auth_user.id==id).select().first().username or the shortcut version: db.auth_user[id].username If you want to use the 'format' attribute of the auth_user table (which I think defaults to '%(first_name) %(last_name) (%(id))',

[web2py] Re: Query table A which value not exist in table B

2011-11-03 Thread Omi Chiba
Got it ! Thanks a lot!! My case was actually not belongs (not in) and I can do it by adding "~" at the beginning of query. def index(): requests = db()._select(db.PDTFF.FFDNO) query = db.SDTH2P01.H2DNO.belongs(requests) orders=db(~query).select(orderby=[db.SDTH2P01.H2JCSC,db.SDTH2P01.H2TR

Re: [web2py] Custom search_widget SQLFORM.grid

2011-11-03 Thread Jim Steil
Ok - no replies so I went about this myself and am trying to come up with a solution. First off, the reasons why the default search doesn't work for me. -As in the example below, sometimes I want to provide a custom drop-down for users to select from to limit the records displayed -Date values

[web2py] Re: SQLFORM boolean fields edit problem

2011-11-03 Thread Cliff
Carlos, In my simple case, the work around is easy. Just do a redirect back to the edit function. I wonder how it works if I hand build the form, or use CRUD... On Nov 3, 3:03 pm, Carlos wrote: > Hi, > > I have the exact same problem for uploads, check boxes and radio buttons > ... so far. > >

Re: [web2py] auth_user represent

2011-11-03 Thread Richard Vézina
Be aware that with 1.99.2 you need to write it like this : db.auth_user.id.represent = lambda id*, row*: db.auth_user(id).first_name if id!=None else 'N/A' Even if you don't need the row element... Richard On Thu, Nov 3, 2011 at 4:28 PM, Richard Vézina wrote: > Is this what you trying to do :

Re: [web2py] auth_user represent

2011-11-03 Thread Richard Vézina
Is this what you trying to do : db.auth_user.id.represent = lambda id: db.auth_user(id).first_name if id!=None else 'N/A' On Thu, Nov 3, 2011 at 4:08 PM, Bianca Cadaveri wrote: > Hello, > > I have a number representing somebody in auth_user. How can I get the > username back ? db.auth_user.id.re

[web2py] Re: BlockUI with web2py

2011-11-03 Thread brushek
Yes, I think I do that, thanks anyway :). On 3 Lis, 16:40, Anthony wrote: > Is the other stuff inside your queue callback running (e.g., the > show("blind"))? The whole thing is fairly complicated and a bit hard to > follow just by reading the code. Maybe try simplifying and build up from > somet

[web2py] auth_user represent

2011-11-03 Thread Bianca Cadaveri
Hello, I have a number representing somebody in auth_user. How can I get the username back ? db.auth_user.id.represent(this_number) does not work. Can somebody please help me ? Thank you, BC

Re: [web2py] Query table A which value not exist in table B

2011-11-03 Thread Richard Vézina
http://web2py.com/book/default/chapter/06?search=belong#belongs Richard On Thu, Nov 3, 2011 at 2:35 PM, Omi Chiba wrote: > I'm using DB2 and I can do the sql on AS400 like this. This is only > selecting the data from SDTH2P01 which value is not existing in PDTFF. > > SELECT * FROM SPDTHKU/SDTH2

[web2py] Re: SQLFORM boolean fields edit problem

2011-11-03 Thread Carlos
Hi, I have the exact same problem for uploads, check boxes and radio buttons ... so far. The way I solved (worked-around) it: ... after form.accepts ... eltable = form[0] prefix = nube.hwrapper_upload def getv(basename): retur

Re: [web2py] Re: A SQLFORM.grid question

2011-11-03 Thread Jim Steil
Mike If you post some of the details of your app I'm happy to look at it. I'm using SQLFORM.smartgrid extensively and it is working really well for me. -Jim On 11/2/2011 10:47 PM, Mike Veltman wrote: Now I am even more confused :) Sorry for being a nagging person. Why does SQLFO

Re: [web2py] Problem while Importing a csv file into the database

2011-11-03 Thread howesc
what is the error you are getting when you upload the data? note that web2py CSV import will be limited to what can be processed in 30 seconds, which limits you to around 100 rows. http://code.google.com/appengine/docs/python/tools/uploadingdata.html is my favorite. use the tool to generate th

[web2py] Re: Autocomplete in GAE

2011-11-03 Thread howesc
i suspect that auto-complete relies on the SQL LIKE statement which does not exist on GAE. in general GAE is not setup for queries that return lots of results (which is what a LIKE query tends to do) and so these are pretty hard to do there. yup, web2py has done a great job of database abstrac

[web2py] Query table A which value not exist in table B

2011-11-03 Thread Omi Chiba
I'm using DB2 and I can do the sql on AS400 like this. This is only selecting the data from SDTH2P01 which value is not existing in PDTFF. SELECT * FROM SPDTHKU/SDTH2P01 WHERE H2DNO NOT IN (SELECT FFDNO FROM SPDTHKU/PDTFF) Can we do it on web2py and how ? My contoller ---

Re: [web2py] GAE & Python 2.7

2011-11-03 Thread howesc
i'm not smart enough to know the difference between CGI and WSGI, but i have inserted custom WSGI middleware on GAE before web2py successfully. (perhaps because web2py is using CGI it was harder than i expected) i am interested in 2.7 and concurrent requests, though i don't know how to audit m

[web2py] Re: web2py with Eclipse

2011-11-03 Thread monotasker
Can you tell me what the current status of this is? I'm running release 1.99.2. I've placed the snippet you provide here in the top of my model file, but PyDev still doesn't recognize "current" or "session" or any of the gluon classes called in the model file. Is this just not yet implemented?

Re: [web2py] Mixing/supporting CMS with Web2py

2011-11-03 Thread Philip Kilner
Hi Carl, On 02/02/2011 12:46, Carl wrote: has anyone direct experience of using Wordpress, SquareSpace or similar solution alongside Web2py? These solutions appeal for their maturity and I'd like to use one to do the "donkey" work and fall back to Web2py to do my site's specific functionality.

[web2py] Re: Confused about hidden fields

2011-11-03 Thread Omi Chiba
Thanks David !! On Nov 3, 10:31 am, TheSweetlink wrote: > I am not certain that the case is the same but one thing I noticed > with SQLFORM.factory and hidden fields was that in order to pass a > hidden field from the SQLFORM.factory(...hidden=dict(Sir Robin: 'the > brave')) required that a Field

[web2py] Re: Mixing/supporting CMS with Web2py

2011-11-03 Thread Gour
On Wed, 2 Feb 2011 04:46:19 -0800 (PST) Carl wrote: Hello Carl, > has anyone direct experience of using Wordpress, SquareSpace or > similar solution alongside Web2py? > > These solutions appeal for their maturity and I'd like to use one to > do the "donkey" work and fall back to Web2py to do my

[web2py] Re: Reusing a prefilled, readonly SQLFORM.factory form?

2011-11-03 Thread pepper_bg
> I think he wants to re-use an existing factory form, so presumably couldn't > specify/change the default values after the form has already been created, > right? Correct. The code is more like: def frm(): form=build_form(readonly=True) return dict(form=form) build_form is defined elsewh

[web2py] Re: BlockUI with web2py

2011-11-03 Thread Anthony
Is the other stuff inside your queue callback running (e.g., the show("blind"))? The whole thing is fairly complicated and a bit hard to follow just by reading the code. Maybe try simplifying and build up from something more basic. On Thursday, November 3, 2011 11:11:03 AM UTC-4, brushek wrote:

[web2py] Re: What's the best way to paginate without SQLFORM.gird ?

2011-11-03 Thread Omi Chiba
SQLTABLE doesn't work without 'id' fields either but it worked !!! On Nov 3, 8:47 am, Omi Chiba wrote: > I will give a shot ! > > On Nov 2, 8:15 pm, Bruno Rocha wrote: > > > > > > > > > I use thishttp://dev.s-cubism.com/plugin_paginator > > > On Wed, Nov 2, 2011 at 9:17 PM, Omi Chiba wrote: > >

[web2py] Re: Confused about hidden fields

2011-11-03 Thread TheSweetlink
I am not certain that the case is the same but one thing I noticed with SQLFORM.factory and hidden fields was that in order to pass a hidden field from the SQLFORM.factory(...hidden=dict(Sir Robin: 'the brave')) required that a Field(...) be defined for it in the form definition. To make it hidden

[web2py] Re: upload

2011-11-03 Thread Anthony
As I mentioned, when you originally upload the file, web2py creates a new filename with the following form: mytable.myfield.[16-char-uuid].[base16-encoded 'myfile'].pdf. Notice that the table and field are included at the beginning of the filename. This filename is what gets stored in the uploa

[web2py] Re: Validators, when are they necessary ?

2011-11-03 Thread Archibald Linx
Thank you Anthony. Your answers are always very clear. Archibald On 2 nov, 22:15, Anthony wrote: > On Wednesday, November 2, 2011 4:46:45 PM UTC-4, Archibald Linx wrote: > > > Dear Web2py users, > > > I have a few questions about validators, especially : when are they > > necessary ? > > > For e

[web2py] Re: BlockUI with web2py

2011-11-03 Thread brushek
without load and without akcje.load i can see the blocking message, but there is no unblock if request.vars.a == 'restart': form=FORM(TR('Wybierz VPS',SELECT(ipvps,_name='ip', requires=IS_IN_SET(ipvps))), TR('',INPUT(_type='submit'), formstyle='ul'),_id='staty')

[web2py] Re: Reusing a prefilled, readonly SQLFORM.factory form?

2011-11-03 Thread Anthony
On Thursday, November 3, 2011 10:44:11 AM UTC-4, Massimo Di Pierro wrote: > > This should do it. > > form = SQLFORM.factory( Field('test',default='abc'), > Field('best',default='123'), readonly=True ) > I think he wants to re-use an existing factory form, so presumably couldn't specify/change t

[web2py] Re: gae ReferenceProperty

2011-11-03 Thread Massimo Di Pierro
I think I just fixed this in trunk, please check. On Nov 3, 9:34 am, Murray3 wrote: > I thought this would work with custom SQL > Using latest version of web2py in gae interactive console  I have for > testing purposes: > > from gluon.contrib.gql import gae > from gluon.dal import * > db = DAL('

[web2py] Re: A SQLFORM.grid question

2011-11-03 Thread apple
My mistake. I tend to redirect because I need some extra processing but grid does actually produce a basic edit form. If you do use the grid generated form then the submit should work as normal though. You should check where it is failing - e.g. when you press submit is it actually calling the cont

[web2py] Re: BlockUI with web2py

2011-11-03 Thread Anthony
Nothing jumps out. Doesn't look like a web2py issue, though. I think you'll just have to debug your JS code. Are you sure it's getting to the $.blockUI call (i.e., it's not returning in the preceding if clause)? On Thursday, November 3, 2011 9:54:30 AM UTC-4, brushek wrote: > > I have following

[web2py] Re: Reusing a prefilled, readonly SQLFORM.factory form?

2011-11-03 Thread Massimo Di Pierro
This should do it. form = SQLFORM.factory( Field('test',default='abc'), Field('best',default='123'), readonly=True ) On Nov 3, 2:17 am, pepper_bg wrote: > I have some functionality which generates a custom SQLFORM.factory > form (reads/writes to different tables, handles uploads, etc.). All > wor

[web2py] gae ReferenceProperty

2011-11-03 Thread Murray3
I thought this would work with custom SQL Using latest version of web2py in gae interactive console I have for testing purposes: from gluon.contrib.gql import gae from gluon.dal import * db = DAL('gae') db.define_table('Contact', Field('name', 'string')) db.define_table('PhoneNumb

[web2py] Re: BlockUI with web2py

2011-11-03 Thread brushek
I have following javascript function: (function($) { $.fn.pytacz = function(options) { var opts = $.extend({}, $.fn.pytacz.defaults, options); var details = $('.details'); opts.message_txt = opts.message_txt.replace('[msg]', opts.tekst_czekania); return this.submit(function(e)

[web2py] Re: What's the best way to paginate without SQLFORM.gird ?

2011-11-03 Thread Omi Chiba
I will give a shot ! On Nov 2, 8:15 pm, Bruno Rocha wrote: > I use thishttp://dev.s-cubism.com/plugin_paginator > > On Wed, Nov 2, 2011 at 9:17 PM, Omi Chiba wrote: > > SQLFORM.grid doesn't work on my table because there is no 'id' field > > but using primarykey instead. > > > I looked over the

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-03 Thread Omi Chiba
Kostas, I'm glad you did it ! I tried your code this morning but some how it does not function (second pull dropdown doesn't show when first one is changed :( Anyway, your code looks a little bit too advance for me so I will keep the current one. On Nov 3, 6:59 am, Kostas M wrote: > Omi, > >

[web2py] Re: image in form

2011-11-03 Thread Casey Schroeder
I understand the confusion now - yes, the field does not populate with the path because the local path is not important to web2py and the server path is not important to the regular user. But it should not error out on edit in any case. You can look at the code for the appadmin for a good way to

[web2py] Re: Update, create a log and show an extra field in SQLFORM

2011-11-03 Thread Cliff
Create an edit method in your controller. Before your call to form.accepts(), stash the old parent id somewhere. You can put it in the session or in a hidden field on the form. The session is better in my opinion because you don't need to validate it like you must validate something that comes i

[web2py] SQLFORM boolean fields edit problem

2011-11-03 Thread Cliff
SQLFORM appears to not correctly display the value of an updated boolean field after submission. Text fields correctly show updated values. In the toy application below, if you edit a dog record and update one of the boolean fields, you will find it unchanged after a submit. If you edit the text

[web2py] Re: AJAX custom code

2011-11-03 Thread Vineet
Thank you Anthony for your help. At last It worked. I could not figure-out what was wrong. I just deleted & re-typed the code, as it was a small piece of code. :) Vineet On Nov 3, 1:07 am, Anthony wrote: > The URL has to be in quotes. Also, looks like the second arg to ajax() > should be the 'na

[web2py] Update, create a log and show an extra field in SQLFORM

2011-11-03 Thread Vinicius Assef
Hi guys. I have this model: db.define_table('parent', Field('name', 'string'), format='%(name)') db.define_table('child', Field('name', 'string'), Field('relation', 'string'), Field('parent_id', db.parent), format='%(name)s %(relation)s') I need to develop a feature to change the chi

[web2py] Re: Confused about hidden fields

2011-11-03 Thread DenesL
On second thought it is not broken. request.vars are processed during form.accepts and form.vars will contain validated values afterwards. Since in this case field2 is not in request.vars, form.vars.field2 will be set to None. To set the value of field2, without it coming in thru request.vars (i.

[web2py] 500 Internal Server Error

2011-11-03 Thread thodoris
I have the following configuration auth.settings.allow_basic_login=True db.define_table( 'files', Field('file','upload')) @auth.requires_login() def upload(): form = crud.create(db.files) return dict(form=form) and i applied the PATCH mentioned here https://groups.google.com/forum/

[web2py] Re: upload

2011-11-03 Thread lucas
ok, still confused, exactly how do you pass the table and field to the response.download. i don't see it in the parameters. how does it extract the table and field from the data provided. from the request somehow? lucas

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-03 Thread Kostas M
Omi, Thanks for the hint! I managed to adjust your solution to my case. Also, I made some small recommendations, posted in web2pyslices. On Oct 18, 9:00 pm, Omi Chiba wrote: > Kostas, > > This could be your alternatives. > > slice:http://www.web2pyslices.com/slices/take_slice/144

[web2py] Re: SQLFORM.factory and Select functionalities

2011-11-03 Thread Kostas M
Omi, Thanks for the hint! I managed to adjust your solution to my case. Also, I made some small recommendations, posted in web2pyslices. On Oct 18, 9:00 pm, Omi Chiba wrote: > Kostas, > > This could be your alternatives. > > slice:http://www.web2pyslices.com/slices/take_slice/144

Re: [web2py] Problem while Importing a csv file into the database

2011-11-03 Thread Philip Kilner
Hi, On 03/11/2011 11:12, Saurabh S wrote: I will be deploying my code to GAEdatabase will be Google's datastore...is there any tool available to migrate a data template into GAE datastore ? I'm not familiar with tools for GAE, although a quick Google suggests that there are some, but I'd

[web2py] Saurabh S wants to chat

2011-11-03 Thread Saurabh S
--- Saurabh S wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-4d6c4a2f3-0feaf224bf-Oir9iudbwgceMu0GRBc4DXQyDAI You'll need

Re: [web2py] Problem while Importing a csv file into the database

2011-11-03 Thread Saurabh S
Thanks for replying philip, I will be deploying my code to GAEdatabase will be Google's datastore...is there any tool available to migrate a data template into GAE datastore ? On Thu, Nov 3, 2011 at 2:57 PM, Philip Kilner wrote: > Hi, > > > On 03/11/2011 09:01, Saurabh S wrote: > >> is the

[web2py] Re: upload

2011-11-03 Thread Anthony
On Thursday, November 3, 2011 3:27:35 AM UTC-4, lucas wrote: > > https://localhost/iquanta1/main/dl/myfile.pdf > I assume myfile.pdf is the *original* filename. That won't work. You have to give it the new filename, which includes the table name and field name of the upload field. You typically

[web2py] Re: image in form

2011-11-03 Thread peter
I do not use validators. Looking at it again I realise that this is not a bug, but how the sytem works. It does not show the 'image'. I think it would be nice if it did display the filename, but I realise this is a feature request. However now it shows the image it does not mislead one into thinki

Re: [web2py] Problem while Importing a csv file into the database

2011-11-03 Thread Philip Kilner
Hi, On 03/11/2011 09:01, Saurabh S wrote: is there any other solution for this ? please suggest as i am complately stuck up with this from last three daysplz suggest I can't help with web2py's CSV import function, but if you are stuck, why not try importing directly into the database?

Re: [web2py] Problem while Importing a csv file into the database

2011-11-03 Thread Saurabh S
Hi , thanks for the reply...i tried what you suggested but even that is not working out...is there any other solution for this ? please suggest as i am complately stuck up with this from last three daysplz suggest On Thu, Nov 3, 2011 at 12:08 PM, Johann Spies wrote: > On 2 November 2011 13:36

[web2py] Re: lexical scanner

2011-11-03 Thread lucas
ok, something more complicated now. i have reference to auth in my text, for cross checking with permissions and stuff in an if statement. how do i pass the auth pointer reference through to renderer so that when i use auth.* in the text it runs properly? thank you in advance. lucas

[web2py] Reusing a prefilled, readonly SQLFORM.factory form?

2011-11-03 Thread pepper_bg
I have some functionality which generates a custom SQLFORM.factory form (reads/writes to different tables, handles uploads, etc.). All works fine but somewhere down the flow I just wanted to display that same form prefilled and readonly. For whatever reason I can't prefill it and make it readonly a

[web2py] Re: upload

2011-11-03 Thread lucas
ok, hey anthony, having trouble, so i get your above explanation. here is my function: #undecorated def dl(): return response.download(request, db) the url would be something like: https://localhost/iquanta1/main/dl/myfile or https://localhost/iquanta1/main/dl/myfile.pdf both are giving

Re: [web2py] "Simple query" suffers nasty case of user error...

2011-11-03 Thread Bruno Rocha
I guess you need .grid (not smartgrid) todos = db.todo.complete==False grid=SQLFORM.grid(todos) -- Bruno Rocha [http://rochacbruno.com.br]

Re: [web2py] "Simple query" suffers nasty case of user error...

2011-11-03 Thread Bruno Rocha
On Thu, Nov 3, 2011 at 4:51 AM, Tom Campbell wrote: > ...but I'm too much of a noob to get it. > > # file models/db_todo.py > db.define_table('todo', >Field('summary','string',requires=IS_NOT_EMPTY()), >Field('priority',requires=IS_IN_SET([1,2,3,4,5])), >Field('complete','

[web2py] Re: image in form

2011-11-03 Thread Casey Schroeder
I have not experienced this before, and i have done similar things, but what do your validators look like? I.E. db.artists.image.requires=... On Oct 31, 10:30 pm, peter wrote: > I define a table > > db.define_table('artists', >                 Field('name'), >                 Field('image','uplo