Pages
Categories
Category Archives: Django
kääntää Deployed!
Edit: And of course, the obligatory Project Page entry here: http://www.pioverpi.net/projects/csc309-a3-kaantaa-translations/ Now that I’m done with exams I can start blogging and coding for fun again. Freedom! My first item on the tasklist was to deploy my CSC309 Django app (aka kääntää) on Bluehost. Google again was my friend, and I found a few resources [...]
Django Models and Templates
When doing web development, you tend to lose a lot of flexibility regardless of the framework that you’re working with. You end up doing things the “Django-way” or the “RoR-way”. That became painfully clear to me this weekend while I was working on my CSC309 assignment. The Model Let’s say that you have a model [...]
Also posted in Tech, python Tagged django, model, python, regroup, template, template tags Leave a comment
Unit Tests in Django
I’m going to talk a bit about some of the practices that I use for unit testing in Django. If you’re unfamiliar with the Django testing system, you can read up on it here: http://docs.djangoproject.com/en/dev/topics/testing/ In general, I organize my unit tests into folders (ref. Organizing Django Tests into Folders) so I can break them [...]
Organizing Django Tests into Folders
Update: Due to some strange Django error, Django will refuse to run your app’s tests if your application doesn’t have a models.py file. You’ll need to create an empty models.pyin your app’s folder if you don’t have one Django comes with a nice testing rig that lets you individually test each app. By using a [...]
AJAX Autocomplete for Cities in Django