[TurboGears] Re: problem with kid template for using multibyte charachters

2005-12-05 Thread raku
Thanks. It was surely display when add kid.assume_encoding=utf-8 to template. -- raku

[TurboGears] Re: How to make turbogears.url answering something other than localhost:8080

2005-12-05 Thread Arnar
Hello there, I believe I might be experiencing the same bug. I'm running TurboGears (latest stable version) behind Apache and mod_python via mpcp. My problem is not with redirects though, but that I can't place the application anywhere except on the virtual host root. I want to place my

[TurboGears] Re: identity problem/question

2005-12-05 Thread Jorge Godoy
Jeff Watkins [EMAIL PROTECTED] writes: Unless someone speaks up and explains why it *ISN'T* wrong after all, I'm going to check this fix in tomorrow morning. Ah! This is what that small SQLObject patch that I had here fixed. :-) I couldn't remember what it was and had no time to dig it

[TurboGears] Re: distribution

2005-12-05 Thread Jorge Godoy
Swaroop C H [EMAIL PROTECTED] writes: I guess I'm more comfortable with tarballs too, but that's mainly because I haven't used eggs before. Kevin, are eggs the recommended way of distributing _production_ TG code? If so, how would you make configuration changes and make sure they don't get

[TurboGears] Re: How to make turbogears.url answering something other than localhost:8080

2005-12-05 Thread Jorge Godoy
Arnar [EMAIL PROTECTED] writes: Kevin Dangoor wrote: On 01 Dec 2005 18:17:46 -0200, Jorge Godoy [EMAIL PROTECTED] wrote: Kevin Dangoor [EMAIL PROTECTED] writes: Are you proxying behind Apache or something? If so, this would make sense Yes. You should be able to

[TurboGears] Re: How to make turbogears.url answering something other than localhost:8080

2005-12-05 Thread Jorge Godoy
Jorge Godoy [EMAIL PROTECTED] writes: Arnar, can you add your comments later? I'll post the ticket number here. http://trac.turbogears.org/turbogears/ticket/179 It's ticket #179. Be seeing you, -- Jorge Godoy [EMAIL PROTECTED]

[TurboGears] Re: api question

2005-12-05 Thread Michele Cella
David Bernard wrote: About your suggestion of using a Form's method : * to do this errors should be part of the Form'state, * in my case I share the Form instance between every request, so interference could append if two users use simultanously the form. You are right, indeed. :-) Sorry.

[TurboGears] Re: JSON WriteException - long int

2005-12-05 Thread nzljim
Wrap int() around the variable that is returned from the database as a Long, I've done it in my return dictionary e.g. return dict(itemid=int(item.Id), description=item.Description, amount=item.Amount)

[TurboGears] Re: How to make turbogears.url answering something other than localhost:8080

2005-12-05 Thread Kevin Dangoor
Hi Arnar, It sounds like there are two things in your case: 1) you should use the url function to make sure that the server path gets added to URLs in your program 2) the url function has a bug that needs fixing (which is the ticket Jorge opened). Kevin On 12/5/05, Arnar [EMAIL PROTECTED]

[TurboGears] Re: distribution

2005-12-05 Thread Kevin Dangoor
On 05 Dec 2005 09:35:35 -0200, Jorge Godoy [EMAIL PROTECTED] wrote: Swaroop C H [EMAIL PROTECTED] writes: I guess I'm more comfortable with tarballs too, but that's mainly because I haven't used eggs before. Kevin, are eggs the recommended way of distributing _production_ TG code? If

[TurboGears] Re: JSON WriteException - long int

2005-12-05 Thread Kevin Dangoor
On 12/4/05, evan [EMAIL PROTECTED] wrote: Thanks for the reply. I'm still a python and TG noob so I'm not sure how to complete this upgrade of just the json-py part. The json-py-3_4.zip file (from sourceforge) doesn't contain a setup.py file. Installing it manually in my site-packages

[TurboGears] Templates in a subdirectory under project/templates ?

