[web2py] Re: web2py 1.86.1 is OUT

2010-10-02 Thread guruyaya
Oh, awsome! I see there's Hebrew and RTL support, in the admin! Who is this fine work? Sorry. I just like the attention. On Oct 2, 10:50 pm, mdipierro wrote: > Changelog: > > markmin2latex > markmin2pdf > Storage getfirst, getlast, getall by Kevin and Nathan > db(db.table), db(db.table.id) both s

[web2py] Re: experimental... .pdf

2010-10-02 Thread mart
Ok, 'm really liking this! a few questions: 1) I'm not catching on where we get pdflatex... is it a plugin? where do we get it? 2) Is this a feature that can be add to an up for users? meanin something like "upload your document - then download your pdf (or email generated pdf")? should be doab

[web2py] Re: experimental... .pdf

2010-10-02 Thread mdipierro
or better {{ import re from gluon.contrib.markmin.markmin2pdf import markmin2pdf def markmin_serializer(text,tag=None,attr={}): if tag==None: return re.sub('\s+',' ',text) if tag=='br': return '\n\n' if tag=='h1': return '# '+text+'\n\n' if tag=='h2': return '#'*2+' '+text+'\n\n'

[web2py] experimental... .pdf

2010-10-02 Thread mdipierro
install pdflatex create a views/generic.pdf that contains: begin file {{ import re from gluon.contrib.markmin.markmin2pdf import markmin2pdf def markmin_serializer(text,tag=None,attr={}): if tag==None: return re.sub('\s+',' ',text) if tag=='br': return '\n\n' if tag=='h1': r

[web2py] Re: Help with web2py book chapter 3

2010-10-02 Thread Luther Goh Lu Feng
Thanks for the fix. So my wiki app rss feed shows the single test entry I created. However, the URL to show the page is http://localhost:8000/mywiki/default/show.rss/1 instead of http://localhost:8000/mywiki/default/show/1 Any tips to resolve this please? On Oct 3, 4:07 am, mdipierro wrote:

[web2py] Re: Content seen only by logged in users

2010-10-02 Thread mdipierro
Yes in two ways. You can set permission on a controller function with @auth.requires_login() def index(): ... return dict() OR in the view you can do {{if auth.user:}} this content is only visible to logged in users {{pass}} On Oct 2, 8:33 pm, iu_long wrote: > Hi all, > I am new to

[web2py] Content seen only by logged in users

2010-10-02 Thread iu_long
Hi all, I am new to web2py and I was wondering how can I make content in views seen only by logged in users? Can anyone enlighten me :) Cheers ! Iu

[web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread mdipierro
Since August we had many improvements in sql.py that were not reflected into dal.py. web2py is still using sql.py and it will be a little while before we move to dal.py On Oct 2, 9:05 pm, DenesL wrote: > Hi Ivan, > > mysql is not one of the supported DBs for keyed tables: > only DB2, MSSQL, Ingre

[web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread DenesL
Hi Ivan, mysql is not one of the supported DBs for keyed tables: only DB2, MSSQL, Ingres, and Informix have been added as per http://groups.google.com/group/web2py/browse_thread/thread/db150376b06d47fc Adding support for mysql should be fairly easy but the required steps under point (E) in the po

Re: [web2py] Re: Universal Database Interface - UDI

2010-10-02 Thread Alexandre Andrade
Well, I know I have a long way ahead. 2010/10/2 mdipierro > I do not see an easy solution. > > On Oct 2, 9:48 am, Alexandre Andrade wrote: > > The case is the databases and tables are not similar. > > > > Sample case: > > > > database1: city_population_data > > database2:city_financial_data >

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread Ivan Matveev
>2010/10/3 mdipierro > > ... but SQLFORM and web2py crud will not work with sqlalchemy. > > one reasons we cannot do something like SQLAlchemy's reflect in web2py > is that the database is not aware of how web2py should treat the > field. For example a 'varchar' field could be a 'string', a > 'pas

[web2py] Re: Javascript Template Engine for Cleaner Coding

2010-10-02 Thread yamandu
I would like to know if the benefits are worth. I think It would be at least an overhead of proccessing and one more thing to complicate. But what I trully wish is a better way to code things like widgets. A more practical way of writing this type of code when mixed with ohter stuff like web2py.

[web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread mdipierro
... but SQLFORM and web2py crud will not work with sqlalchemy. one reasons we cannot do something like SQLAlchemy's reflect in web2py is that the database is not aware of how web2py should treat the field. For example a 'varchar' field could be a 'string', a 'password', an 'upload', or a 'list '.

[web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread mdipierro
SQLAlchemy is better for accessing legacy DB. Massimo On Oct 2, 4:16 pm, Ivan Matveev wrote: > 2010/10/2 Mariano Reingart > > > > > > > Did you try string notation for references? > > > db.define_table('cars', > >   Field('car_id','integer'), > >    Field('model_id', "reference car_models.model

Re: [web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread Ivan Matveev
2010/10/2 Mariano Reingart > > Did you try string notation for references? > > db.define_table('cars', > Field('car_id','integer'), >Field('model_id', "reference car_models.model_id"), >Field('note','text'), > primarykey=['car_id'], > migrate=False > ) > > Anyway, if you are using s

[web2py] web2py 1.86.1 is OUT

2010-10-02 Thread mdipierro
Changelog: markmin2latex markmin2pdf Storage getfirst, getlast, getall by Kevin and Nathan db(db.table), db(db.table.id) both supported and equivalent to db(db.table.id>0) postresql ssl support less unnecessary logging and warnings on GAE IS_DECIMAL_IN_RANGE and IS_FLOAT_IN_RANGE support dot="," (

[web2py] Re: Universal Database Interface - UDI

2010-10-02 Thread mdipierro
I do not see an easy solution. On Oct 2, 9:48 am, Alexandre Andrade wrote: > The case is the databases and tables are not similar. > > Sample case: > > database1: city_population_data > database2:city_financial_data > database3: city_sports_data > > while the 3 databases have SOME common informat

[web2py] Re: Help with web2py book chapter 3

2010-10-02 Thread mdipierro
This is solved in trunk. There was a bug. On Oct 2, 12:55 pm, Luther Goh Lu Feng wrote: > Hi all I refer to the code snippet from chapter 3 of the > bookhttp://dpaste.org/k3fH/in the construction of an rss feed for a wiki > apphttp://web2py.com/book/default/chapter/03#A-Wiki > > It is a snippet

[web2py] Re: Admin - edit static files is broken

2010-10-02 Thread mdipierro
Could be a permission issue. When you open it from localhost do you still use lighttpd or do you start web2py user your user account? On Oct 2, 10:58 am, Arnaud Masselin wrote: > Hi all, > > i have deployed Web2py 1.83.2 on lighttpd production server. And i > have a problem for edit css files in

[web2py] Help with web2py book chapter 3

2010-10-02 Thread Luther Goh Lu Feng
Hi all I refer to the code snippet from chapter 3 of the book http://dpaste.org/k3fH/ in the construction of an rss feed for a wiki app http://web2py.com/book/default/chapter/03#A-Wiki It is a snippet to show an rss feed: currently it shows "no rss" on http://localhost:8000/mywiki/default/news.rss

[web2py] Admin - edit static files is broken

2010-10-02 Thread Arnaud Masselin
Hi all, i have deployed Web2py 1.83.2 on lighttpd production server. And i have a problem for edit css files in the admin interface. I raise a 404 error when I try to edit files. Files seems to be accessible because, for example, /static/ landing_a_default_new.css display content of my css file.

[web2py] Re: Problem with rss feed from wiki application in book

2010-10-02 Thread Luther Goh Lu Feng
Following either link = 'http://' + str(request.env.http_host) + URL('show', args=row.id) or link = "http://127.0.0.1:8000"; + URL('show', args=row.id) I get the link in the rss feed to the wiki page as http://127.0.0.1:8000/mywiki/default/show.rss/1 On Sep 26, 7:11 pm, "Martin.Mulone" wrote

[web2py] Re: Select specific fields on GAE

2010-10-02 Thread mdipierro
hmm. a GAE thing. I think it is fixed now. One more test please. On Oct 2, 11:44 am, István Gazsi wrote: > I have tried it on GAE, but it looks like it uses the gallery table > instead of the gallery_images table, so the uploaded files are not > redirected to the other db table. > > On Oct 1, 9:5

[web2py] Re: Javascript Template Engine for Cleaner Coding

2010-10-02 Thread Magnitus
I'm not sure if he was suggesting it as a solution for the community as much as asking about it for his purposes. If you use tables a lot, the html might be clutered, but if you follow the tips in this article and keep the tags to a minimum (using css for the styling & layout), then html is not so

[web2py] Re: Select specific fields on GAE

2010-10-02 Thread István Gazsi
I have tried it on GAE, but it looks like it uses the gallery table instead of the gallery_images table, so the uploaded files are not redirected to the other db table. On Oct 1, 9:58 pm, István Gazsi wrote: > It's great now it works! :) Thank you very much. I will test it on GAE > as soon as I c

[web2py] Re: What does this mean?

2010-10-02 Thread Sundar
I think it is some data (which is already in the DB) related problems, since if a duplicate the table definition, appadmin works OK on the new one. Let me do some more homework before coming back. Thanks and sorry. - On Oct 2, 7:37 pm, mdipierro wrote: > Can you please pos

Re: [web2py] Re: Universal Database Interface - UDI

2010-10-02 Thread Alexandre Andrade
The case is the databases and tables are not similar. Sample case: database1: city_population_data database2:city_financial_data database3: city_sports_data while the 3 databases have SOME common information (cities), the other data are not common. so, in my application, I need to get cities da

[web2py] Re: What does this mean?

2010-10-02 Thread mdipierro
Can you please post your model? On Oct 2, 9:20 am, Sundar wrote: > I have a similar situation. > > My table, say, Purchase Order contains two fields: client, endclient. > The client ID from the Clients table is the foreign key for both. > > For the above table, when I try AppAdmin, I get the brok

[web2py] Re: What does this mean?

2010-10-02 Thread Sundar
I have a similar situation. My table, say, Purchase Order contains two fields: client, endclient. The client ID from the Clients table is the foreign key for both. For the above table, when I try AppAdmin, I get the broken reference error. I think that two fields in a single table both referring

[web2py] Re: Universal Database Interface - UDI

2010-10-02 Thread mdipierro
say you have two databases db1=DAL(...) db2=DAL(...) and they contains a similar table table1=db1.define_table('person',Field('name')) table2=db2.define_table('person',table1) # same fields a table1 and you want all records from both rows=db(table1.id>0).select()&db(table2.id>0).sele

[web2py] Re: DAL, legacy keyed table, field references

2010-10-02 Thread mdipierro
That should make no difference On Oct 1, 11:29 pm, Mariano Reingart wrote: > On Fri, Oct 1, 2010 at 3:40 PM, Ivan Matveev wrote: > > > 2010/10/1 mdipierro > > >> keyed tables are only partially supported. Perhaps user Denes can say > >> more about that. For now here is a quick hack that should

[web2py] Re: Javascript Template Engine for Cleaner Coding

2010-10-02 Thread Martin.Mulone
in my opinion we have already a template system, another one or mix with web2py is to complicate things. Perhaps not, but sure we are going to have people writing python code in javascript block, and javascript in python block. On 2 oct, 02:10, yamandu wrote: > Hi, I found thishttp://www.embedded

[web2py] Re: shorting your URL with routes

2010-10-02 Thread Francisco Costa
Thank you Jonathan and Wikus. I only have a few functions in the users controller so I will list them like Wikus showed. I appreciate all your help. On Oct 2, 1:00 am, Jonathan Lundell wrote: > On Oct 1, 2010, at 9:48 AM, Francisco Costa wrote: > > > > > > > I would like to improve my users urls

[web2py] Universal Database Interface - UDI

2010-10-02 Thread Alexandre Andrade
(this text was translated by google) Hi folks, I'll have to develop an application on my service that uses data from several databases. I'm the one time looking for a way to solve this problem within the web2py and the solution is pictured below. I wonder if anyone has a similar situation and