Category archives: Pony

Rainbows and web services and Django... Oh my! RSS

RSS feed of Pony

Save/Restore for Django "Embedded" Apps

So we have a lot of Django-based code where we'd like the user to be able to download a (subset of) the Django database as a "config file", then upload that "config file" to some number of other machines (or the original one), potentially long after the database has been migrated. I've got ...

Continue reading

React.js with Django

So I've been doing a spike test with a project where I'm trying to use React.js to build a front-end to a Django application. The bulk of this application is basic Django forms, posts, page-loads, etc. but there's a number of complex views for scheduling, content uploading etc. As of now ...

Continue reading

Uploading GBs to Django

As some may remember, one of our products involves the user posting very large (multiple GB) files. Previously we've been using an nginx extension that does a direct-to-disk streaming decode during an upload, but that extension isn't available in newer nginx (which we'd like to have available in order to take advantage ...

Continue reading

pip/pytz fails with 1.4 and 2013b

We happened to be building a new build server today, and one of the steps in the process is to install packages.  We download all of the packages to local disk in one step (pip install --download ${packages}), then install them in the next step (pip install --no-index --find-links ${packages}).  Thing is, while pytz downloaded ...

Continue reading

Defaulting a POINT to GeoIP

So you added a totally cool and gnarly view that lets the user specify a POINT on a map (and text coordinates), and then two more to let them view and explore them.  Your users should love you forever... but those dratted users are complaining that the default location is off in the Atlantic ocean ...

Continue reading

Metaclasses, what are they good for...

A question was asked at the Django Toronto meetup during the metaclasses talk, basically, "what would you use this for"... so, here's my talk on Metaclasses [pdf] from a PyCon of the Python 2.2 era, which addressed that question at some length (the first half of the presentation). It doesn't secifically mention ...

Continue reading

olwidget show features in the window

So now you've got your spiffy textual-entry-of-GPS-coordinates-and-map admin GUI and you're wanting to actually let people see your "features" on a map.  olwidget has an InfoMap() which is basically a Map + a single InfoLayer, but it uses a static set of "info" rather than a dynamically updating set. Here's how to hack ...

Continue reading

olwidget templates...

If you are using olwidget to get your geodjango editing up-and-running fast, and you want your users to be able to enter the GPS coordinates textually, as well as via the map, then yay, I've already gone through the pain for you.  Here is a hacky way to get synchronized text-field and map entry ...

Continue reading

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