[web2py] Stupid translation question

2010-01-28 Thread weheh
I haven't really worked with translation, yet. But I'm going to be getting into it in a big way. I have db.define_table('content',Field('title'),Field('body')) I want to enter title and body in English, but then translate to other languages. Let's say I do this: rows=db(db.content.id>0).select()

[web2py] input title attribute

2010-01-28 Thread vihang
Any idea how I can access or add 'title' attribute for input elements? Cannot see it anywhere in the html.py. 'title' is used for tooltips text. Thanks -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...

[web2py] wmd

2010-01-28 Thread Johann Spies
Thadeus mentioned that he used WMD on his blog. I have tried to get it working by putting the following in layout.hml: // to set WMD's options programatically, define a "wmd_options" object with whatever settings // you want to override. Here are the defaults: wmd_options = { // format

Re: [web2py] Postgresql interface buggy

2010-01-28 Thread Johann Spies
On 28 January 2010 00:15, Thadeus Burgess wrote: > This is most likely a bug, would you be willing to provide more > information on the matter? Example. I have changed the type of a field from string (1024) to 'text'. > > For simplicities sake, drop your tables with the DAL by doing > > db.table

[web2py] state of documentation: why pdf?

2010-01-28 Thread pistacchio
hi to all, after a long session of web2py coding, i feel now a bit frustrated by the documentation. i don't think that .pdf is the best format for documenting an opensource project. every time you need to look up something you have to search the whole document for a keyword and read through the fo

[web2py] Translations stopped working in 1.74.8

2010-01-28 Thread ls1
Hello, I recently upgraded web2py from 1.62.2 to 1.74.8 and have following problem. The applications (even 'welcome' which comes with web2py) are not translated according to web browser language preferences. If I have set language preferences in web browser like: 'pl','en' -> I got all messages

[web2py] Re: wmd

2010-01-28 Thread selecta
i showed in a slice that using a wysiwyg editor for markup is possible, why not use that instead of wysiwym On Jan 28, 9:52 am, Johann Spies wrote: > Thadeus mentioned that he used WMD on his blog. > > I have tried to get it working by putting the following in layout.hml: > > >   // to set WMD's

[web2py] Using AS in DAL

2010-01-28 Thread Khaled ElAdawy
I just want to map this simple query to DAL syntax: "SELECT field_name FROM table_name AS my_name" Regards, -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this g

Re: [web2py] input title attribute

2010-01-28 Thread tiago almeida
Have you tried using the optional parameter _title when building your INPUT object? INPUT( ..., _title="my Title", ...) --- On Thu, Jan 28, 2010 at 8:33 AM, vihang wrote: > Any idea how I can access or add 'title' attribute for input elements? > Cannot see it anywhere in the html.py. > > 'titl

[web2py] Re: state of documentation: why pdf?

2010-01-28 Thread Richard
I totally agree - the manual is a great resource but the PDF format makes it hard to traverse and doesn't keep up with new features. Django docs are excellent. This was brought up previously and the main obstacle (IIRC) is Massimo needs publications to justify working on web2py for his university.

[web2py] Couldn't we just ahve a / after everything address?

2010-01-28 Thread Jason Brower
I wonder if we could have the server always redirect to a / after all address. This makes it so our extra values can always work without having to use a long URL(bla) string. Having it different all the time can be a bit annoying. There may be better examples. :) So: www.jason.com/default/part wou

[web2py] Mobile devices + web2py

2010-01-28 Thread tiago almeida
Hello, does web2py have any mechanism for dealing with mobile devices? I'm talking about *determining if the user is on a mobile device* so that pages can be tailored for those screens. I've searched in the book and in web2pyslices and don't see anything like that. Thanks a lot in advance, Tiago

[web2py] dynamic content with jquery trigger/bind?

2010-01-28 Thread selecta
Does anybody have some experiences with creating dynamic content with jquery? I know the signal/slot system from qt and I have the feeling that trigger/bind from jquery can do the same thing in web2py My idea is to have e.g. a list view (controller list) and a form (controller form). Both are load

