Post archive for October, 2009
DRY Ajax Comments
Posted by on October 24, 2009.
Back in February, I posted an entry about adding Ajax functionality to the built-in comments app. I always intended to go back and improve this method, but didn't get the chance until now. Yesterday I decided to take another look, and I found a much better way of achieving this functionality without violating the DRY principal like I did originally. I've posted the code on Bitbucket as django-ajaxcomments, and I'm releasing it under the same BSD license that Django uses. The Problem With Copy & Paste In my original post, I copied the django.contrib.comments.views.comments.post_comment view and then modified certain pieces of it to return JSON instead so that the jQuery callback function could interpret the results. The problem with this is that the post_comment view has changed since then, and it will continue to change. If I continued to maintain the project as it was, I would have to watch ...
(click to read more) 14 comments so far
Switching from Linux to Mac
Embracing Minimalism Over the course of the last year, I've slowly gone through a major shift in my philosophy about technology and about life in general. I've begun to see the great value of minimalism, and as a result I've begun to strive for elegant simplicity. For a long time, I've almost obsessively tinkered with my computer setup, both software and hardware. I have been a long time Linux user, and as soon as I got a stable setup I'd always be eager to update to the latest alpha or daily build so that I could get things working again. With web development, I would often start a project and get excited about it, and then start another one at the same time, and then another. In my personal life, I would get interested in something and I would pursue it 110% - spending hours perfecting guitar solos, writing fiction, ...
Categories
By Month
- November, 2009
- October, 2009
- August, 2009
- April, 2009
- March, 2009
- February, 2009
- December, 2008
- November, 2008
- October, 2008
- September, 2008
By Year
Atom Feeds
Latest Comments
-
-posted by hokOffillaCal on Easily Working With Pinax on Multiple Machines, 1 day, 11 hours ago
-
-posted by test on DRY Ajax Comments, 2 weeks ago
-
-posted by test on DRY Ajax Comments, 2 weeks ago
-
-posted by srn on DRY Ajax Comments, 1 month, 1 week ago
-
-posted by Brandon Konkle on DRY Ajax Comments, 4 months ago