Quantcast
Channel: Nomad Journey
Browsing latest articles
Browse All 20 View Live

Using Django templates with jQuery AJAX

I recently discovered a neat way of displaying data retrieved using jQuery AJAX in concert with Django’s template engine. You can create a view in Django which simply uses the render_to_response...

View Article



Django Gotcha: Never set a variable called ‘user’ in your RequestContext

Okay. So I was working on some view code in a Django project and I noticed something weird. The view started rendering as if the user was no longer logged in. Odd thing was that it was only doing that...

View Article

Using svn:externals for external Django module dependencies

After working on building a fairly complex Django application for the last year or so, I have ended up using a few of the open source Django modules that are out there. Why re-invent the wheel after...

View Article

UUID template tag for Django

A while back, I had posted a template tag on djangosnippets which generates UUIDs on the fly. I figured that I’d share the same snippet here and explain why I did it. My rationale for writing this: I...

View Article

jQuery minitabs plugin 1.0 released

The jQUery minitabs plugin allows the quick and easy creation of tabbed widgets anywhere on a page. The plugin includes a detailed example and sample CSS to get you started. The plugin supports:...

View Article


Dallas Django 1.1 Sprint

Djangonauts of Dallas rejoice! We are joining forces to have our very first Django Sprint event for the upcoming 1.1 release. For more info: When: Saturday, April 18, 2009 at 9:00am to Sunday, April...

View Article

CloudBerry: Freeware tool for S3 and CloudFront

I was searching for some information on S3 and CloudFront and found this little gem mentioned in a comment on a discussion forum somewhere. CloudBerry Explorer makes managing files in Amazon S3 storage...

View Article

Database independent Django queries: COALESCE vs. NVL, IFNULL, ISNULL

Most of the time, it is not necessary to write raw SQL from Django. However, there are cases where it can’t be avoided. One common pattern in SQL that always comes up is to check two fields and get the...

View Article


Dynamic Django queries (or why kwargs is your friend)

A very easy way to dynamically build queries in Django is to use Python kwargs (keyword arguments). Let’s say we have a model that looks something like this: class Entry( models.Model ): user =...

View Article


Customized comment notifications from Django

I recently had to implement a way to send notifications (using the excellent django-notification app developed by James Tauber) to users whose content is commented on in my Django web app. However, I...

View Article

Windows 7, 64-bit Python and easy_install

I recently downloaded and installed Windows 7 RTM on my laptop. I upgraded from 32-bit XP to a 64-bit flavor of Windows 7. I decided to install a 64-bit version of Python to take advantage of the 6GB...

View Article

Go to top of page using jQuery

This one liner jQuery snippet will force your browser to go to the top of your page: $('html, body').animate({ scrollTop: 0 }, 0); If you want to add some smooth scrolling: $('html, body').animate({...

View Article

Designing user interfaces with Balsamiq Mockups For Desktop

As a web developer, it can be quite time consuming to meticulously code complex pages with HTML and CSS. What’s worse is to invest a lot of time doing that and then realizing that your precious layout...

View Article


rxvt – A better console for Cygwin

I have been using xterm on Cygwin/X for a long time now. I love the fact that you can have a native X Windows server running on Windows with xterm and all the X11 goodies. However, since upgrading to...

View Article

Setting up your own Hadoop cluster with Cloudera distro for EC2

Installing Prerequisites Before you begin, figure out what distro you are on (if you don’t already know) by issuing this command from the shell: lsb_release -c For my set up, I used Ubuntu 8.04.3 LTS...

View Article


Splitting up Django models

Sometimes it makes sense to split up your Django models for a specific application across multiple files instead of having all of them in one models.py file. This allows for easier and simpler code...

View Article

Suppressing MySQL/MySQLdb warning messages from Python

Here is a quick three line snippet that will suppress all of those annoying warning messages from MySQL when using MySQLdb: from warnings import filterwarnings import MySQLdb as Database...

View Article


Enabling color directory listings in Mac OS X Terminal

Add these two lines to your ~/.bash_profile to enable color in OS X Terminal: export CLICOLOR=1 export LSCOLORS=ExFxCxDxBxegedabagacad For more reference: ls(1) Mac OS X Manual Page

View Article

Crouching Dallas, Hidden Startups

Bradley Joyce over at 3#Labs wrote a nice piece about a problem facing the startup scene in the Dallas-area: We have have a lot of tech talent in Dallas, just not startup talent. I’d like to point out...

View Article

Returning HTTP responses with django-tastypie

Here at MutualMind, we’ve built our REST developer API using the excellent django-tastypie framework. Once you understand the basic request/response cycle as mentioned in the documentation, it takes...

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images