[web2py] Re: Error in trunk with admin layout?
Thanks lots. All fixed. On Nov 4, 5:01 pm, mdipierro mdipie...@cs.depaul.edu wrote: Check if fixed. On Nov 4, 9:17 am, rochacbruno rochacbr...@gmail.com wrote: +1 Enviado via iPhone Em 04/11/2010, às 11:33, Seeker tmurn...@gmail.com escreveu: Hi, In trunk: Not sure if i have done something wrong, but admin seems to be without a layout ... Anyone else experiencing this? Thanks.- Hide quoted text - - Show quoted text -
[web2py] Re: Hyperlink urls in comments
Thanks for your reply, you're right. The problem occurred in round cube in Thunderbird the link is click-able. I have not yet tried to send HTML formatted mail for the auth methods, but I suspect that is what you are looking to do. Yes, if that's the only way to solve the problem ... Kind regards, Annet.
[web2py] How to unplug or upgrade a plugin
I have the problem that the jqrid-plugin's search function works as expected in one application and not in another (older) one. In the latter it flatly ignored the mouse on the search icon. So I decided to upgrade plugin_wiki on the second one by reinstalling a newer version and ended up having to put my backups back for the plugin to work again. So my questions: How do I remove a plugin from an application? And how do I upgrade plugin_wiki? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] error in admin: _read function missing
Hi, In trunk: Clicking on 'view' link on the select page complains of an invalid function ... Thanks.
[web2py] ISBN database
Hello list, have any of you tried to find out data about a book via the ISBN number, maybe using web2py. Kenneth
[web2py] Error in wizard generated scaffold?
Hi, Using trunk: Testing the wizard generated scaffold; attempting to delete a record from the update page generates an error: document does not exist.
Re: [web2py] Web2py Application Exhibition ( Version 2.0 )
Hi Netadmin, Very nice initiative. Is it mandatory that the project is opensource. I am working on an enterprise analytics application using web2py. However, I am not going to make it opensource. (I might consider making some parts of it opensource later). rAm i Think, i Wait, i Fast -- Siddhartha http://sodidi.ramjeeganti.com On Thu, Nov 4, 2010 at 2:48 AM, NetAdmin mr.netad...@gmail.com wrote: Web2py Application Exhibition Version 2.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than December 15, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on December 31, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! 7. Previous winners must wait 365 days before being eligible to win again. Martin Mulone, the winner of the last Exhibition with his entry titled Instant Press, has volunteered to help tally your votes using an application he wrote. ( Using Web2py of course! ) Submissions must be mailed to mr.netad...@gmail.com Good Luck! Mr.NetAdmin at gmail.com
[web2py] Re: Learning Management System survey
Volunteering. I might be able to get some funding at our university. BTW thanks for the BBB suggestion, I'm integrating it now in my application. Nico On Nov 3, 10:35 pm, mdipierro mdipie...@cs.depaul.edu wrote: We need to assemble a team. On Nov 3, 3:00 pm, jnowl john_now...@carleton.ca wrote: I keep an eye on python web frameworks. Here at Carleton a pilot has just begun: http://www2.carleton.ca/ccs/this-month-ccs/october-2010/learning-mana... Looking at the LMS's you mention (BB, D2L, Moodle). I don't work in the LMS area but would like to see python used more. To that end, I think the web development tools are just beginning to mature to where client-server tools were 10yrs ago, i.e. with ui builders widget toolkits. And still lots of impedance mismatch - I'd rather work in python than javascript. But I'd like to help work on a python lms, time allowing! So one thing needed would be mechanism to export/import btwn systems.
[web2py] Re: \sample markmin app
it has been included for some time. Could you tell me exactly where the editor MarkItUp is included? I looked in Contrib etc but maybe I'm missing something? Sorry for this question but I am not always very good at seeing what is obvious! :-) On Nov 4, 6:25 pm, mdipierro mdipie...@cs.depaul.edu wrote: it has been included for some time. You can use it via the MARKMIN helper. On Nov 4, 12:34 pm, villas villa...@gmail.com wrote: That looks like a great combination with the editor! Is Markitup going to be included as standard? -D
Re: [web2py] Re: Straw poll on the learning curve of markmin for the layman
I'm very happy about Markmin! I've used Markdown for years for creating eLearning resources and blogging. I have tried to get 'normal' users to use Markdown (Markmin would be the same) and it's not easy. Non-techy people will not use inline markup! So an editor like MarkItUp is essential. The combination of MarkItUp and Markdown is excellent. Add web2py to the mix and Massimo has created a winner in my opinion! (I've created a combined blog / wiki using plugin_wiki and it works great.) But I reiterate - don't try and teach a markup language (however simple) to non technical users - you will lose them in seconds! On 4 November 2010 22:27, rochacbruno rochacbr...@gmail.com wrote: I am a markmin fan, I wrote An. Entire book in markmin. Very rapid Enviado via iPhone Em 04/11/2010, às 20:15, Christopher Steel chris.st...@gmail.com escreveu: We love Markmin. It is tiny, easy to use and logical. It is similar to Markdown which is pretty nice, but Markmin covers what people actually use in a way that makes markup look good in itself. As an added bonus it is totally readable as a text file so everyone, including one of our board members who happens to be blind, can edit, create and update markmin documents. I think it has world changing possibilities... and Massimo(?) just posted an example app - http://www.web2py.com/markmin On Nov 4, 3:20 pm, Luther Goh Lu Feng elf...@yahoo.com wrote: Has anyone had experience implementing markin as part of text area input? Do end users find markmin difficult? Personally, I find it very user friendly, especially withhttp://www.web2py.com/markminBut then again, I am a biased developer. Any feedback on this?
Re: [web2py] Re: Straw poll on the learning curve of markmin for the layman
[sorry - I meant The combination of MarkItUp and **Markmin** is excellent.] On 5 November 2010 09:30, Tom Atkins minkto...@gmail.com wrote: I'm very happy about Markmin! I've used Markdown for years for creating eLearning resources and blogging. I have tried to get 'normal' users to use Markdown (Markmin would be the same) and it's not easy. Non-techy people will not use inline markup! So an editor like MarkItUp is essential. The combination of MarkItUp and Markdown is excellent. Add web2py to the mix and Massimo has created a winner in my opinion! (I've created a combined blog / wiki using plugin_wiki and it works great.) But I reiterate - don't try and teach a markup language (however simple) to non technical users - you will lose them in seconds! On 4 November 2010 22:27, rochacbruno rochacbr...@gmail.com wrote: I am a markmin fan, I wrote An. Entire book in markmin. Very rapid Enviado via iPhone Em 04/11/2010, às 20:15, Christopher Steel chris.st...@gmail.com escreveu: We love Markmin. It is tiny, easy to use and logical. It is similar to Markdown which is pretty nice, but Markmin covers what people actually use in a way that makes markup look good in itself. As an added bonus it is totally readable as a text file so everyone, including one of our board members who happens to be blind, can edit, create and update markmin documents. I think it has world changing possibilities... and Massimo(?) just posted an example app - http://www.web2py.com/markmin On Nov 4, 3:20 pm, Luther Goh Lu Feng elf...@yahoo.com wrote: Has anyone had experience implementing markin as part of text area input? Do end users find markmin difficult? Personally, I find it very user friendly, especially withhttp://www.web2py.com/markminBut then again, I am a biased developer. Any feedback on this?
[web2py] Re: Book Edit Suggestion
Good to know. I suppose you just need to change the 'select' to 'search'. However, it would be nice to mention that tuple! :) On Nov 5, 4:42 am, rochacbruno rochacbr...@gmail.com wrote: Sorry I didnt test this way. I also didnt know that search returns a select. Enviado via iPhone Em 05/11/2010, às 01:58, mdipierro mdipie...@cs.depaul.edu escreveu: Just: search, rows = crud.search(table) search returns a tuple. On Nov 4, 10:29 pm, Bruno Rocha rochacbr...@gmail.com wrote: It is ok to do search, rows = crud.search(table), crud.select(table) Edited! 2010/11/4 villas villa...@gmail.com http://www.web2py.com/book/default/chapter/07#CRUD I noticed this example in the book which does not seem correct: def manage(): table=db[request.args(0)] form = crud.update(table,request.args(1)) table.id.represent = lambda id: \ A('edit:',id,_href=URL(args=(request.args(0),id))) search, rows = crud.select(table) # -- return dict(form=form,search=search,rows=rows) May I suggest replacing the marked line: search, rows = crud.select(table) with these two lines: search = crud.search(table) rows = crud.select(table) -D -- http://rochacbruno.com.br
[web2py] Re: new admin layout
I like the new design small things: in the online editor the save icon is quite different from the rest of the simplistic icons, it confused me. also it should be css = cursor: pointer; when i did not see my mouse trurn to a hand i thought i could not click it
[web2py] Re: Web2py Application Exhibition ( Version 2.0 )
Ramjee, Yes the app must be opensource. ( Like Web2py ) Mr.NetAdmin On Nov 5, 3:20 am, Ramjee Ganti gant...@gmail.com wrote: Hi Netadmin, Very nice initiative. Is it mandatory that the project is opensource. I am working on an enterprise analytics application using web2py. However, I am not going to make it opensource. (I might consider making some parts of it opensource later). rAm i Think, i Wait, i Fast -- Siddharthahttp://sodidi.ramjeeganti.com On Thu, Nov 4, 2010 at 2:48 AM, NetAdmin mr.netad...@gmail.com wrote: Web2py Application Exhibition Version 2.0 Do you have a Web2py app that you'd like to show the world? If so, you may be interested in the Web2py Application Exhibition. The WAE is a way to... 1. Demonstrate what can be done with Web2py. 2. Share and learn about useful web2py, python, Javascript, jQuery etc. techniques. 3. Earn some money toward that new you've been craving. Projects will be judged in the following areas. Ease of use Usefulness Visual Appeal The Rules 1. Applications must be submitted no later than December 15, 2010 2. Source must be included with your submissions. 3. If the application is written by a team, Massimo can NOT be part of the team. 4. After a 2 week review period, on December 31, 2010, the winners will be announced on the web2py-users list. 5. The 1st place winner will receive $100 US Dollars, 2nd place will receive $50 6. You must enjoy using Web2py! 7. Previous winners must wait 365 days before being eligible to win again. Martin Mulone, the winner of the last Exhibition with his entry titled Instant Press, has volunteered to help tally your votes using an application he wrote. ( Using Web2py of course! ) Submissions must be mailed to mr.netad...@gmail.com Good Luck! Mr.NetAdmin at gmail.com
[web2py] unicode problem in DAL
I'm trying to insert a record with a filed value uëLocatie and I get an error in sql.Table._insert at the last line: return 'INSERT INTO %s(%s) VALUES (%s);' % (sql_t, sql_f, sql_v) here the traceback File D:\Data_Python_25\support\Web2Py_DAL_support.py, line 250, in DAL_Table Description = Value[3][:-1]) File P:\Web2PY\web2py_src\web2py\gluon\sql.py, line 2035, in insert query = self._insert(**fields) File P:\Web2PY\web2py_src\web2py\gluon\sql.py, line 2028, in _insert return 'INSERT INTO %s(%s) VALUES (%s);' % (sql_t, sql_f, sql_v) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 35: ordinal not in range(128) I don't understand the problem and know what I'm doing wrong Wwith print statements I tried to narrow the problem, and in : def sql_represent(obj, fieldtype, dbname, db_codec='UTF-8'): there's is this part if isinstance(obj, unicode): print '', type(obj),obj if len(obj)0 : print ord(obj[0]) obj = obj.encode(db_codec) print '', type(obj) if len(obj)0 : print ord(obj[0]) which seems to convert the unicode to a string with byte values larger than 128. Am I doing something wrong, or is this a bug ? And of course far more interesting, how do I solve this problem ? thanks, Stef Mientki
Re: [web2py] Re: Learning Management System survey
I have some spare time, have a few ideas and find the project interesting but my perspective may be different because i don't use a LMS at work now. 2010/11/3 mdipierro mdipie...@cs.depaul.edu We need to assemble a team. On Nov 3, 3:00 pm, jnowl john_now...@carleton.ca wrote: I keep an eye on python web frameworks. Here at Carleton a pilot has just begun: http://www2.carleton.ca/ccs/this-month-ccs/october-2010/learning-mana... Looking at the LMS's you mention (BB, D2L, Moodle). I don't work in the LMS area but would like to see python used more. To that end, I think the web development tools are just beginning to mature to where client-server tools were 10yrs ago, i.e. with ui builders widget toolkits. And still lots of impedance mismatch - I'd rather work in python than javascript. But I'd like to help work on a python lms, time allowing! So one thing needed would be mechanism to export/import btwn systems. -- Un saludo, José Ignacio Hurtado López
[web2py] Getting back to where you were
I combine two (crud.create with keepvalues=True) forms on one page and below the forms a SQLTABLE (not using jqgrid because I don't know how to pass a query to jqgrid) with an 'edit' link in the first column. I want to get back to the same screen after one of the entries in the SQLTABLE has been edited with the updated information for that record the only change on that page. And I don't know how to do it. Is it possible? My model: db.define_table('clm01', Field(service_provider,db.service_provider, requires=IS_IN_DB(db,db.service_provider.id, '%(name)s'),label=Service provider), Field('trainer'), Field('date','date'), Field('focus'), Field('length'), Field(planned, 'integer'), Field('actual', 'integer'), Field('difference', 'integer'), signature) db.define_table('clm01_data', Field('form_id', db.clm01, writable = False, readable= False), Field('teacher', db.teacher, requires = IS_IN_DB(db,'teacher.id', '%(surname)s, %(name)s')), Field(school,db.school,label=School, requires=IS_IN_DB(db,db.school.id, '%(name)s')), Field('position'), Field('day_1', 'boolean'), Field('day_2', 'boolean'), signature) db.clm01_data.id.represent = lambda id: A('edit',_href=URL(r=request,c='default',f='edit_clm01_data',args=str(id))) And controller: @auth.requires_login() def clm01_create(): form=SQLFORM.factory(db.clm01, db.clm01_data) if form.accepts(request.vars, keepvalues = True): if db((db.clm01.service_provider == request.vars.service_provider) (db.clm01.focus == request.vars.focus) (db.clm01.date == request.vars.date)).count() == 0: id = db.clm01.insert(**db.clm01._filter_fields(form.vars)) form.vars.form_id=id else: form.vars.form_id = db((db.clm01.service_provider == request.vars.service_provider) (db.clm01.focus == request.vars.focus) (db.clm01.date == request.vars.date)).select(db.clm01.id)[0]['id'] if form.vars.form_id: if db((db.clm01_data.form_id == form.vars.form_id) (db.clm01_data.teacher == form.vars.teacher) (db.clm01_data.school == form.vars.school)).count() == 0: id = db.clm01_data.insert(**db.clm01_data._filter_fields(form.vars)) data = SQLTABLE(db((db.clm01_data.form_id == form.vars.form_id) (db.teacher.id == db.clm01_data.teacher) (db.school.id == db.clm01_data.school)).select( db.clm01_data.id, db.clm01_data.form_id, db.teacher.surname, db.teacher.name, db.school.name, db.clm01_data.position, db.clm01_data.day_1, db.clm01_data.day_2), headers = {'clm01.id' : 'ID', 'clm01_data.form_id' : 'Form ID', 'teacher.surname' : 'Teacher surname', 'teacher.name' : 'Teacher name', 'school.name' : 'School', 'clm01_data.position' : 'Position', 'clm01_data.day_1' : 'Day 1', 'clm01_data.day_2' : 'Day 2'}) return dict(form=form,data = data) def edit_clm01_data(): for fld in db.clm01_data.fields(): if (fld == 'day_2') : db.clm01_data[fld].writable = True else: db.clm01_data[fld].writable = False db.clm01_data.teacher.represent = lambda id: db.teacher(id).surname + ' ' + db.teacher(id).name form = crud.update(db.clm01_data,request.raw_args, next = URL(r=request, f='clm01_create',vars=request.vars), deletable = False) return dict(form=form,data = data) Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: How to unplug or upgrade a plugin
You can remove the plugin using the admin interface (click plugin, click remove from plugin page). You can upgrade a plugin by applying the new plugin over the old one). On Nov 5, 2:10 am, Johann Spies johann.sp...@gmail.com wrote: I have the problem that the jqrid-plugin's search function works as expected in one application and not in another (older) one. In the latter it flatly ignored the mouse on the search icon. So I decided to upgrade plugin_wiki on the second one by reinstalling a newer version and ended up having to put my backups back for the plugin to work again. So my questions: How do I remove a plugin from an application? And how do I upgrade plugin_wiki? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: How to unplug or upgrade a plugin
Anyway... I m sure jqgrid works well in plugin_wiki. Either there is an error in passing arguments to it or there is an issue with permissions or there is a JS conflict. On Nov 5, 2:10 am, Johann Spies johann.sp...@gmail.com wrote: I have the problem that the jqrid-plugin's search function works as expected in one application and not in another (older) one. In the latter it flatly ignored the mouse on the search icon. So I decided to upgrade plugin_wiki on the second one by reinstalling a newer version and ended up having to put my backups back for the plugin to work again. So my questions: How do I remove a plugin from an application? And how do I upgrade plugin_wiki? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: error in admin: _read function missing
I do not understand where to click. On Nov 5, 2:14 am, Seeker tmurn...@gmail.com wrote: Hi, In trunk: Clicking on 'view' link on the select page complains of an invalid function ... Thanks.
[web2py] Re: \sample markmin app
Markitup is not plugin_wiki (static/plugin_wiki/markitup) not in web2py On Nov 5, 4:23 am, villas villa...@gmail.com wrote: it has been included for some time. Could you tell me exactly where the editor MarkItUp is included? I looked in Contrib etc but maybe I'm missing something? Sorry for this question but I am not always very good at seeing what is obvious! :-) On Nov 4, 6:25 pm, mdipierro mdipie...@cs.depaul.edu wrote: it has been included for some time. You can use it via the MARKMIN helper. On Nov 4, 12:34 pm, villas villa...@gmail.com wrote: That looks like a great combination with the editor! Is Markitup going to be included as standard? -D
Re: [web2py] Re: Learning Management System survey
I can volunteer time and input for the LMS idea. I'm not experienced enough with Python and web2py yet to contribute good code but can help with frontend UI, design, jQuery and documentation. Assuming the project would have a Free license? I'd be happy to register, host, set up and manage a dedicated site for the project. The site could reference a bitbucket Hg repository (issue tracking there), have a demo, download links (including plugins and themes), a forum for users and developers (I'd be happy to moderate), documentation etc. In daydreaming time I have spent many hours trying to come up with a name for such a system. Because there is already 'desire2learn' in the market it's probably not good to use the '2' in the middle again like web2py. I am fully behind Massimo's focus on the user. As such the universally accepted term 'Learning Management System' (see http://en.wikipedia.org/wiki/Learning_management_system) is very appropriate - so how about calling it 'elemes'? get it?! 'elemes.com' and 'elemes.org' are available. I'd be happy to buy these and provide hosting for a site for the project if people think this might be a good name? (You could change it later - but it'd get us started with a place to discuss requirements, design criteria and goals away from the web2py list.) Thoughts? On 3 November 2010 22:35, mdipierro mdipie...@cs.depaul.edu wrote: We need to assemble a team.
[web2py] Re: error in admin: _read function missing
Sorry, that was a bit cryptic. - Generate a test app with the wizard (with a few test tables). - Click on the '... Select' menu item for one of the tables. - Click the 'view' link for one of the records. - Click the 'edit ...' link for the record. - Tick the 'delete'check box and submit. - Error: Document does not exist. On Nov 5, 2:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand where to click. On Nov 5, 2:14 am, Seeker tmurn...@gmail.com wrote: Hi, In trunk: Clicking on 'view' link on the select page complains of an invalid function ... Thanks.- Hide quoted text - - Show quoted text -
[web2py] Re: error in admin: _read function missing
I understand. Will fix it. On Nov 5, 8:27 am, Seeker tmurn...@gmail.com wrote: Sorry, that was a bit cryptic. - Generate a test app with the wizard (with a few test tables). - Click on the '... Select' menu item for one of the tables. - Click the 'view' link for one of the records. - Click the 'edit ...' link for the record. - Tick the 'delete'check box and submit. - Error: Document does not exist. On Nov 5, 2:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand where to click. On Nov 5, 2:14 am, Seeker tmurn...@gmail.com wrote: Hi, In trunk: Clicking on 'view' link on the select page complains of an invalid function ... Thanks.- Hide quoted text - - Show quoted text -
Re: [web2py] Re: How to unplug or upgrade a plugin
On 5 November 2010 14:50, mdipierro mdipie...@cs.depaul.edu wrote: Anyway... I m sure jqgrid works well in plugin_wiki. Either there is an error in passing arguments to it or there is an issue with permissions or there is a JS conflict. Well I am unable to find the cause of the problem. This is in my controller: def teacher(): teachers=plugin_wiki.widget('jqgrid',table='teacher') add= A(Add a teacher,_href=URL(r=request, c=default, f=add_teacher)) return dict(teachers=teachers,add=add) and def show_data(): tabel = request.vars.tabel.lower() data= plugin_wiki.widget('jqgrid',table=tabel) return dict(data=data,tabel=tabel) I got data in the grid, can sort columns, page but the left bottom two icons on the grid is dead. I have removed all the other older plugins that can cause problems but that did not change anything. Then I reinstalled the latest plugin_wiki and now the 'teacher' grid has a different background and does not show the bottom controls and the show_data ends with a ticket: Traceback (most recent call last): File /Users/js/Programmeer/zenex/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py, line 952, in module File /Users/js/Programmeer/zenex/web2py/gluon/globals.py, line 96, in lambda self._caller = lambda f: f() File /Users/js/Programmeer/zenex/web2py/gluon/tools.py, line 2264, in f return action(*a, **b) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py, line 801, in show_data data= plugin_wiki.widget('jqgrid',table=tabel) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py, line 675, in widget return getattr(PluginWikiWidgets,name)(*args,**kargs) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py, line 280, in jqgrid % dict(callback=callback,colnames=json(colnames), File /Users/js/Programmeer/zenex/web2py/gluon/serializers.py, line 31, in json return simplejson.dumps(value) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/__init__.py, line 228, in dumps return _default_encoder.encode(obj) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 232, in encode chunks = list(chunks) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 498, in _iterencode for chunk in _iterencode_list(o, _current_indent_level): File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 396, in _iterencode_list for chunk in chunks: File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 511, in _iterencode o = _default(o) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 206, in default raise TypeError(repr(o) + is not JSON serializable) TypeError: is not JSON serializable Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: error in admin: _read function missing
ACTUALLY ... I am have just confused myself with another error I logged earlier. the description above refers to 'Error in wizard generated scaffold?' THIS error is in the normal appadmin section (http://127.0.0.1:8000/ test/appadmin/select/...). Clicking on the 'View' link causes an error: Invalid Function. Clicking on the 'View' link causes an error. Sorry for the confusion. On Nov 5, 3:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: I understand. Will fix it. On Nov 5, 8:27 am, Seeker tmurn...@gmail.com wrote: Sorry, that was a bit cryptic. - Generate a test app with the wizard (with a few test tables). - Click on the '... Select' menu item for one of the tables. - Click the 'view' link for one of the records. - Click the 'edit ...' link for the record. - Tick the 'delete'check box and submit. - Error: Document does not exist. On Nov 5, 2:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand where to click. On Nov 5, 2:14 am, Seeker tmurn...@gmail.com wrote: Hi, In trunk: Clicking on 'view' link on the select page complains of an invalid function ... Thanks.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
[web2py] Re: How to unplug or upgrade a plugin
What is the value of request.vars.tabel and what is the definition of the table you are showing? On Nov 5, 8:36 am, Johann Spies johann.sp...@gmail.com wrote: On 5 November 2010 14:50, mdipierro mdipie...@cs.depaul.edu wrote: Anyway... I m sure jqgrid works well in plugin_wiki. Either there is an error in passing arguments to it or there is an issue with permissions or there is a JS conflict. Well I am unable to find the cause of the problem. This is in my controller: def teacher(): teachers=plugin_wiki.widget('jqgrid',table='teacher') add= A(Add a teacher,_href=URL(r=request, c=default, f=add_teacher)) return dict(teachers=teachers,add=add) and def show_data(): tabel = request.vars.tabel.lower() data= plugin_wiki.widget('jqgrid',table=tabel) return dict(data=data,tabel=tabel) I got data in the grid, can sort columns, page but the left bottom two icons on the grid is dead. I have removed all the other older plugins that can cause problems but that did not change anything. Then I reinstalled the latest plugin_wiki and now the 'teacher' grid has a different background and does not show the bottom controls and the show_data ends with a ticket: Traceback (most recent call last): File /Users/js/Programmeer/zenex/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py, line 952, in module File /Users/js/Programmeer/zenex/web2py/gluon/globals.py, line 96, in lambda self._caller = lambda f: f() File /Users/js/Programmeer/zenex/web2py/gluon/tools.py, line 2264, in f return action(*a, **b) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py, line 801, in show_data data= plugin_wiki.widget('jqgrid',table=tabel) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py, line 675, in widget return getattr(PluginWikiWidgets,name)(*args,**kargs) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py, line 280, in jqgrid % dict(callback=callback,colnames=json(colnames), File /Users/js/Programmeer/zenex/web2py/gluon/serializers.py, line 31, in json return simplejson.dumps(value) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/__init__.py, line 228, in dumps return _default_encoder.encode(obj) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 232, in encode chunks = list(chunks) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 498, in _iterencode for chunk in _iterencode_list(o, _current_indent_level): File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 396, in _iterencode_list for chunk in chunks: File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 511, in _iterencode o = _default(o) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 206, in default raise TypeError(repr(o) + is not JSON serializable) TypeError: is not JSON serializable Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: How to unplug or upgrade a plugin
Do the columns have label=T(...)? or do they have unicode in them? I think I know the problem... On Nov 5, 8:36 am, Johann Spies johann.sp...@gmail.com wrote: On 5 November 2010 14:50, mdipierro mdipie...@cs.depaul.edu wrote: Anyway... I m sure jqgrid works well in plugin_wiki. Either there is an error in passing arguments to it or there is an issue with permissions or there is a JS conflict. Well I am unable to find the cause of the problem. This is in my controller: def teacher(): teachers=plugin_wiki.widget('jqgrid',table='teacher') add= A(Add a teacher,_href=URL(r=request, c=default, f=add_teacher)) return dict(teachers=teachers,add=add) and def show_data(): tabel = request.vars.tabel.lower() data= plugin_wiki.widget('jqgrid',table=tabel) return dict(data=data,tabel=tabel) I got data in the grid, can sort columns, page but the left bottom two icons on the grid is dead. I have removed all the other older plugins that can cause problems but that did not change anything. Then I reinstalled the latest plugin_wiki and now the 'teacher' grid has a different background and does not show the bottom controls and the show_data ends with a ticket: Traceback (most recent call last): File /Users/js/Programmeer/zenex/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py, line 952, in module File /Users/js/Programmeer/zenex/web2py/gluon/globals.py, line 96, in lambda self._caller = lambda f: f() File /Users/js/Programmeer/zenex/web2py/gluon/tools.py, line 2264, in f return action(*a, **b) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py, line 801, in show_data data= plugin_wiki.widget('jqgrid',table=tabel) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py, line 675, in widget return getattr(PluginWikiWidgets,name)(*args,**kargs) File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py, line 280, in jqgrid % dict(callback=callback,colnames=json(colnames), File /Users/js/Programmeer/zenex/web2py/gluon/serializers.py, line 31, in json return simplejson.dumps(value) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/__init__.py, line 228, in dumps return _default_encoder.encode(obj) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 232, in encode chunks = list(chunks) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 498, in _iterencode for chunk in _iterencode_list(o, _current_indent_level): File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 396, in _iterencode_list for chunk in chunks: File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 511, in _iterencode o = _default(o) File /Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py, line 206, in default raise TypeError(repr(o) + is not JSON serializable) TypeError: is not JSON serializable Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
Re: [web2py] Re: How to unplug or upgrade a plugin
On 5 November 2010 15:42, mdipierro mdipie...@cs.depaul.edu wrote: Do the columns have label=T(...)? or do they have unicode in them? I think I know the problem... Your question about the labels made me experiment. I removed the labels from the gr02-definition and now I get a functional grid for gr02 but not yet for 'teacher' . In both cases I cannot see the icons at the bottom (background being white where it was black previously). I suppose I have to do something about the css for this grid to get the icons visible. Can you help me with that please? My models: db.define_table(person, Field(surname, string, default=None), Field(name, string, default=None) ) db.define_table(teacher, db.person, Field(highest_qualification), Field(id_number,length=13), Field(school), Field(gender), Field(cell, string, length=15, default=None), Field(grade), Field(domain), signature, format = '%(surname)s, %(name)s' ) Original gr02 (partial) db.define_table(gr02, Field(title_of_training, label=1.1 Title of Training), Field(service_provider, db.service_provider, label=1.2 Name of training provider, requires=IS_IN_DB(db,db.service_provider.id, '%(name)s') ), Field(date, date,label=1.3 Date), Field(module,label=1.4 Module), Field(q2_1, label=SPAN(2.1 The objectives of the, BR(),spasies(9), session were clear to me), requires=IS_IN_SET(agree_or_not), widget=horizontal_checkbox ), Field(q2_2, label=2.2 The content was easy to understand , requires=IS_IN_SET(agree_or_not), widget=horizontal_checkbox )) Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Clone and rename apps in admin
HI, I Know it is easy to clone an app within console using $ cp /app/* -R /newapp/ or something like this But, I am working in a project hosted in a shared poor host, where I have access to admin via HTTPS, but I have not the SSH access. Sometimes I need to clone an existing application for testing new features without breaking the running app. two things I would like to have in /admin is [clone this app] which copy the application in to a new application with a new name. [rename this app] which simply change the name of the app directory What about?
[web2py] blob readable writeable = false not workin
Hello, How I may hide blob field from a form? I did : db[request.args(0)].blobfield.readable=\ db[request.args(0)].blobfield.writeable=\ db[request.args(0)].blobfield_blob.readable=\ db[request.args(0)].blobfield_blob.writeable=False In my controller without succes. I use crud.create(db[request.args(0)]) Thanks Richard
[web2py] Using tinymce for text areas of in component views
I have implemeted the basic tinymce editor here:http:// wiki.moxiecode.com/index.php/ TinyMCE:For_Dummies#To_create_a_very_simple_TinyMCE_wysiwyg_Editor In a normal view, tinymce works fine. The forms were constructed manually using form and textarea tags (It's a long story why sqlform isn't use but let's leave that for another time) Now I have a 2 components: a comments list component and a comments form component. Prior to the installation of tinymce, a comment created will automatically update the comments list via ajax. So what happens when I install tinymce? Well I am able to get the editor over the text area. However there are some strange things. Upon a fresh reload, the first form submission of the comments form will always activate Enter a value. The second submission (without refresh), causes the form to be submitted, but this time, the comments list won't be updated. If this is helpful, the code to do the ajax update of the comments form is as follows: $('#comments_form').live('change', function(){ $.get({{=URL(a='roverus', c='comment', f='read.load', vars={'current_worksheet':request.args[0]})}}, function(data){ web2py_component('/roverus/comment/read.load? current_conversation=' + current_conversation, conversation); }); }) I have tried looking at the javascript console but there are no errors. Any tips to debug this is welcomed. Thanks in advance.
Re: [web2py] Re: new admin layout
On Fri, Nov 5, 2010 at 11:40 AM, selecta gr...@delarue-berlin.de wrote: also it should be css = cursor: pointer; when i did not see my mouse trurn to a hand i thought i could not click it These issues will hopefully be resolved in a consistent manner (not by patch one thing at a time, but everything at once) once the HTML is reworked, and a cleaner CSS is written for it. In any case, expect a new update next week, since this baby has to ship before the supercomputing conference presentation. ;) As part of the HTML refactoring effort, I'll remove most inline images, and convert them to background images, so if you want an alternative theme, it'll be easier to implement using just CSS without hacking HTML. This could be a step towards user themes or whatever you want. Also, I've decided to redo the theme once more. I've had something like this on mind: http://www.workroomdesign.com/images/projects/mrecon3.png Clean with just orange. Another option would be a dark theme: http://media02.hongkiat.com/design_starter_kits/Web-Form-Elements-02.jpg Or a combination of dark with orange. Does anyone here prefer dark themes? I myself have switched to a light theme on my desktop, so I don't mind the light theme, but I've been in love with the dark themes for a long time. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: blob readable writeable = false not workin
The origin of this need is the following : In web2py 1.83.2 we was possible to omit the upload of file for the field, but with the exact same model and controller in web2py 1.88.2 it raise a ticket in case upload is omited. Richard On Fri, Nov 5, 2010 at 12:11 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, How I may hide blob field from a form? I did : db[request.args(0)].blobfield.readable=\ db[request.args(0)].blobfield.writeable=\ db[request.args(0)].blobfield_blob.readable=\ db[request.args(0)].blobfield_blob.writeable=False In my controller without succes. I use crud.create(db[request.args(0)]) Thanks Richard
[web2py] plugin.wiki.theme: error in book?
from gluon.tools import PluginManager plugins = PluginManager plugins.wiki.theme = 'cupertino' results in Traceback (most recent call last): File /Users/js/Programmeer/zenex/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/db.py, line 106, in module plugins.wiki.theme = 'cupertino' AttributeError: type object 'PluginManager' has no attribute 'wiki' According to the book one should be able to do that. A mistake in the book? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: customizating the headers of the result in crud.search
I think I got excited too soon. I tried these method and it seems that it not works. This is the traceback: Traceback (most recent call last): File /home/demetrio/devel/web2py_devel/trunk/devel/web2py/gluon/ restricted.py, line 188, in restricted exec ccode in environment File /home/demetrio/devel/web2py_devel/trunk/devel/web2py/ applications/calendar/views/calendars/search.html, line 97, in module File /home/demetrio/devel/web2py_devel/trunk/devel/web2py/gluon/ sqlhtml.py, line 1192, in __init__ columns = sqlrows.colnames AttributeError: 'list' object has no attribute 'colnames' One question, i'm using web2py Version 1.87.3. Can it be that this funcionality is applied on trunk or newer versions? Thx again for your time. On 2 nov, 16:04, demetrio dgzabal...@gmail.com wrote: Thanks a lot Massimo! On 2 nov, 14:58, mdipierro mdipie...@cs.depaul.edu wrote: Yes. In the view, instead of {{=rows}} do {{=SQLTABLE(rows,headers=)}} On Nov 2, 5:43 am, demetrio dgzabal...@gmail.com wrote: Hi, first of all sorry if I made any mistake in english :) When i try to make acrud.search(), i can customize the names of the search form, but i cant do the same with the results' headers. def search(): db.licenses.id.represent = lambda id: \ DIV(A('edit',_href=URL(r=request, f='update', args=(id))), , A('read',_href=URL(r=request, f='read', args=(id))), ,A('delete',_onclick=return confirm(' + T(Are you sure to delete?) +'),_href=URL(r=request, f='delete', args=(id form, rows =crud.search(db.licenses, field_labels = {'id':'ID','name':'Name'}) return dict(form=form, rows=rows) With this, code my form is something like: checkbox ID select input checkbox Name select input but my results table is: licenses.id licenses.name -- edit read delete resultname1 edit read delete resultname2 edit read delete resultname3 Do you know if there is any posibility to customize that header names?, it will be nice if I could use the headers parameter like in the crud.search() method because you can do something like this modifying the represent of the id Search Form: checkbox **ID** select input checkbox Name select input Results: **Actions** Name -- edit read delete resultname1 edit read delete resultname2 edit read delete resultname3 notice that the field licenses.id in the form is named **ID**, and in the results is named **Actions** Thats all, thanks in advance :)
[web2py] Re: How to make a dropbox in a create.form with IS_IN_DB and an join of multiple tables
It works! Thank you very much! On 4 nov, 22:03, howesc how...@umich.edu wrote: your problem is where you put the query in the IS_IN_DB. try modifying to put the query in the first spot. something like: requires=IS_IN_DB(db((db.file_asset.type == db.file_asset_type.id) (db.file_asset_type.name=='Album Art')), db.file_asset.id, '% (name)s')), (no that is not from your example, but a clipping from one of my models) cfh On Nov 4, 11:16 am, demetrio dgzabal...@gmail.com wrote: Hi everyone! I'm doing an app with fullcalendar (http://arshaw.com/fullcalendar/) and now i'm with all the events and calendar cruds. Its time to add some logic to the crud.create() of the events, an only let the user to add events in his/her calendars, not in ALL the calendars. I have this: db.define_table('calendars', Field('name', 'string', required=True, notnull=True), #Field('project_id', 'reference', default=None, required=True), format='%(name)s') db.define_table('events', Field('title', 'string', required=True, notnull=True, label=T('Title')), Field('place', 'string', label=T('Place')), Field('description', 'text', label=T('Description')), Field('init_date', 'datetime', required=True, label=T('Init date')), Field('end_date', 'datetime', required=True, label=T('End date')), Field('calendar_id', 'reference calendars', label=T('Calendar')), Field('all_day', 'boolean', default=False, required=True, label=T('All day')), format='%(title)s' ) db.define_table('user_calendars', Field('calendar', 'reference calendars', required=True, notnull=True, label=T('Calendar')), Field('color', 'string', default=blue, required=True, label=T('Color')), Field('fullcalendar_class', 'string', required=True, writable=False, readable=False), Field('permissions', 'string', required=True, label=T('Permissions'), requires=IS_IN_SET(['r', 'rw', 'owner'], zero=None)), Field('user_id', 'reference auth_user', required=True, notnull=True, label=T('User')), format='') With that model defined, in the events crud, will appear ALL the calendars, so i have tried to do something like this: def create(): query = ((db.user_calendars.calendar == db.calendars.id) (db.user_calendars.user_id == auth.user.id) ((db.user_calendars.permissions ==owner) | (db.user_calendars.permissions==rw))) db.events.calendar_id.requires =IS_IN_DB(db, query, zero=None ) return dict(form=crud.create(db.events)) And i found that the IS_IN_DB doesn't admit SQL queries xD the query is something like: give me all my calendars and the ones where i can write Is there any quick and optimal solution to make all of this in the controller? or i have to customize the crud form in the view?. Thanks in advance!
[web2py] Re: How to make a dropbox in a create.form with IS_IN_DB and an join of multiple tables
At the moment we are developing the app in a private SVN server, but I think that we are gonna release the project on January-February (more or less), and if nothing changes, it will be open source. Anyway, i'll speak with the other developer on the next monday about this. best regards On 4 nov, 20:09, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello! I am very interresting in your dev. I would like to help if possible. Richard On Thu, Nov 4, 2010 at 2:16 PM, demetrio dgzabal...@gmail.com wrote: Hi everyone! I'm doing an app with fullcalendar (http://arshaw.com/fullcalendar/) and now i'm with all the events and calendar cruds. Its time to add some logic to the crud.create() of the events, an only let the user to add events in his/her calendars, not in ALL the calendars. I have this: db.define_table('calendars', Field('name', 'string', required=True, notnull=True), #Field('project_id', 'reference', default=None, required=True), format='%(name)s') db.define_table('events', Field('title', 'string', required=True, notnull=True, label=T('Title')), Field('place', 'string', label=T('Place')), Field('description', 'text', label=T('Description')), Field('init_date', 'datetime', required=True, label=T('Init date')), Field('end_date', 'datetime', required=True, label=T('End date')), Field('calendar_id', 'reference calendars', label=T('Calendar')), Field('all_day', 'boolean', default=False, required=True, label=T('All day')), format='%(title)s' ) db.define_table('user_calendars', Field('calendar', 'reference calendars', required=True, notnull=True, label=T('Calendar')), Field('color', 'string', default=blue, required=True, label=T('Color')), Field('fullcalendar_class', 'string', required=True, writable=False, readable=False), Field('permissions', 'string', required=True, label=T('Permissions'), requires=IS_IN_SET(['r', 'rw', 'owner'], zero=None)), Field('user_id', 'reference auth_user', required=True, notnull=True, label=T('User')), format='') With that model defined, in the events crud, will appear ALL the calendars, so i have tried to do something like this: def create(): query = ((db.user_calendars.calendar == db.calendars.id) (db.user_calendars.user_id == auth.user.id) ((db.user_calendars.permissions ==owner) | (db.user_calendars.permissions==rw))) db.events.calendar_id.requires =IS_IN_DB(db, query, zero=None ) return dict(form=crud.create(db.events)) And i found that the IS_IN_DB doesn't admit SQL queries xD the query is something like: give me all my calendars and the ones where i can write Is there any quick and optimal solution to make all of this in the controller? or i have to customize the crud form in the view?. Thanks in advance!
[web2py] How to perform a sort() in joined Rows?
I need to do .sort() in a Rows object gerenarate by select join. I get key error if I use onlye the field name. Looks like the structure is different when it comes from a join. So it sort must be different. This is bad. How to do it?
Re: [web2py] Re: \sample markmin app
Changing the subject a little, What about including a markmin widget for 'text' datatype? Field('myMarkup','text',widget='markmin') or simply Field('MyMarkup','markmin') then auto generated forms would render it by default including the markitUp editor in the widget. The same could be done for a kind of 'html' widget/type includind an html editor What about? 2010/11/5 mdipierro mdipie...@cs.depaul.edu Markitup is not plugin_wiki (static/plugin_wiki/markitup) not in web2py On Nov 5, 4:23 am, villas villa...@gmail.com wrote: it has been included for some time. Could you tell me exactly where the editor MarkItUp is included? I looked in Contrib etc but maybe I'm missing something? Sorry for this question but I am not always very good at seeing what is obvious! :-) On Nov 4, 6:25 pm, mdipierro mdipie...@cs.depaul.edu wrote: it has been included for some time. You can use it via the MARKMIN helper. On Nov 4, 12:34 pm, villas villa...@gmail.com wrote: That looks like a great combination with the editor! Is Markitup going to be included as standard? -D -- http://rochacbruno.com.br
[web2py] SQLTABLE linkto
Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
Re: [web2py] Re: new admin layout
My vote is for a light-ish theme. -- Thadeus On Fri, Nov 5, 2010 at 11:38 AM, Branko Vukelic bg.bra...@gmail.com wrote: On Fri, Nov 5, 2010 at 11:40 AM, selecta gr...@delarue-berlin.de wrote: also it should be css = cursor: pointer; when i did not see my mouse trurn to a hand i thought i could not click it These issues will hopefully be resolved in a consistent manner (not by patch one thing at a time, but everything at once) once the HTML is reworked, and a cleaner CSS is written for it. In any case, expect a new update next week, since this baby has to ship before the supercomputing conference presentation. ;) As part of the HTML refactoring effort, I'll remove most inline images, and convert them to background images, so if you want an alternative theme, it'll be easier to implement using just CSS without hacking HTML. This could be a step towards user themes or whatever you want. Also, I've decided to redo the theme once more. I've had something like this on mind: http://www.workroomdesign.com/images/projects/mrecon3.png Clean with just orange. Another option would be a dark theme: http://media02.hongkiat.com/design_starter_kits/Web-Form-Elements-02.jpg Or a combination of dark with orange. Does anyone here prefer dark themes? I myself have switched to a light theme on my desktop, so I don't mind the light theme, but I've been in love with the dark themes for a long time. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
[web2py] Re: customizating the headers of the result in crud.search
It seems that it's been a long day... {{if not rows:}} No matches found {{else:}} {{=SQLTABLE(rows,headers={field.id:custom name id, field.name:custom name})}} {{pass}} more simple... impossible... Sorry for wasting your time :( On 5 nov, 18:06, demetrio dgzabal...@gmail.com wrote: I think I got excited too soon. I tried these method and it seems that it not works. This is the traceback: Traceback (most recent call last): File /home/demetrio/devel/web2py_devel/trunk/devel/web2py/gluon/ restricted.py, line 188, in restricted exec ccode in environment File /home/demetrio/devel/web2py_devel/trunk/devel/web2py/ applications/calendar/views/calendars/search.html, line 97, in module File /home/demetrio/devel/web2py_devel/trunk/devel/web2py/gluon/ sqlhtml.py, line 1192, in __init__ columns = sqlrows.colnames AttributeError: 'list' object has no attribute 'colnames' One question, i'm using web2py Version 1.87.3. Can it be that this funcionality is applied on trunk or newer versions? Thx again for your time. On 2 nov, 16:04, demetrio dgzabal...@gmail.com wrote: Thanks a lot Massimo! On 2 nov, 14:58, mdipierro mdipie...@cs.depaul.edu wrote: Yes. In the view, instead of {{=rows}} do {{=SQLTABLE(rows,headers=)}} On Nov 2, 5:43 am, demetrio dgzabal...@gmail.com wrote: Hi, first of all sorry if I made any mistake in english :) When i try to make acrud.search(), i can customize the names of the search form, but i cant do the same with the results' headers. def search(): db.licenses.id.represent = lambda id: \ DIV(A('edit',_href=URL(r=request, f='update', args=(id))), , A('read',_href=URL(r=request, f='read', args=(id))), ,A('delete',_onclick=return confirm(' + T(Are you sure to delete?) +'),_href=URL(r=request, f='delete', args=(id form, rows =crud.search(db.licenses, field_labels = {'id':'ID','name':'Name'}) return dict(form=form, rows=rows) With this, code my form is something like: checkbox ID select input checkbox Name select input but my results table is: licenses.id licenses.name -- edit read delete resultname1 edit read delete resultname2 edit read delete resultname3 Do you know if there is any posibility to customize that header names?, it will be nice if I could use the headers parameter like in the crud.search() method because you can do something like this modifying the represent of the id Search Form: checkbox **ID** select input checkbox Name select input Results: **Actions** Name -- edit read delete resultname1 edit read delete resultname2 edit read delete resultname3 notice that the field licenses.id in the form is named **ID**, and in the results is named **Actions** Thats all, thanks in advance :)
Re: [web2py] SQLTABLE linkto
I think you should specify r=request, f=YOURFUNCTION, args=request.args(0)+'/'+str(ID) request.args(0) = YOURTABLENAMESPECIFYINREQUEST Works for me! Richard On Fri, Nov 5, 2010 at 2:00 PM, villas villa...@gmail.com wrote: Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
[web2py] Re: plugin.wiki.theme: error in book?
plugins = PluginManager should be plugins = PluginManager() On Nov 5, 12:02 pm, Johann Spies johann.sp...@gmail.com wrote: from gluon.tools import PluginManager plugins = PluginManager plugins.wiki.theme = 'cupertino' results in Traceback (most recent call last): File /Users/js/Programmeer/zenex/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /Users/js/Programmeer/zenex/web2py/applications/zenex2/models/db.py, line 106, in module plugins.wiki.theme = 'cupertino' AttributeError: type object 'PluginManager' has no attribute 'wiki' According to the book one should be able to do that. A mistake in the book? Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us everything we need for life and godliness through the full knowledge of the one who called us by his own glory and excellence. 2 Pet. 1:2b,3a
[web2py] Re: How to perform a sort() in joined Rows?
You always have to options: sort at the db level (1) or sort ate the web2py level (2) 1) rows = db(query).select(orderby=db.table1.field1) 2) rows=rows.sort(lambda row: row.table1.field1) On Nov 5, 12:31 pm, yamandu yamandu.co...@gmail.com wrote: I need to do .sort() in a Rows object gerenarate by select join. I get key error if I use onlye the field name. Looks like the structure is different when it comes from a join. So it sort must be different. This is bad. How to do it?
Re: [web2py] Re: list:reference issue
What widget is that used in your Capture.png? 2010/11/4 Richard Vézina ml.richard.vez...@gmail.com More input on the problem. It happen when the date validator is activated. The refresh form not expose the normal list field. I reproduce the problem with Chrome and Firefox systematically when the date is forgot and required by the model. I attach screenshot of the problem : Capture.png = when date validator is activated Capature-1.png = normal list selector field The main problem is that the id is splited. Richard On Thu, Nov 4, 2010 at 1:57 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok I know what the problem has cause : It seems that the new version is splitting id into single number : 35 = |3|5| 94 = |9|4| Instead of : 94 = |94| Richard On Thu, Nov 4, 2010 at 12:33 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I get this error... I have no clue why I get it. I think it not coming from my app : Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /home/www-data/web2py/applications/init/views/appadmin.html https://127.0.0.1/admin/default/edit/init/views/appadmin.html, line 192, in module {{=form}} File /home/www-data/web2py/gluon/sqlhtml.py, line 1273, in __init__ r = field.represent(r) File /home/www-data/web2py/gluon/sql.py, line 518, in lambda (ids and ', '.join(f(r,id) for id in ids) or '') TypeError: sequence item 0: expected string, int found Error snapshot*Detailed traceback description* - Exception: type 'exceptions.TypeError'(sequence item 0: expected string, int found) - Python 2.6.4: /usr/bin/python File /home/www-data/web2py/gluon/restricted.py in restricted at line 188 [ code | arguments | variables ] File /home/www-data/web2py/applications/init/views/appadmin.html in module at line 192[ code | arguments | variables ] File /home/www-data/web2py/gluon/sqlhtml.py in __init__ at line 1273[ code | arguments | variables ] File /home/www-data/web2py/gluon/sql.py in lambda at line 518[ code | arguments | variables ] *Function argument list: (ids=[9, 4], r=Table {'first_name': gluon.sql.Field object at...itials': gluon.sql.Field object at 0xbb52a50c}, f=function ff at 0xbb1db02c)* 513. 514. 515. 516. 517. 518. 519. 520. 521. 522. elif field._db and field_type.startswith('list:reference') and \ field_type.find('.') 0 and \ field_type[15:] in field._db.tables: referenced = field._db[field_type[15:]] field.represent = lambda ids, r=referenced, f=ff: \ (ids and ', '.join(f(r,id) for id in ids) or '') if hasattr(referenced, '_format') and referenced._format: requires = validators.IS_IN_DB(field._db,referenced.id, referenced._format,multiple=True) if field.unique: * * *Richard* * * -- http://rochacbruno.com.br
[web2py] Re: \sample markmin app
Field('MyMarkup','text',represent=lambda t: MARKMIN(t)) On Nov 5, 12:46 pm, Bruno Rocha rochacbr...@gmail.com wrote: Changing the subject a little, What about including a markmin widget for 'text' datatype? Field('myMarkup','text',widget='markmin') or simply Field('MyMarkup','markmin') then auto generated forms would render it by default including the markitUp editor in the widget. The same could be done for a kind of 'html' widget/type includind an html editor What about? 2010/11/5 mdipierro mdipie...@cs.depaul.edu Markitup is not plugin_wiki (static/plugin_wiki/markitup) not in web2py On Nov 5, 4:23 am, villas villa...@gmail.com wrote: it has been included for some time. Could you tell me exactly where the editor MarkItUp is included? I looked in Contrib etc but maybe I'm missing something? Sorry for this question but I am not always very good at seeing what is obvious! :-) On Nov 4, 6:25 pm, mdipierro mdipie...@cs.depaul.edu wrote: it has been included for some time. You can use it via the MARKMIN helper. On Nov 4, 12:34 pm, villas villa...@gmail.com wrote: That looks like a great combination with the editor! Is Markitup going to be included as standard? -D -- http://rochacbruno.com.br
Re: [web2py] SQLTABLE linkto
On Nov 5, 2010, at 11:00 AM, villas wrote: Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I wonder if this is really a duplication. As web2py interprets a URL, the first mytable is a function name, and the second (in this case) is a table name, right? They happen to have the same name here. (That said, SQLTABLE's linkto logic is distinctly non-trivial; I'm not at all sure what's going on in several of the cases.) I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
[web2py] Re: new admin layout
I like white background and neutral colors (like grey buttons, black header, etc.) and orange for links and edit buttons. On Nov 5, 11:38 am, Branko Vukelic bg.bra...@gmail.com wrote: On Fri, Nov 5, 2010 at 11:40 AM, selecta gr...@delarue-berlin.de wrote: also it should be css = cursor: pointer; when i did not see my mouse trurn to a hand i thought i could not click it These issues will hopefully be resolved in a consistent manner (not by patch one thing at a time, but everything at once) once the HTML is reworked, and a cleaner CSS is written for it. In any case, expect a new update next week, since this baby has to ship before the supercomputing conference presentation. ;) As part of the HTML refactoring effort, I'll remove most inline images, and convert them to background images, so if you want an alternative theme, it'll be easier to implement using just CSS without hacking HTML. This could be a step towards user themes or whatever you want. Also, I've decided to redo the theme once more. I've had something like this on mind: http://www.workroomdesign.com/images/projects/mrecon3.png Clean with just orange. Another option would be a dark theme: http://media02.hongkiat.com/design_starter_kits/Web-Form-Elements-02.jpg Or a combination of dark with orange. Does anyone here prefer dark themes? I myself have switched to a light theme on my desktop, so I don't mind the light theme, but I've been in love with the dark themes for a long time. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group
[web2py] Re: Clone and rename apps in admin
I think we can modify admin/controller/default.py site() and when you upload a new up, if instead of a url you provide an app name it gets cloned. On Nov 5, 10:16 am, Bruno Rocha rochacbr...@gmail.com wrote: HI, I Know it is easy to clone an app within console using $ cp /app/* -R /newapp/ or something like this But, I am working in a project hosted in a shared poor host, where I have access to admin via HTTPS, but I have not the SSH access. Sometimes I need to clone an existing application for testing new features without breaking the running app. two things I would like to have in /admin is [clone this app] which copy the application in to a new application with a new name. [rename this app] which simply change the name of the app directory What about?
[web2py] Re: list:reference issue
I do not understand: db.define_table('userlist', Field('fname','string',notnull=True), Field('lname','string',notnull=True), format='%(fname)s %(lname)s (%(id)s)') db.define_table('name', Field('name','string',notnull=True), Field('date','date',notnull=True), Field('userselect','list:reference tablelist',notnull=True)) there is no table tablelist. This On Nov 5, 11:24 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Can't reproduce it in a dedicated app. But the list:reference doesn't seems to me to work correctly as it was in the 1.83.2 in which it was managing a list reprensentation. Now I can't pick my stuff from a list like in the attached file I sent yesterday. There is only a empty field. If I try to pass a list of element like : |1|2| it store 0. Pretty strange behavior to me. Attached app. Go to default/create/userlist Create some user Then go to default/create/name See that there is no way to pick the user charged in userlist table There is also default/read/name/ID where you can see that there no list stored in case you load |1|2| in create view. Regards Richard On Thu, Nov 4, 2010 at 4:33 PM, mdipierro mdipie...@cs.depaul.edu wrote: Can you please post the model, the controller and the steps to reproduce the problem? Massimo On Nov 4, 3:29 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: More input on the problem. It happen when the date validator is activated. The refresh form not expose the normal list field. I reproduce the problem with Chrome and Firefox systematically when the date is forgot and required by the model. I attach screenshot of the problem : Capture.png = when date validator is activated Capature-1.png = normal list selector field The main problem is that the id is splited. Richard On Thu, Nov 4, 2010 at 1:57 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: Ok I know what the problem has cause : It seems that the new version is splitting id into single number : 35 = |3|5| 94 = |9|4| Instead of : 94 = |94| Richard On Thu, Nov 4, 2010 at 12:33 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I get this error... I have no clue why I get it. I think it not coming from my app : Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /home/www-data/web2py/applications/init/views/appadmin.html https://127.0.0.1/admin/default/edit/init/views/appadmin.html, line 192, in module {{=form}} File /home/www-data/web2py/gluon/sqlhtml.py, line 1273, in __init__ r = field.represent(r) File /home/www-data/web2py/gluon/sql.py, line 518, in lambda (ids and ', '.join(f(r,id) for id in ids) or '') TypeError: sequence item 0: expected string, int found Error snapshot*Detailed traceback description* - Exception: type 'exceptions.TypeError'(sequence item 0: expected string, int found) - Python 2.6.4: /usr/bin/python File /home/www-data/web2py/gluon/restricted.py in restricted at line 188 [ code | arguments | variables ] File /home/www-data/web2py/applications/init/views/appadmin.html in module at line 192[ code | arguments | variables ] File /home/www-data/web2py/gluon/sqlhtml.py in __init__ at line 1273[ code | arguments | variables ] File /home/www-data/web2py/gluon/sql.py in lambda at line 518[ code | arguments | variables ] *Function argument list: (ids=[9, 4], r=Table {'first_name': gluon.sql.Field object at...itials': gluon.sql.Field object at 0xbb52a50c}, f=function ff at 0xbb1db02c)* 513. 514. 515. 516. 517. 518. 519. 520. 521. 522. elif field._db and field_type.startswith('list:reference') and \ field_type.find('.') 0 and \ field_type[15:] in field._db.tables: referenced = field._db[field_type[15:]] field.represent = lambda ids, r=referenced, f=ff: \ (ids and ', '.join(f(r,id) for id in ids) or '') if hasattr(referenced, '_format') and referenced._format: requires = validators.IS_IN_DB(field._db,referenced.id, referenced._format,multiple=True) if field.unique: * * *Richard* * * Capture.png 10KViewDownload Capture-1.png 12KViewDownload web2py.app.applistissue.w2p 107KViewDownload
[web2py] Re: How to perform a sort() in joined Rows?
Thanks Massimo, I realized the need to use the tablename but as I am writing a helper class for reporting this was harder. The code has to figure out when this is needed. I borrowed two lines of code from webgrid.py and id solved to me: self.tablenames = list(set(map(lambda c: c.split('.')[0], rows.colnames))) self.joined = len(self.tablenames) 1 Although I have not understand it completely, it worked. On Nov 5, 4:30 pm, mdipierro mdipie...@cs.depaul.edu wrote: You always have to options: sort at the db level (1) or sort ate the web2py level (2) 1) rows = db(query).select(orderby=db.table1.field1) 2) rows=rows.sort(lambda row: row.table1.field1) On Nov 5, 12:31 pm, yamandu yamandu.co...@gmail.com wrote: I need to do .sort() in a Rows object gerenarate by select join. I get key error if I use onlye the field name. Looks like the structure is different when it comes from a join. So it sort must be different. This is bad. How to do it?
[web2py] Re: Language File is Reseted when Server is Reseted
I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN!
Re: [web2py] Re: list:reference issue
No widget. On Fri, Nov 5, 2010 at 2:30 PM, Bruno Rocha rochacbr...@gmail.com wrote: What widget is that used in your Capture.png? 2010/11/4 Richard Vézina ml.richard.vez...@gmail.com More input on the problem. It happen when the date validator is activated. The refresh form not expose the normal list field. I reproduce the problem with Chrome and Firefox systematically when the date is forgot and required by the model. I attach screenshot of the problem : Capture.png = when date validator is activated Capature-1.png = normal list selector field The main problem is that the id is splited. Richard On Thu, Nov 4, 2010 at 1:57 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok I know what the problem has cause : It seems that the new version is splitting id into single number : 35 = |3|5| 94 = |9|4| Instead of : 94 = |94| Richard On Thu, Nov 4, 2010 at 12:33 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I get this error... I have no clue why I get it. I think it not coming from my app : Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /home/www-data/web2py/applications/init/views/appadmin.html https://127.0.0.1/admin/default/edit/init/views/appadmin.html, line 192, in module {{=form}} File /home/www-data/web2py/gluon/sqlhtml.py, line 1273, in __init__ r = field.represent(r) File /home/www-data/web2py/gluon/sql.py, line 518, in lambda (ids and ', '.join(f(r,id) for id in ids) or '') TypeError: sequence item 0: expected string, int found Error snapshot*Detailed traceback description* - Exception: type 'exceptions.TypeError'(sequence item 0: expected string, int found) - Python 2.6.4: /usr/bin/python File /home/www-data/web2py/gluon/restricted.py in restricted at line 188[ code | arguments | variables ] File /home/www-data/web2py/applications/init/views/appadmin.html in module at line 192[ code | arguments | variables ] File /home/www-data/web2py/gluon/sqlhtml.py in __init__ at line 1273[ code | arguments | variables ] File /home/www-data/web2py/gluon/sql.py in lambda at line 518[ code | arguments | variables ] *Function argument list: (ids=[9, 4], r=Table {'first_name': gluon.sql.Field object at...itials': gluon.sql.Field object at 0xbb52a50c}, f=function ff at 0xbb1db02c)* 513. 514. 515. 516. 517. 518. 519. 520. 521. 522. elif field._db and field_type.startswith('list:reference') and \ field_type.find('.') 0 and \ field_type[15:] in field._db.tables: referenced = field._db[field_type[15:]] field.represent = lambda ids, r=referenced, f=ff: \ (ids and ', '.join(f(r,id) for id in ids) or '') if hasattr(referenced, '_format') and referenced._format: requires = validators.IS_IN_DB(field._db,referenced.id, referenced._format,multiple=True) if field.unique: * * *Richard* * * -- http://rochacbruno.com.br
Re: [web2py] Re: new admin layout
I think it was mentioned a few times that orange is not very readable. I tend to agree with that, too. Anyone else had that problem? On Fri, Nov 5, 2010 at 7:33 PM, mdipierro mdipie...@cs.depaul.edu wrote: I like white background and neutral colors (like grey buttons, black header, etc.) and orange for links and edit buttons. On Nov 5, 11:38 am, Branko Vukelic bg.bra...@gmail.com wrote: On Fri, Nov 5, 2010 at 11:40 AM, selecta gr...@delarue-berlin.de wrote: also it should be css = cursor: pointer; when i did not see my mouse trurn to a hand i thought i could not click it These issues will hopefully be resolved in a consistent manner (not by patch one thing at a time, but everything at once) once the HTML is reworked, and a cleaner CSS is written for it. In any case, expect a new update next week, since this baby has to ship before the supercomputing conference presentation. ;) As part of the HTML refactoring effort, I'll remove most inline images, and convert them to background images, so if you want an alternative theme, it'll be easier to implement using just CSS without hacking HTML. This could be a step towards user themes or whatever you want. Also, I've decided to redo the theme once more. I've had something like this on mind: http://www.workroomdesign.com/images/projects/mrecon3.png Clean with just orange. Another option would be a dark theme: http://media02.hongkiat.com/design_starter_kits/Web-Form-Elements-02.jpg Or a combination of dark with orange. Does anyone here prefer dark themes? I myself have switched to a light theme on my desktop, so I don't mind the light theme, but I've been in love with the dark themes for a long time. -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] Re: \sample markmin app
2010/11/5 mdipierro mdipie...@cs.depaul.edu Field('MyMarkup','text',represent=lambda t: MARKMIN(t)) Nice! I should use that right now! but this only renders markmin in to html, I am talking about including the markmin editor into a widget for insert/update
[web2py] Re: SQLTABLE linkto
@Jonathan I think you are right about the /function/table/id convention for SQLTABLE linkto. But by using linkto=URL() I should be able specify whichever URL I want rather than have to work around an unnecessary convention? @Richard I played around a little, but I couldn't make that work for me, but maybe I'm missing something. On Nov 5, 6:33 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 5, 2010, at 11:00 AM, villas wrote: Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I wonder if this is really a duplication. As web2py interprets a URL, the first mytable is a function name, and the second (in this case) is a table name, right? They happen to have the same name here. (That said, SQLTABLE's linkto logic is distinctly non-trivial; I'm not at all sure what's going on in several of the cases.) I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
Re: [web2py] Re: SQLTABLE linkto
Try this! table.id.represent = lambda id: \ A('Edit',_href=URL(r=request,f='FUNCNAME',args=('TABLE',id))) On Fri, Nov 5, 2010 at 3:11 PM, villas villa...@gmail.com wrote: @Jonathan I think you are right about the /function/table/id convention for SQLTABLE linkto. But by using linkto=URL() I should be able specify whichever URL I want rather than have to work around an unnecessary convention? @Richard I played around a little, but I couldn't make that work for me, but maybe I'm missing something. On Nov 5, 6:33 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 5, 2010, at 11:00 AM, villas wrote: Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I wonder if this is really a duplication. As web2py interprets a URL, the first mytable is a function name, and the second (in this case) is a table name, right? They happen to have the same name here. (That said, SQLTABLE's linkto logic is distinctly non-trivial; I'm not at all sure what's going on in several of the cases.) I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
Re: [web2py] Re: SQLTABLE linkto
On Nov 5, 2010, at 12:11 PM, villas wrote: @Jonathan I think you are right about the /function/table/id convention for SQLTABLE linkto. But by using linkto=URL() I should be able specify whichever URL I want rather than have to work around an unnecessary convention? Probably not, at least not the way I read SQLTABLE. I'm not certain, but I think that in your example, this is the way SQLTABLE is generating the href: href = '%s/%s/%s' % (linkto, tablename, r_old) Since linkto is the result of URL(), it'll have the function name, and the above logic is always appending the table name to it (r_old is, I assume, the id, but maybe not). That line of code is part of this: elif linkto and field.type == 'id': try: href = linkto(r, 'table', tablename) except TypeError: href = '%s/%s/%s' % (linkto, tablename, r_old) r = A(r, _href=href) (I'm not 100% sure how r gets built, but as you see it's the link text, so you should be able to look and see what it is.) It looks like you can make linkto a lambda function, in which case you'll have complete control over the href. @Richard I played around a little, but I couldn't make that work for me, but maybe I'm missing something. On Nov 5, 6:33 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 5, 2010, at 11:00 AM, villas wrote: Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I wonder if this is really a duplication. As web2py interprets a URL, the first mytable is a function name, and the second (in this case) is a table name, right? They happen to have the same name here. (That said, SQLTABLE's linkto logic is distinctly non-trivial; I'm not at all sure what's going on in several of the cases.) I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
Re: [web2py] Re: Clone and rename apps in admin
Cool! But [rename app] will be needed to manage app versions 2010/11/5 mdipierro mdipie...@cs.depaul.edu I think we can modify admin/controller/default.py site() and when you upload a new up, if instead of a url you provide an app name it gets cloned. On Nov 5, 10:16 am, Bruno Rocha rochacbr...@gmail.com wrote: HI, I Know it is easy to clone an app within console using $ cp /app/* -R /newapp/ or something like this But, I am working in a project hosted in a shared poor host, where I have access to admin via HTTPS, but I have not the SSH access. Sometimes I need to clone an existing application for testing new features without breaking the running app. two things I would like to have in /admin is [clone this app] which copy the application in to a new application with a new name. [rename this app] which simply change the name of the app directory What about? -- http://rochacbruno.com.br
[web2py] Logical Delete instead of true delete of a record using crud.update
Sorry if this is a repeat, but I have not seen my original post. I have a situation where I would like to use the crud.update with the delete checkbox, I am using the ondelete callback to set other record to invalid, however after the ondelete function completes the underlying record is deleted. Is there a way to keep this from happening?
[web2py] Re: Logical Delete instead of true delete of a record using crud.update
Thanks, I will do that, or something similar. BTW, ignore my other post, for some reason I could not find the original post and posted again. Greg On Nov 4, 2:58 pm, mdipierro mdipie...@cs.depaul.edu wrote: hm. that breaks the workflow. You should expose the nonvalid field (field.writable=True) and do a crud.update(,deletable=False) On Nov 4, 1:31 pm, ggivler ggiv...@gmail.com wrote: I have a crud.update form that is deletable, I use the ondelete callback function to mark the records as nonvalid, is there a way to keep the record from being deleted after this?
[web2py] Re: Logical Delete instead of true delete of a record using crud.update
Ignore this, it is a duplicate. On Nov 5, 3:38 pm, ggivler ggiv...@gmail.com wrote: Sorry if this is a repeat, but I have not seen my original post. I have a situation where I would like to use the crud.update with the delete checkbox, I am using the ondelete callback to set other record to invalid, however after the ondelete function completes the underlying record is deleted. Is there a way to keep this from happening?
[web2py] Re: Language File is Reseted when Server is Reseted
delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN!
[web2py] Re: Using tinymce for text areas of in component views
Erm I know the issue already. Too complex to put in words. On Nov 6, 12:31 am, Luther Goh Lu Feng elf...@yahoo.com wrote: I have implemeted the basic tinymce editor here:http:// wiki.moxiecode.com/index.php/ TinyMCE:For_Dummies#To_create_a_very_simple_TinyMCE_wysiwyg_Editor In a normal view, tinymce works fine. The forms were constructed manually using form and textarea tags (It's a long story why sqlform isn't use but let's leave that for another time) Now I have a 2 components: a comments list component and a comments form component. Prior to the installation of tinymce, a comment created will automatically update the comments list via ajax. So what happens when I install tinymce? Well I am able to get the editor over the text area. However there are some strange things. Upon a fresh reload, the first form submission of the comments form will always activate Enter a value. The second submission (without refresh), causes the form to be submitted, but this time, the comments list won't be updated. If this is helpful, the code to do the ajax update of the comments form is as follows: $('#comments_form').live('change', function(){ $.get({{=URL(a='roverus', c='comment', f='read.load', vars={'current_worksheet':request.args[0]})}}, function(data){ web2py_component('/roverus/comment/read.load? current_conversation=' + current_conversation, conversation); }); }) I have tried looking at the javascript console but there are no errors. Any tips to debug this is welcomed. Thanks in advance.
Re: [web2py] Re: list:reference issue
I will during the weekend. Thank you Massimo Richard On Fri, Nov 5, 2010 at 4:09 PM, mdipierro mdipie...@cs.depaul.edu wrote: I believe this problem was fixed in trunk a few days ago. Did you try trunk? Massimo On Nov 5, 2:11 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Oups! I start with tablelist I forgot to correct it. It solves the problem default multiselect view un broswer... And banko! We can reproduce the first problem I had. If you change Field('userselect','list:reference tablelist',notnull=True)) For Field('userselect','list:reference userlist',notnull=True)) Add some record in userlist then back in name table try to omit the date you will have the problem... The default multiselect view will break in case the date is omit in the validator is trigged. With more then 10 record list:reference split the id into single digit : 10 become 1 and 0 Look at the attachement. Thanks Richard On Fri, Nov 5, 2010 at 2:40 PM, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand: db.define_table('userlist', Field('fname','string',notnull=True), Field('lname','string',notnull=True), format='%(fname)s %(lname)s (%(id)s)') db.define_table('name', Field('name','string',notnull=True), Field('date','date',notnull=True), Field('userselect','list:reference tablelist',notnull=True)) there is no table tablelist. This On Nov 5, 11:24 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Can't reproduce it in a dedicated app. But the list:reference doesn't seems to me to work correctly as it was in the 1.83.2 in which it was managing a list reprensentation. Now I can't pick my stuff from a list like in the attached file I sent yesterday. There is only a empty field. If I try to pass a list of element like : |1|2| it store 0. Pretty strange behavior to me. Attached app. Go to default/create/userlist Create some user Then go to default/create/name See that there is no way to pick the user charged in userlist table There is also default/read/name/ID where you can see that there no list stored in case you load |1|2| in create view. Regards Richard On Thu, Nov 4, 2010 at 4:33 PM, mdipierro mdipie...@cs.depaul.edu wrote: Can you please post the model, the controller and the steps to reproduce the problem? Massimo On Nov 4, 3:29 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: More input on the problem. It happen when the date validator is activated. The refresh form not expose the normal list field. I reproduce the problem with Chrome and Firefox systematically when the date is forgot and required by the model. I attach screenshot of the problem : Capture.png = when date validator is activated Capature-1.png = normal list selector field The main problem is that the id is splited. Richard On Thu, Nov 4, 2010 at 1:57 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: Ok I know what the problem has cause : It seems that the new version is splitting id into single number : 35 = |3|5| 94 = |9|4| Instead of : 94 = |94| Richard On Thu, Nov 4, 2010 at 12:33 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I get this error... I have no clue why I get it. I think it not coming from my app : Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /home/www-data/web2py/applications/init/views/appadmin.html https://127.0.0.1/admin/default/edit/init/views/appadmin.html, line 192, in module {{=form}} File /home/www-data/web2py/gluon/sqlhtml.py, line 1273, in __init__ r = field.represent(r) File /home/www-data/web2py/gluon/sql.py, line 518, in lambda (ids and ', '.join(f(r,id) for id in ids) or '') TypeError: sequence item 0: expected string, int found Error snapshot*Detailed traceback description* - Exception: type 'exceptions.TypeError'(sequence item 0: expected string, int found) - Python 2.6.4: /usr/bin/python File /home/www-data/web2py/gluon/restricted.py in restricted at line 188 [ code | arguments | variables ] File /home/www-data/web2py/applications/init/views/appadmin.html in module at line 192[ code | arguments | variables ] File /home/www-data/web2py/gluon/sqlhtml.py in __init__ at line 1273[ code | arguments | variables ] File /home/www-data/web2py/gluon/sql.py in lambda at line 518[ code | arguments |
Re: [web2py] Re: list:reference issue
I just test it still there... Richard On Fri, Nov 5, 2010 at 4:18 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: I will during the weekend. Thank you Massimo Richard On Fri, Nov 5, 2010 at 4:09 PM, mdipierro mdipie...@cs.depaul.edu wrote: I believe this problem was fixed in trunk a few days ago. Did you try trunk? Massimo On Nov 5, 2:11 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Oups! I start with tablelist I forgot to correct it. It solves the problem default multiselect view un broswer... And banko! We can reproduce the first problem I had. If you change Field('userselect','list:reference tablelist',notnull=True)) For Field('userselect','list:reference userlist',notnull=True)) Add some record in userlist then back in name table try to omit the date you will have the problem... The default multiselect view will break in case the date is omit in the validator is trigged. With more then 10 record list:reference split the id into single digit : 10 become 1 and 0 Look at the attachement. Thanks Richard On Fri, Nov 5, 2010 at 2:40 PM, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand: db.define_table('userlist', Field('fname','string',notnull=True), Field('lname','string',notnull=True), format='%(fname)s %(lname)s (%(id)s)') db.define_table('name', Field('name','string',notnull=True), Field('date','date',notnull=True), Field('userselect','list:reference tablelist',notnull=True)) there is no table tablelist. This On Nov 5, 11:24 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Can't reproduce it in a dedicated app. But the list:reference doesn't seems to me to work correctly as it was in the 1.83.2 in which it was managing a list reprensentation. Now I can't pick my stuff from a list like in the attached file I sent yesterday. There is only a empty field. If I try to pass a list of element like : |1|2| it store 0. Pretty strange behavior to me. Attached app. Go to default/create/userlist Create some user Then go to default/create/name See that there is no way to pick the user charged in userlist table There is also default/read/name/ID where you can see that there no list stored in case you load |1|2| in create view. Regards Richard On Thu, Nov 4, 2010 at 4:33 PM, mdipierro mdipie...@cs.depaul.edu wrote: Can you please post the model, the controller and the steps to reproduce the problem? Massimo On Nov 4, 3:29 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: More input on the problem. It happen when the date validator is activated. The refresh form not expose the normal list field. I reproduce the problem with Chrome and Firefox systematically when the date is forgot and required by the model. I attach screenshot of the problem : Capture.png = when date validator is activated Capature-1.png = normal list selector field The main problem is that the id is splited. Richard On Thu, Nov 4, 2010 at 1:57 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: Ok I know what the problem has cause : It seems that the new version is splitting id into single number : 35 = |3|5| 94 = |9|4| Instead of : 94 = |94| Richard On Thu, Nov 4, 2010 at 12:33 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, I get this error... I have no clue why I get it. I think it not coming from my app : Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /home/www-data/web2py/applications/init/views/appadmin.html https://127.0.0.1/admin/default/edit/init/views/appadmin.html, line 192, in module {{=form}} File /home/www-data/web2py/gluon/sqlhtml.py, line 1273, in __init__ r = field.represent(r) File /home/www-data/web2py/gluon/sql.py, line 518, in lambda (ids and ', '.join(f(r,id) for id in ids) or '') TypeError: sequence item 0: expected string, int found Error snapshot*Detailed traceback description* - Exception: type 'exceptions.TypeError'(sequence item 0: expected string, int found) - Python 2.6.4: /usr/bin/python File /home/www-data/web2py/gluon/restricted.py in restricted at line 188 [ code | arguments | variables ] File /home/www-data/web2py/applications/init/views/appadmin.html in module at line 192[ code | arguments | variables ] File /home/www-data/web2py/gluon/sqlhtml.py in __init__ at line 1273[
[web2py] Re: Countries as Python objects
www.geonames.org On 3 Nov, 14:18, Bruno Rocha rochacbr...@gmail.com wrote: More difficult to get is a list of States/Cities 2010/11/3 Martín Mulone mulone.mar...@gmail.com Very usefull 2010/11/3 Jason Brower encomp...@gmail.com Yeah, I noticed that a few months ago. It's very nice to use. On Wed, 2010-11-03 at 10:49 -0200, Bruno Rocha wrote: Countries as Python objects http://opencountrycodes.appspot.com/python/ -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com -- http://rochacbruno.com.br
[web2py] Re: Countries as Python objects
sorry, i have a problem with links The correct http://www.geonames.org In download section there are a exhaustive list of regions, cities and countries. On 5 Nov, 22:02, puercoespin jzaragoza.puercoes...@gmail.com wrote: www.geonames.org On 3 Nov, 14:18, Bruno Rocha rochacbr...@gmail.com wrote: More difficult to get is a list of States/Cities 2010/11/3 Martín Mulone mulone.mar...@gmail.com Very usefull 2010/11/3 Jason Brower encomp...@gmail.com Yeah, I noticed that a few months ago. It's very nice to use. On Wed, 2010-11-03 at 10:49 -0200, Bruno Rocha wrote: Countries as Python objects http://opencountrycodes.appspot.com/python/ -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com -- http://rochacbruno.com.br
Re: [web2py] Re: SQLTABLE linkto
On Nov 5, 2010, at 12:18 PM, Richard Vézina wrote: Try this! table.id.represent = lambda id: \ A('Edit',_href=URL(r=request,f='FUNCNAME',args=('TABLE',id))) That's going to have the same problem, since in villas's example, both FUNCNAME and TABLE are 'mytable'. My earlier suggestion is to change this: SQLTABLE(mytablerows,linkto=URL()) to something like this: SQLTABLE(mytablerows, linkto=lambda rep,t,tn: URL(r=request, args=[rep])) On Fri, Nov 5, 2010 at 3:11 PM, villas villa...@gmail.com wrote: @Jonathan I think you are right about the /function/table/id convention for SQLTABLE linkto. But by using linkto=URL() I should be able specify whichever URL I want rather than have to work around an unnecessary convention? @Richard I played around a little, but I couldn't make that work for me, but maybe I'm missing something. On Nov 5, 6:33 pm, Jonathan Lundell jlund...@pobox.com wrote: On Nov 5, 2010, at 11:00 AM, villas wrote: Does SQLTABLE linkto work properly? If I use: SQLTABLE(mytablerows,linkto=URL()) I get URLs like this: myapp/default/mytable/mytable/id Note the duplication of mytable. I wonder if this is really a duplication. As web2py interprets a URL, the first mytable is a function name, and the second (in this case) is a table name, right? They happen to have the same name here. (That said, SQLTABLE's linkto logic is distinctly non-trivial; I'm not at all sure what's going on in several of the cases.) I have tried with URL('mytable') and URL(f='mytable'), but it's the same. Of course I can work around the issue specifying: db.mytable.id.represent = lambda id: A('edit:',id,_href=URL(args=(id))) ...which gives the URL that I expect, but that is not the question here... --D
Re: [web2py] Re: Language File is Reseted when Server is Reseted
Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! -- www.yamachine.com A máquina não para! EL MELECH NEEMAN!
[web2py] Re: ISBN database
You can find data about a book with an ISBN by querying the Amazon API or using this link format: http://www.amazon.com/FAKE/dp/ISBN I have done this before and have a database of ISBN's - feel free to contact me privately. Richard On Nov 5, 6:39 pm, Kenneth kenneth.t.lundst...@gmail.com wrote: Hello list, have any of you tried to find out data about a book via the ISBN number, maybe using web2py. Kenneth
[web2py] cSans CSS framework
Haven't used it yet, but examples look promissing: http://code.google.com/p/csans/ -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog: http://www.brankovukelic.com/ Check out my portfolio: http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca: http://identi.ca/foxbunny Gimp Brushmakers Guild http://bit.ly/gbg-group
Re: [web2py] unicode problem in DAL
Hi, before to make the insert, you need change the string ascii to utf8, Newvalue=value.encode(utf-8) El 05/11/2010 12:18, Stef Mientki stef.mien...@gmail.com escribió: I'm trying to insert a record with a filed value uëLocatie and I get an error in sql.Table._insert at the last line: return 'INSERT INTO %s(%s) VALUES (%s);' % (sql_t, sql_f, sql_v) here the traceback File D:\Data_Python_25\support\Web2Py_DAL_support.py, line 250, in DAL_Table Description = Value[3][:-1]) File P:\Web2PY\web2py_src\web2py\gluon\sql.py, line 2035, in insert query = self._insert(**fields) File P:\Web2PY\web2py_src\web2py\gluon\sql.py, line 2028, in _insert return 'INSERT INTO %s(%s) VALUES (%s);' % (sql_t, sql_f, sql_v) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 35: ordinal not in range(128) I don't understand the problem and know what I'm doing wrong Wwith print statements I tried to narrow the problem, and in : def sql_represent(obj, fieldtype, dbname, db_codec='UTF-8'): there's is this part if isinstance(obj, unicode): print '', type(obj),obj if len(obj)0 : print ord(obj[0]) obj = obj.encode(db_codec) print '', type(obj) if len(obj)0 : print ord(obj[0]) which seems to convert the unicode to a string with byte values larger than 128. Am I doing something wrong, or is this a bug ? And of course far more interesting, how do I solve this problem ? thanks, Stef Mientki
[web2py] Re: Language File is Reseted when Server is Reseted
perhaps when this occurs should delete the file automatically? Pros? Cons? On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote: Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN!
[web2py] Re: new welcome app in trunk but minor problem...
I applied part of the patch but I do not understand the A(...void(0)). Why? On Nov 5, 11:58 am, Martín Mulone mulone.mar...@gmail.com wrote: Massimo, reviewing the welcome in trunk, I see that i made some little important mistakes. Also I made a little fix to the menu, to work with touch screens. See the attached patch. 2010/11/4 Richard richar...@gmail.com Love the new welcome app design. Instead of developing flash further how about just using jgrowl instead. It requires downloading 3 more files and the advantages are minimal. I think the advantages are worthwhile and the extra files do not matter if they are stored in sub-folders to avoid clutter. On Nov 4, 5:27 am, mdipierro mdipie...@cs.depaul.edu wrote: One thing we can do is a FLASH helper that allows: response.flash=flash('test',mode='warn') This is already in the new welcome app but we could promote flash to a FLASH helper. Pros? Cons? It would link a helper to some image static files that may not be there. We could add some JS code insider that can reposition it but I do not think that is a good idea. The position should be fixed and determined by the CSS. Massimo On Nov 3, 12:09 pm, rochacbruno rochacbr...@gmail.com wrote: Would be a good idea to have more options for flash. I.e: response.flash('hello world',position='top-right') Enviado via iPhone Em 03/11/2010, às 14:56, Martín Mulone mulone.mar...@gmail.com escreveu: Massimo I think welcome is broken in trunk, there no files in views/ :O Often the user does not notice that something has just appeared in the flash box Perhaps a variation of flash 'silen', that goes like an application statusbar, on bottom and thin. 2010/11/3 mdipierro mdipie...@cs.depaul.edu I think this is fixed and layouts now work with both old welcome and new welcome. Can somebody try it please? Just install one random layout (old welcome and new welcome) and use firebug to make sure superfish.js is found. Massimo On Nov 3, 4:37 am, Branko Vukelic bg.bra...@gmail.com wrote: On Wed, Nov 3, 2010 at 6:00 AM, mdipierro mdipie...@cs.depaul.edu wrote: We have two solutions: 1) change all layouts w2p files to look for superfish in static/ or in static/js 2) move all the current static files in static/ and our of static/css, static/js, static/images/. Probably 1) is a better option. If you can customize it anyway you want in a custom template, I really see no problem with 1). -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com welcome_001.diff 4KViewDownload
[web2py] Re: blob readable writeable = false not workin
Can I see the model? On Nov 5, 11:40 am, Richard Vézina ml.richard.vez...@gmail.com wrote: The origin of this need is the following : In web2py 1.83.2 we was possible to omit the upload of file for the field, but with the exact same model and controller in web2py 1.88.2 it raise a ticket in case upload is omited. Richard On Fri, Nov 5, 2010 at 12:11 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, How I may hide blob field from a form? I did : db[request.args(0)].blobfield.readable=\ db[request.args(0)].blobfield.writeable=\ db[request.args(0)].blobfield_blob.readable=\ db[request.args(0)].blobfield_blob.writeable=False In my controller without succes. I use crud.create(db[request.args(0)]) Thanks Richard
[web2py] Re: new welcome app in trunk but minor problem...
This is the correct way to make a link to do nothing, so you can click and going to display sub-menus without going to a link. If you put a normal link with # or #nolink some browser (mosts) interpreat to search in the page this anchor, and move the screen. On 5 nov, 20:44, mdipierro mdipie...@cs.depaul.edu wrote: I applied part of the patch but I do not understand the A(...void(0)). Why? On Nov 5, 11:58 am, Martín Mulone mulone.mar...@gmail.com wrote: Massimo, reviewing the welcome in trunk, I see that i made some little important mistakes. Also I made a little fix to the menu, to work with touch screens. See the attached patch. 2010/11/4 Richard richar...@gmail.com Love the new welcome app design. Instead of developing flash further how about just using jgrowl instead. It requires downloading 3 more files and the advantages are minimal. I think the advantages are worthwhile and the extra files do not matter if they are stored in sub-folders to avoid clutter. On Nov 4, 5:27 am, mdipierro mdipie...@cs.depaul.edu wrote: One thing we can do is a FLASH helper that allows: response.flash=flash('test',mode='warn') This is already in the new welcome app but we could promote flash to a FLASH helper. Pros? Cons? It would link a helper to some image static files that may not be there. We could add some JS code insider that can reposition it but I do not think that is a good idea. The position should be fixed and determined by the CSS. Massimo On Nov 3, 12:09 pm, rochacbruno rochacbr...@gmail.com wrote: Would be a good idea to have more options for flash. I.e: response.flash('hello world',position='top-right') Enviado via iPhone Em 03/11/2010, às 14:56, Martín Mulone mulone.mar...@gmail.com escreveu: Massimo I think welcome is broken in trunk, there no files in views/ :O Often the user does not notice that something has just appeared in the flash box Perhaps a variation of flash 'silen', that goes like an application statusbar, on bottom and thin. 2010/11/3 mdipierro mdipie...@cs.depaul.edu I think this is fixed and layouts now work with both old welcome and new welcome. Can somebody try it please? Just install one random layout (old welcome and new welcome) and use firebug to make sure superfish.js is found. Massimo On Nov 3, 4:37 am, Branko Vukelic bg.bra...@gmail.com wrote: On Wed, Nov 3, 2010 at 6:00 AM, mdipierro mdipie...@cs.depaul.edu wrote: We have two solutions: 1) change all layouts w2p files to look for superfish in static/ or in static/js 2) move all the current static files in static/ and our of static/css, static/js, static/images/. Probably 1) is a better option. If you can customize it anyway you want in a custom template, I really see no problem with 1). -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com welcome_001.diff 4KViewDownload
[web2py] Oracle raises MySQL prices
http://www.h-online.com/open/news/item/Oracle-raises-prices-for-MySQL-1130988.html
[web2py] Re: new welcome app in trunk but minor problem...
here i found some explanation http://www.webdevelopersnotes.com/tutorials/javascript/javascript_event_handlers_onclick_ondblclick.php3 On 5 nov, 20:57, Martin.Mulone mulone.mar...@gmail.com wrote: This is the correct way to make a link to do nothing, so you can click and going to display sub-menus without going to a link. If you put a normal link with # or #nolink some browser (mosts) interpreat to search in the page this anchor, and move the screen. On 5 nov, 20:44, mdipierro mdipie...@cs.depaul.edu wrote: I applied part of the patch but I do not understand the A(...void(0)). Why? On Nov 5, 11:58 am, Martín Mulone mulone.mar...@gmail.com wrote: Massimo, reviewing the welcome in trunk, I see that i made some little important mistakes. Also I made a little fix to the menu, to work with touch screens. See the attached patch. 2010/11/4 Richard richar...@gmail.com Love the new welcome app design. Instead of developing flash further how about just using jgrowl instead. It requires downloading 3 more files and the advantages are minimal. I think the advantages are worthwhile and the extra files do not matter if they are stored in sub-folders to avoid clutter. On Nov 4, 5:27 am, mdipierro mdipie...@cs.depaul.edu wrote: One thing we can do is a FLASH helper that allows: response.flash=flash('test',mode='warn') This is already in the new welcome app but we could promote flash to a FLASH helper. Pros? Cons? It would link a helper to some image static files that may not be there. We could add some JS code insider that can reposition it but I do not think that is a good idea. The position should be fixed and determined by the CSS. Massimo On Nov 3, 12:09 pm, rochacbruno rochacbr...@gmail.com wrote: Would be a good idea to have more options for flash. I.e: response.flash('hello world',position='top-right') Enviado via iPhone Em 03/11/2010, às 14:56, Martín Mulone mulone.mar...@gmail.com escreveu: Massimo I think welcome is broken in trunk, there no files in views/ :O Often the user does not notice that something has just appeared in the flash box Perhaps a variation of flash 'silen', that goes like an application statusbar, on bottom and thin. 2010/11/3 mdipierro mdipie...@cs.depaul.edu I think this is fixed and layouts now work with both old welcome and new welcome. Can somebody try it please? Just install one random layout (old welcome and new welcome) and use firebug to make sure superfish.js is found. Massimo On Nov 3, 4:37 am, Branko Vukelic bg.bra...@gmail.com wrote: On Wed, Nov 3, 2010 at 6:00 AM, mdipierro mdipie...@cs.depaul.edu wrote: We have two solutions: 1) change all layouts w2p files to look for superfish in static/ or in static/js 2) move all the current static files in static/ and our of static/css, static/js, static/images/. Probably 1) is a better option. If you can customize it anyway you want in a custom template, I really see no problem with 1). -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com welcome_001.diff 4KViewDownload
[web2py] Re: new welcome app in trunk but minor problem...
I understand that. But do you want dead links in the welcome menu? On Nov 5, 7:13 pm, Martin.Mulone mulone.mar...@gmail.com wrote: here i found some explanation http://www.webdevelopersnotes.com/tutorials/javascript/javascript_eve... On 5 nov, 20:57, Martin.Mulone mulone.mar...@gmail.com wrote: This is the correct way to make a link to do nothing, so you can click and going to display sub-menus without going to a link. If you put a normal link with # or #nolink some browser (mosts) interpreat to search in the page this anchor, and move the screen. On 5 nov, 20:44, mdipierro mdipie...@cs.depaul.edu wrote: I applied part of the patch but I do not understand the A(...void(0)). Why? On Nov 5, 11:58 am, Martín Mulone mulone.mar...@gmail.com wrote: Massimo, reviewing the welcome in trunk, I see that i made some little important mistakes. Also I made a little fix to the menu, to work with touch screens. See the attached patch. 2010/11/4 Richard richar...@gmail.com Love the new welcome app design. Instead of developing flash further how about just using jgrowl instead. It requires downloading 3 more files and the advantages are minimal. I think the advantages are worthwhile and the extra files do not matter if they are stored in sub-folders to avoid clutter. On Nov 4, 5:27 am, mdipierro mdipie...@cs.depaul.edu wrote: One thing we can do is a FLASH helper that allows: response.flash=flash('test',mode='warn') This is already in the new welcome app but we could promote flash to a FLASH helper. Pros? Cons? It would link a helper to some image static files that may not be there. We could add some JS code insider that can reposition it but I do not think that is a good idea. The position should be fixed and determined by the CSS. Massimo On Nov 3, 12:09 pm, rochacbruno rochacbr...@gmail.com wrote: Would be a good idea to have more options for flash. I.e: response.flash('hello world',position='top-right') Enviado via iPhone Em 03/11/2010, às 14:56, Martín Mulone mulone.mar...@gmail.com escreveu: Massimo I think welcome is broken in trunk, there no files in views/ :O Often the user does not notice that something has just appeared in the flash box Perhaps a variation of flash 'silen', that goes like an application statusbar, on bottom and thin. 2010/11/3 mdipierro mdipie...@cs.depaul.edu I think this is fixed and layouts now work with both old welcome and new welcome. Can somebody try it please? Just install one random layout (old welcome and new welcome) and use firebug to make sure superfish.js is found. Massimo On Nov 3, 4:37 am, Branko Vukelic bg.bra...@gmail.com wrote: On Wed, Nov 3, 2010 at 6:00 AM, mdipierro mdipie...@cs.depaul.edu wrote: We have two solutions: 1) change all layouts w2p files to look for superfish in static/ or in static/js 2) move all the current static files in static/ and our of static/css, static/js, static/images/. Probably 1) is a better option. If you can customize it anyway you want in a custom template, I really see no problem with 1). -- Branko Vukelić bg.bra...@gmail.com stu...@brankovukelic.com Check out my blog:http://www.brankovukelic.com/ Check out my portfolio:http://www.flickr.com/photos/foxbunny/ Registered Linux user #438078 (http://counter.li.org/) I hang out on identi.ca:http://identi.ca/foxbunny Gimp Brushmakers Guildhttp://bit.ly/gbg-group -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com -- My blog:http://martin.tecnodoc.com.ar My portfolio *spanish*:http://www.tecnodoc.com.ar Checkout my last proyect instant-press:http://www.instant2press.com welcome_001.diff 4KViewDownload
[web2py] Re: error in admin: _read function missing
fixed. please check it. On Nov 5, 8:27 am, Seeker tmurn...@gmail.com wrote: Sorry, that was a bit cryptic. - Generate a test app with the wizard (with a few test tables). - Click on the '... Select' menu item for one of the tables. - Click the 'view' link for one of the records. - Click the 'edit ...' link for the record. - Tick the 'delete'check box and submit. - Error: Document does not exist. On Nov 5, 2:51 pm, mdipierro mdipie...@cs.depaul.edu wrote: I do not understand where to click. On Nov 5, 2:14 am, Seeker tmurn...@gmail.com wrote: Hi, In trunk: Clicking on 'view' link on the select page complains of an invalid function ... Thanks.- Hide quoted text - - Show quoted text -
Re: [web2py] Re: Language File is Reseted when Server is Reseted
Well, I don´t know exactly. What´s this file exactly for? 2010/11/5 mdipierro mdipie...@cs.depaul.edu: perhaps when this occurs should delete the file automatically? Pros? Cons? On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote: Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! -- www.yamachine.com A máquina não para! EL MELECH NEEMAN!
[web2py] RFC
We could easily provide this alternative syntax: db.define_table('person','name unique, address, married boolean, bio wiki') form = SQLFORM.factory('name unique, address, married boolean, bio wiki') by taking it out of the wizard and moving into the DAL (sql.py). Is it a good idea?
[web2py] Re: Language File is Reseted when Server is Reseted
It stores the cache.disk (in principle it can be deleted without data loss). The problem is that if the failure is caused by some other serious problem, deleting automatically, will hide a problem with cache.disk. On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote: Well, I don´t know exactly. What´s this file exactly for? 2010/11/5 mdipierro mdipie...@cs.depaul.edu: perhaps when this occurs should delete the file automatically? Pros? Cons? On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote: Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN!
[web2py] Re: Language File is Reseted when Server is Reseted
Perhaps we can generate a ticket and then delete the file, so the ticket happens once. On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote: It stores the cache.disk (in principle it can be deleted without data loss). The problem is that if the failure is caused by some other serious problem, deleting automatically, will hide a problem with cache.disk. On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote: Well, I don´t know exactly. What´s this file exactly for? 2010/11/5 mdipierro mdipie...@cs.depaul.edu: perhaps when this occurs should delete the file automatically? Pros? Cons? On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote: Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN!
Re: [web2py] Re: Language File is Reseted when Server is Reseted
The ticket is good idea but it will pop to the user? 2010/11/6 mdipierro mdipie...@cs.depaul.edu: Perhaps we can generate a ticket and then delete the file, so the ticket happens once. On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote: It stores the cache.disk (in principle it can be deleted without data loss). The problem is that if the failure is caused by some other serious problem, deleting automatically, will hide a problem with cache.disk. On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote: Well, I don´t know exactly. What´s this file exactly for? 2010/11/5 mdipierro mdipie...@cs.depaul.edu: perhaps when this occurs should delete the file automatically? Pros? Cons? On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote: Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! -- www.yamachine.com A máquina não para! EL MELECH NEEMAN!
Re: [web2py] RFC
bio wiki will be a Markmin represent? I think it is a good idea, but , if mixed with the normal sintax, will it work? Some users, specially students, will try to mix for example: db.define_table('person','name unique, address, married boolean, bio wiki',Field('foo','text'), format=' ' , migrate=' ' , compute= ' ' , signature) This could difficult the learning curve of DAL Enviado via iPhone Em 06/11/2010, às 00:53, mdipierro mdipie...@cs.depaul.edu escreveu: We could easily provide this alternative syntax: db.define_table('person','name unique, address, married boolean, bio wiki') form = SQLFORM.factory('name unique, address, married boolean, bio wiki') by taking it out of the wizard and moving into the DAL (sql.py). Is it a good idea?
[web2py] Re: How do you create custom form feilds?
i say the answer depends on where you are running the system. a schemaless system like google app engine allows you to add fields on the fly. i actually have a table that specifies fields to be appended to a user table. in my db.py i query the first table and generate my user table on the fly. since i am running on GAE there is no upgrade and stuff just works. it's an advantage of having a schemaless system. your option certainly works for a traditional SQL database. i suppose if you allowed migrations you could have a single table per event that had all the fields, and generate that on the fly, though changes once it is created might be pretty hard. cfh On Nov 4, 9:21 pm, Jason Brower encomp...@gmail.com wrote: I understand how to actually do it in the database. But what if I wanted to know if there is a proper way to do it when I let specific roles in my site create fields of their own. For example: (I am building a conference software.) John is using my site to create an event to attend. He has the usual fields already: username, password, first name last name, email... But he want to add more fields. For example school affiliation. How would you best handle this situation? I was thinking of creating many to many table... Users that log into my system can attend more than one conference/event so we have the basics like shown above. Then people can attend various events and fill in more data. So: T:field conference_id field_name field_type field_required T:user_conference_field conference_id user_id field_id data And then I would have to create customer forms for these as they are certainly not conventional. That second table here is like a 3 way cosmic convergence of craziness and I wonder if there is a better way. --- Best Regards, Jason Brower
[web2py] Re: Language File is Reseted when Server is Reseted
yes but once and only once, when an upgrade corrupts a cache file. On Nov 5, 10:01 pm, Carlos Costa yamandu.co...@gmail.com wrote: The ticket is good idea but it will pop to the user? 2010/11/6 mdipierro mdipie...@cs.depaul.edu: Perhaps we can generate a ticket and then delete the file, so the ticket happens once. On Nov 5, 9:55 pm, mdipierro mdipie...@cs.depaul.edu wrote: It stores the cache.disk (in principle it can be deleted without data loss). The problem is that if the failure is caused by some other serious problem, deleting automatically, will hide a problem with cache.disk. On Nov 5, 9:52 pm, Carlos Costa yamandu.co...@gmail.com wrote: Well, I don´t know exactly. What´s this file exactly for? 2010/11/5 mdipierro mdipie...@cs.depaul.edu: perhaps when this occurs should delete the file automatically? Pros? Cons? On Nov 5, 4:35 pm, Carlos Costa yamandu.co...@gmail.com wrote: Looks like it fixed. So simple! Thanks! 2010/11/5 mdipierro mdipie...@cs.depaul.edu: delete it C:\...\applications\welcome/cache/cache.shelve do you still have the problem? On Nov 5, 1:53 pm, yamandu yamandu.co...@gmail.com wrote: I´ve installed win32 extensions. Now I get: ERROR:web2py.cache:corrupted file: C:\...\applications\welcome/cache/ cache.shelve everytime! On Oct 6, 6:54 pm, mdipierro mdipie...@cs.depaul.edu wrote: Yes it is somewhere in the manual. On Oct 6, 3:41 pm, Carlos Costa yamandu.co...@gmail.com wrote: Things make more sense now. I always got the message Cron disable because no file locking. I had to pass -N argument for it to stop anoying me. Is that documented? Thanks again. 2010/10/6 mdipierro mdipie...@cs.depaul.edu: If you run web2py from source under windows you need it. If you use the web2py binary then it comes with it. without it you have no file locking and it is possible thet two web2py threads conflict (one writes a file, another tries to open, fails, overwrites it). Massimo On Oct 6, 2:07 pm, yamandu yamandu.co...@gmail.com wrote: Well, I think I never heard of it? I looked into python help and couldn´t find it. Should I have it? On Oct 6, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote: I think I see what the problem is... do you have Mark hammondwin32 extensions installed? Massimo On Oct 6, 1:13 pm, yamandu yamandu.co...@gmail.com wrote: I am using web2py server in Windows 7. The actual file is changed and I have to translate again (pt-br.py). I tried to replicate the situation now but I coud not. Restart the server, restart the editor (thought it could be problem with SVN plugin). But the problem not ocurred. Maybe if restart the computer! Because it seems to happen once a day and no more, if remember right. On Oct 6, 2:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: what os are you using? hat web server? you see the translation in english or you find the contect of a languages/xx.py file actually changing? can you send me an example of the languages/xx.py file before and after it gets overwritten? Massimo On Oct 6, 11:38 am, yamandu yamandu.co...@gmail.com wrote: Everytime I restart the we2py server mylanguagefile become in english again. What may cause this behavior? --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN! --www.yamachine.com A máquina não para! EL MELECH NEEMAN!
[web2py] Re: RFC
You could mix but not this way. db.define_table('person','name unique, address, married boolean, bio wiki') db.person.bio.default='...' On Nov 5, 10:04 pm, rochacbruno rochacbr...@gmail.com wrote: bio wiki will be a Markmin represent? I think it is a good idea, but , if mixed with the normal sintax, will it work? Some users, specially students, will try to mix for example: db.define_table('person','name unique, address, married boolean, bio wiki',Field('foo','text'), format=' ' , migrate=' ' , compute= ' ' , signature) This could difficult the learning curve of DAL Enviado via iPhone Em 06/11/2010, às 00:53, mdipierro mdipie...@cs.depaul.edu escreveu: We could easily provide this alternative syntax: db.define_table('person','name unique, address, married boolean, bio wiki') form = SQLFORM.factory('name unique, address, married boolean, bio wiki') by taking it out of the wizard and moving into the DAL (sql.py). Is it a good idea?
[web2py] Re: Using tinymce for text areas of in component views
I am putting this link here http://tinymce.moxiecode.com/punbb/viewtopic.php?id=28 as this is the solution to problematic form submissions. tinyMCE.triggerSave() might need to be called if you are using ajax or components for your form submission. Hope this will be useful to someone who searches the group. On Nov 6, 4:18 am, Luther Goh Lu Feng elf...@yahoo.com wrote: Erm I know the issue already. Too complex to put in words. On Nov 6, 12:31 am, Luther Goh Lu Feng elf...@yahoo.com wrote: I have implemeted the basic tinymce editor here:http:// wiki.moxiecode.com/index.php/ TinyMCE:For_Dummies#To_create_a_very_simple_TinyMCE_wysiwyg_Editor In a normal view, tinymce works fine. The forms were constructed manually using form and textarea tags (It's a long story why sqlform isn't use but let's leave that for another time) Now I have a 2 components: a comments list component and a comments form component. Prior to the installation of tinymce, a comment created will automatically update the comments list via ajax. So what happens when I install tinymce? Well I am able to get the editor over the text area. However there are some strange things. Upon a fresh reload, the first form submission of the comments form will always activate Enter a value. The second submission (without refresh), causes the form to be submitted, but this time, the comments list won't be updated. If this is helpful, the code to do the ajax update of the comments form is as follows: $('#comments_form').live('change', function(){ $.get({{=URL(a='roverus', c='comment', f='read.load', vars={'current_worksheet':request.args[0]})}}, function(data){ web2py_component('/roverus/comment/read.load? current_conversation=' + current_conversation, conversation); }); }) I have tried looking at the javascript console but there are no errors. Any tips to debug this is welcomed. Thanks in advance.
Re: [web2py] Re: How do you create custom form feilds?
It certainly won't be on GAE because of what I do with it. (I need more flexibitliy.) But it is interesting to hear your solution. I will try my way and see how it lands. BR, Jason On Sat, Nov 6, 2010 at 5:44 AM, howesc how...@umich.edu wrote: i say the answer depends on where you are running the system. a schemaless system like google app engine allows you to add fields on the fly. i actually have a table that specifies fields to be appended to a user table. in my db.py i query the first table and generate my user table on the fly. since i am running on GAE there is no upgrade and stuff just works. it's an advantage of having a schemaless system. your option certainly works for a traditional SQL database. i suppose if you allowed migrations you could have a single table per event that had all the fields, and generate that on the fly, though changes once it is created might be pretty hard. cfh On Nov 4, 9:21 pm, Jason Brower encomp...@gmail.com wrote: I understand how to actually do it in the database. But what if I wanted to know if there is a proper way to do it when I let specific roles in my site create fields of their own. For example: (I am building a conference software.) John is using my site to create an event to attend. He has the usual fields already: username, password, first name last name, email... But he want to add more fields. For example school affiliation. How would you best handle this situation? I was thinking of creating many to many table... Users that log into my system can attend more than one conference/event so we have the basics like shown above. Then people can attend various events and fill in more data. So: T:field conference_id field_name field_type field_required T:user_conference_field conference_id user_id field_id data And then I would have to create customer forms for these as they are certainly not conventional. That second table here is like a 3 way cosmic convergence of craziness and I wonder if there is a better way. --- Best Regards, Jason Brower