[web2py] get or insert shortcut

2010-01-28 Thread Richard
I want to get the ID of a record with certain fields, and create it if not already existing. Is there a shortcut for this common operation? In Django it is called "get_or_create()" Also, is there a shortcut for update_or_create()? Thanks, Richard -- You received this message because you are sub

[web2py] Re: state of documentation: why pdf?

2010-01-28 Thread pistacchio
On Jan 28, 12:48 pm, Richard wrote: > This was brought up previously and the main obstacle (IIRC) is Massimo > needs publications to justify working on web2py for his university. > Hopefully a compromise can be reached. if this is the reason (and it is indeed a valid one), than nobody would ke

[web2py] Re: validator that creates select with options from list of tuples?

2010-01-28 Thread selecta
ok one more improvement but then it works perfectly if theset and len(theset[0])==2 and (isinstance(theset[0], list) or isinstance(theset[0], tuple)): should be if theset and (isinstance(theset[0], list) or isinstance(theset[0], tuple)) and len(theset[0])==2: On Jan 27, 2:25 am, selecta wrote:

[web2py] Re: Custom form doesn't submit

2010-01-28 Thread Adi
Update: I think I found a web2py bug. form.custom.inpval.filename is generating bad html code. The first option label of the html is this: JokerRiddlerTwoface"> Joker RiddlerTwoface Basically the first has nested inside itself what should be the actual code. If I remove this in Firebug, the f

[web2py] Re: input title attribute

2010-01-28 Thread vihang
I am building the form directly from SQLFORM. But I tried many combinations using form.element and accessing the form array directly, but does not work. Supposedly 'title' is not there in the input helper (html.py) on the first place. On Jan 28, 4:37 pm, tiago almeida wrote: > Have you tried usin

Re: [web2py] Two domains, two web2py instances, two apps, same database

2010-01-28 Thread Alexandre Andrade
I think your proposed setup is good, with two virtual hosts. I just recomend append "migrate=false" to tables that appear in example.com(accounts, or auth_user) Could be also just apps in one installation of web2py, if you adjust one of your virtual hosts. 2010/1/28 Thadeus Burgess > Here ar

Re: [web2py] Stupid translation question

