Django community: Community blog posts RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Manipulating IPv4 and IPv6 addresses in python
Eighteen months ago, after many years of programming in perl for most of my systems programming needs, I decided to give python a go after much coaxing by a colleague, Alec Thomas. At the time I had started developing an IP address management system, designed for ISPs/Telcos who need to manage hundreds of address blocks and allocations to customers and internal infrastructure. I did a quick -
Awesome Talk by Adrian Holovaty at Vancouver Python User Group
Adrian Holovaty gave a talk to the Vancouver Python User's Group tonight. Really nice, funny presentation. His plane was late so while we waited for him we watched his talk at Snakes and Rubies. He showed us some of the new features coming in Django. The neatest thing for me was this new thing he's been working on called "databrowse". It's really awesome. Also the forms stuff is a lot nicer now in the newforms library. Someone asked about migration with Django and how to modify the schema once your app is up and running. It was neat to watch him add a column to his database and watch how he did it. It's unbelievable how many apps this guy has written and with Django it is so fast. Some of the stuff he has been doing for the Washington Post is pretty cool. -
Awesome Talk by Adrian Holovaty at Vancouver Python User Group
Adrian Holovaty gave a talk to the Vancouver Python User's Group tonight. Really nice, funny presentation. His plane was late so while we waited for him we watched his talk at Snakes and Rubies. He showed us some of the new features coming in Django. The neatest thing for me was this new thing he's been working on called "databrowse". It's really awesome. Also the forms stuff is a lot nicer now in the newforms library. Someone asked about migration with Django and how to modify the schema once your app is up and running. It was neat to watch him add a column to his database and watch how he did it. It's unbelievable how many apps this guy has written and with Django it is so fast. Some of the stuff he has been doing for the Washington Post is pretty cool. -
Improving performance of Dojo-based web applications
Introduction Web 2.0 brought on us an onslaught of new server-side web frameworks, and made it OK to put some code on the client side as well. Yes, I am talking about Ajax. While elements of Ajax were available (and used) for a long time now, 2005 was the crucial year for this relatively old technology fueled by proliferation of modern browsers with proper support of JavaScript and HTML DOM, which, in turn, gave a rise to numerous Ajax toolkits. As always new exciting technology polarizes people — you can find ardent supporters of Ajax and a booing horde of naysayers. The latter crowd points out real and imaginary problems with Ajax. Some problems are real enough but stem from a misuse of the technology. One of them is a performance of a web application. In this article I will show how to improve a performance of a web application with Ajax and how to optimize an Ajax web application. Specifically I will show how to optimize a Dojo-based high-performance web application. I will use Django and Apache as examples of a server environment. Design of a modern web application In order to improve the overall performance of a web … -
Improving performance of Dojo-based web applications
Introduction Web 2.0 brought on us an onslaught of new server-side web frameworks, and made it OK to put some code on the client side as well. Yes, I am talking about Ajax. While elements of Ajax were available (and used) for a long time now, 2005 was the crucial year for this relatively old technology fueled by proliferation of modern browsers with proper support of JavaScript and HTML DOM, which, in turn, gave a rise to numerous Ajax toolkits. As always new exciting technology polarizes people — you can find ardent supporters of Ajax and a booing horde of naysayers. The latter crowd points out real and imaginary problems with Ajax. Some problems are real enough but stem from a misuse of the technology. One of them is a performance of a web application. In this article I will show how to improve a performance of a web application with Ajax and how to optimize an Ajax web application. Specifically I will show how to optimize a Dojo-based high-performance web application. I will use Django and Apache as examples of a server environment. Design of a modern web application In order to improve the overall performance of a web … -
Adrian Holovaty Talk and Django Jam in Vancouver
This Sunday, the Vancouver/Zope User's Group (maybe the Zope part should be removed? sorry guys) is having a "Django Jam", a hands-on session where you can see how to create some simple applications or perhaps here some people talk about things they have developed in Django. Unfortunately the two applications I am working on are immature right now and I don't have a laptop, but I'll be there checking out what other people have done. Tuesday is even more exciting as Adrian Holovaty, the lead Django developer/founder is going to give a talk to the Python User's group while he is in town for another conference. If you are interested in web frameworks (especially simple ones done in a cool language) come and check it out. Vancouver DjangoJam. Full invite text follows: Django is the Python-based web framework used at companies like Google, the Washington Post and St. Joseph Media (publishers of Canadian Life magazine). "Vandjangojam" is a great opportunity to learn Django or learn more about it. In addition to a quick introduction to Django, the jam will feature a Q&A; session with the lead programmer of it. ---- Introduction to The Django Web Framework : Sunday, February 4, … -
Adrian Holovaty Talk and Django Jam in Vancouver
This Sunday, the Vancouver/Zope User's Group (maybe the Zope part should be removed? sorry guys) is having a "Django Jam", a hands-on session where you can see how to create some simple applications or perhaps here some people talk about things they have developed in Django. Unfortunately the two applications I am working on are immature right now and I don't have a laptop, but I'll be there checking out what other people have done. Tuesday is even more exciting as Adrian Holovaty, the lead Django developer/founder is going to give a talk to the Python User's group while he is in town for another conference. If you are interested in web frameworks (especially simple ones done in a cool language) come and check it out. Vancouver DjangoJam. Full invite text follows: Django is the Python-based web framework used at companies like Google, the Washington Post and St. Joseph Media (publishers of Canadian Life magazine). "Vandjangojam" is a great opportunity to learn Django or learn more about it. In addition to a quick introduction to Django, the jam will feature a Q&A; session with the lead programmer of it. ---- Introduction to The Django Web Framework : Sunday, February 4, … -
Mount an SSH Connection in OS X
Google’s Amit Singh released MacFUSE, a Mac-centric interpretation of FUSE. From the project website: MacFUSE implements a mechanism that makes ... -
Fried Chicken
I’ve been trying to make outstanding fried chicken for about four years, and I think I’ve finally got it. I don’t mean to toot my own horn, but I just made the best damn fried chicken I’ve ever had, and it wasn’t even all that hard. If you like the crispy stuff and aren’t afraid of phrases like “heat a quart of oil to 375°”, read on… Hardware You’ll need some gadgets to pull this off: -
Django on Accelerators
We’ve setup two clients plus ourselves on TextDrive Accelerators. For those not in the know, TextDrive Accelerators are Sun Solaris ... -
All I want to do is convert my schema!
I’m working on a django in which I want to store GPS track information in GPX format. The bests way to store that in django is with an XMLField. An XMLField is basically just a TextField with validation via a RELAX NG Compact schema. There is a schema for GPX. Great! The schema is an XSD though, but that’s okay, it’s a schema for XML so it should be pretty easy to just convert that to RELAX NG compact, right? Wrong. I pulled out my handy dandy schema swiss army knife, Trang but was shocked to find out that while it can handle Relax NG (both verbose and compact), DTD, and an XML file as input and even XSD as an output, there was just no way that I was going to be able to coax it to read an XSD. Trang is one of those things (much like Jing that I rely on pretty heavily that hasn’t been updated in years. That scares me a bit, but I keep on using ‘em. With Trang out of the picture, I struck out with various google searches (which doesn’t happen very often). Jacob was kind enough to point me at the … -
Blog Spam Protection
I currently manually review and delete comment spam every few days. It doesn't take long, it's just frustrating. When you regularly repeat an action over a long period of time, you begin to notice patterns of action. What I've noticed is that most comment spam is being posted to older blog posts - most likely due to their higher number of in-links, and I'm guessing higher google page rank. To this end, what I've done is add a method to my blog Post model, which checks the post date and, if it's within the defined timeframe, will return 'True'. My Post detail template now checks this method and only displays the form when appropriate. The first file to change is your blog applications models.py. At the top of the file add this import statement to bring in the 'datetime' module and required tools: from datetime import datetime, timedelta Next, in the same file, add the following method to your 'Post' class (just after the 'body' field is fine): def allow_comments(self): return (self.date + timedelta(21)) > datetime.now() Lastly, open up your blog detail template and replace the existing call to {% free_comment_form ... %} with: {% if object.allow_comments %} {% free_comment_form … -
Blog Spam Protection
I currently manually review and delete comment spam every few days. It doesn't take long, it's just frustrating. When you regularly repeat an action over a long period of time, you begin to notice patterns of action. What I've noticed is that most comment spam is being posted to older … -
Small Django tips from one newbie to another
I am a Django newbie: I have gotten my feet wet exploring Django and have started building my first serious application with it. I am having more fun with Django than I have had with any other software tool in a long time, and I would like to share a few things I have learned along the way so far, that might help other newbies. If you are a more experienced Django-neer reading this and notice areas for improvement or outright mistakes, I would be very grateful for the feedback. -
Hacking Django, how Bazaar
A short while ago, I went on a mission to find a better way to hack Django. I needed a way to keep my patches organized and updated. So, in this article I discuss my experiences with a tool I found to help me achieve these goals… Enter Bazaar, one of the several distributed version [...] -
New Cuker Design site, powered by Django
I wanted to mention that we’ve completed (as of about a month ago) the new Cuker Design Website using Django. ... -
Pardon the Dust
Sorry about the short outage there. I finally consolidated the various co-location, shared hosting, and virtual private hosting services that I was consuming every month in to one VPS account. I still have some legacy URLs to do some rewrite magic for, but the archives back to 2002 is here. Because my new box is very Django-oriented, I am now running WordPress via PHP5 (FastCGI) and MySQL5 on lighttpd behind perlbal. One of the things I really enjoyed about the move from WordPress on Apache with a really gnarly .htaccess file for URL rewriting to lighttpd was the simplicity of it all. Getting WordPress to “just work” for me on lighttpd was as simple as adding a 404 handler for the site: server.error-handler-404 = "/index.php?error=404" Everything should be smoothing out shortly and of course the eventual goal is to move this blog over to Django trunk. I did just that a few months ago but I need to revisit the code, find the importer, and give it a lot of layout love. -
Django on dreamhost problem
***Update*** Looking around I found this post that puts forward what is a much better solution. It suggests renaming django.fcgi to dispatch.fcgi because dreamhost has a policy of not killing things called dispatch.fcgi. I’ve updated the dreamhost wiki page on django to mention this. What’s below is my old solution: Primary problem My mum’s site [...] -
Skype3 i polski czat dla Railsów, Django i Pylonsa
Nowy Skype 3 wprowadza małą rewolucję w stos. do poprzedniej wersji. Można nie tylko rozmawiać, ale pograć w szachy, kółko i krzyżyk i inne gry (są b. ładnie zrobione we Flashu 9). Można nagrywać rozmowy na dysk. Można tworzyć publiczne czaty. I właśnie w tej sprawie piszę ten tekst bo stworzyłem polski czat dla miłośników frameworków Ruby on Rails, Django i Pylons. Wygodniej jest czasem skonsultować coś w czasie rzeczywistym niż na grupie czy forum dyskusyjnym. -
URGENT: Upgrade Django if Deployed via FastCGI
I found a serious vulnerability within the Django implementation of Flup and reported it to the security team. As of ... -
Long time, no post
Wow, it has been half a year since this site was up. It used to be that I hosted this site ( and all of the other crazy sites I have ) out of a spare bedroom. That server room was host to anywhere between 4 and 12 computers at any given time. I generated a lot of noise, and a lot of heat. When we decided to move, I shut everything down and put the servers in storage so that the room could be made more presentable. Wow, our energy bills dropped by more than $80 per month at that point. And the room became much more inhabitable. Now that we've moved into our new home, I'm reticent to put it all back in place, so instead of that, I'm experimenting with Xen. Xen is an open source virtualization project similar to vmware of parallels, but only for linux. At this point I've got a virtual machine, which you are using right now that is running in boulder. Post to Del.icio.us -
Requiring a Login for an Entire Django Powered Site Redux
In an earlier post I had some Django middleware that requires users to be authenticated to use the app. If ... -
The Pareto principle (Or, why the 80/20 rule always bites us in the ass)
This rant bought to you by yet another unfinished project. As hard as you work to avoid it, there seems to be no way to avoid the good old 80/20 rule. It seems that no matter what you're working on, 80% of the work takes 20% of the time, and the remaining 20% of the work takes (at least) 80% of the remaining time on the project. The '80/20 rule', as it's commonly known, is an implentation of the Pareto Principle, originally conceived by observing that 80% of income in italy was received by 20% of the Italian population. (Source: Wikipedia). In software development this is very visible. It doesn't take a developer long to get a working mock-up online, complete with a basic interface and the most important functionality. But one can almost guarantee that this mock-up will not include some small yet important features that a public, commercial product requires if it's to be used by the masses. I'm a big fan of Django. But I'm also annoyed at the way it lets us emphasise Pareto's principles. Rapid Web Application Development is the current 'in thing' - using Django or Ruby on Rails, one can get a basic … -
The Pareto principle (Or, why the 80/20 rule always bites us in the ass)
This rant bought to you by yet another unfinished project. As hard as you work to avoid it, there seems to be no way to avoid the good old 80/20 rule. It seems that no matter what you're working on, 80% of the work takes 20% of the time … -
Running Django SVN? Update your Flup!
Every couple of days or so I update my Django src directory to the svn trunk. I find it to ...