2005-12-05 Thread Mark Godfrey
Hi group :) I have a project I'm working on that's getting rather largish,and ideally would like to split out the templates in a similar manner. I thought it would have been possible to do something along the lines of wa2/templates/customer/index and place an empty __init__.py file inside of

[TurboGears] Re: JSON WriteException - long int

2005-12-05 Thread Kevin Dangoor
I've uploaded a json-py 3.4 egg. You can get it like this: easy_install -f http://www.turbogears.org/download/index.html json-py Let me know if you run into any problem... Kevin On 12/4/05, evan [EMAIL PROTECTED] wrote: Thanks for the reply. I'm still a python and TG noob so I'm not sure

[TurboGears] Re: Templates in a subdirectory under project/templates ?

2005-12-05 Thread Mark Godfrey
Figured it out. You need master.kid in the sub-directory too. :) I was kinda expecting it to work like Zope does, and automagically acquire master.kid from the parent class. No matter, problem solved, thanks for listening ;)

[TurboGears] Re: Templates in a subdirectory under project/templates ?

2005-12-05 Thread Liza
On 12/5/05, Mark Godfrey [EMAIL PROTECTED] wrote: Figured it out. You need master.kid in the sub-directory too. :) I just do this: py:extends='../master.kid' --Liza

[TurboGears] Re: Can't get my unit tests going with testgears

2005-12-05 Thread Kevin Dangoor
Hi Matthew, Thanks for posting this. I'll see about getting some form of it into the TurboGears proper. Kevin On 12/2/05, matthew clark [EMAIL PROTECTED] wrote: Here is the beginning of a unittest that we have been using. I should move this up to a parent class. Otherwise it needs to be in

[TurboGears] turbogears.url and None parameters

2005-12-05 Thread Brian Beck
Not sure if url is still in 0.9 and works the same way, but would it be reasonable to exclude a parameter in the return value if its value is None? Right now conditionally including a parameter requires making a dictionary beforehand and then modifying it, which makes a one-liner in kid a big

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ronald Jaramillo
+1 On Dec 5, 2005, at 10:57 PM, bruno modulix wrote: Kevin Dangoor a écrit : So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 The first, of course.

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michael Schneider
Kevin, I am still new to cherrypy. I was under the impression that you built an object tree, and it automatically mapped the URI to the object tree, passing in args to the function http://yoursite/articles/edit?id=10 wouldn't this map to class Article(.): def edit(self, id=None):

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michele Cella
william wrote: Does this is implementable into CP2.1 AFAIK, such flexible URL would available in CP2.2. I think Routes provides the maximum flexibility one could ever need and it seems that it will be easily integrable with CherryPy 2.2:

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michele Cella
Michele Cella wrote: I'm unable to make a choice between 1 and 2, definitely not the third option. Ok, the first seems the best. If I read the second it seems like I'm going to edit (or show) 10 articles not the article number 10. So +1 for the first. Ciao Michele

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michael Schneider
Here a nice overview of the REST approach to URI encoding with some links http://en.wikipedia.org/wiki/Representational_State_Transfer

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Jared Kuolt
I prefer the command before anything, e.g.: http://yoursite/edit/article/10 That's assuming 'articles' isn't a subdirectory.

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Bob Ippolito
On Dec 5, 2005, at 12:58 PM, Ian Bicking wrote: Kevin Dangoor wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ian Bicking
Sylvain Hellegouarch wrote: Indeed, IMO the three are equivalent (in fact 2 and 3 are the same). If we refer to REST we have: http://www.ics.uci.edu/~fielding/pubs/dissertation/evaluation.htm#sec_6_2_4 Which clearly indicates that the underlying implementation should be seen through the URI

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Sylvain Hellegouarch
True. From CherryPy 2.2, all exposed methods will be positional parameters aware by default except index(). Selon Michele Cella [EMAIL PROTECTED]: Michael Schneider wrote: would you go to partial matches for the other URL (like the CherryPy docs below), or is there a trick that

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Jorge Godoy
Kevin Dangoor [EMAIL PROTECTED] writes: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 the advantage to the first one is that it makes view look

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ian Bicking
Kevin Dangoor wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 http://yoursite/article-10?action=edit ... because 10 doesn't mean anything and

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread bruno modulix
Kevin Dangoor a écrit : So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 The first, of course. the advantage to the first one is that it makes view look

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Ray Cote
At 3:42 PM -0500 12/5/05, Kevin Dangoor wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 the advantage to the first one is that it makes view look

