[turbogears-commits] [2073] website/newdocs/download/tgsetup.py: tgsetup will now default the script-dir to /usr/local/bin on a posix system
Title: [2073] website/newdocs/download/tgsetup.py: tgsetup will now default the script-dir to /usr/local/bin on a posix system Revision 2073 Author kevin Date 2006-11-13 17:26:27 -0500 (Mon, 13 Nov 2006) Log Message tgsetup will now default the script-dir to /usr/local/bin on a posix system and should (untested!) print out a message on a Window system if the path does not appear to contain the python script dir. tgsetup also now makes the distinction between the standard and future packages. standard includes all of the parts we've come to know and love. future drops SQLObject and adds Genshi and SQLAlchemy. (Kid is still included because the widgets rely on it.) Modified Paths website/newdocs/download/tgsetup.py Diff Modified: website/newdocs/download/tgsetup.py (2072 => 2073) --- website/newdocs/download/tgsetup.py 2006-11-11 20:23:00 UTC (rev 2072) +++ website/newdocs/download/tgsetup.py 2006-11-13 22:26:27 UTC (rev 2073) @@ -1,8 +1,8 @@ #!/bin/env python TurboGears installer +from distutils import log - #!python Bootstrap setuptools installation @@ -136,27 +136,67 @@ sys.exit(1) -def update_args(): -Sets up the command line arguments for ez_setup.py -if len(sys.argv) 1: -args = sys.argv[1:] -else: -args = [] -args.append(-f) -args.append(http://www.turbogears.org/download/) -args.append(-U) -args.append(TurboGears) -return args - def tg_main(): print TurboGears Installer check_python() check_directory() -args = update_args() print Beginning setuptools/EasyInstall installation and TurboGears \ - download + download\n +if len(sys.argv) 1: +args = sys.argv[1:] +else: +args = [] main(args) +if post_install_msgs: +print +Important additional install information + + +print \n\n.join(post_install_msgs) + +post_install_msgs = [] + +def install_command(): +try: +from setuptools.command import easy_install as eimodule +except ImportError: +import easy_install as eimodule +original_class = eimodule.easy_install +class easy_install(eimodule.easy_install): +original_class.user_options.insert(0, (future, None, +use Genshi and SQLAlchemy)) +original_class.boolean_options.append(future) +def initialize_options(self): +self.future = False +original_class.initialize_options(self) + +def finalize_options(self): +if self.future: +self.args.append(TurboGears[future]) +else: +self.args.append(TurboGears[standard]) +if self.upgrade is None: +self.upgrade = True +if self.script_dir is None: +if os.name == posix: +self.script_dir = /usr/local/bin +else: +path = os.environ.get(PATH, ) +import re +if not path.match(r'Python\d+\Script'): +post_install_msgs.append( +You may need to update the PATH in your environment to allow +you to run the tg-admin command or any other Python scripts that +you install. To do that on Windows: + +Go to System Properties - Advanced - Environment Variables and add or edit the PATH variable to have ;C:\Python24;C:\Python24\Scripts, assuming you installed Python to the default location.) + +original_class.finalize_options(self) +self.find_links.append(http://www.turbogears.org/download/) + +# install our new class +eimodule.easy_install = easy_install # TGEND def _validate_md5(egg_name, data): @@ -271,6 +311,9 @@ egg = download_setuptools(version, delay=0) sys.path.insert(0,egg) from setuptools.command.easy_install import main +#TGBEGIN +install_command() +#TGEND return main(list(argv)+[egg]) # we're done here finally: if egg and os.path.exists(egg): @@ -289,11 +332,17 @@ from setuptools.command.easy_install import main except ImportError: from easy_install import main +#TGBEGIN +install_command() +#TGEND main(list(argv)+[download_setuptools(delay=0)]) sys.exit(0) # try to force an exit else: if argv: from setuptools.command.easy_install import main +#TGBEGIN +install_command() +#TGEND main(argv) else: print Setuptools version,version,or greater has been installed. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Repository Commits group. To post to this group, send
[tg-tickets] Re: [TurboGears] #1043: controllers.py: foo should not be used as a variable name in _process_output
#1043: controllers.py: foo should not be used as a variable name in _process_output +--- Reporter: grover |Owner: elvelind Type: defect | Status: new Priority: highest |Milestone: 1.0 Component: TurboGears | Version: 0.9a5 Severity: blocker | Resolution: Keywords: | +--- Comment (by mikl): Hilarious. I think we should use something more pythonic like spam ... or eggs :) -- Ticket URL: http://trac.turbogears.org/turbogears/ticket/1043 TurboGears http://www.turbogears.org/ TurboGears front-to-back web development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Tickets group. To post to this group, send email to turbogears-tickets@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-tickets?hl=en -~--~~~~--~~--~--~---
[tg-tickets] Re: [TurboGears] #1165: welcome.kid en castellano
#1165: welcome.kid en castellano -+-- Reporter: santiago.pessat |Owner: anonymous Type: defect | Status: new Priority: normal |Milestone: Component: unassigned | Version: Severity: normal | Resolution: Keywords: | -+-- Comment (by mikl): I am sorry, but my spanish is a bit rusty - what's going on here? Apparently, you have translated welcome.kid - but why? And why have you reported this as a defect? Is there a problem? In any case, it would make it easier, if you would write in english... -- Ticket URL: http://trac.turbogears.org/turbogears/ticket/1165 TurboGears http://www.turbogears.org/ TurboGears front-to-back web development --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups TurboGears Tickets group. To post to this group, send email to turbogears-tickets@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-tickets?hl=en -~--~~~~--~~--~--~---
[TurboGears] Re: TG Newbie Wants to Create a Dynamic Form
Dave schrieb: I'm currently looking to design an application in Turbogears but am getting hung up on one specific challenge - that's updating form fields conditionally based upon the selection of another form field. For instance: In a form, you have two select fields, one for state and one for city. I want the city field to be populated with city names that are ONLY in the state selected, which would (presumably) be pulled from a database. I'd like to do it asynchronously versus posting the entire form and dealing with the whole page reloading. Has anybody done this with AutoCompleteFields? For example with a form of 3 AutoCompleteFields. The list of the suggestions depends on each others fields value. I think that I have to hack AutoCompleteManager.prototype.doDelayedRequest somehow to pass also the values of the other form fields to the controller method. Sounds not so easy. Has anybody done this? -- Greg --~--~-~--~~~---~--~~ 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: Post-login login
On 11/13/06, Stuart Clarke [EMAIL PROTECTED] wrote: I'm wanting to put some logic in my app which will get executed every time a user logs in. Specifically, I want to increment a user's login counter (a column in the user table), and I want to redirect them to certain pages, based on what group they're a member of. I can't figure out how to do this with Identity. It sets up a login controller in my project, but that only seems to be called after successful login if the user actually went to the login page to begin with, not if they were attempting to visit another page, and then got hi-jacked because they hadn't logged in. Is there any way for me to add this logic? Hi Stuart, You can do this by implementing a custom identity-controller. You need to implement a small interface and provide an entry point in your egg. Here's a simple example, basically this is just a copy of the std. identity provider with the configurable class names hard-coded (softproof is the name of the project this is taken from). import logging log = logging.getLogger(softproof.model.identity) class SoftproofIdentityProvider(object): def __init__(self): pass def create_provider_model(self): return def validate_identity(self, user_name, password, visit_key): user = session.query(User).get_by(user_name=user_name) if not user: log.warning(No such user: %s, user_name) return None if not self.validate_password(user, user_name, password): log.info(Passwords don't match for user: %s, user_name) return None log.info(associationg user (%s) with visit (%s), user.user_name, visit_key) link = session.query(VisitIdentity).get_by(visit_key=visit_key) if not link: link = VisitIdentity(visit_key=visit_key, user_id=user.user_id) session.save(link) else: link.user_id = user.user_id session.flush() return SoftproofIdentity(visit_key, user) def validate_password(self, user, user_name, password): return user.password == password def load_identity(self, visit_key): return SoftproofIdentity(visit_key) def anonymous_identity(self): return SoftproofIdentity(None) class SoftproofIdentity(object): def __init__(self, visit_key, user=None): if user: self._user = user self.visit_key = visit_key self.key = None @property def user(self): try: return self._user except AttributeError: pass visit = session.query(VisitIdentity).get_by(visit_key=self.visit_key) if not visit: self._user = None return None self._user = session.query(User).get(visit.user_id) return self._user @property def user_name(self): if not self.user: return None return self.user.user_name @property def anonymous(self): return not self.user @property def permissions(self): try: return self._permissions except AttributeError: pass if not self.user: self._permissions = frozenset() else: self._permissions = frozenset([p.permission_name for p in self.user.permissions]) return self._permissions @property def groups(self): try: return self._groups except AttributeError: pass if not self.user: self._groups = frozenset() else: self._groups = frozenset([g.group_name for g in self.user.groups]) return self._groups def logout(self): if not self.visit_key: return try: visit = session.query(VisitIdentity).get_by(visit_key=self.visit_key) session.delete(visit) anon = SoftproofIdentity(None) identity.set_current_identity(anon) except: pass else: session.flush() To enable this you need to add this to your call to setup() in setup.py: entry_points = [turbogears.identity.provider] softproof = softproof.model:SoftproofIdentityProvider , and change this line in your to your app.cfg: identity.provider='softproof' HTH, Arnar --~--~-~--~~~---~--~~ 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: search by alternate ID fails with MySQL
[EMAIL PROTECTED] wrote: Can we please see your class declaration? This particular feature works fine for me, so we're missing something here... Are you think reserved keyword collision? Because that's what I am :-) -Rob --~--~-~--~~~---~--~~ 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: Post-login login
I've used this strategy before: http://groups.google.com/group/turbogears/browse_thread/thread/af36be446f4ba47a/6f41a2a22d7c159f?lnk=stq=rnum=44#6f41a2a22d7c159f --~--~-~--~~~---~--~~ 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] Getting the User Community to Improve Docs
The docs would improve very quickly if even a small faction of this group's users would help out. If 5% committed just spent 10 minutes a week nearly 20 hours of improvements could be made. We as community need to figure out how to get people motivated to help out. I'm sure many would like to help out if we had a list of small tasks they could work on. Well it turns out we have a huge task that could be broken into smaller tasks that would aid in improving the completeness of the docs. This groups archives has over 20,000 messages that contain far more useful information on TG than is currently available in docs. If we could mine all the useful bits out of these message and turn them into docs, a giant leap forward would have been made. This is a huge task and cannot be done without a large number of volunteers and some infrastructure to organize the effort. What we need is a small TG app that grabs all of this groups topics that are at least a week old and are not in the database and add them to a database with a status of needs tagging and also save the link to the topic. We then need a page that displays the newest say 25 topics that has a status of needs tagging in a list so that a user could select a topic and then be given the link to the topic for them to review and a series of check boxes to select tags for documentation. There would also have to be an option to state that no useful information for docs exists in the topic as well as info in the message is out of date. Once at least 3 people have tagged a topic the status of the topic would be changed to tagging complete. Another page of the application could provide a list of tags with a progress bar that shows the documentation extraction progress of the topic tag. That is, it would give an indication of the progress that has been made in migrating useful information to the TG docs. For example, lets say there are 10 topics in the user group that has been tagged with identity. If someone has already gone through 3 of them and made modification to the TG docs to include the valuable information that was in the message then the topic could be closed so the progress bar would show 30% complete. Now this is just an idea that I had and realized that many other details would have to be worked out to make this happen but would like to know if anyone else thinks that this would be a useful way to improve the TG docs. Also would there be anyone who would be interested in leading this effort to get the infrastructure in place. I know I don't have time to lead this effort but would be more than willing to spend some time each week tagging topics and improving docs as I can. Here is also a start of a topic tags list: ajax ajax.dojo ajax.jquery ajax.mochikit ajax.moo.fx ajax.prototype ajax.rico ajax.scriptaculous ajax.yahoo!ui api cherrypy configuration controller database database.mysql database.postgresql database.sqlite decorators deployment fastdata identity installation internationalization json logging model orm orm.activemapper orm.sqlalchemy orm.sqlobject orm.turboentity plugins scheduler setuptools template template.buffet template.cheetah template.clearsilver template.django template.genshi template.htmlpy template.jinja template.kid template.myghty template.stan template.xslt template.zpt test test.mechanize test.nose test.selenium test.twill tgadmin tgwidgets toolbox toolbox.catwalk toolbox.modeldesigner troubleshooting tutorials view widgets wsgi --~--~-~--~~~---~--~~ 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: Doc Priority thoughts
On 11/12/06, gasolin [EMAIL PROTECTED] wrote: Based on your comment I think most people agree that its better to list all information in docs front page. So I start this process in hybrid way: prompt the most important docs (which direct related to TurboGears, such as 'How to choose different template engine', 'widgets intro', 'Identity intro', 'internationalization', 'Agile Test', 'Error logging', and 'scheduler') to front page and let full list in 'Solving specific problems' and 'Alternate Components' doc. The gray area which store most of docs are within 'Solving specific problems', 'Alternate Components', and 'RoughDocs'. Should we list all of them on front page? Or the hybrid way is clear enough? If we don't list them on the front page, we should have another page where we list ALL docs. This second page should be linked very prominantly from the front page. If there's a clear structure, research has shown that people can find their way through huge documents and find what they are looking for. And as far as perceptions go, more is definitely better for docs in the open source world. Nobody has ever told me, Oh, I didn't use that framework because there were too many Docs. Of course, I'll just use the search engine provided, and not worry about sorting through the huge list of docs. But you never know looking through the list of docs may still show me something I'd never have thought to search for... -- 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 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 date validation using Schemas
Hi all, If I am trying to validate two dates from a form, so that one date is always the same or greater than the second date, how do I get my form value from within my schema? What I have so far is: class DateRangeSchema(validators.Schema): sdate = validators.DateConverter(datetime_module='mxDateTime',not_empty=True) edate = formencode.compound.All(validators.DateConverter(datetime_module='mxDateTime',not_empty=True), validators.DateValidator(datetime_module='mxDateTime',earliest_date=sdate)) which works in the sense that the DateConverters make sure my dates are valid. But DateValidator seems to want a date at declaration for earliest_date when I am trying to give it the first date from my form. DateValidator lets you pass earliest_date as a callable but I do not know how I would get at the date object value of sdate within that function to return it! Is there an easy way to do this or do I have to create my own validator that inherits from FormValidator like the FieldsMatch one? Regards, Aaron --~--~-~--~~~---~--~~ 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 date validation using Schemas
On Nov 13, 2006, at 4:41 PM, Aaron Bostick wrote: Hi all, If I am trying to validate two dates from a form, so that one date is always the same or greater than the second date, how do I get my form value from within my schema? What I have so far is: class DateRangeSchema(validators.Schema): sdate = validators.DateConverter(datetime_module='mxDateTime',not_empty=True) edate = formencode.compound.All(validators.DateConverter (datetime_module='mxDateTime',not_empty=True), validators.DateValidator (datetime_module='mxDateTime',earliest_date=sdate)) which works in the sense that the DateConverters make sure my dates are valid. But DateValidator seems to want a date at declaration for earliest_date when I am trying to give it the first date from my form. DateValidator lets you pass earliest_date as a callable but I do not know how I would get at the date object value of sdate within that function to return it! Is there an easy way to do this or do I have to create my own validator that inherits from FormValidator like the FieldsMatch one? I think the easiest thng to do is to create a FormValidator and place it as a chained_validator in the Schema, something like: class DatesValidator(FormValidator): gettextargs = {'domain':'messages'} messages = { 'publica_menor' : _('La fecha de publicacion debe ser menor que la de ' 'despublicacion'), 'despublica_mayor' : _('La fecha de despublicacion debe ser mayor que ' 'la de publicacion'), } def validate_python(self, value, state=None): pub = value.get('fecha_publica', None) des = value.get('fecha_despublica', None) if (pub and des) and pub des: message = self.message('publica_menor', state) errors = dict( fecha_publica = self.message('publica_menor', state), fecha_despublica = self.message( 'despublica_mayor', state), ) raise Invalid(message, value, state, error_dict=errors) (taken from some prod. code of mine) 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] A Few Documentation Links
Fellow TurboGears Enthusiasts, In the brief time I've been tinkering with TurboGears I've collected a few documentation links, some of which might be difficult to find. So, in case they might be useful to others I've created a page on one of my web sites listing them: http://www.RawFedDogs.net/TurboGears While going through them I noticed that the API docs page at: http://Docs.TurboTears.org/1.0/API which used to have alot of good stuff on it now just displays, Not available yet. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. --~--~-~--~~~---~--~~ 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] WingIDE and tg-admin shell
I don't know if any of you use WingIDE, but in case you don't, in Wing's environment you can have multiple python interpreters. For e.g. you can have a py2.3, py2.4 etc.. shell.What I wanted was a way to have 'tg-admin shell' as one of the interpreters to display. Now I can't do it in Wing yet, but I was hoping that someone can tell me how the TG custom shell works. I was wondering if I can just import a bunch of modules if I can mimic the TG custom shell, or does it also do some other things I am not aware of. I am guessing that there would be some PYTHONPATH issues as well? Anyhow, any additional info would be helpful.If I can get this right it would make Wing the ultimate TG dev environment. ( for me, at least ). thanks,-- -mike --~--~-~--~~~---~--~~ 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: Doc Priority thoughts
On 11/13/06, Mark Ramm [EMAIL PROTECTED] wrote: Of course, I'll just use the search engine provided, and not worry about sorting through the huge list of docs. The problem is that the search engine isn't that useful unless you know the names of everything. I have no problem finding stuff, but I put a significant portion of it in the wiki, so I have a pretty good idea of how a particular idea is named. I still find myself having to do 2-3 searches to find something if I forget. --~--~-~--~~~---~--~~ 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: WingIDE and tg-admin shell
On 11/13/06, Michael Steinfeld [EMAIL PROTECTED] wrote: I was hoping that someone can tell me how the TG custom shell works. turbogears/command/base.py, Shell class. If I can get this right it would make Wing the ultimate TG dev environment. That would be my customized vim environment. I really do need to get around to cleaning that up and releasing it one day. --~--~-~--~~~---~--~~ 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: A Few Documentation Links
On 11/13/06, Kevin Monceaux [EMAIL PROTECTED] wrote: http://Docs.TurboTears.org/1.0/API which used to have alot of good stuff on it now just displays, Not available yet. These are now on the front page under the Reference section. The API docs will be just that, docs generated off the docstrings. --~--~-~--~~~---~--~~ 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: TurboEntity
On 11/10/06, Jonathan LaCour [EMAIL PROTECTED] wrote: And we are definitely open to suggestions. At this point there are three of us with three different code bases with three slightly different APIs. We are discussing any and every idea, and all of our different approaches to the same problem. We welcome any ideas that you may have! I'd like to see migrate come along with this project. http://erosson.com/migrate/docs/ --~--~-~--~~~---~--~~ 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] IDE's and stuff. (Was WingIDE and TG Shell)
On 11/13/06, Karl Guertin [EMAIL PROTECTED] wrote: That would be my customized vim environment. I really do need to get around to cleaning that up and releasing it one day. Send it 'unclean' and we can help :) Anyone using pida [http://pida.berlios.de/]? It's kinda early beta but works ok most of the time. And VIM 7.0 is yummy, native tabs, a nice code completion window []s --~--~-~--~~~---~--~~ 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: WingIDE and tg-admin shell
Yeah, I'd love to see that. I already have quite a large vim.cfg, but you can always get more interesting tricks ;) On 13 Nov., 17:28, Karl Guertin [EMAIL PROTECTED] wrote: On 11/13/06, Michael Steinfeld [EMAIL PROTECTED] wrote: I was hoping that someone can tell me how the TG custom shell works.turbogears/command/base.py, Shell class. If I can get this right it would make Wing the ultimate TG dev environment.That would be my customized vim environment. I really do need to get around to cleaning that up and releasing it one day. --~--~-~--~~~---~--~~ 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: WingIDE and tg-admin shell
On 11/13/06, Karl Guertin [EMAIL PROTECTED] wrote: On 11/13/06, Michael Steinfeld [EMAIL PROTECTED] wrote: I was hoping that someone cantell me how the TG custom shell works.turbogears/command/base.py, Shell class. If I can get this right it would make Wing the ultimate TG dev environment.That would be my customized vim environment. I really do need to getaround to cleaning that up and releasing it one day. Not sure what you mean by that. I have vi bindings working in WingIDE so I get the best of both worlds. I get my text editor with syntax highlighting, code completetion etc .. and I also get to use all the vi bindings in the same window. But what do you mean 'cleaning and releasing one day' ? Also, what i was wondering is if I can just import a bunch of modules to the python interpreter and get the same results as the custom tg-admin shell. -mike --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
Karl, On Sun, Nov 12, 2006 at 02:29:11AM -0500, Karl Guertin wrote: After two months worth of comments, I've rewritten the 20 minute wiki tutorial. Looks good!!! I've hit a minor problem on page 4. I added the code to transform WikiWords into links but WikiWords arn't being transformed into links. I copied/pasted the code to be sure I had the RegEx correct. Any suggestions on what I might check? Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. --~--~-~--~~~---~--~~ 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: Allow configuration of unit tests via test.cfg
Timothy Freund wrote: I just submitted a patch, ticket #1177 to allow unit test configuration through an optional test.cfg file as well as app.cfg. I thought that tests should be configured in the same way that development and production environments are configured. Details are here: http://trac.turbogears.org/turbogears/ticket/1177 Inspiration came from my own experience learning about unit testing TG applications this week, and the following sources: http://groups.google.com/group/turbogears/browse_thread/thread/6403fb307ce92112/da7152728e1bc3f2 http://www.thesamet.com/blog/2006/06/02/four-tips-on-identity-testing/ Your comments are appreciated. Replied at the ticket, to sum up: +1 from me. :) 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Kevin Monceaux [EMAIL PROTECTED] wrote: Any suggestions on what I might check? 1. Make sure you're doing the substitution above the return 2. WikiWords must start with a capital, be at least 4 characters long, and have at least one more capital letter in the word: TurboGears, BoBo, WikiWord, TestMe are all valid. Other than that, can't really help you. My final source code for the project is downloadable on Page 6. I think I'll put another link to that download on the first page. --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 13 Nov., 19:33, Karl Guertin [EMAIL PROTECTED] wrote: On 11/13/06, Kevin Monceaux [EMAIL PROTECTED] wrote: Any suggestions on what I might check?1. Make sure you're doing the substitution above the return 2. WikiWords must start with a capital, be at least 4 characters long, and have at least one more capital letter in the word: TurboGears, BoBo, WikiWord, TestMe are all valid. Other than that, can't really help you. My final source code for the project is downloadable on Page 6. I think I'll put another link to that download on the first page. --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
Hi Karl I haven't read it all very closely, but it seems that you've done a marvellous job. I think you should add a link to the installation guide (http://www.turbogears.org/download/) to the start of the tutorial. That might be of great assistance to any potential newcomers to TG (linked from Digg or similar places). I also think we should consider porting all our docs to SQLAlchemy as that seems to be The Future(tm) of TurboGears :) That is not very important though, but I think we should make it a policy for the 1.1 docs :) In any case, good job Regards, Mikkel On 12 Nov., 08:29, Karl Guertin [EMAIL PROTECTED] wrote: After two months worth of comments, I've rewritten the 20 minute wiki tutorial. http://docs.turbogears.org/1.0/Wiki20/Page1 The primary enhancement is that I've added contextual lines in the examples, which will hopefully reduce the confusion over where to insert stuff. Since nobody is going to get through a written tutorial in 20 minutes, I've taken the opportunity to expand the explanations to provide some background information and links to places where you can find more information on topics the tutorial glosses over. I've tried to take special care to explain more exotic Python constructs to language newcomers, as we do seem to be getting a number trying to work through the tutorial. Finally, I've modified the ajax portion to use MochiKit's connect() functionality to demonstrate proper technique. Remember folks, setting onclick attributes is not good style and killing my open in new tab middle click annoys me greatly. All the best, Karl --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
Karl, On Mon, Nov 13, 2006 at 01:33:30PM -0500, Karl Guertin wrote: Other than that, can't really help you. My final source code for the project is downloadable on Page 6. I think I'll put another link to that download on the first page. Okay, I know enough about Regular Expressions that I really should have caught that. On page: http://docs.turbogears.org/1.0/Wiki20/Page4 It has: wikiwords = re.compile(rb([A-Z]w+[A-Z]+w+)) In your actual source code you have: wikiwords = re.compile(r\b([A-Z]\w+[A-Z]+\w+)) The back slashes are missing in the tutorial. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. --~--~-~--~~~---~--~~ 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: Getting the User Community to Improve Docs
John M Camara wrote: The docs would improve very quickly if even a small faction of this group's users would help out. If 5% committed just spent 10 minutes a week nearly 20 hours of improvements could be made. We as community need to figure out how to get people motivated to help out. I'm sure many would like to help out if we had a list of small tasks they could work on. Well it turns out we have a huge task that could be broken into smaller tasks that would aid in improving the completeness of the docs. This groups archives has over 20,000 messages that contain far more useful information on TG than is currently available in docs. If we could mine all the useful bits out of these message and turn them into docs, a giant leap forward would have been made. This is a huge task and cannot be done without a large number of volunteers and some infrastructure to organize the effort. What we need is a small TG app that grabs all of this groups topics that are at least a week old and are not in the database and add them to a database with a status of needs tagging and also save the link to the topic. We then need a page that displays the newest say 25 topics that has a status of needs tagging in a list so that a user could select a topic and then be given the link to the topic for them to review and a series of check boxes to select tags for documentation. There would also have to be an option to state that no useful information for docs exists in the topic as well as info in the message is out of date. Once at least 3 people have tagged a topic the status of the topic would be changed to tagging complete. Actually, it wouldn't even have to grab the topics, it could just pull info from the RSS feed[1] and handle it accordingly. The better choice, imo, would be to come up with a registration and unique message content combination that would allow people who wish to be part of this to tag content in a reply to the post. Another page of the application could provide a list of tags with a progress bar that shows the documentation extraction progress of the topic tag. That is, it would give an indication of the progress that has been made in migrating useful information to the TG docs. For example, lets say there are 10 topics in the user group that has been tagged with identity. If someone has already gone through 3 of them and made modification to the TG docs to include the valuable information that was in the message then the topic could be closed so the progress bar would show 30% complete. Now this is just an idea that I had and realized that many other details would have to be worked out to make this happen but would like to know if anyone else thinks that this would be a useful way to improve the TG docs. Also would there be anyone who would be interested in leading this effort to get the infrastructure in place. I know I don't have time to lead this effort but would be more than willing to spend some time each week tagging topics and improving docs as I can. I'll try to get some time to put something together today. Considering it would only have to parse RSS feeds it shouldn't be too hard. (famous last words) -Adam [1] http://groups.google.com/group/turbogears/feeds --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Mikkel Høgh [EMAIL PROTECTED] wrote: I also think we should consider porting all our docs to SQLAlchemy as that seems to be The Future(tm) of TurboGears :) The official ORM for 1.0 is SQLObject. All docs in 1.0/* will use SQLObject exclusively unless they're specifically about SQLAlchemy. I personally prefer SA but the call has been made and I want a consistent story in the docs without a whole bunch of if you use... digressions. I have not been enforcing this (actually IdentityManagment is the only one that covers both ORMs) but I probably will start moving SA references to footnotes as we get the docs finalized for 1.0. That is not very important though, but I think we should make it a policy for the 1.1 docs :) When SA becomes the official ORM, all examples will switch to SA examples, whatever form SA support looks like at that point (straight SA, ActiveMapper, TurboEntity, whatever Jonathan LaCour and friends are currently working on, etc). Until then, SQLObject will remain as the example ORM in all the docs. --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Kevin Monceaux [EMAIL PROTECTED] wrote: The back slashes are missing in the tutorial. D'oh. Sorry about that. I didn't even notice when I looked them over. It seems as though the Restructured Text parsed-literals eat slashes while the normal literals don't. --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/12/06, iain duncan [EMAIL PROTECTED] wrote: - the old comments are still there, which are now out of sync with the doc, so they should be trimmed/deleted Comments which really are out of date have been trimmed, I wasn't entirely sure about the remaining comments, so they were left. - the database still uses unicode, so the code as is will fail on mysql ( or does for me ). I think it would be better to change those to plain strings so that it will work out of the box on other RDBMS I know there have been fixes mentioned on this list, so it got put on my todo list, that's why your comment is still there. - perhaps a demo of the tg-admin sql sql command would be good before the sql create, that helped me understand what was going on when I was first exposed to object-relational mappers Reasonable enough, todo. - maybe a link to or example of exactly how one makes the database and dev.cfg edit would be useful for beginners. i can write that up for mysql if you'd like Maybe the problem is that the tutorial doesn't push sqlite hard enough. We really do use sqlite for a good reason. - could the command prompts have a fully path name before them or something to help people know which dir they should be in for issuing commands? I had anticipated this to some extent and many of the non-template files do have a path, I suppose I can put paths to all files without too much work. - the use of std.url produces a warning from CherryPy about it being deprecated Fun fun. --~--~-~--~~~---~--~~ 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: Getting the User Community to Improve Docs
On 11/13/06, John M Camara [EMAIL PROTECTED] wrote: This groups archives has over 20,000 messages that contain far more useful information on TG than is currently available in docs. If we could mine all the useful bits out of these message and turn them into docs, a giant leap forward would have been made. If someone wants to do this, I'd have no issues with it, but I'll note that most of those messages are out of date or duplicates. If you want to find useful messages, check the last 4-5 months for developer messages. If you want to further reduce the size of the data, drop myself and Jorge Godoy. We both occasionally contribute something useful but we also spend a lot of messages on community management. If you're looking for widgets advice, Alberto's and Michelle's messages are particularly pertinent. Outside of the above, there are like 15 or 20 messages that I have tagged for migration to docs. Most of the remainder of the messages in the group are either not generally useful (and a google search on this group would be better than trying to find it in the docs) or are version-specific bugs that should be fixed by a faster release cycle. More directly useful to me would be if people would pull information off trac and into RoughDocs and confirm the code works for 1.0. The code review takes most of the effort in these conversions. The conversion and copy editing process are fairly simple otherwise. --~--~-~--~~~---~--~~ 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] Tidy Filter
Has anyone used the tidy filter for cherrypy? I'd like to use it, but can't seem to get it working. I put this in dev.cfg. tidy_filter.on = True tidy_filter.tmp_dir = /tmp/ tidy_filter_strict_xml = True tidy_filter.tidy_path = /usr/bin/tidy Randall --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
Karl Guertin [EMAIL PROTECTED] writes: The official ORM for 1.0 is SQLObject. All docs in 1.0/* will use SQLObject exclusively unless they're specifically about SQLAlchemy. I personally prefer SA but the call has been made and I want a consistent story in the docs without a whole bunch of if you use... digressions. I have not been enforcing this (actually IdentityManagment is the only one that covers both ORMs) but I probably will start moving SA references to footnotes as we get the docs finalized for 1.0. Hmmm... What about having two versions of each document? Suffixing them with SO or SA and making a suffix-less version that redirects to the current (now SO) version would be interesting... -- 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: IDE's and stuff. (Was WingIDE and TG Shell)
On Mon, 2006-13-11 at 14:52 -0200, José de Paula Eufrásio Júnior wrote: On 11/13/06, Karl Guertin [EMAIL PROTECTED] wrote: That would be my customized vim environment. I really do need to get around to cleaning that up and releasing it one day. Send it 'unclean' and we can help :) Do post to the list on this! I have a bunch of vim scripts and commands I'd be happy to contribute, and now that I'm learning kid I'll be making a bunch more kid specific ones. 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: WingIDE and tg-admin shell
around to cleaning that up and releasing it one day. Not sure what you mean by that. I have vi bindings working in WingIDE so I get the best of both worlds. I get my text editor with syntax highlighting, code completetion etc .. and I also get to use all the vi bindings in the same window. But what do you mean 'cleaning and releasing one day' ? Vi bindings aren't *usually* the same thing. I don't know for Wing, but for instance the vi binding port for komodo ( don't know if it's released yet, some buddies of mine are developers there ) doesn't include vim commands, macros, vim to python command mappers and vice versa, and the full power of vim keymaps. After they told me that I passed on the offer of a beta copy. ; ) Now eclipse is supposed to be able to do real vim integration using eclim, but I have not tried it out yet, has anyone? I would be very interested in a wiki page ( ok, two, we should make one for the emacsers too, ha ha ) of editor related stuff to speed up gears development. That's something I could contribute to right away. 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Jorge Godoy [EMAIL PROTECTED] wrote: Hmmm... What about having two versions of each document? Suffixing them with SO or SA and making a suffix-less version that redirects to the current (now SO) version would be interesting... That might be a possibility, but I'm more interested in achieving complete documentation coverage, getting API docs, and removing the Getting Started series than I am in writing SQLAlchemy versions of docs. --~--~-~--~~~---~--~~ 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: WingIDE and tg-admin shell
On 11/13/06, iain duncan [EMAIL PROTECTED] wrote: I would be very interested in a wiki page ( ok, two, we should make one for the emacsers too, ha ha ) of editor related stuff to speed up gears development. That's something I could contribute to right away. Feel free to start a page on Vim in RoughDocs. I'm sure I'll contribute quite a bit to it when I'm done with everything else. --~--~-~--~~~---~--~~ 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: IDE's and stuff. (Was WingIDE and TG Shell)
On 11/13/06, José de Paula Eufrásio Júnior [EMAIL PROTECTED] wrote: Send it 'unclean' and we can help :) By 'unclean' I mean half-implemented and buggy. I don't release non-working projects despite the release early, release often mantra in free software. --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
Comments which really are out of date have been trimmed, I wasn't entirely sure about the remaining comments, so they were left. Makes sense! - maybe a link to or example of exactly how one makes the database and dev.cfg edit would be useful for beginners. i can write that up for mysql if you'd like Maybe the problem is that the tutorial doesn't push sqlite hard enough. We really do use sqlite for a good reason. I can see that sqlite is the best choice for someone totally new to the whole mess, but I think a lot of new Gears users are going to be coming to the project with the choice of RDBMS already made for them for a variety of reasons, and that's likely to be mysql or postgres. Maybe what would be more useful is to have a link in there to a doc page with further details on setting gears up with those two systems? I could write the mysql one if you'd like ( but not for a week! ). - the use of std.url produces a warning from CherryPy about it being deprecated Fun fun. Is that a warning I should just ignore? Should we put in a warning about the warning? ;) 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: Wiki 20 tutorial rewrite completed, comments appreciated
On Mon, 2006-13-11 at 14:42 -0500, Karl Guertin wrote: On 11/13/06, Mikkel Høgh [EMAIL PROTECTED] wrote: I also think we should consider porting all our docs to SQLAlchemy as that seems to be The Future(tm) of TurboGears :) The official ORM for 1.0 is SQLObject. All docs in 1.0/* will use SQLObject exclusively unless they're specifically about SQLAlchemy. I personally prefer SA but the call has been made and I want a consistent story in the docs without a whole bunch of if you use... digressions. I have not been enforcing this (actually IdentityManagment is the only one that covers both ORMs) but I probably will start moving SA references to footnotes as we get the docs finalized for 1.0. That is not very important though, but I think we should make it a policy for the 1.1 docs :) When SA becomes the official ORM, all examples will switch to SA examples, whatever form SA support looks like at that point (straight SA, ActiveMapper, TurboEntity, whatever Jonathan LaCour and friends are currently working on, etc). Until then, SQLObject will remain as the example ORM in all the docs. Is there any reason not to have dual versions? I know we want one good way but I have to say part of my attraction to gears is that is more unixy, we have choice of modules. My dream world would be a plugable switch between the two in which the mapper enable one to change only the model file. At any rate, as the book covers SO, I don't think it's a good idea to switch the docs when 1.1 comes out or we will have a *lot* of annoyed new users who bought the book. I think it's very important to be able to follow good docs on both approaches. 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: *You* can help the TurboGears project. Here's how!
... I suspect what's either (possibly) missing or (more likely) not currently pointed to determinedly enough is an architectural overview showing the API relationships of the current bits. The famous graphic is OK in terms of the gross relationships between the components, but after a month working part-time with TG I'm only just beginning to feel that I understand the architecture. Not only would such notes encourage contributors, they might also reduce the amount of time those on this list who *are* familiar with the architecture spend answering questions that seem insurmountable to the questioners but often turn out to be quite trivial for those in the know. I don't underestimate the effort this would take. Maybe we need a two-level effort, where the documenters can ask the architects off-line and then tun the answers into documentation. Or something like that. Very well put, such a document would be helping me a lot. 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: WingIDE and tg-admin shell
On Mon, 2006-13-11 at 17:13 -0500, Karl Guertin wrote: On 11/13/06, iain duncan [EMAIL PROTECTED] wrote: I would be very interested in a wiki page ( ok, two, we should make one for the emacsers too, ha ha ) of editor related stuff to speed up gears development. That's something I could contribute to right away. Feel free to start a page on Vim in RoughDocs. I'm sure I'll contribute quite a bit to it when I'm done with everything else. Will put on my todo ( still panicking on client project right now ). I can also add some writeups on pydev tips with vim, ie taking full advantage of the if_python vim module for testing and debugging. ( Though ubuntu's vim now ships with this disabled, gah! ) 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] A Couple of Widget Questions
Karl, On Fri, Nov 10, 2006 at 02:19:11PM -0500, Karl Guertin wrote: *most* 0.9 stuff will work with 1.0b, the tutorial looks valid from my glance at it. Well, since the tutorial is a bit sketchy on the details I downloaded the source code for the tutorial and and tried running it with 1.0b1. When I tried to start it via start-formtutorial.py I got: Traceback (most recent call last): File ./start-formstutorial.py, line 19, in ? modulename=formstutorial.config) File /usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/config.py, line 207, in update_config configure_loggers(configdict) File /usr/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/config.py, line 136, in configure_loggers config[global][tg.new_style_logging] = False KeyError: 'global' P.S. The tutorial in question is: http://trac.turbogears.org/turbogears/wiki/SimpleWidgetForm Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. --~--~-~--~~~---~--~~ 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: A Couple of Widget Questions
P.S. The tutorial in question is: http://trac.turbogears.org/turbogears/wiki/SimpleWidgetForm Try quickstarting a new project with the same name, and copying in the controllers.py model.py, and templates folder from the tutorial's tarball. There are a few configuration changes since that particular tutorial was written, but I think the actual widget code should still work. -- 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 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: A Couple of Widget Questions
On 11/13/06, Kevin Monceaux [EMAIL PROTECTED] wrote: Well, since the tutorial is a bit sketchy on the details I downloaded the source code for the tutorial and and tried running it with 1.0b1. When I tried to start it via start-formtutorial.py I got: The config format changed several times over the course of 0.9 development. It seems that the tutorial code was written before the final change to the current format. The easiest solution is usually to quickstart an appropriately named new project and copy the code (controllers.py, model.py, templates/*, etc) over to the new project. I have enough planned for this week that I do not plan to do any widgets documentation conversion until at least the weekend. --~--~-~--~~~---~--~~ 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: Getting the User Community to Improve Docs
More directly useful to me would be if people would pull information off trac and into RoughDocs and confirm the code works for 1.0. The code review takes most of the effort in these conversions. The conversion and copy editing process are fairly simple otherwise. Yes! This is an easy way to get started, and it helps a lot. If you search around the trac wiki you'll find lots of interesting documents that just need to be ported to rough-docs and tested. If you can just port it over and not test it, leave a note that it's not tested against 1.0. The wiki way will takeover and somebody may test it for you. ;) If you'd rather not deal with the coversion, but would like to test some docs, you can do that. If something doesn't exist in the docs, write it up! If somebody posts something insiteful on the list, ask them to paste it into Rough Docs, where we can improve on it, validate it, and get it included in the official docs. Lots of little steps get us where we need to go. And of course there's always room for those who are ready to put some serious effort into organzing all of that data into a coherent and easily navigable set of pages. ;) -- Mark Ramm www.compoundthinking.com/blog --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
Karl Guertin [EMAIL PROTECTED] writes: That might be a possibility, but I'm more interested in achieving complete documentation coverage, getting API docs, and removing the Getting Started series than I am in writing SQLAlchemy versions of docs. I was just worried with loosing what we have on SA... -- 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: Wiki 20 tutorial rewrite completed, comments appreciated
I could write the mysql one if you'd like ( but not for a week! ). That would be a fantastic contribution. It would be great to have a ready place to point people to. The two things people run up against most often have to do with the way TurboGears automatically wraps every request in a database transaction. 1) You'll want to explain the notrans database URI trick to make it easy to work with mysql without InnoDB tables, 2) You'll also want to explain how to set MySQL to use InnoDB tables by default so that sql create just works. -- 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 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/11/06, Karl Guertin [EMAIL PROTECTED] wrote: After two months worth of comments, I've rewritten the 20 minute wiki tutorial. http://docs.turbogears.org/1.0/Wiki20/Page1 The primary enhancement is that I've added contextual lines in the examples, which will hopefully reduce the confusion over where to insert stuff. Since nobody is going to get through a written tutorial in 20 minutes, I've taken the opportunity to expand the explanations to provide some background information and links to places where you can find more information on topics the tutorial glosses over. I've tried to take special care to explain more exotic Python constructs to language newcomers, as we do seem to be getting a number trying to work through the tutorial. Finally, I've modified the ajax portion to use MochiKit's connect() functionality to demonstrate proper technique. Remember folks, setting onclick attributes is not good style and killing my open in new tab middle click annoys me greatly. The only real comment I have is that the $(...) stuff is superfluous, and could easily be confused with Kid's ${}. You almost never need to use $() unless you're directly screwing with the DOM. Everything that takes DOM objects should take a string identifier, and connect is no exception. Also, e.preventDefault() is probably better said as e.stop(). Normally when you do preventDefault you also want stopPropagation, and that's what stop does. Though it shouldn't make a difference in this case. -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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Bob Ippolito [EMAIL PROTECTED] wrote: The only real comment I have is that the $(...) stuff is superfluous, and could easily be confused with Kid's ${}. You almost never need to use $() unless you're directly screwing with the DOM. Everything that takes DOM objects should take a string identifier, and connect is no exception. Good point. I had put it in in the event that people were familiar with the convention from other javascript frameworks. Out it goes. Also, e.preventDefault() is probably better said as e.stop(). Normally when you do preventDefault you also want stopPropagation, and that's what stop does. Though it shouldn't make a difference in this case. For onclick replacement handlers I usually don't stop propagation in case something further up the chain wants to do something with the event. --~--~-~--~~~---~--~~ 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: *You* can help the TurboGears project. Here's how!
Mark Ramm wrote: ... I suspect what's either (possibly) missing or (more likely) not currently pointed to determinedly enough is an architectural overview showing the API relationships of the current bits. The famous graphic is OK in terms of the gross relationships between the components, but after a month working part-time with TG I'm only just beginning to feel that I understand the architecture. This isn't what you're looking for exactly, but it did help me visualize the relationship between the components in one fairly simple graphic. But you're right, we need to link to this more prominently, and we need to create better visual representations of our architecture. http://www.checkandshare.com/blog/?p=34 It's an excellent explanatory aid. I wish it had been available when I started using TG. It helps a lot. regards Steve PS One minor nit: Postgress should be PostgreSQL. -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
iain duncan wrote: On Mon, 2006-13-11 at 14:42 -0500, Karl Guertin wrote: On 11/13/06, Mikkel Høgh [EMAIL PROTECTED] wrote: I also think we should consider porting all our docs to SQLAlchemy as that seems to be The Future(tm) of TurboGears :) The official ORM for 1.0 is SQLObject. All docs in 1.0/* will use SQLObject exclusively unless they're specifically about SQLAlchemy. I personally prefer SA but the call has been made and I want a consistent story in the docs without a whole bunch of if you use... digressions. I have not been enforcing this (actually IdentityManagment is the only one that covers both ORMs) but I probably will start moving SA references to footnotes as we get the docs finalized for 1.0. That is not very important though, but I think we should make it a policy for the 1.1 docs :) When SA becomes the official ORM, all examples will switch to SA examples, whatever form SA support looks like at that point (straight SA, ActiveMapper, TurboEntity, whatever Jonathan LaCour and friends are currently working on, etc). Until then, SQLObject will remain as the example ORM in all the docs. Is there any reason not to have dual versions? I know we want one good way but I have to say part of my attraction to gears is that is more unixy, we have choice of modules. My dream world would be a plugable switch between the two in which the mapper enable one to change only the model file. At any rate, as the book covers SO, I don't think it's a good idea to switch the docs when 1.1 comes out or we will have a *lot* of annoyed new users who bought the book. I think it's very important to be able to follow good docs on both approaches. Why don't we start out with SO-only documents. Then we can identity the portions that vary between DB platforms and develop plug-in replacements for the SO bits. We could use a web framework (like TurboGears!) to integrate this so one could just select one's platform either in the URLs or as a session variable value. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden --~--~-~--~~~---~--~~ 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: *You* can help the TurboGears project. Here's how!
http://www.checkandshare.com/blog/?p=34 It's an excellent explanatory aid. I wish it had been available when I started using TG. It helps a lot. I think Roland created it back in January, but it never got linked into the TG docs. But since he released it under a Creative Commons licence, all we need to do is give him credit and we can use it wherever we want. I think he may have sent me a copy of the Adobe Illustrator file, in which case I'll fix the postgress PostgreSQL thing. If not I'll e-mail him and ask for it so we can fix it, keep it up to date and include it in the docs. -- 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 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: Widget parameters
Oh, actually, I agree with what you said about the disorganization, :)... I wish there were more examples of widgets too Speaking of which, more examples might solve my current problem... say I have two widget classes: class UserField(widgets.WidgetsList): username = widgets.TextField(validator=validators.NotEmpty()) email = widgets.TextField(attrs={'size':30}, validator=validators.NotEmpty()) class PasswordField(widgets.WidgetsList): password = widgets.PasswordField('password', validator=validators.NotEmpty()) passwordConfirm = widgets.PasswordField('passwordConfirm', validator=validators.NotEmpty()) And I want to concatenate them together, e.g.: def userAddForm(country, city, controller=None): form = widgets.TableForm(fields=[UserField(), PasswordField()], action=save) return form But then I get errors. If I take away the PasswordField(), then it all works. I'm probably not doing the syntax right in some way, but I can't figure out why. Frank --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Steve Holden [EMAIL PROTECTED] wrote: Why don't we start out with SO-only documents. Then we can identity the portions that vary between DB platforms and develop plug-in replacements for the SO bits. Sure, I'm willing to do this. I use both fairly heavily and for everything except object definition, the differences are trivial. One issue (and one of the reasons I'm holding off) is what form official SA support will take. We could use a web framework (like TurboGears!) to integrate this so one could just select one's platform either in the URLs or as a session variable value. I think the simplest solution is to write a docutils plugin that will take a series of alternates, display the first, and set the remainder to ``style=display:none``. One possibility is to cheat by something like a general admonition with a custom admonition type and do all of the hiding in javascript. As for the selecting a preferred platform, that's simple javascript cookies. I'll probably implement this after I finish off the docs I feel are necessary for 1.0 (including API docs and decent docstring coverage). If someone wants to do it in the meantime, we're always up for contributions. --~--~-~--~~~---~--~~ 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: Dictionaries and kid
On 11/12/06, Diez B. Roggisch [EMAIL PROTECTED] wrote: The general problem you see here is known as marshalling. [snip] Diez Any complaints if I add this to the official docs with light editing? --~--~-~--~~~---~--~~ 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: Getting the User Community to Improve Docs
Adam Jones wrote: I'll try to get some time to put something together today. Considering it would only have to parse RSS feeds it shouldn't be too hard. (famous last words) -Adam The RSS feeds will be good for grabbing the new topics to keep the project up to date. The older topics are valuable too so I will write a script that can be run once to scrape the group of its old topics. I should be able to get this done tomorrow. --~--~-~--~~~---~--~~ 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: Dictionaries and kid
On Mon, 2006-13-11 at 22:26 -0500, Karl Guertin wrote: On 11/12/06, Diez B. Roggisch [EMAIL PROTECTED] wrote: The general problem you see here is known as marshalling. [snip] Diez Any complaints if I add this to the official docs with light editing? I think it's a great idea. If anyone knows offsite links to further resources on the same topic, those would be nice to have at the bottom. 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: *You* can help the TurboGears project. Here's how!
On Nov 13, 2006, at 2:26 AM, Steve Holden wrote: ... I suspect what's either (possibly) missing or (more likely) not currently pointed to determinedly enough is an architectural overview showing the API relationships of the current bits. The famous graphic is OK in terms of the gross relationships between the components, but after a month working part-time with TG I'm only just beginning to feel that I understand the architecture. This is an excellent point. In the DVD, I do go through a lot of the code to get people acquainted with how things are laid out, but that is no substitute for a few good diagrams. The specs will help people tackle specific things (if they mention where to look to start implementing), but there's nothing like really *understanding* how everything is wired up vs. just knowing how to approach a given problem. TG doesn't have magic imports, so if you have the source available you can track through the source to find out what goes on... but, I think a lot of people would get tripped up when they enter the rather interesting world of turbogears.controllers (or turbogears.errorhandling!) That code is up for some major simplification. But, for now, some diagrams that show what's going on there would be a big bonus. Kevin --~--~-~--~~~---~--~~ 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: Getting the User Community to Improve Docs
Karl Guertin wrote: On 11/13/06, John M Camara [EMAIL PROTECTED] wrote: This groups archives has over 20,000 messages that contain far more useful information on TG than is currently available in docs. If we could mine all the useful bits out of these message and turn them into docs, a giant leap forward would have been made. If someone wants to do this, I'd have no issues with it, but I'll note that most of those messages are out of date or duplicates. I agree that a number of older messages are out of date so that's why I suggested that we list the last 25 messages that have not been tagged. At some point when there are diminishing returns we could just list the remaining older topics out of date. I also agree that many of the messages are duplicates but that is mainly due to incomplete docs. As the docs improve I would expect the number of duplicates will reduce in frequency. If you want to find useful messages, check the last 4-5 months for developer messages. If you want to further reduce the size of the data, drop myself and Jorge Godoy. We both occasionally contribute something useful but we also spend a lot of messages on community management. If you're looking for widgets advice, Alberto's and Michelle's messages are particularly pertinent. For now it's better to keep it simple then to come up with all kinds of rules. If a good number of volunteers help out with the tagging this process shouldn't take to long to do the initial effort. Once the older topics are tagged very little effort should be required on newer topics. Outside of the above, there are like 15 or 20 messages that I have tagged for migration to docs. Most of the remainder of the messages in the group are either not generally useful (and a google search on this group would be better than trying to find it in the docs) or are version-specific bugs that should be fixed by a faster release cycle. I agree there are some messages that are not useful but even the ones that might not provide much value or maybe slightly off topic are still worth documenting even if it's just added to an FAQ. After all, it was asked once it's likely to come up again. Google searches are helpful but they don't replace good docs. More directly useful to me would be if people would pull information off trac and into RoughDocs and confirm the code works for 1.0. The code review takes most of the effort in these conversions. The conversion and copy editing process are fairly simple otherwise. I agree. There are many ways to improve the docs. --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On Nov 13, 2006, at 10:19 PM, Karl Guertin wrote: On 11/13/06, Steve Holden [EMAIL PROTECTED] wrote: Why don't we start out with SO-only documents. Then we can identity the portions that vary between DB platforms and develop plug-in replacements for the SO bits. Sure, I'm willing to do this. I use both fairly heavily and for everything except object definition, the differences are trivial. One issue (and one of the reasons I'm holding off) is what form official SA support will take. I haven't had a chance to really look at TurboEntity yet (and I know there's more going on in that arena right now). My intention is for TG to support both the Data Mapper pattern style (standard SQLAlchemy) and the Active Record pattern (ActiveMapper/TurboEntity) simultaneously. It currently does this with ActiveMapper. Particularly with the work that's going on to create a better Active Record style layer, I think that using a layer like that will make people happiest for many applications (particularly brand new applications that aren't dealing with legacy database designs). I would expect the docs to follow suit, generally using the Active Record layer, but probably with a doc that discusses standard SQLAlchemy. We could use a web framework (like TurboGears!) to integrate this so one could just select one's platform either in the URLs or as a session variable value. I think the simplest solution is to write a docutils plugin that will take a series of alternates, display the first, and set the remainder to ``style=display:none``. One possibility is to cheat by something like a general admonition with a custom admonition type and do all of the hiding in javascript. As for the selecting a preferred platform, that's simple javascript cookies. I'll probably implement this after I finish off the docs I feel are necessary for 1.0 (including API docs and decent docstring coverage). If someone wants to do it in the meantime, we're always up for contributions. Here's another alternative: We could start building parallel docs in the 1.1 area. I suspect that the biggest changes for users to deal with will be those component changes, so there wouldn't have to be a huge difference for many of the docs. It's not a perfect solution (and probably not as good as Steve's suggestion and Karl's implementation idea), but it's one that can be done without any additional infrastructure. That said, a little bit of JS and CSS is not a lot of infrastructure :) I thought I'd mention this, because we'll want to make 1.1 docs as it's developed so that we don't have a giant doc-lag-time at the end of the release cycle. Kevin --~--~-~--~~~---~--~~ 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: email validation regex
Alberto Valverde wrote: On Sep 19, 2006, at 8:31 AM, [EMAIL PROTECTED] wrote: Hi folks, I'm trying to add an email validation to my registration form. Is there any type of email validator or regex expression I can use? This site (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65215) has some python code but apparently it is not very robust. I think at most basic i just need to regex [EMAIL PROTECTED] What regex forumlas have you guys been using? There's an Email validator in FormEncode (bundled with TG) which works like a charm: from turbogears.validators import * Email.to_python('[EMAIL PROTECTED]') '[EMAIL PROTECTED]' Email.to_python('[EMAIL PROTECTED]') Traceback (most recent call last): File stdin, line 1, in ? File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/ api.py, line 319, in to_python vp(value, state) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/ validators.py, line 1174, in validate_python value, state) formencode.api.Invalid: The domain portion of the email address is invalid (the portion after the @: foo) You can use this validator with form widgets. It can also do a dns lookup for the domain to check if it's valid if you install pyDNS. 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] turbogears error :( (kid template error, actually)
im getting a kid error template on a template that doesnt have any kid stuff...heres the error:: Page handler: bound method Root.index of wheelsmall.controllers.Root object at 0xb751306c Traceback (most recent call last): File /usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py, line 105, in _run self.main() File /usr/local/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 /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 326, in expose output = database.run_with_transaction( File string, line 5, in run_with_transaction File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/database.py, line 246, in so_rwt retval = func(*args, **kw) File string, line 5, in _expose File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 343, in lambda mapping, fragment, args, kw))) File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 380, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 74, in _process_output fragment=fragment) File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/view/base.py, line 131, in render return engine.render(**kw) File /usr/local/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/turbokid/kidsupport.py, line 140, in render tclass = self.load_template(template) File /usr/local/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/turbokid/kidsupport.py, line 110, in load_template mod = _compile_template(package, basename, tfile, classname) File /usr/local/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/turbokid/kidsupport.py, line 14, in _compile_template mod = kid.load_template(tfile, name=classname) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/__init__.py, line 123, in load_template code = template.compile(dump_code=cache, dump_source=os.environ.get('KID_OUTPUT_PY')) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/compiler.py, line 87, in compile code = self.code File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/compiler.py, line 101, in code self._code = py_compile(self.python, pyfile, 'exec') File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/compiler.py, line 108, in python py = kid.parser.parse_file(self.kid_file, self.encoding) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 58, in parse_file return parse(source, encoding, filename=filename) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 46, in parse return parser.parse() File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 76, in parse self.proc_stream(self.module_code) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 133, in proc_stream for (ev, item) in self.stream: File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 168, in _track for p in stream: File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 210, in _coalesce for ev, item in stream: File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 374, in __iter__ for (ev, stuff) in self._expat_stream(): File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 346, in _expat_stream feed(data) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 414, in feed raise e ExpatError: mismatched tag: line 16, column 2 ill post my contoller.py too if you want --~--~-~--~~~---~--~~ 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] Multiple AjaxGrid in same page (only one grid showed)
Hi, i have attemped work with two AjaxGrid in the same page, but not success. Where has erro? ajaxgrid work with multiple instances? Example code -- Controllers.py -- ... grid = AjaxGrid(refresh_url=/search) gridone = AjaxGrid(refresh_url=/searchgo) class Root(controllers.RootController): @expose(template=.templates.form) def index(self): ... my code here... return dict(form=grid, form1=gridone) @expose(format=json) def search(self): ... my code here... @expose(format=json) def searchgo(self): ... my code here... -- form.kid -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; ?python import sitetemplate ? html xmlns=http://www.w3.org/1999/xhtml; xmlns:py=http://purl.org/kid/ns#; py:extends=sitetemplate head meta content=text/html; charset=UTF-8 http-equiv=content-type py:replace=''/ titleAjaxgrid Example/title /head body span py:content=form.display()/span span py:content=form1.display()/span /body /html -- -- -- the problem is: only ajaxgrid is showed in the page. But i need two ajaxgrid in the page. My code is incorrectly? 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] Getting the User Community to Improve Docs
The docs would improve very quickly if even a small faction of this group's users would help out. If 5% committed just spent 10 minutes a week nearly 20 hours of improvements could be made. We as community need to figure out how to get people motivated to help out. I'm sure many would like to help out if we had a list of small tasks they could work on. Well it turns out we have a huge task that could be broken into smaller tasks that would aid in improving the completeness of the docs. This groups archives has over 20,000 messages that contain far more useful information on TG than is currently available in docs. If we could mine all the useful bits out of these message and turn them into docs, a giant leap forward would have been made. This is a huge task and cannot be done without a large number of volunteers and some infrastructure to organize the effort. What we need is a small TG app that grabs all of this groups topics that are at least a week old and are not in the database and add them to a database with a status of needs tagging and also save the link to the topic. We then need a page that displays the newest say 25 topics that has a status of needs tagging in a list so that a user could select a topic and then be given the link to the topic for them to review and a series of check boxes to select tags for documentation. There would also have to be an option to state that no useful information for docs exists in the topic as well as info in the message is out of date. Once at least 3 people have tagged a topic the status of the topic would be changed to tagging complete. Another page of the application could provide a list of tags with a progress bar that shows the documentation extraction progress of the topic tag. That is, it would give an indication of the progress that has been made in migrating useful information to the TG docs. For example, lets say there are 10 topics in the user group that has been tagged with identity. If someone has already gone through 3 of them and made modification to the TG docs to include the valuable information that was in the message then the topic could be closed so the progress bar would show 30% complete. Now this is just an idea that I had and realized that many other details would have to be worked out to make this happen but would like to know if anyone else thinks that this would be a useful way to improve the TG docs. Also would there be anyone who would be interested in leading this effort to get the infrastructure in place. I know I don't have time to lead this effort but would be more than willing to spend some time each week tagging topics and improving docs as I can. --~--~-~--~~~---~--~~ 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] Redirect seems weird...
Like, i was runnig tg from http://127.0.0.1/ and when i did a redirect(/), the url path became http://localhost/ Is it right? --~--~-~--~~~---~--~~ 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] MySQL encoding trouble
Hi, googling through the web, I didn't find a solution for the following encoding problem using TurboGears/SQLAlchemy: Environment: see below The test data model is fairly simple: class Project(ActiveMapper): test model class mapping: id = column(Integer, primary_key=True) title = column(Unicode(255)) title_key = column(Unicode(30)) test data (edited via phpMyAdmin): - title = ''The german ö is an o-umlaut - tite_key = 'test_key' running from tg-admin shell: from model import Project proj = Project.select_by(title_key=testkey) (...) Traceback (most recent call last): File console, line 1, in ? File build/bdist.linux-i686/egg/sqlalchemy/ext/assignmapper.py, line 7, in do (...) File build/bdist.linux-i686/egg/sqlalchemy/engine/base.py, line 632, in _get_col File build/bdist.linux-i686/egg/sqlalchemy/types.py, line 190, in convert_result_value File encodings/utf_8.py, line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode bytes in position 11-14: invalid data Ok, why is this? Why a decode, everything should be utf8? Let's do a simple access to MySQL on raw console: import MySQLdb con = MySQLdb.connect(host=127.0.0.1, port=...etc.) cur = con.cursor() sql = select title from project where title_key = 'testkey'; cur.execute(sql); 1L t = cur.fetchall()[0][0] con.close() t 'The german \xf6 is an o-umlaut' t.decode(utf8) Traceback (most recent call last): File stdin, line 1, in ? File encodings/utf_8.py, line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode bytes in position 11-14: invalid data The decode failed, because the string is not a utf8-string (although seemingly utf8 encoded): isinstance(t, unicode) False It should run this way: s = u'The german \xf6 is an o-umlaut' isinstance(s,unicode) True print s The german ö is an o-umlaut But what is t if not an utf8-string like s? s.encode(latin1) 'The german \xf6 is an o-umlaut' s.encode(latin1) == t True It is a latin-1 encoded utf8-string. What process encodes the already correct unicode-string wrongly using latin-1? Is this a MySQLdb-failure? Do I miss something? My environment: Linux Ubuntu 6.10 TurboGears 1.0b1 SQLAlchemy 0.3.0 (release) using ActiveMapper MySQL 5.0.24a-Debian - started by root: /usr/bin/mysqld_safe --character-set-server=utf8 mysql SHOW VARIABLES LIKE 'character_set%'; +--++ | Variable_name| Value | +--++ | character_set_client | utf8 | | character_set_connection | utf8 | | character_set_database | utf8 | | character_set_filesystem | binary | | character_set_results| utf8 | | character_set_server | utf8 | | character_set_system | utf8 | | character_sets_dir | /usr/share/mysql/charsets/ | +--++ mysql SHOW VARIABLES LIKE 'collation%'; +--+-+ | Variable_name| Value | +--+-+ | collation_connection | utf8_general_ci | | collation_database | utf8_general_ci | | collation_server | utf8_general_ci | +--+-+ Any hints are welcome:-) TIA, Stefan -- Start here: www.meretz.de --~--~-~--~~~---~--~~ 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] Why does /login return 403 status code?
Hello TG people, I'm using a project with identity management, and have tried integrating some non browser tools, which didn't work at first, as POST requests to /login kept returning a 403 error. For some reason, Line 40 of controllers.py in a quickstarted project sets the status code to 403. Why is this? I've changed it to return 200 for the time being, until I work out whats going on... -Sw. --~--~-~--~~~---~--~~ 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] Multiple AjaxGrid in same page (only one grid showed)
Hi, i have attemped work two AjaxGrid in the same page, but not success. Where has erro? ajaxgrid work with multiple instances? Example code -- Controllers.py -- ... grid = AjaxGrid(refresh_url=/search) gridone = AjaxGrid(refresh_url=/searchgo) class Root(controllers.RootController): @expose(template=.templates.form) def index(self): ... my code here... return dict(form=grid, form1=gridone) @expose(format=json) def search(self): ... my code here... @expose(format=json) def searchgo(self): ... my code here... -- form.kid -- !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; ?python import sitetemplate ? html xmlns=http://www.w3.org/1999/xhtml; xmlns:py=http://purl.org/kid/ns#; py:extends=sitetemplate head meta content=text/html; charset=UTF-8 http-equiv=content-type py:replace=''/ titleAjaxgrid Example/title /head body span py:content=form.display()/span span py:content=form1.display()/span /body /html -- -- -- the problem is: only ajaxgrid is showed in the page. But i need two ajaxgrid in the page. My code is incorrectly? 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] Which Java Library should be used?
Hello, I have a dilema and maybee you can help. We are developing a site which requires some ajax and visual features like: drop down menus on mouse over submit over ajax a checkbox state change star rateing like on yahoo music submit a form in background and change the content of a div with the reply from the server drag and drop sort add new form list elements on the fly with autocomplete or validation feature For a better understanding I created a page where visually all features I need are displayed. http://demo.webnova.ro/el Based on these information which JavaScript libaray you would recommend? I need a library that could do these features I require. The library should be also small if possible. Is there any which can make all of these? As I heared prototype is a good one and easy to learn but I can't tell if it has the features mentioned above. If you would be able to do these functionalities, how much it would costs me? Thank you very much for your time answering this letter, Best regards, Peter Csaba --~--~-~--~~~---~--~~ 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] Is it just me or...
tg-admin sql upgrade doesn't work yet? --~--~-~--~~~---~--~~ 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: email validation regex
Alberto Valverde wrote: On Sep 19, 2006, at 8:31 AM, [EMAIL PROTECTED] wrote: Hi folks, I'm trying to add an email validation to my registration form. Is there any type of email validator or regex expression I can use? This site (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65215) has some python code but apparently it is not very robust. I think at most basic i just need to regex [EMAIL PROTECTED] What regex forumlas have you guys been using? There's an Email validator in FormEncode (bundled with TG) which works like a charm: from turbogears.validators import * Email.to_python('[EMAIL PROTECTED]') '[EMAIL PROTECTED]' Email.to_python('[EMAIL PROTECTED]') Traceback (most recent call last): File stdin, line 1, in ? File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/ api.py, line 319, in to_python vp(value, state) File /Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/FormEncode-0.5.1-py2.4.egg/formencode/ validators.py, line 1174, in validate_python value, state) formencode.api.Invalid: The domain portion of the email address is invalid (the portion after the @: foo) You can use this validator with form widgets. It can also do a dns lookup for the domain to check if it's valid if you install pyDNS. 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] mailing list backlog
I just released a bunch of messages that had been queued in the mailing list. I wanted to let everyone know that the big surge in spam recently has caused a couple of things:1) unusually large numbers of messages going into the moderation queue2) some people's messages are being flagged as possibly being spamI should make the mailing list signup info clear about the fact that new users are moderated (I change this setting once I see that they're not posting spam). I think that occasional delays in messages getting through is a minor price to pay for keeping the list spam free.Sorry for those that were hung up in queue for a day or two.Kevin --Kevin DangoorTurboGears / Zesty Newsemail: [EMAIL PROTECTED]company: http://www.BlazingThings.comblog: http://www.BlueSkyOnMars.com --~--~-~--~~~---~--~~ 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: Which Java Library should be used?
On 11/13/06, cpeter [EMAIL PROTECTED] wrote: Hello, I have a dilema and maybee you can help. We are developing a site which requires some ajax and visual features like: drop down menus on mouse over submit over ajax a checkbox state change star rateing like on yahoo music submit a form in background and change the content of a div with the reply from the server drag and drop sort add new form list elements on the fly with autocomplete or validation feature all that can be done with mochikit which is included with TG, maybe except the star thing which you won't probably find in a library although someone ask something very similar a while ago and he even pointed out a full CSS and javascript specialiced library that can easily be converted into a widget. For a better understanding I created a page where visually all features I need are displayed. http://demo.webnova.ro/el Based on these information which JavaScript libaray you would recommend? I need a library that could do for the record please don't ever say java went your refering to javascript, if this was 2 years ago I'll be looking for your address to mail you something you wont like. these features I require. The library should be also small if possible. Is there any which can make all of these? As I heared prototype is a good one and easy to learn but I can't tell if it has the features mentioned I believe any of the mainstream libs can do this without any problem. above. If you would be able to do these functionalities, how much it would costs me? are you saying cost in time? cost in money? Thank you very much for your time answering this letter, Best regards, Peter Csaba --~--~-~--~~~---~--~~ 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: *You* can help the TurboGears project. Here's how!
On 11/13/06, Kevin Dangoor [EMAIL PROTECTED] wrote: turbogears.errorhandling! Ah! It burnses! ;] Actually it isn't poorly written code, but it is very weird code for python. --~--~-~--~~~---~--~~ 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: mailing list backlog
On 11/14/06, Kevin Dangoor [EMAIL PROTECTED] wrote: I just released a bunch of messages that had been queued in the mailing list. I wanted to let everyone know that the big surge in spam recently has caused a couple of things: so that explains why I clean out the unread and then got 15 new threads, I was like ohh my ... what happen people normally don't post at night here. Kevin -- Kevin Dangoor TurboGears / Zesty News email: [EMAIL PROTECTED] company: http://www.BlazingThings.com blog: http://www.BlueSkyOnMars.com --~--~-~--~~~---~--~~ 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: Is it just me or...
On 11/13/06, Italo Maia [EMAIL PROTECTED] wrote: tg-admin sql upgrade doesn't work yet? actually it has never work as expected you first need to run record http://www.sqlobject.org/sqlobject-admin.html#the-record-command honestly I have never used it --~--~-~--~~~---~--~~ 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: Redirect seems weird...
On 11/12/06, Italo Maia [EMAIL PROTECTED] wrote: Like, i was runnig tg from http://127.0.0.1/ and when i did a redirect(/), the url path became http://localhost/ Is it right? I believe so, redirect works based on hostnames not IP addresses as all webapps should --~--~-~--~~~---~--~~ 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: Wiki 20 tutorial rewrite completed, comments appreciated
On 11/13/06, Kevin Dangoor [EMAIL PROTECTED] wrote: Here's another alternative: We could start building parallel docs in the 1.1 area. I don't want to do parallel docs because I don't want to maintain two sets of docs, as previously mentioned. I will definitely implement something like my suggestion before I go about maintaining two sets of docs. I thought I'd mention this, because we'll want to make 1.1 docs as it's developed so that we don't have a giant doc-lag-time at the end of the release cycle. IMO this particular docs lag is caused by the docudo since we were waiting for docudo to become usable before we started writing docs. I'll be providing ongoing docs coverage for future development, which will be easier as I don't have to write quite so many docs at once and I can write the docs as I learn the modules. I do request that people provide docstrings, as that will be our next big hurdle. --~--~-~--~~~---~--~~ 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 error :( (kid template error, actually)
can you please post the template (and the master.kid) one of the biggest problems of kid is it's errors, they are practically meaninless :) On 11/12/06, jeff [EMAIL PROTECTED] wrote: im getting a kid error template on a template that doesnt have any kid stuff...heres the error:: Page handler: bound method Root.index of wheelsmall.controllers.Root object at 0xb751306c Traceback (most recent call last): File /usr/local/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py, line 105, in _run self.main() File /usr/local/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 /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 326, in expose output = database.run_with_transaction( File string, line 5, in run_with_transaction File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/database.py, line 246, in so_rwt retval = func(*args, **kw) File string, line 5, in _expose File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 343, in lambda mapping, fragment, args, kw))) File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 380, in _execute_func return _process_output(output, template, format, content_type, mapping, fragment) File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/controllers.py, line 74, in _process_output fragment=fragment) File /usr/local/lib/python2.4/site-packages/TurboGears-1.0b1-py2.4.egg/turbogears/view/base.py, line 131, in render return engine.render(**kw) File /usr/local/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/turbokid/kidsupport.py, line 140, in render tclass = self.load_template(template) File /usr/local/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/turbokid/kidsupport.py, line 110, in load_template mod = _compile_template(package, basename, tfile, classname) File /usr/local/lib/python2.4/site-packages/TurboKid-0.9.8-py2.4.egg/turbokid/kidsupport.py, line 14, in _compile_template mod = kid.load_template(tfile, name=classname) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/__init__.py, line 123, in load_template code = template.compile(dump_code=cache, dump_source=os.environ.get('KID_OUTPUT_PY')) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/compiler.py, line 87, in compile code = self.code File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/compiler.py, line 101, in code self._code = py_compile(self.python, pyfile, 'exec') File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/compiler.py, line 108, in python py = kid.parser.parse_file(self.kid_file, self.encoding) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 58, in parse_file return parse(source, encoding, filename=filename) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 46, in parse return parser.parse() File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 76, in parse self.proc_stream(self.module_code) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/parser.py, line 133, in proc_stream for (ev, item) in self.stream: File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 168, in _track for p in stream: File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 210, in _coalesce for ev, item in stream: File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 374, in __iter__ for (ev, stuff) in self._expat_stream(): File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 346, in _expat_stream feed(data) File /usr/local/lib/python2.4/site-packages/kid-0.9.3-py2.4.egg/kid/pull.py, line 414, in feed raise e ExpatError: mismatched tag: line 16, column 2 ill post my contoller.py too if you want --~--~-~--~~~---~--~~ 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: Why does /login return 403 status code?
Kind of guessing, but as it is written, linking to 'login' would not be the normal path for a user to become authenticated. Instead, you would link to a protected url, and a user would be presented with the login form (and a 403 code). The user authenticates, and is forwarded on to the protected url. But you are right about that not making sense in the context of a link to 'login' (as in the example welcome template). The login controller might make more sense as follows: response.status = 403 if identity.was_login_attempted(): msg=_(The credentials you supplied were not correct or did not grant access to this resource.) elif identity.get_identity_errors(): msg=_(You must provide your credentials before accessing this resource.) else: msg=_(Please log in.) response.status = 200 forward_url= request.headers.get(Referer, /) --~--~-~--~~~---~--~~ 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: Which Java Library should be used?
On 11/13/06, cpeter [EMAIL PROTECTED] wrote: drop down menus on mouse over Can be done in CSS. submit over ajax a checkbox state change Can be done in raw javascript, no library needed. You might, however, want to look for something like MochiKit's connect or Dojo's connect to do this cleanly. star rateing like on yahoo music I'm not sure, but YUI or dojo might have this as a pre-built widget. If not, this isn't hard to write. You might view source on somewhere simple like ajaxian.com to see how they do it. submit a form in background and change the content of a div with the reply from the server Not sure if MochiKit provides form submission. I know that dojo.io can. drag and drop sort Any javascript toolkit will provide this. add new form list elements on the fly with autocomplete or validation feature I don't know what this widget is called. I have an unreleased dojo widget that does this but I haven't seen it packaged anywhere else. http://demo.webnova.ro/el 404 Based on these information which JavaScript libaray you would recommend? I need a library that could do I use MochiKit most of the time and dojo when I need something heavier. these features I require. The library should be also small if possible. mootools does most of this and definitely wins the size race. Is there any which can make all of these? As I heared prototype is a good one and easy to learn but I can't tell if it has the features mentioned above. It may or may not have all of them, it usually gets combined with scriptaculous, so you might want to check there if you're looking for a full solution. --~--~-~--~~~---~--~~ 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] can't read properties of self from within a _set_
I have a class with two properties, and I only want to allow one of the properties to be set at a time. Each time a property is set, it checks to see if the other one is defined and deletes it if it is. Here's my code: - class class1(SQLObject): prop_1 = StringCol(default='') prop_2 = StringCol(default='') def _set_prop_1(self,value): self._SO_set_prop_1(value) if self.prop_2: self.prop_2 = None def _set_prop_2(self,value): self._SO_set_prop_2(value) if self.prop_1: self.prop_1 = None and here's the error it gives me: c=class1() Traceback (most recent call last): File console, line 1, in ? File /usr/lib/python2.4/site-packages/SQLObject-0.7.2b1-py2.4.egg/sqlobject/declarative.py, line 93, in _wrapper return fn(self, *args, **kwargs) File /usr/lib/python2.4/site-packages/SQLObject-0.7.2b1-py2.4.egg/sqlobject/main.py, line 1203, in __init__ self._create(id, **kw) File /usr/lib/python2.4/site-packages/SQLObject-0.7.2b1-py2.4.egg/sqlobject/main.py, line 1227, in _create self.set(**kw) File /usr/lib/python2.4/site-packages/SQLObject-0.7.2b1-py2.4.egg/sqlobject/main.py, line 1105, in set raise AttributeError, '%s (with attribute %r)' % (e, name) AttributeError: 'class1' object has no attribute 'id' (with attribute 'prop_1') -- Any ideas how to fix this? --~--~-~--~~~---~--~~ 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: Doc Priority thoughts
Of course, I'll just use the search engine provided, and not worry about sorting through the huge list of docs. But you never know looking through the list of docs may still show me something I'd never have thought to search for... That was precisely true for me in this case because when you are learning a new framework or a brand new way of doing something, you don't necessarily know *what* you're looking for. I like the way the new list has some annotation, personally I think the annotations could be even more verbose and should be searchable by keyword. ( if they aren't already! ) 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: Widget parameters and docs
On Tue, 2006-14-11 at 03:09 +, chiangf wrote: Oh, actually, I agree with what you said about the disorganization, :)... I wish there were more examples of widgets too Personally, I'm finding the biggest hole in the docs right now is a comprehensive tutorial on using form widgets with formencode and validators. My 2 cents. 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] is model.session thread safe?
I've read a few posts, and can't seem to find a definitive, clear answer. Can model.session (provided by SQLAlchemy) be safely used within different controllers? I am concerned because cherrypy spawns new threads for requests, and model.session appears to be a shared object amongst threads. I use model.session.flush() to save changes to the database, and am wondering whether I should be creating a new session object within each controller, or within each method on a controller. How does everyone else do this? -Sw. --~--~-~--~~~---~--~~ 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] Yet another Wiki Reorg, hopefully the last
I've done another wiki reorganization. This reflects my thinking on how the wiki docs are written. In the interest of preventing further index changes, I'm posting it here for comments before I actually make the changes. http://docs.turbogears.org/1.0/RoughDocs/WikiOrganization The goals of this reorganization are: 1. Get everything on the index page. I believe every document is on this index, even if it is in the reorg section. 2. Get rid of GettingStarted. This is already done. The docs in GettingStarted didn't really know what they wanted to be. Were they tutorials? Recipes? Basic Reference? In any event, people were finding them rather than the pages that would answer their questions. Those that provided information not found elsewhere were migrated to the appropriate bin, those that provided a subset of a Reference topic were removed. 3. Community first. I feel it should be. 4. Clearly organized bins. We now have Tutorials, Cookbook, and Reference with ancillary Community [who] and Hacking TurboGears section which cover the standard topics for those sections. Hopefully everybody has a fairly good idea of what articles go in what bin. - Tutorials are step by step instructions that are meant to get you familiar with a component. [how] - Recipes are instructions for how to solve a specific problem in your project. [what] - Reference are in-depth guides that explain the reasoning behind why something was designed a particular way or how it's used. [why] - API docs (to come) answer what methods are available and what their contract is. [where] There is some overlap (specifically the Internationalization article, it probably should be under Recipes), but there are far fewer overlaps than other organization schemes we've done and I feel these categories are used fairly widely within the Python community so people are more likely to recognize the type of documents in each section. Tutorials and Recipes are divided into sections. These have far less though behind them and are definitely up for suggestion. I have a redesigned CSS file that will make the third level headings indent with the list so the sections have a more distinct visual hiearchy among other fun features. I plan on getting diagrams and whatnot into the reference section and leaving notes near the entry points so those so inclined can find them when they're learning the framework. I do have a list of docs that need to happen before the 1.0 docs are finished and further plans on top of that, but I think that everything fits in this framework. --~--~-~--~~~---~--~~ 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] how to share authentication between tg and zope2
Hi all, I would like to share the credentials between tg and zope2 wich run in different ports. I would like that a user insert his/her username and password once in tg or in zope2 and then both servers share it whitout asking two times thfor the authentication. Is there a way to do that? jo --~--~-~--~~~---~--~~ 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: Yet another Wiki Reorg, hopefully the last
Hopefully everybody has a fairly good idea of what articles go in what bin. - Tutorials are step by step instructions that are meant to get you familiar with a component. [how] - Recipes are instructions for how to solve a specific problem in your project. [what] - Reference are in-depth guides that explain the reasoning behind why something was designed a particular way or how it's used. [why] - API docs (to come) answer what methods are available and what their contract is. [where] The above looks really good to me. I'd suggest sticking exactly that description on the index page too! I personally also like it when tutorials have links to the appropriate ref and api doc right in them. Thanks! 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 -~--~~~~--~~--~--~---