2010-01-28 Thread Alexandre Andrade
everything is passed by T('anything') go to languages/my_ln.py (like en_us.py). So you have to manually translate the strings on that file. 2010/1/28 weheh > I haven't really worked with translation, yet. But I'm going to be > getting into it in a big way. I have > > db.define_table('content'

[web2py] Re: bug in SQLFORM.factory?

2010-01-28 Thread mdipierro
Let me try reproduce this. On Jan 28, 1:06 am, Frederik Wagner wrote: > Hi, > > both version do save a None (actually all form.accepts, FORM.accepts, > SQLFORM.accepts do). > > Wouldn't be the correct behavior to consistently and always convert a > False value to 'F'? Am I missing something? > >

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread mdipierro
form = crud.update(db.person, request.args(0), ...) this will do an update if you have http://.../action/[id] and a create if http://.../action On Jan 28, 1:53 am, weheh wrote: > changing subject line -- You received this message because you are subscribed to the Google Groups "web2py-users"

[web2py] Re: Postgresql interface buggy

2010-01-28 Thread mdipierro
I will give this a try. This type of conversion should work unless there is a problem with transactions that holds it up and timesout. On Jan 28, 3:02 am, Johann Spies wrote: > On 28 January 2010 00:15, Thadeus Burgess wrote: > > > This is most likely a bug, would you be willing to provide more

[web2py] Re: Translations stopped working in 1.74.8

2010-01-28 Thread mdipierro
In which language is your app written in (pl, en, it)? Do you have a: T.current_language=['en'] T.force(request.env.http_accept_language) in your code? We did change the behavior of languages at some point from no default to default to english (we had a long discussions about this here). This mea

[web2py] Re: Using AS in DAL

2010-01-28 Thread mdipierro
the DAL allows you to use AS only for the purpose of renaming tables in left joins, not for the purpose or renaming field names. The reason it does not is that it would introduce a lot of complexity but not necessarily provide a useful functionality. The new DAL will have the ability to do he re-na

[web2py] Re: Mobile devices + web2py

2010-01-28 Thread mdipierro
http://www.web2py.com/examples/static/mobile_device_detect.py On Jan 28, 6:01 am, tiago almeida wrote: > Hello, > does web2py have any mechanism for dealing with mobile devices? I'm talking > about *determining if the user is on a mobile device* so that pages can be > tailored for those screens.

[web2py] Re: dynamic content with jquery trigger/bind?

2010-01-28 Thread mdipierro
Yes. I have not tried it but something like this: #IN default.py def index(): return dict() def a_form(): if request.env.request_method=='POST': response.headers['web2py-component-command'] = \ 'web2py_ajax_page("GET","%s","","a_list")' \ % URL(r=request,f='a_list')

Re: [web2py] Re: Mobile devices + web2py

2010-01-28 Thread tiago almeida
Great! I missed that one. Thank you very much, Tiago - On Thu, Jan 28, 2010 at 3:15 PM, mdipierro wrote: > http://www.web2py.com/examples/static/mobile_device_detect.py > > On Jan 28, 6:01 am, tiago almeida wrote: > > Hello, > > does web2py have any mechanism for dealing with mobile devices

[web2py] Re: state of documentation: why pdf?

2010-01-28 Thread mdipierro
In the Django world there are books (for sale) and there are other forms of documentations (html, etc). Nobody prevents you to write any documentation you like. My job is write the book and I will concentrate on it. That is how can justify the time I spend on web2py. Massimo On Jan 28, 6:49 am,

[web2py] Re: validator that creates select with options from list of tuples?

2010-01-28 Thread mdipierro
Could you please email this to me? The email reader messes up the indentation. Thank you. P.S No problem with the name. I have been called Mr.Di which is worse. ;-) On Jan 26, 7:20 pm, selecta wrote: > IGNORE THE POST ABOVE > NOW TRULY SOLVED > > The problem with the post above was that the vali

[web2py] Re: Custom form doesn't submit

2010-01-28 Thread mdipierro
This is not a bug. Somehow your code is passing helpers instead of a value. This is the wrong line: SELECT(form.custom.inpval.filename,) The arguments of select should be option items. They cannot be custom widgets. On Jan 28, 7:08 am, Adi wrote: > Update: I think I found a web2py bug. > >

[web2py] Re: input title attribute

2010-01-28 Thread mdipierro
form.element(_id='the_id_of_the_field')['_title']='the title of the field' This works. attributes must start with _. html.py is transparent to them. On Jan 28, 7:28 am, vihang wrote: > I am building the form directly from SQLFORM. But I tried many > combinations using form.element and accessin

[web2py] Re: Using AS in DAL

2010-01-28 Thread Khaled ElAdawy
I need it to retrieve fields from the database dynamically according to the current language, Please refer to the example below: MODEL: .. Field('description_en', 'string', label=str(T('Image Description'))+" "+str(T('EN')), requires=[IS_NOT_EMPTY(), IS_LENGTH(maxsize=250, minsize=0)]

[web2py] Re: Using AS in DAL

2010-01-28 Thread mdipierro
I see. eval is dangerous. I would suggest: description = 'description_'+lang records = db(db.image.project_id==project_id).select(db.image [description]) ... return dict(...,description=description,...) VIEW: .. {{for record in records:}} {{=record[description]}} {{pass}} .. On Jan 28, 9

Re: [web2py] Re: db.export_to_csv_file and Carriage Return

2010-01-28 Thread Thadeus Burgess
This is an issue with how different operating systems have different methods for representing newline and as avid python developers we should all know this :) -Thadeus On Wed, Jan 27, 2010 at 11:50 PM, mdipierro wrote: > I just run the test and you are right. It does not work. > > I also che

