[tg-docs] Re: ErrorReporting
Christopher Arndt schrieb: Felix Schwarz schrieb: http://docs.turbogears.org/1.0/ErrorReporting Are there any specific actions needed to promote this document from draft level to official or something close to it? I'd like to give some suggesting, for improving this document. It is very helpful already and, incidentally, had just the information I was looking for today, but you godd make it really good, with just a few enhancements: I have gone forward and implemented the suggested changes myself and updated the code for the cherrypy filter method so that it can be used as a base class for your root controller. If some of you could check it out and comment, that would be appreciated. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Docs group. To post to this group, send email to turbogears-docs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-docs?hl=en -~--~~~~--~~--~--~---
[tg-trunk] RE: Config files
Mark Ramm wrote: So now that CherryPy config is pretty much global config only, any thoughts on how we should best manage configuration files in TurboGears 1.1 in order to provide some level of backwards compatibility to our users? I'm not sure what you mean by global config only...? There's global config, app config, and tree config (_cp_config), which get merged into request.config. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Trunk group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~--~~~~--~~--~--~---
[tg-trunk] Config files
Sorry it was late, and was both confused, and said what I meant in a confusing way. What I'm talking abut is a way to parse our old config files to pass into cherrypy as required. Right now we have a central config system, which is only passing stuff to cherrypy's global config. We need to parse it differently and pass it to the cherrypy global config, and app.cfg. But the real question (as Kevin noticed, in spite of my obtuseness) is how we deal with the tree/app config split. Mounting sub-applications in trees is one of the main things we need at my work, it would be great if we could work this out in a way that let's us be backwards compatable with our old config file format. --Mark On 2/27/07, Robert Brewer [EMAIL PROTECTED] wrote: Mark Ramm wrote: So now that CherryPy config is pretty much global config only, any thoughts on how we should best manage configuration files in TurboGears 1.1 in order to provide some level of backwards compatibility to our users? I'm not sure what you mean by global config only...? There's global config, app config, and tree config (_cp_config), which get merged into request.config. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Trunk group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~--~~~~--~~--~--~---
[tg-trunk] Re: Config files
On 2/27/07, Mark Ramm [EMAIL PROTECTED] wrote: But the real question (as Kevin noticed, in spite of my obtuseness) is how we deal with the tree/app config split. Mounting sub-applications in trees is one of the main things we need at my work, it would be great if we could work this out in a way that let's us be backwards compatable with our old config file format. Though I haven't been a 100% fan previously, hearing from Jim Fulton that Zope is moving toward PasteDeploy just makes me that much more certain that using PasteDeploy as the deployment config file format is a good way to go. The format was generally functional, but it seemed (from working with it last year) that there were some places where it could be smoother. It will probably be possible to maintain some level of backwards compatibility. But, if we decide to make a move like that we'd likely want to switch over entirely to standard INI files so that all of the config files use the same format. It may also be possible to perform automated conversion between old formats and new. In truth, this shouldn't be that bad since we don't fully support app composition in TG 1.0 as it is. Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Trunk group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~--~~~~--~~--~--~---
[tg-trunk] TurboGears and CP3
So, many of our tests are very tightly coupled with the CP2 way of doing things. But the actual TurboGears code is not nearly so tightly coupled, and we are now able to process requests with a quickstarted app (we get a stacktrace due to some configuration work that isn't yet done, but we can fake it. Internal server calls need to change, and we probably need to determin the API we want to use for mounting applicaitons at other places than the root. Once we get things working in an acutal applicaton, we plan to go back and write some new tests that are less tightly coupled to CherryPy. The nicest bit so far is cherrypy.url which will let us make the turbogears url() function way less complicated. Woo--hoo for code removal!!! So far we have only one change that will impact end users so far: * simple_cookie has become cookie on both the request and response objects. If you're interested in following along, all of this work is happening in the cp3 branch. -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Trunk group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~--~~~~--~~--~--~---
[tg-trunk] Re: TurboGears and CP3
On Feb 28, 2007, at 2:48 AM, Mark Ramm wrote: So, many of our tests are very tightly coupled with the CP2 way of doing things. But the actual TurboGears code is not nearly so tightly coupled, and we are now able to process requests with a quickstarted app (we get a stacktrace due to some configuration work that isn't yet done, but we can fake it. Internal server calls need to change, and we probably need to determin the API we want to use for mounting applicaitons at other places than the root. Once we get things working in an acutal applicaton, we plan to go back and write some new tests that are less tightly coupled to CherryPy. Have you considered using paste.fixture for the functional tests? That would decouple the tests from CP completely as it treats the whole cow as an opaque WSGI app which is ideal IMO. I did some experiments with paste.deploy and CP3 a while back which I have here [1] if you guys want to take a peek. The paste.app_factory entry point that builds the CP3/TG WSGI app is implemented here [2]. Something similar can be done to create the app that needs to be fed to fixture's TestApp. Just some thoughts You guys are doing an amazing job out there at PyCON! (so great you're distracting me too much from this project that's keeping me away from the world) Keep it up! (and leave some coding to do for the poor souls who cannot join you now... =) Alberto [1] http://tinyurl.com/332ad9 [2] http://tinyurl.com/tjhb8 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Trunk group. To post to this group, send email to turbogears-trunk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears-trunk?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: select_ from_ inheritable_ tables
Hi! Thank you for your response. I will try to describe my problem more precisely. In model.py file there are the following classes: class Base((InheritableSQLObject): created = DateTimeCol(default=DateTimeCol.now()) class BaseSample(Base): name = StringCol(length=40, alternateID=True) class BaseData(Base): sample_id = ForeignKey(BaseSample) On the web page user must have opportunite to find samples. The fields for seach are described in controller.py file: def sample_search(self, tg_errors=None, **kwarg): order_list = [('name', 'sample name'), ('created', 'time of recording')] # fields in search form: name = widgets.TextField(name='name', label='Sample name') before = widgets.CalendarDateTimePicker(name='before', label='Created before, convert=True) order = widgets.SingleSelectField(name='order', label='Order by', options=order_list) if kwarg.has_key('order'): if str(kwarg['order']) == 'name': order_by = model.BaseSample.q.name if str(kwarg['order']) == 'created': order_by = model.Base.q.created result = [list(model.BaseSample.select(query, distinct=True, orderBy=order_by))] ... query consists criteria for sample search. If one selected orderBy = model.Base.q.created, TG gives the following error: ProgrammingError: ERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list SELECT DISTINCT base_sample.id, base_sample.child_name, base_sample.name FROM base, base_sample WHERE base_sample.name) LIKE ('%S%'))) AND ((base_sample.id) = (base.id))) ORDER BY base.created How I can add the fields in select list? I tried to resolve this problem with Select(SQLExpresion). In this case I can't define distict (it also important for my task), because Select hasn't parameter distinct. Best regards Svetlana On 26 Feb., 13:38, Diez B. Roggisch [EMAIL PROTECTED] wrote: On Monday 26 February 2007 11:41, svetl wrote: Good day! If you have any idea how to resolve the following problem, please, help me. Thanks in advance. I have in model.py file class Base(InheritableSQLObject): . created = DateTimeCol(default=DateTimeCol.now()) . class BaseSample(Base): name = StringCol(length=40, alternateID=True) I have to search samples and to sort them by date. The function seach defined in controllers.py containes the query: def search(self): model.BaseSample.select(AND(CONTAINSSTRING(model.BaseSample.q.name, something, model.Base.created =='12.12.06')), orderBy=model.Base.created) It gives an error and I undestand why. Because this select query generates the following: SELECT * FROM tables base_sampl, base WHERE. The fields (*) in SELECT query are all from table 'base_sample'. In this place there are no fields from table Base, but orderBy needs the explicit field name from table 'base' (class Base). The above clearly isn't what you actually have in your code, or it gives you a different error altogether. Because you miss the model.Base.q several times. Please verify that you really have working code. Apart from that, it should work like this (note the usage of Base model.Base.select(AND(your-criteria, model.Base.q.childName == 'BaseSample'), orderBy=model.Base.q.created) Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TurboGears generated MardiGras page
On Mon, 2007-26-02 at 09:42 -0800, SamFeltus wrote: I am sorry I posted it... My apologies... No need, people buy flash websites all the time. I don't know about the others here, but when I'm selling stuff I listen to what my client wants. ;) I don't really like *most* flash sites myself. But I sure as heck intend to figure out combining TG with actionscript because I can guarantee it will be marketable. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: select_ from_ inheritable_ tables
Thank you for your response. I will try to describe my problem more precisely. In model.py file there are the following classes: class Base((InheritableSQLObject): created = DateTimeCol(default=DateTimeCol.now()) class BaseSample(Base): name = StringCol(length=40, alternateID=True) class BaseData(Base): sample_id = ForeignKey(BaseSample) Your whole design is flawed because of improper use of InheritableSQLObject. It is not meant for mere column adding for arbitrary objects. You should be able to do that by simply subclassing from SQLObject. InheritableSQLObject is meant for class hierarchies like Car-Mercedes -BMW not for just adding some common fields. Redesign it that way, and things should work as you try to make them work. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Reloading Widgets
Carlos Hanson wrote: Sweet. Thanks. I thought about something along those lines before reading the response, but I would have passed a call to the function, get_item_list(), rather than the fuction itself, get_item_list. I need to research why that works. I think it's in widgets/meta.py:94 def __get__(self, obj, typ=None): if obj is None: # return the original class attribute. This makes the descriptor # almost invisible return getattr(typ, self.param_name) param = getattr(obj, self.param_name) if callable(param): return param() return param --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TurboLucene now has documentation!
Hi Kevin, Thanks! :-) I was just trying to help keep things clear in people's minds. (And my own!) :-) As for the multiple model support, I believe that RuleDispatch will make for a clean solution. It's the direction I'm going to explore first. Ed Singleton also suggested in the mailing list that integrating TurboLucene with SQLAlchemy to eliminate the translation functions might also be cool (and feasible). Anyway, the positive feedback is most appreciated. :-D If you have any suggestions for other improvements, please let me know. Take care, Krys On Feb 26, 3:51 pm, Kevin Horn [EMAIL PROTECTED] wrote: Krys, This is a fantastic tutorial! I especially appreciate the recap and in context sections sprinkled throughout...these were a great idea. Looking forward to seeing how TurboLucene develops in the future...especially built-in support for indexing multiple model objects. Kevin Horn On 2/25/07, Krys Wilken [EMAIL PROTECTED] wrote: Well, I finally got around to writing up some documentation for TurboLucene. I've been in a bit of a lethargic state lately, so it's nice to see that that is passing. Anyway... I have written (and coded) a TurboLucene tutorial. In it we add full-text searching capabilities to the TurboGears 20 Minute Wiki. You can find it here: http://dev.krys.ca/turbolucene/wiki/WikiTutorial It should be easy to translate the principles from the turtorial to any TurboGears project. Anyway, feedback is most welcome. I hope this makes TurboLucene more accessible and fun to use. :-) Enjoy! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Newbie Question about Model Designer
hi all, i'm just new to turbogears and have a question that may be answered easyly by one who knows turbogears better than me. when i create a project with identity support (tg 1.0.1), the model designer of the toolbox does not see the intially created model. even worse, when i create some model there and generate the code for it, the old model information for identity support (user, group, permission, etc.) is lost. is there a way to reverse engineer the model from the model.py into the model designer or at least to start over with a model such as it is initially created by a project with identity support? thx to all, rg. michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Widgets question
On Feb 26, 2007, at 6:23 PM, Ian Wilson wrote: The forms have no general structure whatsoever ? Are they just a question and then a variable number of potential answers? The only structure I have is an a poll, a variable number of question and a variable number of answers. The database look lile that class Poll(SQLObject): created = DateTimeCol(default=datetime.now) active = IntCol(default=0) title = UnicodeCol(length=255) questions = MultipleJoin('Question') class Question(SQLObject): text = UnicodeCol(length=255) reponses = MultipleJoin('Answer') class answer(SQLObject): text = UnicodeCol(length=255) vote = IntCol() question = ForeignKey('Question') -Ian On 2/26/07, Fred C [EMAIL PROTECTED] wrote: Hi, I have a poll system to develop and I need to create a form for each poll dynamicaly. I just have a series of quesitons and a series of potential answers for each questions stored into the database. I was wandering if there is somewhere an example of a form created dynamicaly. Thanks -fred- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Widgets question
Fred C wrote: The only structure I have is an a poll, a variable number of question and a variable number of answers. The database look lile that class Poll(SQLObject): created = DateTimeCol(default=datetime.now) active = IntCol(default=0) title = UnicodeCol(length=255) questions = MultipleJoin('Question') class Question(SQLObject): text = UnicodeCol(length=255) reponses = MultipleJoin('Answer') class answer(SQLObject): text = UnicodeCol(length=255) vote = IntCol() question = ForeignKey('Question') If you want to show all the poll on a single page, a pair of nested RepeatingFieldSets with a custom template should be enough.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TurboLucene now has documentation!
Krys, Yeah, read the mailing list archive (it's not very long yet :) and I think that using Elixir statements at least would make that sort of thing pretty easy. I'm sure you could also work up a more general (non-Elixir) solution. Good luck! I'm hoping to have a look at the source (though it way be a couple of weeks before I get the chance), so hopefully, I can come up with some more specific suggestions in the future. Kevin Horn On 2/27/07, Krys [EMAIL PROTECTED] wrote: Hi Kevin, Thanks! :-) I was just trying to help keep things clear in people's minds. (And my own!) :-) As for the multiple model support, I believe that RuleDispatch will make for a clean solution. It's the direction I'm going to explore first. Ed Singleton also suggested in the mailing list that integrating TurboLucene with SQLAlchemy to eliminate the translation functions might also be cool (and feasible). Anyway, the positive feedback is most appreciated. :-D If you have any suggestions for other improvements, please let me know. Take care, Krys On Feb 26, 3:51 pm, Kevin Horn [EMAIL PROTECTED] wrote: Krys, This is a fantastic tutorial! I especially appreciate the recap and in context sections sprinkled throughout...these were a great idea. Looking forward to seeing how TurboLucene develops in the future...especially built-in support for indexing multiple model objects. Kevin Horn On 2/25/07, Krys Wilken [EMAIL PROTECTED] wrote: Well, I finally got around to writing up some documentation for TurboLucene. I've been in a bit of a lethargic state lately, so it's nice to see that that is passing. Anyway... I have written (and coded) a TurboLucene tutorial. In it we add full-text searching capabilities to the TurboGears 20 Minute Wiki. You can find it here: http://dev.krys.ca/turbolucene/wiki/WikiTutorial It should be easy to translate the principles from the turtorial to any TurboGears project. Anyway, feedback is most welcome. I hope this makes TurboLucene more accessible and fun to use. :-) Enjoy! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Setting SingleSelectField's options in form.display()?
On 26 Feb, 23:35, Ian Wilson [EMAIL PROTECTED] wrote: users_form() or users_form.display() take named arguments so if you pass a dictionary with the arguments inside you need to apply ** to it like this: ${users_form(**form_data)} And you want something like this(the parameter names and then the field's names whose parameter you want set): form_data = dict(value=dict(number=42), options = dict(users = [(1, one), (2, two)])) Yeah, thanks. That did it. - Mikael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Disabled fields validating as not_empty=False?
Hi, I've set a bunch of fields to disabled in order to make them read- only, so I can re-use a WidgetList for both creating and editing data (i.e., I don't want to be able to change the data once it's set for certain f fields). Now, most of these have not_empty=True set as a condition in their validators. Which is good when creating a new object. When I want to edit them, I set add a dict(disabled='disabled') for certain fields. However, that makes them disappear from the input! Why is this, and what can I do about it if I still want to re-use my forms? Thanks, Mikael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Best way to pass on URL parameters?
Hi, I've got an exposed method that gets called with /do?id=N (def do()), that displays a form and posts it to /action (@error_handler(do) def action()). Problem is that I want to pass on the ID parameter to the 'action' method. How do I do that the most convenient way? Do I use a table with an extra field? If so, is there a way of adding fields to a TableForm /after/ it has been created? This all boils down to being able to re-use forms for both creating and editing -- the ID field /cannot/ have not_empty=True for the create form (as the object has not yet been created), however it /must/ have not_empty=True for the edit form. Also, per a previous post to this group, hidden fields seem to validate as not_empty=False. Any suggestions? Thanks in advance, Mikael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TurboGears generated MardiGras page
I found if you put all your changable sets in the DB, hooked TG to an MXMLC compiler, have the Kid template spit out ActionScript, and created/edited the SWF in CatWalk, it just worked. I am tinkering with the SWF having an edit mode right now, but it is primitive. Just a button press (Cricket Compiler) to recompile the page, drag the images around to reposition, editing the text in the page. I am gonna try and add a Flex based control panel next. I think it would be potent if attached to a better library of ActionScript than I know how to write. One thing, creating/editing the page in the browser, it is irritating not having an image editor for the browser, and having to drop out of a web based environment to edit images for the web. On Feb 27, 2:58 am, iain duncan [EMAIL PROTECTED] wrote: On Mon, 2007-26-02 at 09:42 -0800, SamFeltus wrote: I am sorry I posted it... My apologies... No need, people buy flash websites all the time. I don't know about the others here, but when I'm selling stuff I listen to what my client wants. ;) I don't really like *most* flash sites myself. But I sure as heck intend to figure out combining TG with actionscript because I can guarantee it will be marketable. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Best way to pass on URL parameters?
On Tuesday 27 February 2007 16:35, Mikael Jansson wrote: Hi, I've got an exposed method that gets called with /do?id=N (def do()), that displays a form and posts it to /action (@error_handler(do) def action()). Problem is that I want to pass on the ID parameter to the 'action' method. How do I do that the most convenient way? Do I use a table with an extra field? If so, is there a way of adding fields to a TableForm /after/ it has been created? This all boils down to being able to re-use forms for both creating and editing -- the ID field /cannot/ have not_empty=True for the create form (as the object has not yet been created), however it /must/ have not_empty=True for the edit form. Also, per a previous post to this group, hidden fields seem to validate as not_empty=False. Discriminate on value, not on existence. By that I mean that I always have an id-field - it's just negative in case of create. And HiddenFields are vailadated as all other fields as well, I just use id = widgets.HiddenField(validator=validators.Int(not_empty=True)) all the time. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Disabled fields validating as not_empty=False?
Mikael Jansson [EMAIL PROTECTED] writes: Now, most of these have not_empty=True set as a condition in their validators. Which is good when creating a new object. When I want to edit them, I set add a dict(disabled='disabled') for certain fields. However, that makes them disappear from the input! Why is this, and what can I do about it if I still want to re-use my forms? The browser won't spend bandwidth sending information from disabled fields. If you said they're disabled, why should they be sent again? Their value remains the same or isn't interesting on the context the form was submitted. To use the same form you'll have to use a different validation schema. There you omit the unneeded fields. -- Jorge Godoy [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Best way to pass on URL parameters?
Mikael Jansson wrote: I've got an exposed method that gets called with /do?id=N (def do()), that displays a form and posts it to /action (@error_handler(do) def action()). Problem is that I want to pass on the ID parameter to the 'action' method. How do I do that the most convenient way? addform = TableForm(fields=FooFields(), ...) editform = TableForm(fields=FooFields()+[ HiddenField('id_foo') ], ...) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Widgets question
On Feb 27, 2007, at 9:43 AM, Marco Mariani wrote: Fred C wrote: The only structure I have is an a poll, a variable number of question and a variable number of answers. The database look lile that class Poll(SQLObject): created = DateTimeCol(default=datetime.now) active = IntCol(default=0) title = UnicodeCol(length=255) questions = MultipleJoin('Question') class Question(SQLObject): text = UnicodeCol(length=255) reponses = MultipleJoin('Answer') class answer(SQLObject): text = UnicodeCol(length=255) vote = IntCol() question = ForeignKey('Question') If you want to show all the poll on a single page, a pair of nested No, just pick one poll and display all the questions concerning that poll. RepeatingFieldSets with a custom template should be enough.. I haven't try RepeatingFieldSets, I'am going to investigate in that direction. Thanks. -fred- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Disabled fields validating as not_empty=False?
Mikael Jansson schrieb: what can I do about it if I still want to re-use my forms? You can set text fields to 'readonly' instead, but then, there is no visual feedback to the user that they are not editable (for browsers that handle CSS attribute slectors that can be easily changed). But neither setting fields to 'disabled' or 'readonly' prevents malicious users from sending other data for those fields back to your server, so server side validation must be used anyway, as always. Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears app with two database-connection?
I have the same situation here. But, I've taken a totally different approach. We have an ERP system running on an AS/400. I have LOTs of other little apps that access data (mostly order and sales history info) from the ERP system. Instead of dealing with the AS/400 database and two db's in TurboGears, I have written synchronization scripts that run nightly to grab data off the production AS/400 and bring it in to my MySQL database. This works for me because for my needs, day old data is acceptable. The other added benefit is that I can now dictate what the model looks like and can make it play nice with SQLObject. The synchronization scripts are not difficult to write. Also, I've been playing with another open source tool called JitterBit which will do the whole thing for you if you have a server you can spare for it. I don't know if this will work in your environment, but this is the way I was able to implement the same kind of thing. Also, I haven't tried it, but does SQLObject work with Interbase? I thought there were only a few databases supported. -Jim Johnny Blonde wrote: Hello Felix, thanks a lot for your nice comment. i had no time yet to try your tip, but i have few questions on it: the connection to the legacy is established automatically? what happens when i tg-admin sql create? is the legacy model processed as well? (i don´t want it to be processed) how can i lateron access the legacy-model within the app? - i have to import myapp.legacy in order to access it? i now have something like this: = = from datetime import datetime from turbogears.database import PackageHub from sqlobject import * hub = PackageHub(myapp.legacy) __connection__ = hub class Teilnehmer(SQLObject): class sqlmeta: fromDatabase=True idName=NR = = should it work like this? Regards, Frank On 26 Feb., 13:58, Felix Schwarz [EMAIL PROTECTED] wrote: Johnny Blonde schrieb: I need to develop an app, with something special: I have one legacy database of our main booking software, interbase actually, that i need to access. i am definately not allowed to write/modeify data in it, so it has to be strictly read only. the model, of course, is given within the database. for the app itself to save something i need a second database Had the same situation here and TurboGears provides some very nice mechanisms to handle it. Just split your model into two different packages and use turbogears.database.PackageHub. For example: - legacy.py __connection__ = turbogears.database.PackageHub(myapp.legacy) (my legacy model) - model.py hub = PackageHub(quarantine) __connection__ = hub (your app model) Use the configuration system to define different credentials: sqlobject.dburi = mysql://foo:[EMAIL PROTECTED]/mydb myapp.legacy.dburi = mysql://bar:[EMAIL PROTECTED]/xams would i have two separate models for each database? yes. fs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Widgets question
Fred C wrote: If you want to show all the poll on a single page, a pair of nested No, just pick one poll and display all the questions concerning that poll. I meant, s/all the/the whole/ All the questions, and the answers for each question You can have a widget (simple, compound, whatever) for each answer if you like. As long as the widgets are similar, this fits the model of a repeating input widget. Or, if the answers are of the kind pick one out of N, typical for a poll, a multiple radio button for each question is enough. In this case, you have a repeating widget where each repetition contains a multiple radio button (or singleselect, multipleselect, multiple checkbox, whatever). You can fill the options of the radio buttons with a list filled at runtime form_args = { 'repetitions': {'questions':len(poll.questions)}, 'options': {'questions':[ {'answers':get_answers(question)} for question in poll.questions ]}, } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Widgets question
Have you considered using Kid templates directly instead of using widgets? py:for is a good way to produce HTML content from a collection. Barry - Original Message From: Fred C [EMAIL PROTECTED] To: turbogears@googlegroups.com Sent: Tuesday, February 27, 2007 9:24:25 AM Subject: [TurboGears] Re: Widgets question On Feb 26, 2007, at 6:23 PM, Ian Wilson wrote: The forms have no general structure whatsoever ? Are they just a question and then a variable number of potential answers? The only structure I have is an a poll, a variable number of question and a variable number of answers. The database look lile that class Poll(SQLObject): created = DateTimeCol(default=datetime.now) active = IntCol(default=0) title = UnicodeCol(length=255) questions = MultipleJoin('Question') class Question(SQLObject): text = UnicodeCol(length=255) reponses = MultipleJoin('Answer') class answer(SQLObject): text = UnicodeCol(length=255) vote = IntCol() question = ForeignKey('Question') -Ian On 2/26/07, Fred C [EMAIL PROTECTED] wrote: Hi, I have a poll system to develop and I need to create a form for each poll dynamicaly. I just have a series of quesitons and a series of potential answers for each questions stored into the database. I was wandering if there is somewhere an example of a form created dynamicaly. Thanks -fred- Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: setting i18n.get_locale
finally.. :) great, thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears app with two database-connection?
Hello Jim, yes, it does work with interbase using the firebird driver... it at least for now does what i need ;-) well, i fear it won´t be enough to copy the data once a day or twice, because some data has to be looked up in realtime. after the first lookup some data will be replicated to the new database by the new application. i first was thinking of just replicating it every hour or so, but the ceo told me, it won´t be enough, as data needs to be FAST, man... so, i ´ll try it this way... Regards, Frank On 27 Feb., 18:28, Jim Steil [EMAIL PROTECTED] wrote: I have the same situation here. But, I've taken a totally different approach. We have an ERP system running on an AS/400. I have LOTs of other little apps that access data (mostly order and sales history info) from the ERP system. Instead of dealing with the AS/400 database and two db's in TurboGears, I have written synchronization scripts that run nightly to grab data off the production AS/400 and bring it in to my MySQL database. This works for me because for my needs, day old data is acceptable. The other added benefit is that I can now dictate what the model looks like and can make it play nice with SQLObject. The synchronization scripts are not difficult to write. Also, I've been playing with another open source tool called JitterBit which will do the whole thing for you if you have a server you can spare for it. I don't know if this will work in your environment, but this is the way I was able to implement the same kind of thing. Also, I haven't tried it, but does SQLObject work with Interbase? I thought there were only a few databases supported. -Jim Johnny Blonde wrote: Hello Felix, thanks a lot for your nice comment. i had no time yet to try your tip, but i have few questions on it: the connection to the legacy is established automatically? what happens when i tg-admin sql create? is the legacy model processed as well? (i don´t want it to be processed) how can i lateron access the legacy-model within the app? - i have to import myapp.legacy in order to access it? i now have something like this: = = from datetime import datetime from turbogears.database import PackageHub from sqlobject import * hub = PackageHub(myapp.legacy) __connection__ = hub class Teilnehmer(SQLObject): class sqlmeta: fromDatabase=True idName=NR = = should it work like this? Regards, Frank On 26 Feb., 13:58, Felix Schwarz [EMAIL PROTECTED] wrote: Johnny Blonde schrieb: I need to develop an app, with something special: I have one legacy database of our main booking software, interbase actually, that i need to access. i am definately not allowed to write/modeify data in it, so it has to be strictly read only. the model, of course, is given within the database. for the app itself to save something i need a second database Had the same situation here and TurboGears provides some very nice mechanisms to handle it. Just split your model into two different packages and use turbogears.database.PackageHub. For example: - legacy.py __connection__ = turbogears.database.PackageHub(myapp.legacy) (my legacy model) - model.py hub = PackageHub(quarantine) __connection__ = hub (your app model) Use the configuration system to define different credentials: sqlobject.dburi = mysql://foo:[EMAIL PROTECTED]/mydb myapp.legacy.dburi = mysql://bar:[EMAIL PROTECTED]/xams would i have two separate models for each database? yes. fs --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: select_ from_ inheritable_ tables
It's just a bug. http://sourceforge.net/tracker/index.php?func=detailaid=1670239group_id=74338atid=540672 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Widgets question
On Feb 27, 2007, at 12:34 PM, Barry Hart wrote: Have you considered using Kid templates directly instead of using widgets? py:for is a good way to produce HTML content from a collection. Yes, that's what I am doing right now. But I want to have something more generic which will be used in different pages of the website. -fred- Barry - Original Message From: Fred C [EMAIL PROTECTED] To: turbogears@googlegroups.com Sent: Tuesday, February 27, 2007 9:24:25 AM Subject: [TurboGears] Re: Widgets question On Feb 26, 2007, at 6:23 PM, Ian Wilson wrote: The forms have no general structure whatsoever ? Are they just a question and then a variable number of potential answers? The only structure I have is an a poll, a variable number of question and a variable number of answers. The database look lile that class Poll(SQLObject): created = DateTimeCol(default=datetime.now) active = IntCol(default=0) title = UnicodeCol(length=255) questions = MultipleJoin('Question') class Question(SQLObject): text = UnicodeCol(length=255) reponses = MultipleJoin('Answer') class answer(SQLObject): text = UnicodeCol(length=255) vote = IntCol() question = ForeignKey('Question') -Ian On 2/26/07, Fred C [EMAIL PROTECTED] wrote: Hi, I have a poll system to develop and I need to create a form for each poll dynamicaly. I just have a series of quesitons and a series of potential answers for each questions stored into the database. I was wandering if there is somewhere an example of a form created dynamicaly. Thanks -fred- Looking for earth-friendly autos? Browse Top Cars by Green Rating at Yahoo! Autos' Green Center. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Filtered options
Hi: I'm working with a SingleSelectField where I'd like to limit the values that are going into the select list. Here is my situation: I have users and plants. A plant can have multiple users and a user can be in multiple plants. I want a dropdown list of all of the plants for a specified user. The model for the user and plant objects follow: class User(SQLObject): class sqlmeta: table = tg_user user_name = UnicodeCol(length=16, alternateID=True, alternateMethodName=by_user_name) email_address = UnicodeCol(length=255, alternateID=True, alternateMethodName=by_email_address) display_name = UnicodeCol(length=255) password = UnicodeCol(length=40) brillLogon = UnicodeCol(length=10, dbName='brillLogon') active = BoolCol() created = DateTimeCol(default=datetime.now) # groups this user belongs to groups = RelatedJoin(Group, intermediateTable=user_group, joinColumn=user_id, otherColumn=group_id) plants = RelatedJoin('Plant', intermediateTable='userPlant', joinColumn='userId', otherColumn='plantId') class Plant(SQLObject): class sqlmeta: style = Style(longID=True) idName = 'plantId' plantNumber = IntCol() name = UnicodeCol(length=50) initials = UnicodeCol(length=3) active = BoolCol(default=True) users = RelatedJoin('User', intermediateTable='userPlant', joinColumn='plantId', otherColumn='userId') I normally fill my dropdowns with the getXxxxOptions as detailed in the TurboGears book. As such, the following is my code to fill the plant dropdown (when not limited by user) def getPlantOptions(): plants = Plant.select(orderBy='plantNumber') options = [(0, '-- None --')] for plant in plants: options.append((plant.id, plant.name)) return options But, what I really want to do is pass a userId into this method as a parameter so I'm only putting in the plants for a specific user. Is there a way to do this? If so, can someone point me in the right direction to figure out how I can do it? What I'd really like to do is: def getPlantOptions(userId=0): if userId != 0: u = User.get(userId) plants = u.plants else: plants = Plant.select(orderBy='plantNumber') for plant in plants: options.append((plant.id, plant.name)) return options But, then I wouldn't know how to specify it on my field def. Here is what I do for the non-filtered dropdown: plant = SingleSelectField(label='Plant:', options=qlfOptions.getUserPlantOptions) I don't know where I'd supply the parameter. Would I do it somehow in the controller? -Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Cannot turn off logging to screen or enable file logging
On Feb 26, 5:43 pm, Eric Hawthorne [EMAIL PROTECTED] wrote: My prod.cfg section has: # SERVER server.environment=production server.log_file=server.log server.log_to_screen=False but it still logs to the screen and does not log to the file. OS: ubuntu 6.06 TurboGears 1.0b1 CherryPy 2.2.1 What am I doing wrong? This thread has some advice that worked for me at least: http://groups.google.com/group/turbogears/browse_frm/thread/22a00b086714d34a/ae3ace9773add059?lnk=gstq=loggingrnum=4#ae3ace9773add059 hopethishelps --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] AutoCompleteField attrs
Hi: I'm using the AutoCompleteField widget and am passing the following: attrs=dict(size=100) However, my field isn't being resized. From what I can tell in the Widget browser, this should be supported. Can someone tell me if it works for them and I'm just doing something wrong? Or, is this a bug that should be filed? -Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Form widget with default values set from identity and validation decorator
Hi, I'm trying to create a form in which some of the select field defaults are set from values obtaied from a user's identity. So for example to default a country selection to the user's default country from their profile. Because I only have access to the user's identity within my Page classes I'm currently creating a fields class, which i then insert additional values into within my Page class before creating the form widget and returning that. This way I can set the default values appropriately at the time the widget is created. Doing this however, the form widget can't be used in a validate decorator on my save method as it's not in the global scope. Is there a way to do this so that I can have the benefits of a validation decorator and set the defaults from the identity? Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Gzip compression of .py and .kid files.
I'm new to Python and TurboGears. I haven't been able to find the answer to my question by Googling, possibly because gzip is everywhere on the web. The context of my question is: deploying a TurboGears application onto a system with limited (flash) storage. I am aware of the various compressed filesystems available, but I'm considering other approaches. Is it possible to deploy a TurboGears application with all/some of it's source .py and .kid files gzipped to save space? e.g. If foo.kid can't be found, foo.kid.gz should be read instead. So long as the .kid and .py files do need to be accessed randomly, there should be no need to gunzip the file.) These are text files, so 3:1 compression may be possible. I have a feeling (as functions are first class objects in Python, like Ruby) that it may be possible to redefine a few IO functions to achieve this. Any hints would be welcome. Regards, Chris. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Investigating TurboGears
Diez, Thanks for your feedback, I will try implementing a test harness for Pyro and XMLRPC and see how far I get. Again, thanks for our feedback, Doug On Feb 26, 6:10 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: 1) I'm looking at Pyro as a communications mechanism between the distributed systems that have Python. Is it possible to support Pyro from within the TurboGears server? You can use everything python has. 2) To support the Windows machines, and perhaps 3rd party outside users, can I get XMLRPC support inserted into TurboGears in some way? Yes. It is never a problem as a client, and TG can even work as server. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] TurboGears for Mac OS X install fails.
Hey guys, the TurboGears easy_install fails for an installation against a OS X os. It tells me that it cannot find a page for 'RuleDispatch.' When i go to http://cheeseshop.python.org/pypi/RuleDispatch , the page does not exist. I downloaded the .egg file manually (RuleDispatch-0.5a0.dev_r2115- py2.4-macosx-10.4-fat.egg) and install using easy_install -f . TurboGears (while in the dir with the egg files) and it still is trying to access the site. Any help would be appreciated. Thanks, --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Having very wierd TG problem, error msg with master or templates?
Hi, I'm having a very strange TG problem. The problem manifests itself somewhat randomly; the error messages seem to alternate between the below, this one (http://groups.google.com/group/turbogears/browse_frm/ thread/2704d1ef2faf4e1f/3b5b74d075d4e5bf?lnk=gstq=tclass+%3D +mod.templaternum=2#3b5b74d075d4e5bf), and no errors. The page used to work fine, and I just added some new HTML div and span elements into KID and all of sudden I have these errors. I'm not able to edit the page without causing these errors, though if I revert back to base it always works. I'm not sure what is going wrong? My templating is correct, as is the master.kid paths and all variables passed into the KID page. Page handler: bound method Root.index of PROJECTNAME.controllers.Root object at 0x245ed70 Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/ _cphttptools.py, line 105, in _run self.main() File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/ _cphttptools.py, line 254, in main body = page_handler(*virtual_path, **self.params) File string, line 3, in index File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 334, in expose output = database.run_with_transaction( File string, line 5, in run_with_transaction File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ database.py, line 352, in sa_rwt retval = dispatch_exception(e,args,kw) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ database.py, line 341, in sa_rwt retval = func(*args, **kw) File string, line 5, in _expose File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 351, in lambda mapping, fragment, args, kw))) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 391, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 82, in _process_output fragment=fragment) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/view/ base.py, line 131, in render return engine.render(**kw) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboKid-0.9.9-py2.4.egg/turbokid/ kidsupport.py, line 158, in render tclass = self.load_template(template) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboKid-0.9.9-py2.4.egg/turbokid/ kidsupport.py, line 118, in load_template tfile, classname) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboKid-0.9.9-py2.4.egg/turbokid/ kidsupport.py, line 15, in _compile_template mod = kid.load_template(tfile, name=classname) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/kid-0.9.5-py2.4.egg/kid/__init__.py, line 158, in load_template store=cache, ns=ns, exec_module=exec_module) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/kid-0.9.5-py2.4.egg/kid/importer.py, line 144, in _create_module raise_template_error(module=name, filename=filename) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/kid-0.9.5-py2.4.egg/kid/importer.py, line 141, in _create_module exec code in mod.__dict__ File /Users/WULABS/Sites/PROJECTNAME/PROJECTNAME/templates/ index.py, line 20, in ? File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/kid-0.9.5-py2.4.egg/kid/template_util.py, line 123, in base_class_extends raise TemplateExtendsError((str(e) TemplateExtendsError: Could not open '/Users/WULABS/Sites/PROJECTNAME/ PROJECTNAME/templates/master.kid' Template file 'master.kid' not found while processing extends='master.kid' Error location in template file '/Users/WULABS/Sites/PROJECTNAME/ PROJECTNAME/templates/index.kid' between line 27, column 79 and line 28, column 1: ... /script -- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
[TurboGears] Re: Having very wierd TG problem, error msg with master or templates?
Here is another error msg on page reload: Page handler: bound method Root.index of PROJECTNAME.controllers.Root object at 0x245ed70 Traceback (most recent call last): File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/ _cphttptools.py, line 105, in _run self.main() File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/ _cphttptools.py, line 254, in main body = page_handler(*virtual_path, **self.params) File string, line 3, in index File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 334, in expose output = database.run_with_transaction( File string, line 5, in run_with_transaction File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ database.py, line 352, in sa_rwt retval = dispatch_exception(e,args,kw) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ database.py, line 341, in sa_rwt retval = func(*args, **kw) File string, line 5, in _expose File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 351, in lambda mapping, fragment, args, kw))) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 391, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/ controllers.py, line 82, in _process_output fragment=fragment) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboGears-1.0.1-py2.4.egg/turbogears/view/ base.py, line 131, in render return engine.render(**kw) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboKid-0.9.9-py2.4.egg/turbokid/ kidsupport.py, line 158, in render tclass = self.load_template(template) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/TurboKid-0.9.9-py2.4.egg/turbokid/ kidsupport.py, line 94, in load_template tclass = sys.modules[classname].Template AttributeError: 'module' object has no attribute 'Template' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Having very wierd TG problem, error msg with master or templates?
I removed the *.pyc kid files manually and that solved the problem...strange, I thought the pyc files were compiled automatically on server restart... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Gzip compression of .py and .kid files.
On Tuesday 27 February 2007 12:46, Chris Dew wrote: I'm new to Python and TurboGears. I haven't been able to find the answer to my question by Googling, possibly because gzip is everywhere on the web. The context of my question is: deploying a TurboGears application onto a system with limited (flash) storage. I am aware of the various compressed filesystems available, but I'm considering other approaches. Is it possible to deploy a TurboGears application with all/some of it's source .py and .kid files gzipped to save space? Python itself can import zipped files (zip, not gzip AFAIK). I've not tried zipped kid files. I *think* it just overloads python's import routines, so it might be able to. j -- Joshua Kugler Lead System Admin -- Senior Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Gzip compression of .py and .kid files.
On 2/27/07, Joshua J. Kugler [EMAIL PROTECTED] wrote: On Tuesday 27 February 2007 12:46, Chris Dew wrote: I'm new to Python and TurboGears. I haven't been able to find the answer to my question by Googling, possibly because gzip is everywhere on the web. The context of my question is: deploying a TurboGears application onto a system with limited (flash) storage. I am aware of the various compressed filesystems available, but I'm considering other approaches. Is it possible to deploy a TurboGears application with all/some of it's source .py and .kid files gzipped to save space? Python itself can import zipped files (zip, not gzip AFAIK). I've not tried zipped kid files. I *think* it just overloads python's import routines, so it might be able to. I'd doubt that the templates would work, but the sources would. It's a non-trivial amount of effort though. You're probably prematurely optimizing though. Is it work that much effort to save (if you're REALLY lucky) about 1MB? -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TurboGears generated MardiGras page
Hi, Sam, Listen, you're doing some very interesting work. The message behind your development comes across as clearly experimental and not to be reviewed in terms of usability (yet*wink*). I think you're onto something. Please, stay the course and continue to share your findings and examples. Per the previous post by ian duncan, he's spot on in terms of marketability. Do you have some example code posted somewhere or that you'd be willing to share? Go a step further and provide some visual feedback to your audience (e.g. pre-loader). It makes a world of difference rather than looking at a gray box for some indeterminate amount of time. This could be accompanied with a small explanatory tag denoting your intent/ inspiration. It probably won't make the 'nay-sayers' love a particular technology any more but they might come to appreciate the approach you've provided. I hope this message encourages you to keep it up. Jes PS Me, I'm a Front-end engineer specializing in Flash/Flex development. On Feb 27, 7:54 am, SamFeltus [EMAIL PROTECTED] wrote: I found if you put all your changable sets in the DB, hooked TG to an MXMLC compiler, have the Kid template spit out ActionScript, and created/edited the SWF in CatWalk, it just worked. I am tinkering with the SWF having an edit mode right now, but it is primitive. Just a button press (Cricket Compiler) to recompile the page, drag the images around to reposition, editing the text in the page. I am gonna try and add a Flex based control panel next. I think it would be potent if attached to a better library of ActionScript than I know how to write. One thing, creating/editing the page in the browser, it is irritating not having an image editor for the browser, and having to drop out of a web based environment to edit images for the web. On Feb 27, 2:58 am, iain duncan [EMAIL PROTECTED] wrote: On Mon, 2007-26-02 at 09:42 -0800, SamFeltus wrote: I am sorry I posted it... My apologies... No need, people buy flash websites all the time. I don't know about the others here, but when I'm selling stuff I listen to what my client wants. ;) I don't really like *most* flash sites myself. But I sure as heck intend to figure out combining TG with actionscript because I can guarantee it will be marketable. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Filtered options
On Feb 27, 8:34 pm, Jim Steil [EMAIL PROTECTED] wrote: [snip] But, then I wouldn't know how to specify it on my field def. Here is what I do for the non-filtered dropdown: plant = SingleSelectField(label='Plant:', options=qlfOptions.getUserPlantOptions) I don't know where I'd supply the parameter. Would I do it somehow in the controller? Yes, in the controller: user_plant_widget = SingleSelectField('plants', options=[]) # put default/dummy options in @expose('project.templates.user_plant' def plant(self, user): options = qlfOptions.getUserPlantOptions(user) return dict(widget=user_plant_widget, params=dict(options=options)) And somewhere in user_plant.kid: ... ${widget.display(**params)} ... That will pass the options in when the page is rendered for the given user. If your SingleSelectField is part of a form or other compound widget, you'll need to pass the options differently. I can't remember the syntax exactly for TG widgets, but for ToscaWidgets I think it would be (untested, from memory) @expose('project.templates.user_plant' def plant(self, user): options = qlfOptions.getUserPlantOptions(user) child_args = dict(plants=dict(options=options)) # child named 'plants' gets the keyword argument 'options' return dict(widget=user_plant_widget, params=dict(child_args=child_args)) The pattern for TG widgets is similar, but it's not child_args, its something else, and I think the structure might be different. Sorry, can't remember any docs on it, I had to grok the source to figure it out back then. I've been using toscawidgets since they were released, much better IMO. HTH -- wavy davy return dict(widget= --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Form widget with default values set from identity and validation decorator
On Feb 27, 5:43 pm, Alex [EMAIL PROTECTED] wrote: Doing this however, the form widget can't be used in a validate decorator on my save method as it's not in the global scope. Is there a way to do this so that I can have the benefits of a validation decorator and set the defaults from the identity? Yes, there is :) The form parameter to @validate can be a callable, which will fetch a form to validate against. e.g. def get_form(self): form = ...# create/reference complex for form from whatever you want return form @validate(from=get_form) def method(self, ...): ... HTH -- wavy davy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: How do I set the identity upon login.
ok. now I'm still basically as confused as I was before. I'm having an 'identity crisis' ... sorry, couldn't resist. :-) So, we have established that Rick could not seem to get the identity assignment to 'stick' without the code he presented. Is that the general consensus ??? my original question remains: How should I properly log in a user without the boiler plate login template? On Feb 25, 7:55 pm, Patrick Lewis [EMAIL PROTECTED] wrote: On Feb 25, 12:54 pm, Jorge Vargas [EMAIL PROTECTED] wrote: both of you could improve your code with this function.http://trac.turbogears.org/browser/tags/1.0.1/turbogears/identity/__i... I believe everyone in this thread is already using set_current_identity. In what way are you suggesting this could be improved? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Select Field entries not updating? Are they being cached?
Yes, i have a helper function that can build the appropriate options list. Here is a sample select list and the util fnc making the values that go in: objectSubTypeID = widgets.SingleSelectField(label=Object Type, legend=_(Type),validator=validators.Int, options=myprojectweb.utils.makeOptions(myprojectweb.model.objectSubType.sele ct(),'subTypeName')) def makeOptions(results, labelColumn, seperatorColumn=None, AddNull=False,MultiLang=False): values = [] for result in results: try: label = getattr(result,labelColumn) except: if MultiLang == True: label = 'LabelNotFound' else: for lang in list(myprojectweb.model.languages.select()): label[lang.languageCode] = 'Error' if MultiLang == False: values.append((result.id, label[myprojectweb.utils.getActiveLanguage()])) else: values.append((result.id, label)) if AddNull == True: values.insert(0,('-1',' ')) return values Thank you, Fabian -Original Message- From: turbogears@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ian Wilson Sent: 27 February 2007 08:08 To: turbogears@googlegroups.com Subject: [TurboGears] Re: Select Field entries not updating? Are they being cached? Are you passing a callable at instantiation time? Can you show me a snippet of code where you set the options? -Ian On 2/26/07, schnuer.com [EMAIL PROTECTED] wrote: Both via instanciation and value during display time and finally ajax call. It does not work when doing it at instanciation time. Fabian -Original Message- From: turbogears@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ian Wilson Sent: 26 February 2007 10:16 To: turbogears@googlegroups.com Subject: [TurboGears] Re: Select Field entries not updating? Are they being cached? How are you loading the options in the widget's select field ? At widget instantiation or by passing them in at display time ? -Ian On 2/25/07, schnuer.com [EMAIL PROTECTED] wrote: Hi, I'm using widgets. I guess if i did it by hand it would work since when i output the same information with a py:if as just text in the template it shows up as it should. Fabian -Original Message- From: turbogears@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ian Wilson Sent: 26 February 2007 00:19 To: turbogears@googlegroups.com Subject: [TurboGears] Re: Select Field entries not updating? Are they being cached? How are you putting the options into the select fields? Are you using widgets or just doing it by hand ? -Ian On 2/25/07, schnuer.com [EMAIL PROTECTED] wrote: Hi, In my project i have several cases where on for example controller A i can add items to the database that are then going to be possible options in a select or multiple select field in controller B. Now when i add something new it works fine, in the database the things turn up and when looping over them to write them into a template as html everything shows up. But when i then navigate over to controller B the new items don't show up in the (multiple) select field until i restart turbogears. when i hit controller B with another browser however it is being updated. So somehow i guess the browser must cache these lists (IE and firefox both show this behaviour). Both controller A and B are secure resources so a session is maintained. Might that be the reason or is it something completely different? Most importantly however, how do i get around this? Thank you, Fabian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Having very wierd TG problem, error msg with master or templates?
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: I removed the *.pyc kid files manually and that solved the problem...strange, I thought the pyc files were compiled automatically on server restart... Only if the source file has changed. -- Jorge Godoy [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] cursor passing into kid
Hey, I'm curious what the best practice is for passing data fetched from db into a kid template. I'm doing a fetchall() on the resultset gotten from a SA select, and passing the resulting python list to kid to iterate and display items. Would the better and efficient way be to just send the result set into kid and ask it to iterate over fetchone() ? thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Select Field entries not updating? Are they being cached?
On Feb 28, 2007, at 4:18 AM, schnuer.com wrote: Yes, i have a helper function that can build the appropriate options list. Here is a sample select list and the util fnc making the values that go in: objectSubTypeID = widgets.SingleSelectField(label=Object Type, legend=_(Type),validator=validators.Int, options=myprojectweb.utils.makeOptions (myprojectweb.model.objectSubType.sele ct(),'subTypeName')) def makeOptions(results, labelColumn, seperatorColumn=None, AddNull=False,MultiLang=False): values = [] for result in results: try: label = getattr(result,labelColumn) except: if MultiLang == True: label = 'LabelNotFound' else: for lang in list(myprojectweb.model.languages.select ()): label[lang.languageCode] = 'Error' if MultiLang == False: values.append((result.id, label[myprojectweb.utils.getActiveLanguage()])) else: values.append((result.id, label)) if AddNull == True: values.insert(0,('-1',' ')) return values If there's no typo here you're not passing a callable but the result of the call to makeOptions. You'll need a closure for that to work: def makeOptions(results, labelColumn, seperatorColumn=None, AddNull=False,MultiLang=False): def get_options(): values = [] for result in results: try: label = getattr(result,labelColumn) except: if MultiLang == True: label = 'LabelNotFound' else: for lang in list (myprojectweb.model.languages.select()): label[lang.languageCode] = 'Error' if MultiLang == False: values.append((result.id,label [myprojectweb.utils.getActiveLanguage()])) else: values.append((result.id, label)) if AddNull == True: values.insert(0,('-1',' ')) return values return get_options HTH, Alberto --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TurboGears generated MardiGras page
I can post some code when I get it together, but, it is code that just works, is COMPLETELY undocumented and at this time not easy to use without a demo. I didn't know any ActionScript 3 when I started. The code needs plenty of work. But, the swf files are manufactured in the browser with TG, minus the image editing... Here is an HTML intro with links... I'll try and make it more useful later... http://samfeltus.com/site_index.html ActionScript 3, MXMLC compiler, the new Flash VM, Linux support and Flex are major upgrades. I expect the web is fixing to be bombarded with a new generation of Flash content. It's not a problem for TurboGears, cause it's trivial to output ActionScript instead of HTML... Loose coupling is a good thing, and allows for happy accidents... There are no unit tests... I just ran it in the browser until it quit crashing... On Feb 27, 5:53 pm, gogoxoom [EMAIL PROTECTED] wrote: Hi, Sam, Listen, you're doing some very interesting work. The message behind your development comes across as clearly experimental and not to be reviewed in terms of usability (yet*wink*). I think you're onto something. Please, stay the course and continue to share your findings and examples. Per the previous post by ian duncan, he's spot on in terms of marketability. Do you have some example code posted somewhere or that you'd be willing to share? Go a step further and provide some visual feedback to your audience (e.g. pre-loader). It makes a world of difference rather than looking at a gray box for some indeterminate amount of time. This could be accompanied with a small explanatory tag denoting your intent/ inspiration. It probably won't make the 'nay-sayers' love a particular technology any more but they might come to appreciate the approach you've provided. I hope this message encourages you to keep it up. Jes PS Me, I'm a Front-end engineer specializing in Flash/Flex development. On Feb 27, 7:54 am, SamFeltus [EMAIL PROTECTED] wrote: I found if you put all your changable sets in the DB, hooked TG to an MXMLC compiler, have the Kid template spit out ActionScript, and created/edited the SWF in CatWalk, it just worked. I am tinkering with the SWF having an edit mode right now, but it is primitive. Just a button press (Cricket Compiler) to recompile the page, drag the images around to reposition, editing the text in the page. I am gonna try and add a Flex based control panel next. I think it would be potent if attached to a better library of ActionScript than I know how to write. One thing, creating/editing the page in the browser, it is irritating not having an image editor for the browser, and having to drop out of a web based environment to edit images for the web. On Feb 27, 2:58 am, iain duncan [EMAIL PROTECTED] wrote: On Mon, 2007-26-02 at 09:42 -0800, SamFeltus wrote: I am sorry I posted it... My apologies... No need, people buy flash websites all the time. I don't know about the others here, but when I'm selling stuff I listen to what my client wants. ;) I don't really like *most* flash sites myself. But I sure as heck intend to figure out combining TG with actionscript because I can guarantee it will be marketable. Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: cursor passing into kid
On 2/27/07, tml [EMAIL PROTECTED] wrote: Hey, I'm curious what the best practice is for passing data fetched from db into a kid template. I'm doing a fetchall() on the resultset gotten from a SA select, and passing the resulting python list to kid to iterate and display items. Would the better and efficient way be to just send the result set into kid and ask it to iterate over fetchone() ? I like the first one because the python list is more natural for kid, than a result set. Also it's less information being pass to the kid template which will make both the compilation and resulting py file smaller. Also the first approach is more close to MVC then the second one. if your really concern about efficiency the best will be to code it both ways and benchmark it. thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Gzip compression of .py and .kid files.
Thanks, I'll give it a try. Regards, Chris. On Feb 27, 11:35 pm, Joshua J. Kugler [EMAIL PROTECTED] wrote: On Tuesday 27 February 2007 12:46, Chris Dew wrote: I'm new to Python and TurboGears. I haven't been able to find the answer to my question by Googling, possibly because gzip is everywhere on the web. The context of my question is: deploying a TurboGears application onto a system with limited (flash) storage. I am aware of the various compressed filesystems available, but I'm considering other approaches. Is it possible to deploy a TurboGears application with all/some of it's source .py and .kid files gzipped to save space? Python itself can import zipped files (zip, not gzip AFAIK). I've not tried zipped kid files. I *think* it just overloads python's import routines, so it might be able to. j -- Joshua Kugler Lead System Admin -- Senior Programmerhttp://www.eeinternet.com PGP Key:http://pgp.mit.edu/ ID 0xDB26D7CE PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] ? about passing objects into kid templates!
Hi All, I notice that its easy to pass objects into a kid template but.. when you try to pass that same object from the same kid back into turbogears , the object loses its integrity :-( Is there some way of passing objects from kid templates into turbogears functions without the object undergoing any changes? Regards, -- Hamilton Ganesan ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø Bioinformatics Computational Biology Unit Department Biochemistry FABI Square/Bioinformatics building Faculty of Natural Sciences University of Pretoria Lynwood Rd Pretoria South Africa 0001 Tel : +27 12 420 5802 Fax : +27 12 420 5800 ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø E-MAIL: [EMAIL PROTECTED] URL : http://www.bi.up.ac.za/~hamilton ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø God is not mocked, for whatever a man sows, that will he reap (Gal. 6:7) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: ? about passing objects into kid templates!
On 2/28/07, hamilton ganesan [EMAIL PROTECTED] wrote: Hi All, I notice that its easy to pass objects into a kid template but.. when you try to pass that same object from the same kid back into turbogears , the object loses its integrity :-( Is there some way of passing objects from kid templates into turbogears functions without the object undergoing any changes? you lost me there, TG works one way the dispatcher in CP (aka the exposed function) returns a dict that goes into kid, there is no turning back. or your talking about kid's namespace call tg like tg.url() could you provide an example of what you want to accomplish maybe it's an issue with the type of the object your trying and not all objects. Regards, -- Hamilton Ganesan ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø Bioinformatics Computational Biology Unit Department Biochemistry FABI Square/Bioinformatics building Faculty of Natural Sciences University of Pretoria Lynwood Rd Pretoria South Africa 0001 Tel : +27 12 420 5802 Fax : +27 12 420 5800 ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø E-MAIL: [EMAIL PROTECTED] URL : http://www.bi.up.ac.za/~hamilton ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø God is not mocked, for whatever a man sows, that will he reap (Gal. 6:7) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: AssertionError: This transaction has already gone through ROLLBACK; begin another transaction
On 2/26/07, Rainy [EMAIL PROTECTED] wrote: I can't reproduce this error right now because TG fails to access database.. but this was bugging me for the last few days. I have a form with 4 drop down menus.. When first menu is chosen, it loads the second through ajax. When second is chosen, it loads 3 4 through ajax. (1st is country, second is state, 3 4 are county and city). It works fine at home but on remote server only the second (state) menu loads, when I change 2nd menu, 34 do not load and I get a traceback from TG that goes, AssertionError: This transaction has already gone through ROLLBACK; begin another transaction . first of all if it works ok on one env and the other we should list the differences, if your using different db engines maybe you have hit a bug in one of SO's backends. there is no reason for code to work different on two hardwares with the same environment. The code in question is this: @expose(format=json) def getCounties(self, state_id, tg_errors=None): #print ###getCounties, counties, , model.State.get(state_id).counties tmp = {id: 0, countyName: Select county..} is_id = False try: state = int(state_id) is_id = True except: state = state_id is_id = False if is_id: counties = [tmp] + model.State.get(state).counties else: counties = [tmp] + model.State.selectBy(stateName=state) [0].counties return dict(counties=counties) just a note on the structure of the code, instead of using the same variable to store the key param and the string param why not add 2 named params something like @expose(format=json) def getCounties(self,state_id=None,state_name=None,tg_errors=None): if state_id: state = int(state_id) counties = model.State.get(state).counties state = state_id is_id = False if is_id: else: counties = [tmp] + model.State.selectBy(stateName=state) [0].counties return dict(counties=counties) also the tmp variable is not a good idea I don't see why your turning it later into a list why not just leave that on the template and just move the actual data in the controller, it's always going to be Select county right? getCities is similar. Note that at home I just have try: State.get(id) except: State.selectBy(name=state) and it works fine. On remote server I tried to do this because I thought it might be related to the Rollback error. It didn't help of course.. The reason I'm not sure if I will get an id or a name is that when the menu is loaded from ajax, sometimes it will return name and sometimes id. Menu created by me of course always returns id, as it well should. Again, this doesn't cause trouble at home and I didn't investigate this more yet. I don't think this causes the Rollback error though. From my reading of the group it looks like there was an old bug that was related to this but it was fixed. It was also possible to bring this error about by passing around sqlobject object between transactions (if I understood right) and also there was one case when a function had an empty list as an argument and it was reused in later transactions causing the error.. It looks like this case is something different. Here's the mochikit code..: SCRIPT SRC=/static/javascript/MochiKit.js TYPE=text/javascript/ SCRIPT !--document.write(STATES!!+states)-- script var conn = MochiKit.Signal.connect; function replace_state(req) { var states = evalJSONRequest(req).states; replaceChildNodes($('location_form_state_id'), map( function(p) { return OPTION((p.id,p.stateName)) }, states ) ); } function replace_county(req) { var counties = evalJSONRequest(req).counties; replaceChildNodes($('location_form_county'), map( function(c) { return OPTION((c.id,c.countyName)) }, counties ) ); } function replace_city(req) { var cities = evalJSONRequest(req).cities; replaceChildNodes($('location_form_city'), map( function(city) { return OPTION((city.id,city.cityName)) }, cities ) ); } function state_id_changedb(event) { var state_id = event.target().value; var defb = doSimpleXMLHttpRequest('/getCounties', {state_id : state_id}); defb.addCallback(replace_county); } function state_id_changed(event) { var state_id = event.target().value; var def = doSimpleXMLHttpRequest('/getCities', {state_id : state_id}); def.addCallback(replace_city); } function country_id_changed(event) { var country_id = event.target().value; var def = doSimpleXMLHttpRequest('/getStates', {country_id : country_id}); def.addCallback(replace_state);
[TurboGears] Re: hosting problems
On 2/26/07, bewest [EMAIL PROTECTED] wrote: I recommend server pronto be removed from the list at http:// docs.turbogears.org/1.0/Hosting. The customer support is very poor, and their billing practices are insecure (they will publish credit card information on the web). I've outlined this in more detail at http://bewest.wordpress.com/ 2007/02/15/serverpronto-doesnt-understand-privacy-or-security/ and http://bewest.wordpress.com/2007/02/14/serverpronto-will-publish-your- creditcard-on-the-web/. well first please make a comment on the page , in fact I think it's freely editable but you have to admit that deleting some hosting because one client didn't had a good experience with them is not a good idea. I suggest you add a good comment to the wiki with links to your experience so other people can judge. PS: your thread title is a little misleading, it seems like your asking us to fix your hosting company issues. The only reason I actually clicked on it was because I was looking for unanswered threads :) Thanks, Ben --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: select_ from_ inheritable_ tables
svetl schrieb: It's just a bug. http://sourceforge.net/tracker/index.php?func=detailaid=1670239group_id=74338atid=540672 That might be true, but your design is still flawed. Sooner or later you will run into issues with joins because of the SO-inheritance-magic taking place for an unnecessary case. All you want from your base-class is to propagate created-columns through your model classes. Joining a common table for that each time is a needless waste, and will get in your way soon. Diez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Gzip compression of .py and .kid files.
On 2/27/07, Chris Dew [EMAIL PROTECTED] wrote: On Feb 27, 11:43 pm, Bob Ippolito [EMAIL PROTECTED] wrote: On 2/27/07, Joshua J. Kugler [EMAIL PROTECTED] wrote: On Tuesday 27 February 2007 12:46, Chris Dew wrote: I'm new to Python and TurboGears. I haven't been able to find the answer to my question by Googling, possibly because gzip is everywhere on the web. The context of my question is: deploying a TurboGears application onto a system with limited (flash) storage. I am aware of the various compressed filesystems available, but I'm considering other approaches. Is it possible to deploy a TurboGears application with all/some of it's source .py and .kid files gzipped to save space? Python itself can import zipped files (zip, not gzip AFAIK). I've not tried zipped kid files. I *think* it just overloads python's import routines, so it might be able to. I'd doubt that the templates would work, but the sources would. It's a non-trivial amount of effort though. You're probably prematurely optimizing though. Is it work that much effort to save (if you're REALLY lucky) about 1MB? -bob That's a good point about it being premature optimisation. If the (application *and* framework's) .py and .kid files are only 1.5Mb, I would save 1Mb. I expect there are more than 1.5Mb of files. Even 1Mb is good if you've only got 16Mb. I should have more than that, but you're fighting bloat all the way with flash. With the work involved, I may be better off storing much of the application/framework on some form of compressed (read-only?) loopback filesystem. I was (perhaps naively) hoping that you could set USE_GZIP = TRUE in a configuration file. Well dependent libraries are easy enough if they're egg zip compatible, you don't have to do anything -- they're already zipped. You said TurboGears application, not the rest of the stack. Still not really worth spending much time on though. A compressed filesystem like squashfs or cramfs is a much easier and more standard approach to this sort of problem *and* it will compress things like extensions and executables (which dwarf Python bytecode most of the time) where any other solution will not. If you truly constrained to double digit MBs you're going to want (perhaps even need) to use one anyway for the rest of the OS. -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Cannot turn off logging to screen or enable file logging
On 2/26/07, Eric Hawthorne [EMAIL PROTECTED] wrote: My prod.cfg section has: # SERVER server.environment=production server.log_file=server.log server.log_to_screen=False but it still logs to the screen and does not log to the file. OS: ubuntu 6.06 TurboGears 1.0b1 CherryPy 2.2.1 What am I doing wrong? did you check your log.cfg file? I guess your confused from a CP background, what you actually need to check is proydir/config/log.cfg check out http://docs.turbogears.org/1.0/LoggingSystem --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: ? about passing objects into kid templates!
I have my own object which I pass into my kid template (via a dict). I can in the kid template treat that object as normal and access any of its attributes. I then want to pass that very same object ( e.g YYY) (via a form) from the kid template back into a turbogears function but when you do YYY.__class__ in the turbogears function it gives me a unicode type.??? On 2/28/07, Jorge Vargas [EMAIL PROTECTED] wrote: On 2/28/07, hamilton ganesan [EMAIL PROTECTED] wrote: Hi All, I notice that its easy to pass objects into a kid template but.. when you try to pass that same object from the same kid back into turbogears , the object loses its integrity :-( Is there some way of passing objects from kid templates into turbogears functions without the object undergoing any changes? you lost me there, TG works one way the dispatcher in CP (aka the exposed function) returns a dict that goes into kid, there is no turning back. or your talking about kid's namespace call tg like tg.url() could you provide an example of what you want to accomplish maybe it's an issue with the type of the object your trying and not all objects. Regards, -- Hamilton Ganesan ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø Bioinformatics Computational Biology Unit Department Biochemistry FABI Square/Bioinformatics building Faculty of Natural Sciences University of Pretoria Lynwood Rd Pretoria South Africa 0001 Tel : +27 12 420 5802 Fax : +27 12 420 5800 ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø E-MAIL: [EMAIL PROTECTED] URL : http://www.bi.up.ac.za/~hamilton ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø God is not mocked, for whatever a man sows, that will he reap (Gal. 6:7) -- Hamilton Ganesan ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø Bioinformatics Computational Biology Unit Department Biochemistry FABI Square/Bioinformatics building Faculty of Natural Sciences University of Pretoria Lynwood Rd Pretoria South Africa 0001 Tel : +27 12 420 5802 Fax : +27 12 420 5800 ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø E-MAIL: [EMAIL PROTECTED] URL : http://www.bi.up.ac.za/~hamilton ø ¤ º ° ` ° º ¤ ø ¤ º ° ` ° º ¤ ø , ¸ ¸ , ø God is not mocked, for whatever a man sows, that will he reap (Gal. 6:7) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Strange problem when autoreload.on=False
On 2/26/07, Puck [EMAIL PROTECTED] wrote: Hi *, I'm experiencing a strange problem: When autoreload.on is set to True, my app works fine. As soon as I set it to False, the application starts up, but an exception (AssertionError: This transaction has already gone through ROLLBACK; begin another transaction) is thrown on every single call. For the typical stacktrace see below. The utils module, which provides methods for all controllers is always the source of the error. All controller methods that actually return a dict to the template use the utils module to provide standard entries to the dict, i.e. a localized menu structure, etc. : @expose(template=sometemplate) def some_method(self): content = self.get_some_specific_content() return self.utils.default_dict(some_special_extra=content) Within the default_dict method, the best available locale for the user is calculated and loaded from db. The line that bombs is a debug logging statement which outputs the iso code of the loaded locale. Has anyone experienced similar problems? Any ideas as to why this is happening? check out a similar thread with the name of the error your getting, it seems that your SO objects are leaving longer then expected and that is causing troubles. Also remember that http request/responses and therefore CP/TG request/responses are supposed to be atomic so this is a chance your using a dead object. can you add ?debug=1 to your dburi, that way you can see the SQL and see when it is actually making the bad request and it could be track to where the sql was generated. I'm using TG 1.0.1 and Postgres 8.2. Regards, Puck Traceback (most recent call last): File c:\programme\python243\lib\site-packages\CherryPy-2.2.1- py2.4.egg\cherrypy\_cphttptools.py, line 105, in _run self.main() File c:\programme\python243\lib\site-packages\CherryPy-2.2.1- py2.4.egg\cherrypy\_cphttptools.py, line 254, in main body = page_handler(*virtual_path, **self.params) File string, line 3, in index File c:\programme\python243\lib\site-packages\TurboGears-1.0.1- py2.4.egg\turbogears\controllers.py, line 334, in expose output = database.run_with_transaction( File string, line 5, in run_with_transaction File c:\programme\python243\lib\site-packages\TurboGears-1.0.1- py2.4.egg\turbogears\database.py, line 302, in so_rwt retval = func(*args, **kw) File string, line 5, in _expose File c:\programme\python243\lib\site-packages\TurboGears-1.0.1- py2.4.egg\turbogears\controllers.py, line 351, in lambda mapping, fragment, args, kw))) File c:\programme\python243\lib\site-packages\TurboGears-1.0.1- py2.4.egg\turbogears\controllers.py, line 378, in _execute_func output = errorhandling.try_call(func, *args, **kw) File c:\programme\python243\lib\site-packages\TurboGears-1.0.1- py2.4.egg\turbogears\errorhandling.py, line 73, in try_call return func(self, *args, **kw) File C:\Programme\eclipse3.2\workspace\myapp\myapp\controllers.py, line 39, in index return self.utils.default_dict() File C:\Programme\eclipse3.2\workspace\myapp\myapp\utils.py, line 202, in default_dict loc = get_user_locale() File C:\Programme\eclipse3.2\workspace\myapp\myapp\utils.py, line 156, in get_user_locale log.debug(Best locale for + search_locale + : + retval.code) File string, line 1, in lambda File c:\programme\python243\lib\site-packages\SQLObject-0.7.2- py2.4.egg\sqlobject\main.py, line 988, in _SO_loadValue selectResults = self._connection._SO_selectOne(self, dbNames) File c:\programme\python243\lib\site-packages\SQLObject-0.7.2- py2.4.egg\sqlobject\dbconnection.py, line 823, in __getattr__ self.assertActive() File c:\programme\python243\lib\site-packages\SQLObject-0.7.2- py2.4.egg\sqlobject\dbconnection.py, line 749, in assertActive assert not self._obsolete, This transaction has already gone through ROLLBACK; begin another transaction AssertionError: This transaction has already gone through ROLLBACK; begin another transaction --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: Turbogears problems on start
please do a search before posting this was asked this week with the same setup. TG 1.0.1 is not py25 compatible, well it is but not out of the box. http://docs.turbogears.org/1.0/Python2.5Support On 2/25/07, mandoluca [EMAIL PROTECTED] wrote: Hi, I have installes TurboGears on Mac Os X 10.4. I didn't have problems during the installation, but if I try to launch th tg-admin info I recive this erro: host204-32-dynamic:~ gigio$ tg-admin info Traceback (most recent call last): File /usr/local/bin/tg-admin, line 8, in module load_entry_point('TurboGears==1.0.1', 'console_scripts', 'tg- admin')() File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.py, line 236, in load_entry_point File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.py, line 2097, in load_entry_point File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/setuptools-0.6c5-py2.5.egg/pkg_resources.py, line 1830, in load File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboGears-1.0.1-py2.5.egg/turbogears/ __init__.py, line 6, in module from turbogears.controllers import expose, flash, validate, redirect, \ File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboGears-1.0.1-py2.5.egg/turbogears/ controllers.py, line 12, in module from turbogears import view, database, errorhandling, config File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboGears-1.0.1-py2.5.egg/turbogears/view/ __init__.py, line 1, in module from turbogears.view.base import * File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboGears-1.0.1-py2.5.egg/turbogears/view/ base.py, line 17, in module from turbogears.i18n import i18n_filter, get_locale File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboGears-1.0.1-py2.5.egg/turbogears/i18n/ __init__.py, line 5, in module from turbogears.i18n.tg_gettext import gettext, ngettext, install, is_locale_supported, \ File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboGears-1.0.1-py2.5.egg/turbogears/i18n/ tg_gettext.py, line 4, in module from turbojson.jsonify import jsonify File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/TurboJson-1.0-py2.5.egg/turbojson/jsonify.py, line 26, in module 'isinstance(obj, datetime.datetime) or ' File build/bdist.macosx-10.3-fat/egg/dispatch/functions.py, line 690, in when File build/bdist.macosx-10.3-fat/egg/dispatch/functions.py, line 577, in _decorate File string, line 10, in parseRule File build/bdist.macosx-10.3-fat/egg/dispatch/functions.py, line 440, in parseRule File build/bdist.macosx-10.3-fat/egg/dispatch/functions.py, line 326, in parse File build/bdist.macosx-10.3-fat/egg/dispatch/ast_builder.py, line 383, in parse_expr File build/bdist.macosx-10.3-fat/egg/dispatch/ast_builder.py, line 378, in build KeyError: 304 Some helps? Thank you very much for the suggestions! mando --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears group. To post to this group, send email to turbogears@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~--~~~~--~~--~--~---