/*global define*/
define(['lodash'], function(_) {
    'use strict';
    var ClusterService = function(Restangular) {
        var restangular = Restangular.withConfig(function(RestangularConfigurer) {
            RestangularConfigurer.setBaseUrl('/api/v2');
        });
        var restangularFull = Restangular.withConfig(function(RestangularConfigurer) {
            RestangularConfigurer.setBaseUrl('/api/v2').setFullResponse(true);
        });
        var Service = function() {
            this.restangular = restangular;
            this.restangularFull = restangularFull;
        };
        Service.prototype = _.extend(Service.prototype, {
            initialize: function() {
                var self = this;
                return this.getList().then(function(clusters) {
                    var cluster = _.first(clusters);
                    self.clusterId = cluster.id;
                    self.clusterModel = cluster;
                });
            },
            getList: function() {
                return this.restangular.all('cluster').getList().then(function(clusters) {
                    return clusters;
                });
            },
            get: function(id) {
                return this.cluster(id).get().then(function(cluster) {
                    return cluster;
                });
            },
            cluster: function(id) {
                if (id === undefined) {
                    id = this.clusterId;
                }
                return this.restangular.one('cluster', id);
            },
            clusterFull: function(id) {
                if (id === undefined) {
                    id = this.clusterId;
                }
                return this.restangularFull.one('cluster', id);
            }
        });
        return new Service();
    };
    return ['Restangular', ClusterService];
});

@@ -107,24 +107,511 @@
 tangular) %7B%0A
+        var djangoPaginationResponseExtractor = function(response /*, operation, what, url */ ) %7B%0A            if (response.count && response.results) %7B%0A                var newResponse = response.results;%0A                newResponse.pagnation = %7B%0A                    next: response.next,%0A                    previous: response.previous,%0A                    count: response.count%0A                %7D;%0A                return newResponse;%0A            %7D%0A            return response;%0A        %7D;%0A
         var 
@@ -736,16 +736,72 @@
 api/v2')
+.setResponseExtractor(djangoPaginationResponseExtractor)
 ;%0A      
@@ -970,16 +970,72 @@
 se(true)
+.setResponseExtractor(djangoPaginationResponseExtractor)
 ;%0A      
@@ -2374,30 +2374,37 @@
 %7D);%0A        
-return
+var service =
  new Service
@@ -2407,16 +2407,97 @@
 vice();%0A
+        service.initialize = _.once(service.initialize);%0A        return service;%0A
     %7D;%0A 

Add code to handle django pagnation