Archives June 2013

GeoDjango is Pretty Straightforward

Doing some trivial GeoDjango today.  All was pretty straightforward, though the tutorial didn't cover how to add PostGIS to an existing DB (you just run the same commands you'd use to create the template against the existing DB, but it needs to be as a DB superuser, so it won't go into ...

Continue reading

Okay, spammers, you win

I was just going through and deleting your dozens or hundreds of posts a day using django admin interface, but drat it, you're posting way too many comments and that was taking too long.  You wore me down, so I wrote a stupid little view to kill your comments en-mass.  You win, you wasted ...

Continue reading

Save/Restore for Embedded Django?

So you've embedded Django in your product lines and you want to provide a save/restore function.  You, of course, are using South migrations, and since you're agile, you often wind up with schema modifications as requirements change.  Since you're managing a lot of products, you want whatever solution you use to ...

Continue reading

Single Artefact Deployment

The first talk at Django Toronto was on Wave's single artefact deployment mechanism.  Basically it's the Fussy Firmware Packager, but without the signatures.  We use Fussy to be able to send/provide customers with (signed) images that can be loaded on (potentially disconnected) machines (through their web interfaces).

The images include a built ...

Continue reading

Linux Refuses to See the HDMI

My talk at Django Toronto was scuttled by my computer refusing to recognize the HDMI (complained about a checksum failure when the HDMI was plugged in) and the further failure of the VirtualBox image to get onto the network so I could use another machine.  We spent all of the prep time trying to get ...

Continue reading

avahi-daemon just works for hostname.local

So I wanted to set up my demo to be available at a friendly local URL when I run it tomorrow, so I decided to check out how avahi is doing these days.

sudo aptitude install avahi-server

Then edit /etc/avahi/avahi-daemon.conf

host-name=<yourhostname>

Restart avahi and your server will show up as <yourhostname ...

Continue reading

You got Video in my Django at Django Toronto

Realized this morning that I offered to do a quick talk on how to get video running on your web-site at the Django Toronto tomorrow.  So I've put together a small demonstration that shows creating HLS and RTMP streams (using nginx-rtmp), and a quick demo showing how to push to the server using a ...

Continue reading

Fail2ban + Django convenient format

You want to use Django auth failures to generate fail2ban bans to protect against brute-forcing of your passwords. Nothing on django packages... So, you: wrap your login handler with a decorator that logs out messages on failures...

def log_login_failures( function ):
    auth_log = logging.getLogger( 'django.auth' )
    @wraps(function)
    def wrapped( request, *args, **named ):
        result = function( request ...

Continue reading

Do I really need 0-copy?

Nginx Upload Module's key feature/optimization is that as nginx streams the multipart post to disk, it directs the embedded files directly to separate file handles, you can then just move those files to the final location.  So far everything I've seen to replace it has at least a couple of copies going ...

Continue reading

Nginx upload module

Nginx has an upload module (in the nginx-extra package, not in the nginx-full one) that is very nice when you want to allow users to upload large files (think multi-GB video files).  The way it works is that you define a location to which posts may be made where the post may contain an upload ...

Continue reading

Daily archives

Previous month

May 2013

Next month

July 2013

Archives