Vanity URLs for Django Projects Using django-vanityurls
I've just yesterday released a small open source project, which I hope may be of use to somebody out there. I'm already using it on MusicLiveCOLCHESTER, so at least I know it works!
It's a Django app named django-vanityurls. It's pretty simple and lets you set up short, memorable vanity URLs for your site via the Django admin.
It's just a hobby, but with any such project, I try to take a professional approach, so there is 100% test coverage and brief but comprehensive documentation. Feel free to have a look:
- The django-vanityurls project page on PyPI, the Python Package Index
- The django-vanityurls documentation on Read the Docs
- The django-vanityurls source code repository on Github
I'll write a bit more about another of my projects, django-wikiwikiweb, in due course, but that will take a bit longer to describe.
Read more »Update 2024: Still Not Much to See Here
If you can see this, then you're looking at a hastily cobbled-together rewrite of the site using Python+Django. In the time since I last looked at these pages, apparently Zend Framework is no longer an ongoing project. It is an ex-framework. So I've migrated away from the legacy server I had for it.
If you like, I'd be flattered if you were to have a look at one or two of my other projects:
- MusicLiveColchester - comprehensive live music listings for the town I now live in
- django-wikiwikiweb - a Django almost-clone of the original c2 wiki
- Three Hundred Songs - some words about some songs
- All my other junk on GitHub
I don't anticipate much new activity on this site soon, but you never know.
Cheers,
Simon
Blogging Elsewhere
I appreciate it's been a little quiet around here for some time, for whatever reason. In general I just don't spend so much non-work time thinking about programming and other technical matters any more, which is probably healthy.
But if you simply must read more of my ramblings, you'll be delighted to know I'm actively blogging in at least two other places.
My work blogging cryptic crossword solutions and commentary at Fifteensquared continues apace and with pride, even after nearly five years. My posts are clustered around the weekends, and cover the various Independent crosswords, including the Beelzebub advanced cryptic, which I'm pleased to have reintroduced to Fifteensquared some time ago.
Over at Three Hundred Beers, I'm also writing about another favourite pastime: beer. I'm working my way through Roger Protz's renowned book, 300 Beers to Try Before You Die, and jotting down a few thoughts on each beer as I go.
Cheers!
Read more »Contractors: Setting Up a Limited Company is not "Tax Efficient"
Over the last few months I've made the transition from full-time employment, to self-employment, and finally to working through my own limited company. If nothing else, this should make my next tax return particularly interesting.
Forming a limited company to invoice through is fairly common practice for contractors, not least because there is a perception that it's more tax efficient to do so. In fact it's more than a perception: it's a widely-held belief, which is repeated time and time again. It's also completely and utterly untrue.
Let's get this straight: for the average contractor there are absolutely no tax savings to be made by forming a limited company.
Read more »Your Mobile Phone Number is not Safe with your Mobile Operator
There has been a lot of fuss today about mobile network O2 handing out the mobile numbers of its customers to websites that they visit.
That's clearly an unfortunate occurrence, and O2 users as well as the web in general were understandably outraged. But what surprised me was not that it happened at all, it was the fact that the public really don't understand quite how widely it was happening already.
Read more »Some Thoughts on PHP's DateTime, Object Mutability and an Alternative Implementation
I'm beginning think that while the introduction of PHP's newish DateTime
object is very welcome, its implementation is one of the big missed opportunities in the language. This is because the decision was taken to make it mutable. In essence, DateTime has been implemented as an Entity rather than a Value Object.
Namechecked in the Independent Cryptic Crossword - Thanks, Anax!
I really struggled with today's Independent cryptic crossword by Anax, and didn't come close to completing it, let alone spotting this.
So it's only just now that I've learned that hidden away in the completed grid were the names of virtually all of the Independent bloggers at Fifteensquared.
And there I am at 21 across:
A rather humbling turn of events, I must say. It's not every day that one gets mentioned, however cryptically, in a national broadsheet. So many thanks to Anax, and maybe I'll persist in trying to finish one of your puzzles for a change!
Read more »Johann Hari on the "Swingeing Cuts" - Essential Reading for the People of Britain
If you live in Britain, you need to read this. Even if you just live on this planet it's still ten minutes well spent. Writing in The Independent today, Johann Hari provides the clearest overview I've yet seen of why Cameron/Osborne's economic policy - that of "swingeing cuts" - is deeply ill-advised, is vindictive and will ultimately be disastrous for Britain.
Johann Hari: Britain Just Became a Colder, Crueller Country - and for Nothing.
I'm no expert in economics - I barely scraped an A-level in the subject - but even I can see just how wrong the policy is: decades ago John Maynard Keynes taught us how to survive a recession. Similar cuts in Britain in 1918, and more recently in Ireland, have shown us how not to, in spectacular fashion. Bewilderingly, Cameron and Osborne have chosen the latter route.
Once you're done with Johann's article, and if you're interested in a little more of the economic theory behind the state we're in, then I can recommend reading Robert Skidelsky. His Future Generations Will Curse Us for Cutting in a Slump and By George, He Hasn't Got It: What Would JM Keynes Think of George Osborne's Budget? are particularly apposite.
For a lengthier read, Skidelsky's eloquent biography of Keynes, named Keynes: The Return of the Master, is a skilful relation of Keynesian theory to the current crisis, in fairly layman-friendly terms.
You may be pleased to hear that I'm unlikely to blog on the subject of economics a great deal in future, but I feel pretty strongly about all of this at the moment. Perhaps that's partly because, as a left-leaning liberal, I'm incensed that my vote has been misappropriated to help allow this to happen. But that's another story.
Read more »MongoDB Support for Tera-WURFL
This is just a quick heads up to point out that Tera-WURFL now has support for using MongoDB as its data store. This is particularly exciting for me, since I contributed the original code. I've been benefiting from Tera-WURFL for years now, so it's pleasing that our ongoing migration to MongoDB at work provided an opportunity to give something back.
Read more »Getting Started With Stored Procedures in MongoDB
My most exciting technical discovery this year has been MongoDB. Mongo is proving to be a very satisfying solution to a lot of problems, so I'll no doubt be mentioning it here many times in the near future.
MongoDB has support for stored procedures, which is great, but as a newcomer, I found it wasn't entirely obvious how to get started. I also found that the typically quite excellent MongoDB documentation tended to fall short on examples of the specific things I had trouble with. So here's a quick writeup of getting stored procs up-and-running in MongoDB.
Read more »