Showing posts from June, 2010

Integrating hurry.resource into BFG

Back in PyCon APAC last week I was introduced to hurry.resource by its author, which is also one of the founder behind Grok , Martijn Faassen. So, what does it do?. Read Here Lets go to the fun part Setting Up Assuming you are using one of the default BFG templates First, enable ZCA . (or just do this in ): ... config = Configurator(root_factory=get_root, settings=settings) config.hook_zca() config.begin() ... Do this little modification on the get_root function in from repoze.bfg.interfaces import IRequest def get_root(request): request.registry.registerUtility(request,provided=IRequest) return root Add some component codes, name the file from hurry.resource.interfaces import ICurrentNeededInclusions from hurry.resource.interfaces import ILibraryUrl from zope.interface import implements,implementer from zope.component import getUtility,adapter from hurry.resource import NeededInclusions from repoze.bfg.interfaces imp

"They'll realize that they're different."

Quote from JDrama CHANGE . Episode 5 Keita Asakura I'm sorry for being arrogant. I used to be a grade school teacher. Last year, I was in charge of the fifth graders. Anyway, they fight quite often. But some of them become spiteful and then sometimes it leads to bullying. When those problems arise, I would tell them, "Let's think." "You're in the same class, so when there's something you don't like or you're not satisfied of, then tell them properly, and listen to them properly." "Then let's think thoroughly. Then..." Gunji They'll understand each other. Keita Asakura No. They'll realize that they're different. Since we think we're all alike, we get mad when we get contradicted. When someone acts different, we think "What the heck?" That's when fights and bullying begin. But no two people are alike.