[web2py] Re: db.export_to_csv_file and Carriage Return

2010-01-28 Thread mdipierro
than the issue is how we open the file, not how we parse it with csv. On Jan 28, 10:35 am, Thadeus Burgess wrote: > This is an issue with how different operating systems have different > methods for representing newline and as avid python developers we > should all know this :) > > -Thadeus > > O

Re: [web2py] Re: wmd

2010-01-28 Thread Thadeus Burgess
Take a look at http://code.google.com/p/blogitizor/source/browse/src/controllers/admin.py line 280 starts the controller. note lines 293-297 - setting wmd defaults Look at http://code.google.com/p/blogitizor/source/browse/src/views/admin/create.html note lines 191-193 - sets wmd options 331 -

[web2py] Re: state of documentation: why pdf?

2010-01-28 Thread Mengu
massimo, so, are we able to write a documentation on web2py? On Jan 28, 5:30 pm, mdipierro wrote: > In the Django world there are books (for sale) and there are other > forms of documentations (html, etc). > Nobody prevents you to write any documentation you like. > > My job is write the book an

Re: [web2py] Re: Mobile devices + web2py

2010-01-28 Thread Thadeus Burgess
wow Massimo where did that one creep out of the depths from! Lol I never knew :) -Thadeus On Thu, Jan 28, 2010 at 9:27 AM, tiago almeida wrote: > Great! I missed that one. > > Thank you very much, > Tiago > - > On Thu, Jan 28, 2010 at 3:15 PM, mdipierro wrote: >> >> http://www.web2py.c

[web2py] format zero IS_IN_DB

2010-01-28 Thread DenesL
Back in Jan.2/10 the default for zero was changed to '' http://groups.google.com/group/web2py/msg/684a2374e7379861 Consider: db.define_table('person',Field('name',unique=True), format='%(name)s') db.define_table('dog',Field('name',unique=True),Field ('owner',db.person), format='%(name)s') will g

[web2py] Links and ajax

2010-01-28 Thread Jose
I'm trying to change a search form that uses ajax function. Simplifying is a form with a dropbox and a button. What I want is instead of displaying the dropbox is showing a series of links. The problem is that as from the link I call the ajax function (...). I currently have the following (works

Re: [web2py] format zero IS_IN_DB

2010-01-28 Thread Thadeus Burgess
http://groups.google.com/group/web2py/browse_thread/thread/e0ed90f8e72960f6 Please follow the above thread. Massimo said he was thinking about how to procede with the matter. -Thadeus On Thu, Jan 28, 2010 at 11:05 AM, DenesL wrote: > > Back in Jan.2/10 the default for zero was changed to

[web2py] New site in web2py

2010-01-28 Thread Leandro - ProfessionalIT
Friends, The new site in web2py made by my company: ProfessionalIT. KZero Consultoria: http://www.kzeroconsultoria.com.br -- Leandro. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegr

[web2py] Re: New site in web2py

2010-01-28 Thread pistacchio
Gratz :) Looks good to me On Jan 28, 6:45 pm, Leandro - ProfessionalIT wrote: > Friends, > >     The new site in web2py made by my company: ProfessionalIT. > >     KZero Consultoria:http://www.kzeroconsultoria.com.br > > -- Leandro. -- You received this message because you are subscribed to the

[web2py] Re: format zero IS_IN_DB

2010-01-28 Thread DenesL
Thanks, I've seen it. The problem with format and IS_IN_DB can be easily fixed in sql.py but I would be against setting the default of zero to '' in IS_IN_DB and IS_IN_SET if it creates an empty option in the dropdown. zero seems to have been introduced to display a "choose a value" kind of messa

Re: [web2py] Re: state of documentation: why pdf?

2010-01-28 Thread Albert Abril
Mengu: why not? Any new documentation is welcome. On Thu, Jan 28, 2010 at 5:50 PM, Mengu wrote: > massimo, > > so, are we able to write a documentation on web2py? > > On Jan 28, 5:30 pm, mdipierro wrote: > > In the Django world there are books (for sale) and there are other > > forms of documen

