This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('CampaignAccount', ['$scope', '$resource', function($scope, $resource) { | |
return $resource('/campaign_accounts/:id', { | |
id: '@id' | |
}, { | |
update: { | |
method: 'PATCH' | |
} | |
}); | |
}]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Form(web.form.Form, object): | |
def __init__(self, name, *inputs, **kw): | |
super(Form, self).__init__(*inputs, **kw) | |
self.name = name | |
def save_state(self): | |
session.forms[self.name] = dict( | |
notes = dict((i.name, i.note) for i in self.inputs if i.note ), | |
values = dict((i.name, i.get_value()) for i in self.inputs ), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import web | |
from controllers import blog | |
urls = ( | |
'/blog', blog.app | |
) | |
app = web.application(urls, locals()) | |
if __name__ == "__main__": |