If you are wondering how one could possible improve the already awesome Django admin, you probably aren't an admin-junky... yet. While Django admin app is pretty good as it is, it can certainly use lots of improvements. Here I will show you three of the admin enhancements that I simply can't live without.
/dev/blog
Stuff that won't fit in my memory
2013-04-27
2013-04-19
PyCharm Python IDE, first impressions
I've always been an avid Vim fan and user. I've got a vimrc file the length of my leg, and a few megs of plugins. But there's always been something that bothered me in Vim, and that's the lack of good code completion facilities for Python. Sure you have Ropevim, and all that, but that never quite cut it for me. From time to time, I'd enviously look at different IDEs like Eclipse with PyDev or Aptana Studio (yes, that's more or less identical to Eclipse with PyDev, I know), PyCharm... Ah, PyCharm. It really made my day.
2013-04-12
Django SEO and social media metadata with django-meta
SEO and social media are an important part of doing business online. Although metadata are just one part of the story, they are indispensable when it comes to proper positioning of your Django site on the Web. Unfortunately, valid HTML is still quite far from being able to convey all the concepts that you publish on the Internet, and we still have to rely in metadata and semantic markup like schemas to let search engines and social sites know what our content is about. django-meta is my first attempt at making the task of adding metadata to your site a bit easier.
django-meta takes care of two things for you. It renders the classic meta description and keywords, and also renders the OpenGraph protocol meta tags (OG tags). In this post, I will give you a short overview of django-meta. I won't go into too much detail, since the app is (hopefully) well documented.
Testing pluggable Django apps
Testing Django apps is not as straightforward as testing whole Django projects. After all, Django apps are meant to be part of a project, and they cannot survive on their own. So how do you go about it? There are many ways to do it (as usual), ranging from testing only the parts that aren't related to Django, to scaffolding whole Django projects just for the purpose of testing.
Here I will show you how to write a simple script that would allow you to run test suites for pluggable apps without having to scaffold entire projects, while still allowing you to have a full Django environment akin to ones in which you'd run your apps. I find this method to be the most maintainable and easiest to understand.
2013-02-26
South migration with dynamically generated data
When you add a new non-null field in Django models, and you use South to migrate the schema, it usually gives you two options: either add the default value for the field, or use a simple one-off value as default. This works as far as the new field is non-unique. If you are dealing with unique fields, you cannot provide a simple one-off value because it would immediately cause the uniqueness constraint to be broken, and having a default value for a unique field doesn't make any sense. Fortunately, South migrations are written in Python, and it's trivial to add custom dynamically generated data. This post will demonstrate the process of adding a unique slug field to an existing model and migrating the schema using customized migration.
2013-02-15
Steam for Linux: full Steam ahead
Nobody can deny that Valve is serious about Steam for Linux after recent Half Life series and Counter Strike releases for the platform. Valve obviously wants to push this with even more intensity. Indeed, today's featured item is a big Tux with a cake, and 50% to 70% off on all Linux games.
2013-02-14
Simple trick for managing JavaScript brackets in Vim
There are many ways to handle JavaScript brackets and braces in Vim, including autoclosing using plugins. In some cases, though, that is simply not enough. I will show you a few snippets you can insert into your ~/.vimrc to make things a bit easier in some situations.