[TurboGears] Identity Management problem

2005-12-05 Thread Mike Stephen
Hi all, Firstly, I am really enjoying Turbogears, it is such a refreshing way to work after doing Java webapps!! Anyway, I am working with veresion 0.9 from SVN with MySQL on Windows XP and trying to get the Identity Management stuff working. I followed Jeff's tutorial and am having a bizarre

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michele Cella
Well, I've found another opinion (and some comments) regarding 1) vs 2) from the Rails side: http://tech.rufy.com/entry/91 (notice the above url :D) Ciao Michele

[TurboGears] Re: Identity Management problem

2005-12-05 Thread Jorge Godoy
Mike Stephen [EMAIL PROTECTED] writes: Firstly, I am really enjoying Turbogears, it is such a refreshing way to work after doing Java webapps!! :-) Anyway, I am working with veresion 0.9 from SVN with MySQL on Windows XP and trying to get the Identity Management stuff working. I followed

[TurboGears] Re: : Catwalk and (unicode, encoding) problem (more)

2005-12-05 Thread bruno modulix
Brian Beck a écrit : Ronald Jaramillo wrote: Hi, I'm aware of this problem, and yes CatWalk is the one to blame =(. Are you sure about this? I'm not using CatWalk and I had this problem from the tg-admin shell. I've set up a recent version of pgsql and created a db with utf8 encoding -

[TurboGears] link titles (was: Re: [TurboGears] Re: a triviality: how do you like your URLs?)

2005-12-05 Thread Ian Bicking
Bob Ippolito wrote: I'd personally tend towards something simpler, and enforce unique titles... either automatically by adding predicable garbage to the end, or by validating edits/creates to make sure they have a unique title. It would be quite reasonable in the SQLObject trunk to create

[TurboGears] Re: SQLObject Modeling Question

2005-12-05 Thread Joost Moesker
Brian Beck wrote: Just a note, I think the 'cascade' keyword argument is deprecated, it should work the same without it. When you said you were almost there -- what else needs to be done? I'm using the same method as above to model a tree currently and it's working okay for me. Brian are

[TurboGears] Re: SQLObject Modeling Question

2005-12-05 Thread Ian Bicking
Joost Moesker wrote: Brian Beck wrote: Just a note, I think the 'cascade' keyword argument is deprecated, it should work the same without it. When you said you were almost there -- what else needs to be done? I'm using the same method as above to model a tree currently and it's working okay

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Joost Moesker
I would vote #1 For an ecommerce project i'm currently using the following URL scheme: catagoryname/subcatagoryname catagoryname/subcatagoryname/edit catagoryname/subcatagoryname/.../productname catagoryname/subcatagoryname/.../productname/edit Editing the product and catagory 'pages' directly

[TurboGears] Kid XML template

2005-12-05 Thread matthew clark
The solution to this problem is going to take me a long way towards understanding how the kid templates operate. I am trying to serve up some xml from a kid template. Sounds easy enough, but I get lost trying to change the doctype from html to xml. If I put ?xml version=1.0 in my xmlpage.kid

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Mike Orr
On 12/5/05, Kevin Dangoor [EMAIL PROTECTED] wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit This is the most natural. articles contains all articles. 10 is an article. edit is an operation on 10. view is the index

[TurboGears] Re: Kid XML template

2005-12-05 Thread Jared Kuolt
Matt (the guy across the cube wall), Check out kid.outputformat here: http://www.turbogears.org/docs/config.html On 12/5/05, matthew clark [EMAIL PROTECTED] wrote: The solution to this problem is going to take me a long way towards understanding how the kid templates operate. I am trying

