May 13, 2008

Django, Sphinx, and full-text search

Filed under: cool, django, orm, search, tool — michaelangela @ 6:27 pm

This makes some interesting things possible. And it makes sense just looking at it. That’s even better. 🙂

Announcing django-sphinx 2.0.0 Full-text Search | David Cramer’s Blog

One of my tasks lately has been updating the django-sphinx
library to work with Sphinx 0.98, as it includes GIS components which
we have been wanting to possibly utilize on our new search engine. So
today, the conclusion of.. very few hours of work, I’d like to announce
2.0.0 of the Django integration.

The SphinxSearch manager has been completely
rewritten to rely strictly on the Python Sphinx API (a request from the
author of Sphinx), which means it should have much more compatibility
with newer versions in the future. I have also updated the querysets it
returns to work like normal Django QuerySet instances, to where they
clone themselves so you can fork your queryset into several different


May 9, 2008

DRM protected music from MSN music will stop working after August 31, 2008?!

Filed under: drm, microsoft, msn, playforsure, zune — michaelangela @ 5:27 pm

Whoa! Well I haven’t purchased any music from MSN music, but it’s… *shudder*. If you did, you have to find some way to get your music converted somehow if possible. Or don’t upgrade your computer, or change computers, of buy another computer and hope to play that music…

Essentially, every time you play the music, it checks if the current system you are own has already been “ok’d” by the MSN music servers. If it has, like your current computer, you can continue to play them after the deadline.

However, if you are on a new system, or a new device, or whatever, and you try to play your music that you purchased, it’ll try to check with the MSN music servers, as normal, but after the deadline those servers won’t be on. There will be no reply for your player, system, Windows Media Player, etc., and it’ll assume you have an illegal copy and that music will no longer be usable.

Is there no recourse?!

The day the music died [dive into mark]

This is a letter I sent to my father to explain what it means that Microsoft is pulling support for MSN Music.
Tech issues like this often bubble up into the media that he reads, but
they are rarely explained well. My father assumes I have an opinion on
such stories, and he is rarely wrong.

Actually, it is still technically in the future tense. The day the music dies will be August 31, 2008.

May 8, 2008

Django blogging apps…

Filed under: blog, django, tip — michaelangela @ 4:05 am

that are more or less ready to use. The list is at the following link.

Empty Thoughts: Django Blogging Apps

People ask about blogging apps for the Django platform all the time. I
have not investigated each and every one of these, but so far I still
feel pretty confident that not one of these is fully baked (although
some are getting close) in any sort of manner comparable to something
like WordPress or Typo. That said, there’s a lot of great code here, and if you’re not interested in creating your own, use one of the following.

Bash and Django – working together

Filed under: bash, cool, django, shell, shortcuts, tool — michaelangela @ 4:02 am

A note… definitely something to come back to.

Talk Funnel » Blog Archive » Django bash shell shortcuts

SmileyChris had a post up recently on setting up bash aliases for Django. He uses the classic alias command which works for one-line shortcuts. I got inspired to put mine up too, but if you want to do something more elaborate, bash gives you this handy scripting language along with ’shell commands’ so you can do something a bit more involved.

What I tried to do with these shortcuts was to create a set of
mini-commands that quickly do what you need to do when developing
Django. It might help someone out and squeeze an extra 2-3.5
microseconds each time you run a Django command. Hey, it all adds up.

May 7, 2008

Snippet to update Django tables to utf8

Filed under: cool, django, orm, python, snippet, tip, tool — michaelangela @ 11:54 pm

So you get the dreaded illegal mix of collations:

Pythoneer » Convert MySQL table to utf8

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)

What do you do? Not too bad fortunately. And if you’re working with Django, it’s a little bit easier. Launch the shell with python manage.py shell. Then in the shell do something like this:

from django.db import connection
cursor = connection.cursor()
cursor.execute('SHOW TABLES')
for row in cursor.fetchall(): results.append(row)
for row in results: cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' % (row[0]))

I’m sure this can be optimized a bit but it got the job done simply enough.

Full-text search for Django

Filed under: api, django, orm, tip — michaelangela @ 11:34 pm

Just making a note…

Extending Django’s database API to include full-text search (Mercurytide)

May 4, 2008

Flash Javascript combo upload script…

Filed under: dev, flash, tip, tool — michaelangela @ 6:11 am

Pretty cool. Just making a note of it.

SWFUpload News | SWFUpload

SWFUpload is a small JavaScript/Flash library to get the best of both worlds. It features the great upload capabilities of Flash and the accessibility and ease of HTML/CSS. See it in action….

* Upload multiple files at once by ctrl/shift-selecting in dialog
* Javascript callbacks on all events
* Get file information before upload starts
* Style upload elements with XHTML and css
* Display information while files are uploading using HTML
* No page reloads necessary
* Works on all platforms/browsers that has Flash support.
* Degrades gracefully to normal HTML upload form if Flash or javascript is unavailable
* Control filesize before upload starts
* Only display chosen filetypes in dialog
* Queue uploads, remove/add files before starting upload

May 1, 2008

Xcode and AS3 autocompletion

Filed under: as3, cool, tip, tool, xcode — michaelangela @ 9:34 pm

Just a tip. I loaded it but haven’t put it through it’s paces. But it’s still cool to have and XCode does syntax hilighting now. I am not sure if it did before.

Xcode actionscript3 code completion

As I really like to work with Xcode as my primary IDE, I created my own code completion for actionscript 2 and actionscript 3 with full code hinting. Get it here .

Create a free website or blog at WordPress.com.