One of the big downfalls of storing bits of templates in your database is that you're limited to HTML/CSS/JavaScript. Individuals editing flatpages can't use template filters or other bits of Django's awesome templating language. Usually this doesn't make much sense, but for one CMS use-case (linking to other pages by identifier and not hard-coding their URL), it could make a big different. In that vein, Kyle Fox posted a comment on my post about django-chunks and mentioned that he had developed a template tag that allows individuals to insert Django templating language into Flatpages (and chunks!) This tag will let ...
I just whipped together another really simple Django application I call django-google-analytics that simplifies the process of inserting Google Analytics tags into your Django projects. Why did I create this? I manage a lot of Django projects that present slightly-different forms to users depending on the site/domain they're visiting. There's also a bunch of custom submission code that differs from form to form, but that's neither here nor there. I need different Google Analytics codes depending on the sites and after sticking these tags into every single template, I thought it would be cool to be able to manage these ...
Here's another one that I've yanked out of a project. I call it RestrictMiddlware and it is a real simple, and really easily bypassed "security" mechanism. Like most security, it's just security theater, but some clients make it so hard to enable true security that you've got to resort to this type of stuff. As a warning, I'd really emphasize that you shouldn't ever use this type of access restriction on any site that contains truly secure, private, or sensitive material. Use strong user logins or better. This is the RestrictMiddleware and you just pop it into your Django settings.py ...
I've built an impressively simple and basic reusable Django application in the process of creating a mini-CMS for a client. It's called django-chunks and it's really nothing more than a model and a template tag. By adding chunks to your installed apps list in your Django project and performing a ./manage.py syncdb, you'll be able to add as many "keyed" bits of content chunks to your site. The idea here is that you can create a chunk of content, name it with a unique key (for example: home_page_left_bottom) and then you can call this content from a normal template. Why ...
I'm putting this out there because I can see there's a need for it. Disqus, which I mentioned in my previous post, has a couple of methods of integration. The method I chose, the quick and dirty route, is to insert a chunk of JavaScript in certain places on your blog that injects comment counts, a comment thread, and a comment box into your page. On the other side, is a great potential for true integration with your custom blog or site. Disqus has a fairly full featured API: All API methods accept their parameters in the query string of ...
I fixed a bug in my Google Reader feed processor that was making some of the stuff I shared through Google Reader lose the actual content (except for title and link). So if you follow my link blog through any of the RSS feeds on this site, you should start to notice that they're much cooler now ;) I also cleaned up the middle sidebar you see on the home page of the site by separating out Tweets, songs, and links into their own lists. So now I list the 5 most recent tweets, 5 most recent songs, and the ...
Here's a quick question to the Django people following my blog, and one I think will be a huge help to individuals attempting to perform something similar. I'm currently working on a project that could make use of Nathan Borror's excellent django-basic-places and django-basic-people applications. I'm loving them so far, and getting a lot done. However, one thing that I would like to do is allow for a Person to be associated as an "owner" of a place. If I were writing all of these as a cohesive application, I would add an ForeignKey field to the Place model and ...
I know the going is slow here. I've been doing a lot more nerd blogging over on our Stone Ward Interactive blog. So if you're into web development and other technical subjects, check it out!
Yes, Jacqui and I are heading south this March. To Austin, Texas for South by Southwest, or SXSW as the kids say. A lot of really cool people from all over the country who also happen to be friends are going too. I am also excited to be attending my first conference in a long time where I am not media. That means I can have fun, enjoy things, learn stuff, goof around with friends, stay up as late as I want, and get a pony for Christmas too! For those who may not know exactly what South by Southwest ...
A great post by John Resig, the lead developer of jQuery. The pbWiki guys did an excellent analysis of many different Javascript libraries and there are a few takeaways that web developers should note. On the subject of compressing your Javascript files: Looking at the speed of loading jQuery in three forms: normal, minified (using Yahoo Min), and packed (using Packer). By order of file size, packed is the smallest, then minifed, then normal. However, the packed version has an overhead: It must be uncompressed, on the client-side, using a JavaScript decompression algorithm. This unpacking has a tangible cost in ...
Jeremiah Owyan, an analyst at Forrester Research has a post titled "What to do when web developers get stale?" A seasoned web developer that knows Jeremiah expressed his frustration at the seemingly quickening pace of the web development eco-sphere. This web developer had been programming and developing websites for nearly 10 years, but admitted he was having a very hard time keeping up with the younger faster developers that knew the new languages. Jeremiah suggested that the individual in question try and move into a more business / production role. That was probably a good suggestion, but it's not the ...
Just thought I'd post here and let everyone know that I signed up for PyCon this evening. PyCon is the biggest Python Conference (and perhaps the only, who knows?). The coolest thing is that PyCon is taking place in Chicago for 2008 and 2009! Yay! I will only be attending for the conferences on Friday afternoon and the weekend and mostly for the web/Django related stuff. Also, just to meet people who I've only interacted with online. Those are the best parts about going to conferences.
by Clint Ecker