[TurboGears] Re: using egg resources as static files
looks very interesting, alberto. i'll take a look today! 10x --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] using egg resources as static files
Hi guys. I have a project that supports plugins as eggs. I want one plugin to provide some images (that are packaged with the egg). I have a /static/images dir like everyone else in TG. What I want to do, is to find a way to link the directory with images from the egg, to the main static images dir. Any suggestions? Thanks in advance, Eli --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] Re: Parse url for date handling
...just thought you might be interested to take a look at the blog software i am working on - TurboBlog. http://turboblog.python-hosting.com/ eli --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] Re: identity problem ?
I had the same exact problem, and been wrecking my head over this. thanks alot! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] Re: Writing plugins for TG based project.
Yep. That was very easy! Thanks alot. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] Writing plugins for TG based project.
Hi there. I've been working on TG based blogging engine called TurboBlog for some time now, and came to a point where I want to put in place the functionality to allow users to extend the engine with plugins, i.e. flickr sidebar plugin and etc. What I wanted to ask is: what is the prefered approach here? Some tricks using EGGs and setuptools? Anyone can point to examples here? Thanks in advance, Eli --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] Re: Writing plugins for TG based project.
Thanks, I'll take a look. Though it explains how to write plugins, but not how to use and deploy them :) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[TurboGears] Re: Using XMLRPC filter
Ok. Apparently I was a dumbass an mis-spelled the config option name for xmlrpc_filter :) Now it works. The only thing is - is there a way to prevent tg_flash from showing up? thanks, Eli
[TurboGears] Re: Using XMLRPC filter
Well, if I understand correctly this problem exists for all usages of the CP filters?
[TurboGears] Re: Using XMLRPC filter
well, I'll take a look at identity's code, but the wikis don't help, since they use deprecated syntax for filters.
[TurboGears] Re: Using XMLRPC filter
Well, I did try enabling it thru the config.py used the whole path('/RPC') xmlrpcFilter.on = True thing. Did do a thing :) I wanted to have it on the same port, as a part of the whole app (to minimize database problems) So basiclly I was hoping for a small working example, because I pounded on it for while with no success :( Eli
[TurboGears] Using XMLRPC filter
Hi there. I was wondering, since the _cpFilterList will be deprecated in future versions of CherryPy, can someone please provide a clear example on how to impement a XMLRPC handling controller that is mounted to the Root one? Somethis to make this work: class RPCController(controllers.Root): @turbogears.expose() def test(self, i): return i+1 class Root(controllers.Root): RPC = RPCController() Thanks, Eli
[TurboGears] Re: Request: identity example app, paging list recipe
To answer your second request about paging, I've been using this snippet of code: http://turbogears.blogspot.com/2005/11/simple-pager-decorator.html
[TurboGears] Re: Using XMLRPC filter
Is that true? NO normal way of implementing this? That sounds very discouraging... :(
[TurboGears] Dynamic template picking
Hi. I'm writing a Blog-site engine (http://turboblog.python-hosting.com), which supports multiple blogs, and I want to provide themeing ability per-blog. The problem is, I have a BlogController with different methods, which are exposed with 'html=turboblog.templates.methodname' What I wanted to do is to allow 'html=turboblog.templates.%s.methodname'%blog_theme Now here's the tricky part - blog_theme is bound to specific object. But the object is read INSIDE the method, so I cannot add it's param into the decorator. Is there any way to overcome this? If this is not clear enough, I'll provide an example code. Thanks in advance, Eli
[TurboGears] Re: Dynamic template picking
awesome! thanks alot.
[TurboGears] Re: whitspace being encoded as \t or \n
is there any progress on that? i have exactly the same problem in my project. but in quickstarted one - it doesn't happen! Wavy Davy wrote: On 23/01/06, David Stanek [EMAIL PROTECTED] wrote: On 1/22/06, Wavy Davy [EMAIL PROTECTED] wrote: So embedded tabs are translated in to two unicode character \ and t? The same for newlines? This seems odd, as html condenses white space. Is the a specific reason for this behaviour? It's not that they are two unicode characters. A '\n' represents a newline. Try typing 'print This is\twhat I\nmean.' into a interactive Python session. Attached is the input template file and the file I get when output. It is from a slightly modified quickstart project (Inserted tabs and newlines in the line containing the $now time reference). It is *two* seperate characters, a '\' (0x2f) and 't' (0x74) or 'n' (0x6e). in template tab char 0x09 = 0x2f + 0x74 in generated output in template newline char 0x0a = 0x2f + 0x6e in generated output Apologies if I haven't been clear. If I put a tab or newline in to the welcome text on a line containing a $var ref in, yes it does. I actually first noticed when using the toolbox widgets page, not my own application. I then noticed it in my stuff, having been using tg for a couple of months now, and never having seen anything like this before. Very interesting. I have not been able to duplicate this behavior. I have certainly not seen in before. It looks like it might be something to do with my setup. I am running Ubuntu Dapper development release, but it has been running on this before for some time without this problem. -- wavy davy True religion confronts earth with heaven and brings eternity to bear on time - A. W. Tozer Welcome to TurboGears #pageLogin { font-size: 10px; font-family: verdana; text-align: right; } Congratulations, your TurboGears application is running as of\tMon Jan 23 15:57:03 2006.\n\t Are you ready to Gear Up? Take the following steps to dive right in: *Edit your project's model.py to create SQLObjects representing the data you're working with *Edit your dev.cfg file to point to the database you'll be using *Run tg-admin sql create to create the tables in the database *Edit controllers.py to add the functionality to your webapp *Change the master.kid template to have the headers and footers for your application. *Change this template or create a new one to display your data *Repeat steps 4-6 until done. * *Profit!* If you haven't already, you might check out some of the documentation. Thanks for using TurboGears! See you on the mailing list and the turbogears channel on irc.freenode.org! [img] brBuild time: 0.197s, Page size: 1.69KB
[TurboGears] The \r \n problem
Hi there. I'm having a really bad TG day today :( Kid is misbehaving apparently, and escaping \r \t \n characters. Which lead to these effects: SCRIPT TYPE=text/javascript LANGUAGE=javascript\n\n function addtag(){\nt = prompt(please enter tag name:);\n . When the code really looks like: script language=javascript type=text/javascript ![CDATA[ function addtag(){ t = prompt(please enter tag name:); if(t){ window.location=/blog_admin/add_tag?bid=blog.id;tag=+t; } } ]] /script And for each JS file that I include, I get 'invalid charracter' error in the JS Console. I am really out of ideas here. I know this topic was debated before, but it didn't end with any solution, so I am trying to bump this up. Anyhow, I am using the latest trunk version of all components. Thanks in advance, Eli
[TurboGears] Re: The \r \n problem
well, I was rushing to blame Kid on this. I think something is wrong with my Ubuntu. every site I get into gets the same javascript error :( this is extremely weird. something with my libxml maybe? no idea ;( reflog wrote: Hi there. I'm having a really bad TG day today :( Kid is misbehaving apparently, and escaping \r \t \n characters. Which lead to these effects: SCRIPT TYPE=text/javascript LANGUAGE=javascript\n\n function addtag(){\nt = prompt(please enter tag name:);\n . When the code really looks like: script language=javascript type=text/javascript ![CDATA[ function addtag(){ t = prompt(please enter tag name:); if(t){ window.location=/blog_admin/add_tag?bid=blog.id;tag=+t; } } ]] /script And for each JS file that I include, I get 'invalid charracter' error in the JS Console. I am really out of ideas here. I know this topic was debated before, but it didn't end with any solution, so I am trying to bump this up. Anyhow, I am using the latest trunk version of all components. Thanks in advance, Eli
[TurboGears] Re: Trouble installing from nightly tarballs
install cherrypy from the thirdparty directory in svn of turbogears. it has the 2.2beta version that will work.
[TurboGears] Re: Open Source applications
I've set up the svn for turboblog as well, so you can take a peek: turboblog.python-hosting.com unfortunately i cannot afford a hosting for this (since this is a hobby project), so, no live site is available to show off the engine :(
[TurboGears] Re: Open Source applications
h1, h2, h3 { font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif; font-weight: bold; }
[TurboGears] Re: Open Source applications
actually it's incorrect to say that i'm using. the whole design it a copy (ripoff) of Wordpress's default theme by Kubrick.
[TurboGears] Re: No peak.security for 0.9
Hi. Dunno if this is this post related, but what's the best way to implement the 'subject' strategy that you pointed out? I have a situation where i have a permission 'can_admin' which allows to edit a part of the site, but I want another limitation on it, like 'can_admin and user == page.owner' Can it be done with current identity? Eli
[TurboGears] Re: No peak.security for 0.9
Yep, i feared so :) Thanks, Jeff.
[TurboGears] Re: constant crashes in 0.9dev
hm, ok. i'll keep an eye on it. eli
[TurboGears] problem using Identity on MySql
Hi. I don't know if this is Identity related prob, or I am doing something stupid, but when I added Identity support in my project, and tried adding this: a = std.identity.current or some call like in_group('admin') I get this: 500 Internal error Server got itself in trouble Traceback (most recent call last): File /usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py, line 271, in run main() File /usr/lib/python2.4/site-packages/CherryPy-2.1.0-py2.4.egg/cherrypy/_cphttptools.py, line 502, in main body = page_handler(*args, **cherrypy.request.paramMap) File /usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r403-py2.4.egg/turbogears/controllers.py, line 242, in newfunc html, *args, **kw) File /usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r403-py2.4.egg/turbogears/database.py, line 185, in run_with_transaction rollback_all() File /usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r403-py2.4.egg/turbogears/database.py, line 165, in rollback_all hub.rollback() File /usr/lib/python2.4/site-packages/TurboGears-0.9a0dev_r403-py2.4.egg/turbogears/database.py, line 79, in rollback self.threadingLocal.connection.rollback() File /usr/lib/python2.4/site-packages/SQLObject-0.7.0-py2.4.egg/sqlobject/dbconnection.py, line 772, in rollback self._connection.rollback() NotSupportedError: (1196, Warning: Some non-transactional changed tables couldn't be rolled back) any idea what's this all about?
[TurboGears] Re: problem using Identity on MySql
Ok, I'll check if I can use INNODB tables. Jeff, I think it is somehow related, because my app did hit exceptions before, but it never complained about transactions...
[TurboGears] Re: problem using Identity on MySql
As always - you guys are fast and swift with the solutions! Converting the tables to INNODB did the trick. Thanks alot. And to Kevin: I all for FOR the transactional databases. I just used to work with Postgres and didn't realise that this was default MySql behaviour. cheers, Eli
[TurboGears] Re: Model designer in recent svn not working
Keep up the great work, really glad to see it in the SVN!
[TurboGears] constant crashes in 0.9dev
Hi there. I've been working with the SVN version for a while now, but lately, around revision 380+ and till now, i get constant crashes of the project. I just do a couple of page-refreshes and I get: 127.0.0.1 - - [2005/12/28 22:31:05] GET /static/images/kubrickbgcolor.jpg HTTP/1.1 304 - 2005/12/28 22:31:05 HTTP INFO SystemExit raised: shutting down autoreloader 2005/12/28 22:31:05 HTTP INFO HTTP Server shut down any idea how can i track the problem? eli
[TurboGears] Re: Endless loop when restarting TG site
I've hit the same problem when trying to add the TinyMCE widget that was posted a while back on this list...
[TurboGears] Re: constant crashes in 0.9dev
Ok. 1) i am using linux. (ubuntu) 2) removing py:extends didn't affect the problem 3) removing the widgets call, i commented three lines: #from turbogears import widgets #from tinymce import TinyMCE comment_editor = None #widgets.TableForm([widgets.TextField(name), TinyMCE()]) this actually stabilized the project! I've refreshed the page 10 or so times - seems to be ok. hope this gets you on the right track. thanks in advance, eli
[TurboGears] Re: DataController and Relations?
Jeff, keep going with this, looks very promissing, something like that is highly anticipated (atleast by me :) ) eli
[TurboGears] Re: understanding DataController
Sorry, Kevin, I didn't quite understand... I am missing a trailing slash where? I am just using the controller, and these are the links that it generates... Am I in the wrong direction here?
[TurboGears] understanding DataController
Hi there. I've been working on adding an 'admin' part for my site, and since this involves some CRUD, i've tried using DataController for it. Now apparently I don't understand the whole concept, but here's how i tried using it: class AdminController(controllers.Root): blog = datacontroller.DataController(Blog) user = datacontroller.DataController(TG_User) now http://localhost:8080/admin/user displays a nice edit/view for for the sql class, but all links point to wrong urls, like: http://localhost:8080/admin/add http://localhost:8080/admin/1/edit http://localhost:8080/admin/1/delete am i missing something? thanks in advance, eli
[TurboGears] Re: patch to identity module to allow md5 and sha hashing of passwords
Nice stuff, i've done somthing similar with unix 'crypt' but this is done way cleaner. anyhow, it could be rather easy to secure things abit, and encrypt the password before transmittion using javascript clientside, there are implementations of sha and md5 in Dojo for example...
[TurboGears] Re: implemeting nested urls
thanks, i'll give it a spin tomorrow, see if it fits with my url scheme :) best regards, eli
[TurboGears] implemeting nested urls
Hi there. I've been breaking my head trying to implement a nested urls thingie, like: site.com/pages/32/add where pages would be a result of select, and 32 would link to a controller of pages. i've started hacking something in derection of: class BlogController(controllers.Root): def __init__(self): controllers.Root.__init__(self) for b in Page.select(): setattr(self, '%d'%b.id, self.show_page) @turbogears.expose(html=turboblog.templates.welcome) def show_page(self, pageid): return dict(p=pageid, tags=Tag.select()) class Root(controllers.Root): pages = BlogController() but didn't go far. can you please point me in correct direction? 10x, Eli
[TurboGears] Re: another success story
well, i can share the sources for the site, not the scanning part (it's somewhat proprietry), so if you're interested, drop me a direct email: [EMAIL PROTECTED]
[TurboGears] Re: logout for identity
according to the stack trace, your index method should accept *args, **kw parameters to later parse the passed data
[TurboGears] Re: high traffic
I'd second that aswell. I had excellent experience here reporting bugs and getting them fixed together ith the developers gives the project a very LIVE feel.
[TurboGears] Re: Identity Bug Fixed
Yep, works like a charm! Awesome work, Jeff.
[TurboGears] using authentication filter
Hi there. I've been struggling for two days now to make the authenticating session filter to work. I have a simple User (SQLobject), and Session (SQLobject), and I want to provide protected access to pages, based on sessionID without passing username/password all the time. Is there a complete example on how to do this? thanks in advance, Eli