Re: [web2py] Re: Mobile devices + web2py

2010-01-28 Thread Jason Brower
And if you need something more advanced than that... pywurfl is very good. Tells all the capabilities of the phone as well. Even things like if it has a camera and the screensizes. Very powerful. Used it in my thesis project in web2py. (woot woot) BR, Jason Brower On Thu, 2010-01-28 at 10:53 -0

Re: [web2py] Re: format zero IS_IN_DB

2010-01-28 Thread Thadeus Burgess
My thoughts exactly :) -Thadeus On Thu, Jan 28, 2010 at 12:55 PM, DenesL wrote: > Thanks, I've seen it. > > The problem with format and IS_IN_DB can be easily fixed in sql.py but > I would be against setting the default of zero to '' in IS_IN_DB and > IS_IN_SET if it creates an empty option

[web2py] Copy tables from existing table

2010-01-28 Thread Thadeus Burgess
Is there a way to iterate through the Field() elements of a table and use them to create another similar table ? I'm looking for something like db.define_table('hi', Field('hello'), Field('world')) class Foo() def init(atable): for field in atable: db.define_table(tablename + '

[web2py] Re: state of documentation: why pdf?

2010-01-28 Thread mdipierro
You need my permission. You need my permission only if you cut and paste text from the book. I can tell you right now that you are free to use all the code example from the book as well as pictures but not the English text to avoid copyright problems with the publisher. Exceptions can be made for

[web2py] Re: Mobile devices + web2py

2010-01-28 Thread mdipierro
LOL. I do not know it is time stamped as 2009-07-11. I do not remember why I wrote it. Somebody must have asked for it in the past. On Jan 28, 10:53 am, Thadeus Burgess wrote: > wow Massimo where did that one creep out of the depths from! > > Lol I never knew :) > > -Thadeus > > On Thu, Jan 28, 2

Re: [web2py] Re: Mobile devices + web2py

2010-01-28 Thread tiago almeida
Looks great. Thanks :) On Thu, Jan 28, 2010 at 6:57 PM, Jason Brower wrote: > And if you need something more advanced than that... pywurfl is very > good. Tells all the capabilities of the phone as well. Even things > like if it has a camera and the screensizes. Very powerful. Used it in > m

[web2py] RSS Example

2010-01-28 Thread Chris
Hi, The RSS example in the book (page 80) uses relative URLs for the item links which aren't clickable when viewed in Firefox or work in other RSS readers. Is it possible to generate absolute urls for that example that will work? Chris -- You received this message because you are subscribed to t

[web2py] library app

2010-01-28 Thread mdipierro
http://www.reddit.com/r/Python/comments/av2r8/creating_school_library_website_best_way/c0jkyqy -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send ema

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread weheh
Massimo, I don't see how that could possibly work if there's no request.args(0)? In fact, I tried it and got an "invalid function" error. Wouldn't I first have to test not len(request.args(0)) and if True then create else update? This seems obvious, but it seems that crud is so compact that it migh

[web2py] Re: Stupid translation question

2010-01-28 Thread weheh
Hi Alexandre, yes I understand that, but it's not really the root of my question. The question is whether to create special fields in my records for holding the translated text, or use the built-in translation mechanism of web2py? On Jan 28, 9:57 am, Alexandre Andrade wrote: > everything is passe

[web2py] Re: library app

