Category Archives: Django

AJAX Autocomplete for Cities in Django

If you’re building a webapp that has user registration, you’ll probably want to keep track of various tidbits of user information such as: username, e-mail,  city, country etc. Designing the registration page to take in a user’s name and e-mail is easy, just give them an input box and let them type whatever they want [...]
Also posted in Tech | Tagged , , , , , , | Leave a comment

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 [...]
Also posted in Tech, UofT, python | Tagged , , , , | Leave a comment

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 , , , , , | 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 [...]
Also posted in Tech | Tagged , , , , | Leave a comment

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 [...]
Also posted in Tech, python | Tagged , , , | 4 Comments