Posts tagged 'Django'

Django/Ember Token Authentication

Authentication can be a real headache. Thankfully, Django REST Framework and Ember have taken care of the heavy-lifting already.

Django/Ember Authentication is Easy

[2013 Nov 29 Update]: This blog examines the use of session-based authentication. You may find token-based authentication more appropriate (as I have), in which case my more recent post will probably better suit your needs. Check out the latest

As I've previously explained, one of the biggest hurdles to ...

Authenticating Django/Ember

[2013 Sep 21 Update]: I've completely refactored this solution and have done a much better job of implementing it and explaining it. Check out the latest

The web app rage nowadays is to implement your backend as RESTfully as possible, and use Javascript frameworks to facilitate your controller and ...

Functional API Tests

Little is more frustrating than running your test suite and watching it fail fail fail because insert name here’s API service is lagging/down/changed/throttled. While knowing about those things has importance, the time to learn about them isn’t when you’re trying to deploy a completely ...

Previous/Next Navigation in Django CMS

I don't know why Django CMS doesn't have a built-in helper for navigating a page tree. Maybe this will be included in the upcoming 3.0 release (which I am very much looking forward to).

For now, here's a quick gist that will give you previous/next ...

Testing APIs in Django

I think anyone who has got their hands more than slightly wet with functional testing knows the pain of testing code that relies on API calls. The usual suspects can bring your tests to a screeching halt: your network is down, the API is down, the API changed. While knowing ...

From Django to GitHub Pages

I finally joined the cool club of hackers who host their blogs on GitHub Pages. I won't rave about the sheer awesomeness of using GitHub, Jekyll, and Markdown to write blogs because there are already about a hundred million other blogs out there doing just that. I will, though ...

"Testing in Django"

Writing tests and test-driven development has become all the rage lately; but before declaring assertions left and right, it's important to consider where, why, and how you will write your tests.

Different frameworks have different philosophies about how to go about this but, more often than not, developers tend ...

"Rails 'through' vs Django 'ManyToMany'"

Ok, Rails & company have a lot of great points--I love RSpec--but I've noticed a few areas where Rails can improve. Here, namely, I see a big difference in handling multiple relationships to self.

In Rails


class CreateRelationships < ActiveRecord::Migration
    def change
        create_table :relationships do |t ...

"Testing Management Commands"

I think to be a good Django citizen it would be appropriate to write tests ensuring that standard management commands work with your application. I thought of this after dealing with a certain app that doesn't handle loaddata very well.

Going forward, I'm adding this TestCase to all ...