2010-01-28 Thread rāma
Wow that's an amazing site in 200 lines code ! On Jan 29, 4:28 am, mdipierro wrote: > http://www.reddit.com/r/Python/comments/av2r8/creating_school_library... -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread mdipierro
request.args[0] fails if there is no request.args. request.args(i) never fails returns None instead. If you pass None as second argument to crud.update it behaves as crud.create. ;-) On Jan 28, 2:33 pm, weheh wrote: > Massimo, I don't see how that could possibly work if there's no > request.args(

[web2py] Re: Stupid translation question

2010-01-28 Thread mdipierro
In my view, if you want to translate values in database, you should arrange for translations to also be in db. You can just use T but you do not want translation files to increase when the db grows else everything can become slow. On Jan 28, 2:41 pm, weheh wrote: > Hi Alexandre, yes I understand

[web2py] Re: library app

2010-01-28 Thread mdipierro
Technically all models and controller is 168 lines of code (including scaffolding code). The default layout is 94 lines of html and the rest of views amount to 72 lines total. Massimo On Jan 28, 3:08 pm, rāma wrote: > Wow that's an amazing site in 200 lines code ! > > On Jan 29, 4:28 am, mdipie

[web2py] Re: library app

2010-01-28 Thread rāma
Have/Can you released the source? Would love to look at it. On Jan 29, 5:27 am, mdipierro wrote: > Technically all models and controller is 168 lines of code (including > scaffolding code). > > The default layout is 94 lines of html and the rest of views amount to > 72 lines total. > > Massimo >

[web2py] Re: library app

2010-01-28 Thread mdipierro
It is there. There is a download link at the top of the search page. It requires web2py to open it. On Jan 28, 3:45 pm, rāma wrote: > Have/Can you released the source? Would love to look at it. > > On Jan 29, 5:27 am, mdipierro wrote: > > > Technically all models and controller is 168 lines of c

[web2py] Re: library app

2010-01-28 Thread mdipierro
reddit is down. I repost a direct link: http://we2py.com/library It would be great if one of you adopts this code and turn it into a production system (perhaps linking amazon to automatically update book info from ISBN and making the interface more customizable). On Jan 28, 3:53 pm, mdipierr

[web2py] Re: Two domains, two web2py instances, two apps, same database

2010-01-28 Thread howesc
I agree with the 2 apps in one installation of web2py at minimum. 2 installations of web2py sounds like a maintenance nightmare to me. Is it possible to write a virtual host so that a certain domain may only see certain controllers in a web2py application? i suspect that it is, but getting the a

[web2py] Re: Copy tables from existing table

2010-01-28 Thread DenesL
db.define_table('newname',*[f for f in db.table]) On Jan 28, 2:20 pm, Thadeus Burgess wrote: > Is there a way to iterate through the Field() elements of a table and > use them to create another similar table ? > > I'm looking for something like > > db.define_table('hi', Field('hello'), Field('w

[web2py] Re: Two domains, two web2py instances, two apps, same database

2010-01-28 Thread mdipierro
All these things are possible. The issue is that the easiest way depends on details. You can create virtual hosts in apache You can use routes to filter based on hostname (it is in the book) You can have apps block access becased on more complex conditions. On Jan 28, 4:10 pm, howesc wrote: > I a

[web2py] Re: Copy tables from existing table

2010-01-28 Thread mdipierro
Or db.define_table('newname',db.othertable) On Jan 28, 4:19 pm, DenesL wrote: > db.define_table('newname',*[f for f in db.table]) > > On Jan 28, 2:20 pm, Thadeus Burgess wrote: > > > Is there a way to iterate through the Field() elements of a table and > > use them to create another similar tab

[web2py] screencast requests

2010-01-28 Thread Mengu
hi everyone, if you guys have screencast requests on web2py, please let me know. i'd happily record. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, s

[web2py] Re: screencast requests

2010-01-28 Thread mdipierro
Since I just make this http://www.web2py.com/library It would be nice to make a screencast that goes over the source code line by line. But I have not time. Massimo On Jan 28, 4:32 pm, Mengu wrote: > hi everyone, > > if you guys have screencast requests on web2py, please let me know. > i'd happi

[web2py] Re: library app

2010-01-28 Thread rāma
oops i missed it out of excitement! On Jan 29, 6:03 am, mdipierro wrote: > reddit is down. I repost a direct link: > > http://we2py.com/library > > It would be great if one of you adopts this code and turn it into a > production system (perhaps linking amazon to automatically update book > info f

Re: [web2py] screencast requests

2010-01-28 Thread Alex Fanjul
I think screencast is one of the best way to learn about something so thank you for you offering Mengu. If you accept one of mine, I would like to see something about using web2py and smartphones (iphones, android, etc.) maybe with JSON or so. The only example for JSON crud its in sahana code but

Re: [web2py] Re: Copy tables from existing table

2010-01-28 Thread Thadeus Burgess
Sometimes I think to myself and say, "Why didn't I just try that!" Thank you, both of you! -Thadeus On Thu, Jan 28, 2010 at 4:27 PM, mdipierro wrote: > Or > > db.define_table('newname',db.othertable) > > On Jan 28, 4:19 pm, DenesL wrote: >> db.define_table('newname',*[f for f in db.table])

[web2py] Re: get or insert shortcut

2010-01-28 Thread Richard
I guess these don't exist so I've created my own versions, pasted below. Would it be worth including something like this in the DAL? def get_or_create(table, fields): """ Return ID of record from table with passed field values. Create record if does not exist. 'table' is a DAL table

[web2py] Re: Stupid translation question

2010-01-28 Thread weheh
Thanks, understood. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this gr

[web2py] Re: Stupid translation question [ RESOLVED]

2010-01-28 Thread weheh
Thanks, Massimo. Understood. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visi

[web2py] Re: Stupid translation question

2010-01-28 Thread Christopher Steel
Hi Richard, Translations get a little more complicated than most people expect. Here are a few things you want to watch out for: Your site will have a default language. This is the language of the strings placed in the T functions. Generally speaking most people choose English simply because most

[web2py] Re: get or insert shortcut

2010-01-28 Thread mdipierro
This logic = None for field, value in fields.items(): e = table[field] == value logic = e if logic is None else logic & e record = db(logic).select(table['id']).first() does not do what you think it does. I think you want: logic=reduce(lambda a,b:a&b,[table[k]==f

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread weheh
Hi Massimo, I'm sorry, but I don't understand how to do this. I tried the following: #controller def junk(): form = crud.update(db.content,request.args(2),next=request.url) rows=crud.select(...) return dict(form=form,rows=rows) Record creation works OK. But when I click on a rows record id,

[web2py] Re: Stupid translation question

2010-01-28 Thread Christopher Steel
Whoops, I pressed send by accident... Anyway you can checkout: http://kenai.com/projects/universalcake/ for an example of the language changing mechanism. As far as the database, you will have a record id (the automatic index) but you may require a semi-unique field that ties all your translati

[web2py] Why in the default language list there is no "en" or "en-en"?

2010-01-28 Thread tyoc213
Reading the post about default lang, I have watched that there is no english language in the list of languages. So http://localhost:8000/admin/default/update_languages/welcome would not show it, so the question is, if I create "en-en" or "en" it will show that language that is not show there? --

[web2py] Re: Stupid translation question

2010-01-28 Thread weheh
Hi Chris - super write up. Thanks. I'll be referring to it in the next few days. - RG -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to we

[web2py] Two files that perhaps should't be in web2py_src.zip

2010-01-28 Thread tyoc213
I think this 2 applications/admin/static/edit_area/images/Thumbs.db applications/admin/static/edit_area/plugins/charmap/images/Thumbs.db -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.co

[web2py] Re: Mobile Access Design

2010-01-28 Thread yamandu
Hey, thanks Mr Freeze, I am sure it gonna help. And I am look webgrid module. So useful! I´m gonna try tomorrow, but I already know it will same a lot of time. I think a negative point of web2py is the table renderers but webgrid seems to solve this. I could be included in web2py. Thanks. On 28

[web2py] Re: new on web2pyslices.com: version history!

2010-01-28 Thread mr.freeze
Also, a new revision will now trigger an email if you are subscribed to that slice. Handy for keeping up with changes. On Jan 27, 9:56 pm, "mr.freeze" wrote: > Well it took a while but I finally got around to it. From now on when > you modify your slice, a version history link will appear below t

[web2py] Checking my site in other browsers...

2010-01-28 Thread Jason Brower
I used to use this... http://browsershots.org/ But it seems that I need a robots.txt file in the root of my site here... http://www.bullseyedesign4u.com/welcome/default/index Is there an easy way to make this file in http://www.bullseyedesign4u.com/robots.txt in my web2py install? I wonder if othe

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread mdipierro
what is the url that gives you invalid record? What is in request.url? with args(2) and not args(0)? On Jan 28, 7:20 pm, weheh wrote: > Hi Massimo, I'm sorry, but I don't understand how to do this. I tried > the following: > > #controller > def junk(): >   form = crud.update(db.content,request.ar

[web2py] Re: Why in the default language list there is no "en" or "en-en"?

2010-01-28 Thread mdipierro
yes but the translation of 'en' will be ignored unless you change the value of T.current_languages = ['en'] On Jan 28, 7:36 pm, tyoc213 wrote: > Reading the post about default lang, I have watched that there is no > english language in the list of languages. > Sohttp://localhost:8000/admin/def

[web2py] Re: Two files that perhaps should't be in web2py_src.zip

2010-01-28 Thread mdipierro
good catch. Perhaps, somebody more stilled in mercurial than me, should look at the build scripts in Makefile and perhaps rewrite them to use a clean checkout instead of the current mechanism. On Jan 28, 9:04 pm, tyoc213 wrote: > I think this 2 > > applications/admin/static/edit_area/images/Thumb

[web2py] Re: new on web2pyslices.com: version history!

2010-01-28 Thread mdipierro
cool! On Jan 28, 10:20 pm, "mr.freeze" wrote: > Also, a new revision will now trigger an email if you are subscribed > to that slice. Handy for keeping up with changes. > > On Jan 27, 9:56 pm, "mr.freeze" wrote: > > > Well it took a while but I finally got around to it. From now on when > > you

[web2py] Re: Checking my site in other browsers...

2010-01-28 Thread mdipierro
put the robots.txt somewhere, for example in applications/welcome/ static and then create a routes.py routes_in=[('/robots.txt','/welcome/static/robots.txt')] this is in the book. Chapter 4. On Jan 28, 10:52 pm, Jason Brower wrote: > I used to use this...http://browsershots.org/ > But it seems

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread weheh
http://127.0.0.1:8000/spin/default/junk/read/content/4 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.c

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread weheh
The URL is automatically generated by the crud.select and is attached to the record id. Here's the URL: http://127.0.0.1:8000/spin/default/marketing/read/content/4 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send emai

[web2py] Re: get or insert shortcut

2010-01-28 Thread Richard
thanks that's much neater. > does not do what you think it does. can you explain? It worked for my test cases... > record = db(logic).select(table['id']).first() I noticed you removed the ID selection part - is there any efficiency gained in just selecting the ID? Richard On Jan 29, 12:06 pm,

[web2py] Re: crud newbie question regarding update

2010-01-28 Thread weheh
Oh, Massimo, one other thing. The crud.select is returning the auth.user.id, whereas I would like to get auth.user.email in the rows listing. How would I go about doing that? My db.content table has a field named email: Field('user',db.auth_user,requires=IS_IN_DB(db,'auth_user.id','%(email) s'))

[web2py] Re: Custom form doesn't submit

2010-01-28 Thread Adi
Ok, I removed the SELECT entirely to see if the form submits, but it still doesn't. Now I'm doing this: 1. created a read-only SQLFORM 2. did form[0].append(TR(, )) But the Add Another button doesn't submit. Firebug shows html to be OK. However the custom part of the SQLFORM doesn't include "id"s

[web2py] HELP with wysiwyg

2010-01-28 Thread mdipierro
has anybody used? http://127.0.0.1:8000/admin/default/htmledit/welcome/views/default/index.html If you try insert a link it escapes the url of the link. This is normally good but a problem when the url is {{=URL(...)}} Can it be disabled? Massimo -- You received this message because you are su