[TurboGears] Reddit.com rewritten in python...

2005-12-05 Thread Guyon Morée
As can be read on: http://reddit.com/blog/2005/12/night-of-living-python.html the high-profile site is being rewritten in Python. Are there any 'signs' we could check to see if it' perhaps being written in TG? cheers, Guyon Morée http://gumuz.looze.net

[TurboGears] Re: Reddit.com rewritten in python...

2005-12-05 Thread Angel Luis Jimenez Martinez
Quoting http://reddit.com/help/faq: So what Python framework did you use? web.py, the web application framework of choice for discriminating programmers. web.py is itself upon SQLObject and Cheetah. The data is stored in a PostgreSQL database and served by lighttpd.

[TurboGears] Re: link titles

2005-12-05 Thread Krys Wilken
Django has a slug field with is similar. From the site: SlugField Slug is a newspaper term. A slug is a short label for something, containing only letters, numbers, underscores or hyphens. They're generally used in URLs. (http://www.djangoproject.com/documentation/model_api/) I believe

[TurboGears] Re: Reddit.com rewritten in python...

2005-12-05 Thread Sean De La Torre
The comments to that post (http://reddit.com/blog/2005/12/night-of-living-python.html) are getting quite nasty. Don't get me wrong, it's quite entertaining, but some people need to get a life.

[TurboGears] fonts used?

2005-12-05 Thread Jared Kuolt
Can someone tell me what fonts are used in these files? Thanks. http://trac.turbogears.org/turbogears/wiki/WelcomePageImproved -- [EMAIL PROTECTED]

[TurboGears] Re: Reddit.com rewritten in python...

2005-12-05 Thread Ian Bicking
Angel Luis Jimenez Martinez wrote: Quoting http://reddit.com/help/faq: So what Python framework did you use? web.py, the web application framework of choice for discriminating programmers. web.py is itself upon SQLObject and Cheetah. The data is stored in a PostgreSQL database and served

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread [EMAIL PROTECTED]
either 1 or 2

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Michael Schneider
Sorry for the stupid question, but what would the Controller code look like for option #1? for CRUD 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/edit/10 3) http://yoursite/articles/edit?id=10 1) http://yoursite/articles/10/edit 2) http://yoursite/articles/10/delete 3)

[TurboGears] Re: hardcoded paths in tg-admin.exe and easy_install.exe?

2005-12-05 Thread Phillip J. Eby
[EMAIL PROTECTED] wrote: Sure, here's the error message from within a Win Command Prompt: easy_install TurboGears C:\Program: can't open file 'Files\Python2.4.2\python.exe': [Errno 2] No such file or directory My Python install is under C:\Program Files\Python2.4.2\, so this error

[TurboGears] Q: Correct way to excersize your Turbogears SQLObject model by script?

2005-12-05 Thread Mike Kent
I put together a simple learning project using 'tg-admin quickstart', and set up a simple model. Now I want to write a quick-n-dirty python script to use the model with TestGears. After much skiming of docs and experimentation, I came up with this: from sqlobject import * from

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Swaroop C H
On 12/6/05, Jeff Watkins [EMAIL PROTECTED] wrote: I'm certain some will suggest this is unpythonic Why? -- Swaroop C Hwww.swaroopch.info

[TurboGears] new to TG, stuck on 2nd controller class, ugg

2005-12-05 Thread andrew
I know this should be easy, but I am trying to assimilate cherrypy, sqlobject, kid, and the TG glue all in one day. What is the write way to inform TG about my second controller ? I want to be able to go to a URL like http://somewhere/Second/oneplusone and get my new controller in the loop.

[TurboGears] Teaching Dreamweaver about *.kid files - A Solution (hopefully its helpful)

2005-12-05 Thread Peter Kahn
By default dreamweaver will not open a kid template file let alone treat it as html. It would be really nice if there were a filetypes dialog like eclipse has, but this is not the case in my version ( 7.0). However, a type can be added, but its a little tricky for windows users because the

[TurboGears] Re: Teaching Dreamweaver about *.kid files - A Solution (hopefully its helpful)

2005-12-05 Thread Michael Schneider
Peter, Thank you very much, Worked like a charm. I have started using nvu, but this lets my drop back to dreamweaver. Mike

[TurboGears] Re: new to TG, stuck on 2nd controller class, ugg

2005-12-05 Thread Levi
Seems like you're mostly on track. 1) class Second doesn't have to extend anything (but it can). 2) The url you typed had a capitol 'S', where is should have a lower case 's'. If you have to have an upper case S you could rename Root.second to Root.Second or you can look into implementing a

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Levi
+1 on 1) http://yoursite/articles/10/edit

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Swaroop C H
+1 On 12/6/05, Jonathan LaCour [EMAIL PROTECTED] wrote: So, in a generic CRUD feature, what would you want your URLs to look like: 1) http://yoursite/articles/10/edit+1 for #1.It is far and away the best option.It just seems to match the way I think of HTTP as messages being sent to

