Skip to main content

Posts

Showing posts from January, 2012

ANN: Django Better Cache 0.5.1 with expanded docs

I've made a small incremental release on Django Better Cache, adding a from_miss() method to handle cache misses in CacheModel objects. Now, you can define your cache model and how it initializes data when the cache is empty, and perform all your lookups through the CacheModel, expecting misses to auto-populate for you. You can see a quick example of the new functionality below, but I have also made large improvements to the documentation hosted over at ReadTheDocs , so go read the full docs right now, if you are interested. from bettercache.objects import CacheModel from django.contrib import auth class User(CacheModel): username = Key() email = Field() full_name = Field() def from_miss(self, username): user = auth.models.User.objects.get(username=username) self.email = user.email self.full_name = user.get_full_name() If this get() does not find the object in the cache, it will create a new User instance and call from_miss() wit

ANN: straight.plugin 1.3 released - with docs!

I think it is worth a new release to announce that I have documented straight.plugin and published the docs to ReadTheDocs. I hope this will help anyone who has had trouble parsing my terse README file, and will improve adoption of the project in the future. Check out the new code and the new docs .

A little trick for wide pages

We have wide monitors and our reading doesn't tend to like wide text very well. This is why newspapers have lots of narrow columns, rather than stretch each story across the entire width of the paper. Not all websites follow this tip, so drag this to your bookmark toolbar and squeeze the margin in 100px at a time, until you can read more naturally. >squeeze!< Yes, I could resize my window, but the same width isn't right for all pages, and most are padded or have sidebars. This is good when you only need some of the pages you have open to be narrower than the rest.

ANN: Django Better Cache 0.5 Released

I am announcing the release of Django Better Cache 0.5 today. This release includes a move to sphinx as a documentation tool and a new component, the bettercache.objects module, which provides a lite ORM-like interface for caching data. Please read the full, but short documentation over at Read The Docs for details on the bettercache {% cache %} tag and the bettercache.objects ORM, and have a much easier time with your caching needs. Here is just a quick example of the new cache models, from the docs: class User ( CacheModel ): username = Key () email = Field () full_name = Field () user = User ( username = 'bob' , email = 'bob@hotmail.com' , full_name = 'Bob T Fredrick' , ) user . save () ... user = User . get ( username = 'bob' ) user . email == 'bob@hotmail.com' user . full_name == 'Bob T Fredrick'

Leaving Google AppEngine

@ironfroggy Calvin Spealman I can use AWS and work on technological engineering issues, or appengine and work on price-ological engineering issues. :-/ 10 Jan   via  TweetDeck   Maybe I should take myself seriously when I said this. In the past few months, I've barely done any feature or bug work on JournaApp, because it takes my limited time and energy just keeping myself under quota when I'm the only   user of the app . I can't keep that up and keep my sanity, and it is honestly an emotionally draining exercise. This is creating a toxin that affects everything I do, so I'm going to take it out of my life. I don't know if I'll port JournalApp or not. I like it, it has been fun and useful, but I'll probably take project notes in Evernote from here on forward, and on paper again. I miss paper.