Django comes with some awesome CLI tools. Manage.py is a beast of magic and lore. And it loves the fantastical kingdom of Heroku, where is romps with merry measure twixt the ether. But, when I’ve tried to go through a dumpdata of a previous site, syncdb on a migration to Heroku, and loaddata for moving the data, I’ve run into a snag on django_content_type_app_label_key more than once. Here are some resolutions.
Django’s manage.py script comes with some great utilitarian commands. Two of my favorites are dumpdata and loaddata. I’ve used these commands recently to migrate a Django app’s data to the same Django app now running on Heroku. Here’s a little taste of the glory.
Jquery, Ajax, Json, Django – this is quite a laundry list of technologies. In fact, it’s pretty much the whole stack: client tech, server requests, over-the-network data format, and a backend app server. In the following slidedeck and example code, we’re going to touch on the whole stack and not get too deep into any one area. By the end, you should be able to at least have a grasp of what technologies one can use in an Ajax Django application, a little bit of what they’re capable of, and then, hopefully, a list in your brain that you can go back, reference, and then drill into specific technologies when you want to go build something similar yourself.
Here is a “new and shiney” presentation for running Django on Jython. It’s based on my experiences with the DjangoJython tutorial.
As is discussed in the slide deck, and hence the subtitle of the presentation, much could be helped by more careful reading of documentation. Well, moments ago, I decided that I hadn’t checked out django-jython 1.1. Well…. turns out many more problems could have been helped by using this later version. Sweet!
At Sort 2009, a technical conference at the LDS Church, I gave a presentation on my favorite all-in-one web framework, Django. It’s a great tool, and here’s a look at the slides produced to accompany my presentation. Also, checkout bitbucket for the source code for the demo project.
django-admin.py is a utility script that is used by django to start projects, etc. Sometimes, it seems that it’s available to me in the terminal. At other times, it melts away, unavailable. So, where is it, and how do I make it findable?
In software development, be dry, and define data once. But, what if that data needs to be used in many places? This is the case with parts of a web page, for instance, that are common to many different pages. Django has a great mechanism for this: it is context processors.
The amount of content on the blog and its pages has become substantial (in length only) enough to make it a worthwhile idea to paginate it (spread the content over multiple pages). Django makes it very easy! There are some nice objects available for paginating.
I really need an answer to this question. Why? Because I was, until recently, on the verge of shutting down the comments on the site because of the load of blog spam that I was receiving. It was insufferable. But, luckily, Django came to my rescue again and made a potential solution very pain-free – except for one problem.