[TurboGears] Re: new to TG, stuck on 2nd controller class, ugg

2005-12-05 Thread andrew
You guys are great !!! The main reason I chose to look into TG over many other choices was the active community. The upper case was my problem...ugg. Hopefully I will be answering questions soon...but not before I ask a few more over the next couple of weeks. THanks again, Andrew

[TurboGears] a triviality: how do you like your URLs?

2005-12-05 Thread Dave Warnock
+1 on 1) http://yoursite/articles/10/edit .

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread anders pearson
Jeff Watkins [EMAIL PROTECTED] writes: I'm certain some will suggest this is unpythonic, but here goes: class CrudController(turbogears.Controller): [... snip a bunch of code ...] actually, this is pretty similar to what i've been using for building REST apps (in plain cherrypy; no

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Andy-Kim Möller
For me the natural one is the 3 one. Could be that it is because i was programming over 8 years php, but for the first 2 possibillities how would you build a form like this: form action="" href="http://yoursite/articles/edit" target="_blank" >http://yoursite/articles/edit method=GET input

[TurboGears] Re: Teaching Dreamweaver about *.kid files - A Solution (hopefully its helpful)

2005-12-05 Thread Jared Kuolt
This should be added to the wiki. On 12/5/05, Peter Kahn [EMAIL PROTECTED] wrote: By default dreamweaver will not open a kid template file let alone treat it as html. It would be really nice if there were a filetypes dialog like eclipse has, but this is not the case in my version ( 7.0).

[TurboGears] Re: Can't get my unit tests going with testgears

2005-12-05 Thread matthew clark
Sure thing. Don't thank me though, thank superjared. He wrote it for me after much complaining on my part about not being able to test during development. Its not a bird, its not a plane. mattOn 12/5/05, Kevin Dangoor [EMAIL PROTECTED] wrote: Hi Matthew,Thanks for posting this. I'll see

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Matt Dimmic
Ian's right, this is a Bike Shed moment. But since I care what color the bike shed is, +1 for #1. It feels the most pythonic to me: x = Article(id=10) x.edit(...) But my chief hope is that TurboGears' BDFL makes some decision before we get into an argument about what pythonic means. :)

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Claudio Torcato
+1 for #1. for you logic.

[TurboGears] Re: a triviality: how do you like your URLs?

2005-12-05 Thread Mike Orr
What's a Bike Shed? -- Mike Orr [EMAIL PROTECTED] ([EMAIL PROTECTED] address is semi-reliable)

[TurboGears] Re: Identity Management problem

2005-12-05 Thread Rune Hansen
On 5. des. 2005, at 23.35, Jorge Godoy wrote:"Mike Stephen" [EMAIL PROTECTED] writes: Firstly, I am really enjoying Turbogears, it is such a refreshing wayto work after doing Java webapps!! :-) Anyway, I am working with veresion 0.9 from SVN with MySQL on WindowsXP and trying to get the Identity