December 2009
8 posts
4 tags
Where Have All The Good DatePickers Gone?
Is it just me, or is it hard to find a good jQuery-based date picker? Or maybe I’m just picky. The widget needs to support selecting a date range (there goes most of them). And it needs to be able to support configuring a starting and ending time. And it has to support Themeroller (there goes whatever few remained). So as it seems is starting to become a norm for me, I’m working on...
Dec 19th
1 note
3 tags
Using Google's jQuery CDN with Django when not in...
I wanted to transition the Django site I work with primarily to use Google’s jQuery CDN. However, when developing locally, it’s often faster to just use a local copy. What I wanted was a way to toggle which copy of jQuery was being used based on the environment. Environment Detection Before we can toggle the jQuery location, we need to have a way to detect which environment...
Dec 11th
1 note
3 tags
How can I create a page that regularly updates...
It seems this question has been coming up a lot on Stack Overflow, and I wrote a pretty lengthy response which I’ll include here. The original question is #1883266. Q: I’m building a web application that needs to have content on the page updated in real time without a page refresh (like a chat or messaging application). How do I do this with Django? In other words, how do I use AJAX...
Dec 10th
2 tags
Efficiently View Apache Log Files on Windows
One of the annoying things about using multiple platforms is when one platform has a useful utility (no matter how small) and the other platform doesn’t. Have you ever needed to regularly check an Apache log file on your Windows development machine? The shell user inside me says “just tail it”… but this is Windows. However, I just found a really amazing tool called...
Dec 8th
1 note
2 tags
Time for Python Neenjah!
I happened upon an administrative assistant today who was renaming files using Windows Explorer. She had a folder with about 50 or so sub-folders, many of which contained sub-folders of their own. Every file needed to be renamed with the company name prefixing it. So for example, the file “january-charts.pdf” needed to be renamed to “Company - january-charts.pdf”....
Dec 8th
3 tags
MarkEdit in Django
Being primarily a Django developer, it was only a matter of time until MarkEdit came with Django integration. I added to the GitHub repo today a simple app which provides a widget that renders MarkEdit through Django. It’s probably a bit more difficult to use than the jQuery plugin because it makes some assumptions about your Django configuration and usage (as do many Django apps). In any...
Dec 4th
2 tags
MarkEdit Moved to GitHub
I have relocated the MarkEdit repository to GitHub to give it more community accessibility. The GitHub repo now also includes an improved wiki. MarkEdit now has it’s own project page, also hosted by GitHub: http://tstone.github.com/jquery-markedit/ The project page finally puts a working demo online (along with 4 other advanced demos, showing some of MarkEdit’s flexibility).
Dec 4th
2 tags
IE TextRanges, Selections, and Carriage Returns
I spent several hours this week trying to track down a bug with programmatically selecting text via javascript. if (textarea.setSelectionRange) { // Set selection for Mozilla-ish browsers textarea.setSelectionRange(start, end); } else { // Set selection for IE var range = textarea.createTextRange(); range.collapse(true); range.moveEnd('character', start); range.moveStart('character',...
Dec 3rd