[web2py] postgres getting better and better....

2012-09-11 Thread Niphlod
Happy september with the 9.2 release for everybody http://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.2 http://www.postgresql.org/about/news/1415/ --

[web2py] Re: How do I incorporate git into my web2py workflow?

2012-09-11 Thread pbreit
I use Mercurial but should be basically the same. First, "hg clone" web2py somewhere on your hardrive. Then in /applications, create a new app (I usually copy "welcome"). Then "cd" into the new app directory and "git init". Now your app will be version controlled. I host some of my projects on

[web2py] bug in 2.0.8

2012-09-11 Thread Matt
Hi there, First off thanks for all of the fantastic work putting 2.0 together. Looking forward to trying the new features. I've just upgraded from 1.99.7 -> 2.0.8 and I've discovered a serious bug which has resulted in the loss of my data. [I'm using both GAE with CloudSQL and dal(migrate_enab

[web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread pbreit
It sounds like you know enough about these things to figure out if Web2py is too bloated for you. My sense is that even if you think it might be bloated, the extraneous stuff really doesn't get in the way too much. Not using DAL means you are missing out on one of the core features. Building a

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread martzi
Thanks for the reply. I have tried it, ondelete=CASCADE worked, but the referenced table seems to be accepting multiple entries ... one-to-many relation. Are there ways to prevent this from occurring ? On Monday, September 10, 2012 2:43:55 PM UTC+2, Massimo Di Pierro wrote: > > Field('','re

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread lucas
ok, maybe some progress. i removed any instances of psycopg2 from my computer and web2py by default was and is not forced to use only the contrib/pg8000 driver. i think i would rather use that one anyway. when i changed the pool_size from the default 0 to 16, the initial ticket/exception abo

[web2py] BeautifulSoup parsers when in web2py

2012-09-11 Thread lcamara
Hey, My application is using a module that depends on BeautifulSoup which I have in the application modules folders along with my module, I have installed html5lib on my system as it's a very permissive parser. When I run the module directly from the console I get: registring HTMLParserTre

[web2py] HTML truncate

2012-09-11 Thread Pepe Araya
Hello, I need to truncate a field that contains HTML content. Now i'm using htmltruncate in a controller that return a SQLFORM.smartgrid and it works perfect: def noticias(): db.noticias.cuerpo.represent = lambda field,row: XML(htmltrunca

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread villas
I may be wrong, but I do not think Cascade could assist you with enforcing a 1-1 relationship. Maybe making the foreign key field unique would help? On Monday, September 10, 2012 11:45:28 AM UTC+1, martzi wrote: > > Hi, > I wonder if there a way to enforce a one to one relationship with Cascad

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread martzi
Thanks for the reply. But if you meant Field('','reference other_table', unique=True), I have tried that with failure, i am still having a one-to-many relation. FYI: Regarding CASCADE, an ondelete cascade causes deletion of all referred data. On Tuesday, September 11, 2012 1:37:59 PM UTC+2

[web2py] Re: Best Method to implement a "like" button

2012-09-11 Thread villas
How about: in 'likes' make a unique composite index of both fields (created at DB level). Try to insert a record. If it fails (because of the index) then delete instead. On Monday, September 10, 2012 11:58:03 PM UTC+1, Mark Li wrote: > > I have 3 datatables as follows: > > > db.define_table(

[web2py] Re: BeautifulSoup parsers when in web2py

2012-09-11 Thread lcamara
Nevermind I found the solution. I needed to make imports relative in beautifulsoup _html5lib.py builder. for instanc:. from bs4.element import NamespacedAttribute changed to: from ..element import NamespacedAttribute I guess this is what you get when you simply copy paste modules into the folde

[web2py] Remember to delete examples application or become a spam farm

2012-09-11 Thread Web2py Mostly Newbie
Just a short note to say traffic on one of my websites had gone through the roof recently. It turns out that I hadn't removed the examples directory from web2py and spammers were using the example applications to upload comment spam. Cheers Brendan --

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-09-11 Thread Alan Etkin
On Thursday, September 6, 2012 9:34:51 AM UTC-3, Massimo Di Pierro wrote: > > Please open a ticket and this will be easy to fix. > > Opened the ticket: http://code.google.com/p/web2py/issues/detail?id=980 Now it was closed with status fixed, but: -AFAIK, fileld.writable still has no effect in c

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread villas
I am quite familiar with cascade; I just couldn't figure out how it could assist you. In my opinion, Field('','reference other_table', unique=True) should be supported and work. Maybe you added the constraint later and the DB didn't accept it because you already had duplicated field con

[web2py] Re: postgres getting better and better....

2012-09-11 Thread LightDot
Native JSON features look really interesting. Basically, postgres can return a row or an array as JSON now. And validate JSON. Seems quite handy! Regards, Ales On Tuesday, September 11, 2012 10:21:54 AM UTC+2, Niphlod wrote: > > Happy september with the 9.2 release for everybody > > http://wiki

[web2py] Re: HTML truncate

2012-09-11 Thread Massimo Di Pierro
What does it mean it does not work? Can you import it? Can you import it from python? On Tuesday, 11 September 2012 00:55:03 UTC-5, Pepe Araya wrote: > > Hello, > > I need to truncate a field that contains HTML content. > > Now i'm using htmltruncate

[web2py] Re: bug in 2.0.8

2012-09-11 Thread Massimo Di Pierro
Please open a ticket about this. You say the problem is on GAE but the ticket refers to MySQLdb. I assume these are two different systems. On Tuesday, 11 September 2012 03:44:46 UTC-5, Matt wrote: > > Hi there, > > First off thanks for all of the fantastic work putting 2.0 together. > Looking fo

[web2py] Re: Remember to delete examples application or become a spam farm

2012-09-11 Thread Massimo Di Pierro
The latest examples (2.0.x) should not have any DB at all for this reason. On Tuesday, 11 September 2012 07:16:28 UTC-5, Web2py Mostly Newbie wrote: > > Just a short note to say traffic on one of my websites had gone through > the roof recently. It turns out that I hadn't removed the examples >

[web2py] Re: HTML truncate

2012-09-11 Thread Pepe Araya
Hi Massimo, Sorry for my poor explanation. What I don't get is in the view when i call the field value {{=tipo_3.descripcion}} I get the whole text and not the truncated one like in the SQLFORM.grid case. On Tuesday, September 11, 2012 9:32:18 AM UTC-3, Massimo Di Pierro wrote: > > What do

[web2py] Re: postgres getting better and better....

2012-09-11 Thread Alan Etkin
Aren't dal Row and Rows classes capable of returning json also? On Tuesday, September 11, 2012 9:28:52 AM UTC-3, LightDot wrote: > > Native JSON features look really interesting. > > Basically, postgres can return a row or an array as JSON now. And validate > JSON. Seems quite handy! > > Regards,

Re: [web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread Shawn McElroy
Well its starting to seem like a good fit. But yes I won't be using DAL, since I'll be using orientdb. I know I lose something with that decision, but its what I need. I'm also curious how people are using it here as well with web2py. On Sep 11, 2012 1:46 AM, "pbreit" wrote: > It sounds like you

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread martzi
Unique = True, has probably no effect. see below. ... >>> db = DAL('sqlite://storage.db') >>> person = db.define_table('person', Field('name')) >>> bodypart = db.define_table('bodypart', Field('name'), Field('owner', 'reference person', unique=True)) #unique= True seems to have no effect >>> pid

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread villas
I think it does have some effect. I suspect that your existing data may not be unique. See whether the following helps: - If using commandline, try with db.commit() after. - Try with a new table. - Look in databases/sql.log and see whether the field was created with UNIQUE. -

[web2py] Re: HTML truncate

2012-09-11 Thread villas
I end up doing something like this: {{=db.publicaciones.descripcion.represent(=tipo_3.descripcion,tipo_3)}} I hope that helps, but maybe there is a better way? On Tuesday, September 11, 2012 1:48:59 PM UTC+1, Pepe Araya wrote: > > Hi Massimo, > > Sorry for my poor explanation. > > What I don'

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread martzi
I don't get you, could give an InteractiveConsole example, to illustrate your idea. On Tuesday, September 11, 2012 3:39:53 PM UTC+2, villas wrote: > > I think it does have some effect. > I suspect that your existing data may not be unique. > See whether the following helps: > >- If using

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread Massimo Di Pierro
This traceback means the ticket file is corrupted/truncated. On Tuesday, 11 September 2012 06:18:11 UTC-5, lucas wrote: > > ok, maybe some progress. i removed any instances of psycopg2 from my > computer and web2py by default was and is not forced to use only the > contrib/pg8000 driver. i th

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-09-11 Thread Massimo Di Pierro
Now I see what you are trying to do. I do not consider this a bug. At this point this is the intended behavior. You want conditional computed fields depending on user input. If a value is provided use it, if one is not provided then compute it. That is not what compute fields were designed for.

Re: [web2py] [OT] Ubuntu 12.10 will no longer ship with Python 2

2012-09-11 Thread Jonathan Lundell
On 10 Sep 2012, at 11:32 PM, pbreit wrote: > > Well...for starters, web2py, fabric and pil are 2.7. So, yes, I think it is > an absolutely, insanely user-hostile decision. The python ecosystem is not > even close to ready to move to 3. And from what I can tell, 3 offers minimal > benefits. OT

[web2py] Re: bug in 2.0.8

2012-09-11 Thread Massimo Di Pierro
Let me add you did not lose your data. If you revert to 1.99.7 you should find the data is still there. Yet we need to understand what is happening On Tuesday, 11 September 2012 03:44:46 UTC-5, Matt wrote: > > Hi there, > > First off thanks for all of the fantastic work putting 2.0 together.

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-09-11 Thread Anthony
I haven't followed this closely, but instead of specifying a "compute" attribute for the field, could you instead specify the "default" attribute as a function? In that case, the field will appear on forms -- if the user enters a value it will be used, and otherwise the default value will be co

[web2py] Re: bug in 2.0.8

2012-09-11 Thread Massimo Di Pierro
I found the web2py bug that caused this problem. It was an indentation issue. Took the occasion to rewrite the logic a little better. Can you please check this works now? You should be able to update to trunk and your missing fields should re-appear (they will be hidden, writable=False, readabl

[web2py] Re: postgres getting better and better....

2012-09-11 Thread Massimo Di Pierro
Rows yes: rows = db().select() rows.json() Row no: row = rows[0] row.json() # not defined but simplejson.dumps(row.as_dict()) On Tuesday, 11 September 2012 07:51:56 UTC-5, Alan Etkin wrote: > > Aren't dal Row and Rows classes capable of returning json also? > > On Tuesday, September 11, 20

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread lucas
oh cr#p, because i was able to definitely trace that cPickle.load error to the unrecoverable error. makes sense now. so how can i narrow this terrible thing down. i am using apache httpd 2.2.15 on centos 6.3, postgresql 9.1 with the web2py contrib pg8000 driver, and web2py 2.0.8. i have exclu

Re: [web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread Massimo Di Pierro
Adding support for other SQL databases is easy. I have no data about OrientDB but we can easily add an adapter if you help with testing. On Tuesday, 11 September 2012 08:15:01 UTC-5, luckysmack wrote: > > Well its starting to seem like a good fit. But yes I won't be using DAL, > since I'll be us

[web2py] Re: HTML truncate

2012-09-11 Thread Massimo Di Pierro
{{=db.publicaciones.descripcion.represent(tipo_3.descripcion,tipo_3}} I do not think you want the extra =. On Tuesday, 11 September 2012 08:47:00 UTC-5, villas wrote: > > I end up doing something like this: > > {{=db.publicaciones.descripcion.represent(=tipo_3.descripcion,tipo_3)}} > > I hope tha

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread Massimo Di Pierro
Some problems have been reported with pg8000. Can you reproduce the errors with psycopg2. Can you email me one of the corrupt tickets? I may be able to read them and see what is going on. On Tuesday, 11 September 2012 09:31:46 UTC-5, lucas wrote: > > oh cr#p, because i was able to definitely tr

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-09-11 Thread Massimo Di Pierro
if the user does not pass a value it will still not trigger a computation because "" is not None, I think. On Tuesday, 11 September 2012 09:17:02 UTC-5, Anthony wrote: > > I haven't followed this closely, but instead of specifying a "compute" > attribute for the field, could you instead specify

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-09-11 Thread Bruno Rocha
for that cases shouldn't use _before_insert and _before_update triggers? --

[web2py] problem adding members to group

2012-09-11 Thread greaneym
Dear all, I'm testing the pos plugin and have it mostly set up, but I'm stuck. I had commented all the auth statements and have now uncommented them, and was adding the group called manager and before I could add members was interrupted. My session ended, and after that I could not use the adm

[web2py] "MENU helper" and "Server-side DOM" work together?

2012-09-11 Thread amphisia pui
Hi to all I want to use the html helper MENU to have in the page footer a menu totally exploded without sliding items. I changed the css classes and everything looks fine but I don't want the first level menu items to be clickable so the first thing I tried was the server-side parsing to remo

[web2py] Re: Trying to reproduce Ex. in manual, sec. 6.21.1 (inner joins)

2012-09-11 Thread MichaelF
Great; I appreciate it. Do you still want me to open a ticket with a suggestion for an enhancement? Regards, Michael On Monday, September 10, 2012 5:29:12 PM UTC-6, Massimo Di Pierro wrote: > > Anyway, I changed the code in trunk so that the example in the book works > as described. > > On Mond

[web2py] Is 'second option' for one-many available for many-many?

2012-09-11 Thread MichaelF
Section 6.21.1 in the manual talks about an alternative syntax for 1-many joins, using the 'on' function. Is that technique available for many-many? I try this and get an error: # In this example, Meet and Team are being connected through Participant_team teamStaff = db(db.Meet.id == request.ar

[web2py] web2py default layout.html

2012-09-11 Thread Kevin Miller
Hi All, I notice that when I use the layout.html, even though the div with class="container" and the Section with id="main" are the same size, the Section is pushed to the right. I used the inspector in firefox to check it, when I noticed that text I had was going out of the container div. This wa

Re: [web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread Shawn McElroy
Yes i can definately help with testing. Currently there seems to be 2 existing libs for using orientdb. - Compass: https://github.com/emehrkay/Compass which ties directly into orientdb through its rest interface, and will eventually have binary support. - Bulbs with Rexter: http://bulbflow.com/h

Re: [web2py] Is 'second option' for one-many available for many-many?

2012-09-11 Thread Richard Vézina
left join on the linking table and an other left join on the other table?? Would you sent a example in SQL of you complexe request, we could help you translate it into web2py. Richard On Tue, Sep 11, 2012 at 11:04 AM, MichaelF wrote: > Section 6.21.1 in the manual talks about an alternative

[web2py] Re: problem adding members to group

2012-09-11 Thread greaneym
I see on the groups that I might need to run from the source dist instead of web2py.app since I am on a mac, so I'll try that first. On Tuesday, September 11, 2012 9:48:48 AM UTC-5, greaneym wrote: > > Dear all, > > I'm testing the pos plugin and have it mostly set up, but I'm stuck. I had > co

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread villas
Add this line as a test: db.executesql('create unique index idx_owner on bodypart(owner)') to your code like this: db = DAL('sqlite://storage.db') person = db.define_table('person', Field('name')) bodypart = db.define_table('bodypart', Field('name'), Field('owner', 'reference person', unique=Tr

[web2py] Translation plural

2012-09-11 Thread Francisco Costa
How to use the plural featurein tranlation T.plural ? --

[web2py] Re: Is 'second option' for one-many available for many-many?

2012-09-11 Thread MichaelF
I should have added that I can get the same effect with this: # In this example, Meet and Team are being connected through Participant_team teamStaff = db(db.Meet.id == request.args(1)).select( db.Meet.ALL, db.Team.ALL, join = [db.Participant_tea

Re: [web2py] compute fields do not show up in SQLFORM view form

2012-09-11 Thread Massimo Di Pierro
I think so. On Tuesday, 11 September 2012 09:42:05 UTC-5, rochacbruno wrote: > > for that cases shouldn't use _before_insert and _before_update triggers? --

[web2py] Re: "MENU helper" and "Server-side DOM" work together?

2012-09-11 Thread Massimo Di Pierro
I added components yet MENU is a little different then other helpers. On Tuesday, 11 September 2012 09:49:59 UTC-5, amphisia pui wrote: > > Hi to all > > I want to use the html helper MENU to have in the page footer a menu > totally exploded without sliding items. > I changed the css classes and

[web2py] Re: "MENU helper" and "Server-side DOM" work together?

2012-09-11 Thread Anthony
Looks like MENU doesn't generate a DOM structure until its .serialize() method is called. You could do: mmenu = mmenu.serialize(mmenu.data) mmenu.elements('a') I'm not sure why it was done this way as opposed to generating the DOM upon initialization. Massimo? Anthony On Tuesday, September 11

[web2py] Re: Trying to reproduce Ex. in manual, sec. 6.21.1 (inner joins)

2012-09-11 Thread Massimo Di Pierro
Non need. It is now supported as you expected it. On Tuesday, 11 September 2012 09:52:22 UTC-5, MichaelF wrote: > > Great; I appreciate it. > > Do you still want me to open a ticket with a suggestion for an enhancement? > > Regards, > Michael > > On Monday, September 10, 2012 5:29:12 PM UTC-6, Mas

[web2py] Re: web2py default layout.html

2012-09-11 Thread Massimo Di Pierro
Not intended. Can you help us fix it? On Tuesday, 11 September 2012 10:11:35 UTC-5, dundee wrote: > > > Hi All, > > I notice that when I use the layout.html, even though the div with > class="container" and the Section with id="main" are the same size, the > Section is pushed to the right. > I u

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread Anthony
Why do you want a one-to-one relation? Can't you just put all the fields in one table? Anthony On Tuesday, September 11, 2012 9:23:16 AM UTC-4, martzi wrote: > > Unique = True, has probably no effect. see below. > ... > >>> db = DAL('sqlite://storage.db') > >>> person = db.define_table('person'

[web2py] Re: problem adding members to group

2012-09-11 Thread Massimo Di Pierro
I do not understand this line: python web2py.py -S app -M -N -R applications/myapp -A -R should specify a script, not an app -A should be followed by command line arguments for the script but you do not have any This is probably not the cause of your problem anyway. On Tuesday, 11 September

Re: [web2py] Re: Is 'second option' for one-many available for many-many?

2012-09-11 Thread Richard Vézina
That look right... There ways to write request in web2py when it comes to join. They will not generate the same SQL syntax for example : db((db.table1.field==something)&(db.table2.field==something)).select(...) = Old SQL SELECT ... FROM table1, table2 WHERE ... When you use join in web2py, I gu

[web2py] Re: Is 'second option' for one-many available for many-many?

2012-09-11 Thread MichaelF
Thanks; I think I have it. The SQL is: SELECT Meet.*, Team.* FROM Meet INNER JOIN Participant_team ON Meet.id = Participant_team.Meet INNER JOIN Team ON Participant_team.Team = Team.id; My web2py below implements that. On Tuesday, September 11, 2012 9:25:01 AM UTC-6, MichaelF wrote: >

[web2py] Re: Is 'second option' for one-many available for many-many?

2012-09-11 Thread Massimo Di Pierro
I cannot reproduce the problem. This works for me: db=DAL() db.define_table('Meet',Field('name')) db.define_table('Team',Field('name')) db.define_table('Participant_team', Field('Meet',db.Meet), Field('Team',db.Team)) a=db.Meet.insert(name='here') b=db.Team.insert(

[web2py] Display Image in text

2012-09-11 Thread BlueShadow
Hi I like to have an Image Displayed within the Content of an Article. The Content ist stored in a db table. Up till now I simply displayed the content by this line {{Article.Content}} I thought an image with text flowing around the image would freshen up the article. I tried the following I put

[web2py] Re: Is 'second option' for one-many available for many-many?

2012-09-11 Thread MichaelF
Yikes! I *think* I have the same (or functionally the same), but maybe not. Might it be that I'm using an out-of-date version? Here's what I'm using: web2py™(1, 99, 7, datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable')PythonPython 2.5.4: C:\Program Files (x86)\web2py\web2py_no_console.exe I as

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread lucas
On Tuesday, September 11, 2012 10:35:02 AM UTC-4, Massimo Di Pierro wrote: > > Some problems have been reported with pg8000. Can you reproduce the errors > with psycopg2. yes, i can reinstall the psycopg2 rpm package. how do you specify and ensure that web2py is using that driver in the DAL?

[web2py] Re: "MENU helper" and "Server-side DOM" work together?

2012-09-11 Thread Massimo Di Pierro
No good reason. The logic can be moved in the constructor but need to be tested to make sure nothing breaks. On Tuesday, 11 September 2012 10:29:02 UTC-5, Anthony wrote: > > Looks like MENU doesn't generate a DOM structure until its .serialize() > method is called. You could do: > > mmenu = mmen

[web2py] Re: Display Image in text

2012-09-11 Thread Massimo Di Pierro
You should not do it that way because the value of content would be escaped. On Tuesday, 11 September 2012 10:53:18 UTC-5, BlueShadow wrote: > > Hi I like to have an Image Displayed within the Content of an Article. The > Content ist stored in a db table. > Up till now I simply displayed the cont

[web2py] Re: Is 'second option' for one-many available for many-many?

2012-09-11 Thread Massimo Di Pierro
Move 2.0.8 or - better - the nightly build. On Tuesday, 11 September 2012 11:06:11 UTC-5, MichaelF wrote: > > Yikes! I *think* I have the same (or functionally the same), but maybe > not. Might it be that I'm using an out-of-date version? Here's what I'm > using: > > web2py™(1, 99, 7, datetime.d

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread Massimo Di Pierro
print db._adapter.driver_name but psycopg2 always gets priority over pg8000 unless otherwise specified in driver_args. On Tuesday, 11 September 2012 11:11:43 UTC-5, lucas wrote: > > > > On Tuesday, September 11, 2012 10:35:02 AM UTC-4, Massimo Di Pierro wrote: >> >> Some problems have been repor

[web2py] Re: short term roadmap

2012-09-11 Thread Andrew
For 1 & 2, if the only remote repository type being considered is Git, then using hg-git is probably ideal since it'll support both hg and git locally and working with remote git repo's. I would like to work on this. Does anyone else have interest / spare cycles to help implement this support?

[web2py] Re: Display Image in text

2012-09-11 Thread BlueShadow
So what is the right way to do it? On Tuesday, September 11, 2012 6:15:29 PM UTC+2, Massimo Di Pierro wrote: > > You should not do it that way because the value of content would be > escaped. > > --

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Jonathan Lundell
On 10 Sep 2012, at 9:02 AM, Marek Mollin wrote: > So i have cut down the router to bare minimum, just to check this admin issue. > I now have: > > routers = dict( > BASE = dict( > domains = { > 'myapp.com' : 'myapp1', > 'test.myapp.com' : 'myapp2', > } > ), >

Re: [web2py] Re: internal error crash with newest 2.0.6 and old 1.99.2

2012-09-11 Thread LightDot
About python-psycopg2 - I'd rebuild the source rpm with your 9.1 posgresql-devel, just in case. RHEL/CentOS 6 originally ships with postgres 8.4.x, so this might be an issue. Usual caveats apply - don't (re)build rpm packages as root, etc. Regards, Ales On Tuesday, September 11, 2012 6:11:43 P

[web2py] Re: short term roadmap

2012-09-11 Thread Massimo Di Pierro
+1 On Tuesday, 11 September 2012 11:18:00 UTC-5, Andrew wrote: > > For 1 & 2, if the only remote repository type being considered is Git, > then using hg-git is probably ideal since it'll support both hg and git > locally and working with remote git repo's. > > I would like to work on this. Doe

[web2py] Re: short term roadmap

2012-09-11 Thread Massimo Di Pierro
I think the first thing to to would be to create a module that implements the features we want. The logic should not be in the admin actions. I think we need a general purpose way to call scripts from apps (in this case admin) that run in background and communicate with them. I am working on t

[web2py] Re: Display Image in text

2012-09-11 Thread Massimo Di Pierro
It depends. Does content contain HTML? On Tuesday, 11 September 2012 11:36:02 UTC-5, BlueShadow wrote: > > So what is the right way to do it? > > On Tuesday, September 11, 2012 6:15:29 PM UTC+2, Massimo Di Pierro wrote: >> >> You should not do it that way because the value of content would be >>

[web2py] Re: Display Image in text

2012-09-11 Thread BlueShadow
It does I display it by this line to be exact: {{=XML(Artical.Content)}} On Tuesday, September 11, 2012 6:49:40 PM UTC+2, Massimo Di Pierro wrote: > > It depends. Does content contain HTML? > > On Tuesday, 11 September 2012 11:36:02 UTC-5, BlueShadow wrote: >> >> So what is the right way to do it?

Re: [web2py] [OT] Ubuntu 12.10 will no longer ship with Python 2

2012-09-11 Thread LightDot
I have been running python and python3 packages side by side on Fedora ever since python 3 came out. I'm sure all bigger distros have this taken care of in a similar way... I was curious so I took a look: - Debian has 2.x as 'python' and 3.x as 'python3' - Fedora has 2.x as 'python' and 3.x as '

Re: [web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread Andrew W
With its SQL http://code.google.com/p/orient/wiki/GraphDatabase#SQL it sounds like a candidate for a straight dal database adapter. A graph database sounds interesting.. --

[web2py] Error in appadmin

2012-09-11 Thread Martin Weissenboeck
I wanted to see a row of a table and I started the database administration tool. I get the following snapshot. There is a trailing "%", but no "s" - why? self.label '%(last_name)s %(first_name)%' Error snapshot [image: help] ('first_name') inspect attributes Frames - *File D:\dropbox\I

[web2py] Re: Display Image in text

2012-09-11 Thread Massimo Di Pierro
You should be able to do: {{ if Article.InTextImage.thumb: src = URL('download',args=Article.InTextImage.thumb) content = Article.Content.replace('<>',IMG(_src=src,_style='display:block;').xml()) else: content = Article.Content.replace('<>','') pass =XML(content, sanitize=True) # saniti

Re: [web2py] [OT] Ubuntu 12.10 will no longer ship with Python 2

2012-09-11 Thread Massimo Di Pierro
yes. everybody is doing this right but Arch. python3 has to be available but has to treated as a different language. On Tuesday, 11 September 2012 12:09:19 UTC-5, LightDot wrote: > > I have been running python and python3 packages side by side on Fedora > ever since python 3 came out. I'm sure a

[web2py] Re: Error in appadmin

2012-09-11 Thread Massimo Di Pierro
Not in web2py. Perhaps in the code you are running? $ grep '%(first_name)' gluon/*.py gluon/tools.py:user_identifier = '%(first_name)s' gluon/tools.py:return '%(first_name)s %(last_name)s' % user gluon/tools.py:format='%(first_name)s %(last_n

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Marek Mollin
"We be rollin" ;] It works perfectly so far. Both admin and appadmin. Relocating admin doesnt work but its no big deal I guess. Thanks a million! W dniu wtorek, 11 września 2012 18:36:12 UTC+2 użytkownik Jonathan Lundell napisał: > > On 10 Sep 2012, at 9:02 AM, Marek Mollin > > wrote: > > So i

[web2py] Do you value Matplotlib? Read this!

2012-09-11 Thread Massimo Di Pierro
http://numfocus.org/johnhunter/ John Hunter, author of Matplotlib, founding board member of NumFOCUS, husband to Miriam, and father to three daughters: Clara, Ava, and Rahel, was diagnosed with cancer in late July 2012 after returning from his keynote address at SciPy in Austin, TX. He passed

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Jonathan Lundell
On 11 Sep 2012, at 12:04 PM, Marek Mollin wrote: > "We be rollin" ;] > It works perfectly so far. Both admin and appadmin. > Relocating admin doesnt work but its no big deal I guess. What happens when you relocate admin? > > Thanks a million! > > W dniu wtorek, 11 września 2012 18:36:12 UTC+2

[web2py] What data should be private (for security) in a standard web2py installation?

2012-09-11 Thread monotasker
I'm using github for open-source development of some web2py apps and want to make sure I'm not exposing any data that would be a security risk. As far as I can tell, the sensitive pieces of data in a standard app would be: - email account information (by default in db.py) - any recaptcha keys (b

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Marek Mollin
It fires up default app. W dniu wtorek, 11 września 2012 21:15:50 UTC+2 użytkownik Jonathan Lundell napisał: > > On 11 Sep 2012, at 12:04 PM, Marek Mollin > > wrote: > > "We be rollin" ;] > It works perfectly so far. Both admin and appadmin. > Relocating admin doesnt work but its no big deal I g

Re: [web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread Shawn McElroy
yes that is true as well. but to me at least, using the gremlin syntax seems a lot more intuitive for crud operations on a graph. On Tue, Sep 11, 2012 at 11:13 AM, Andrew W wrote: > With its SQL http://code.google.com/p/orient/wiki/GraphDatabase#SQL it > sounds like a candidate for a straight da

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Marek Mollin
Checked again with restarting entire server and it seems fine. Redirects to admin just fine: small problem starts when you enter particular's app appadmin it goes under url: admin.myapp.com/myapp/appadmin and css goes a bit wierd: http://i.imgur.com/0eOYe.png W dniu wtorek, 11 września 2012 21

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-11 Thread Jonathan Lundell
On 11 Sep 2012, at 12:32 PM, Marek Mollin wrote: > Checked again with restarting entire server and it seems fine. > > Redirects to admin just fine: > small problem starts when you enter particular's app appadmin it goes under > url: admin.myapp.com/myapp/appadmin Post the router, please. I'll e

[web2py] Re: What data should be private (for security) in a standard web2py installation?

2012-09-11 Thread Niphlod
- the dal URI if it contains logins/password/db that is not localhost - eventually janrain key is to be kept private as well. PS: Auth.settings_hmac_key in modern scaffolding apps is not written "plainly": it is replaced by Auth.get_or_create_key() that reads from private/auth.key or it creates a

[web2py] Can I have 2 auth tables in a single application?

2012-09-11 Thread Pystar
In the application I am developing, I would like to know if I can have 2 auth tables in it? The reason is that I would like to have ordinary users that would use the auth_user table with some extra fields added and then an admin table with some unique fields. How do I go about implementing some

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread martzi
FYI : putting all the fields in one table will result to multiple columns ... On Tuesday, September 11, 2012 5:31:37 PM UTC+2, Anthony wrote: > > Why do you want a one-to-one relation? Can't you just put all the fields > in one table? > > Anthony > > On Tuesday, September 11, 2012 9:23:16 AM UTC

[web2py] Re: web2py DAL one-to-one relation

2012-09-11 Thread martzi
Thanks for the reply. But db.executesql('create unique index idx_owner on bodypart(owner)') returned the below error, and still didn't solve the problem. Traceback (most recent call last): File "", line 1, in File "/home/martin/Documents/web2py2/gluon/dal.py", line 7234, in executesql a

web2py@googlegroups.com

2012-09-11 Thread howesc
Don_x, i would recommend that your break your problem down into small chunksyou listed several bits and pieces that you are having trouble with. i suggest you look to fix them one at a time. can you: - more clearly state your requirements - show/tell exactly what is going wrong, includin

[web2py] Re: Display Image in text

2012-09-11 Thread BlueShadow
thanks Massimo. that works. Is it also possible to make the image float:left or right So the text flowes around the image. I tried adding float:left; to the _style but it doesnt have any effect. On Tuesday, September 11, 2012 8:50:56 PM UTC+2, Massimo Di Pierro wrote: > > You should be able to do

Re: [web2py] Re: Web2py. for a minimalist app, it feels bloated. Do it I need it?

2012-09-11 Thread David Marko
+1 --

Re: [web2py] Removing labels from forms

2012-09-11 Thread Richard Vézina
input is a reserved word... Richard On Fri, Aug 31, 2012 at 1:01 PM, Alec Taylor wrote: > Perfect, thanks to you both :) > > -- > > > > --

[web2py] When/how is 'format' used?

2012-09-11 Thread MichaelF
I have the following parent-child: db.define_table('Institution', Field('Institution_name', 'string', length=60, required=True, unique=True), format='%(Institution_name)s') db.define_table('Team', Field('Institution', db.Institut

[web2py] Re: problem adding members to group

2012-09-11 Thread greaneym
Got farther but still stuck. I got locked out of the database and am trying to get back in with "admin". cd to directory that contains "web2py.py" python web2py.py -S appname >>> >>> db = DAL('sqlite://storage.sqlite', auto_import=True) >>> print db.tables ['auth_cas', 'auth_event', 'auth_group

[web2py] SQLFORM.grid with args: customizing the Add form

2012-09-11 Thread Vincent
I'm using SQLFORM.grid a lot and it is extremely valuable. I am in a position where I want to use request.args with a grid and I am unsure what the right approach is. Let's say my db.py model is: db.define_table('person', Field('firstname'), Field('lastname'), for

  1   2   >