Commits

Anonymous committed 5e7b513

last bit for session support.

Comments (0)

Files changed (2)

friendpaste/dbsession.py

 
     def load(self, instance, id):
         db = self.bind.db
-        instance.load(db, id)
+        return instance.load(db, id)
 
     def store(self, instance):
         db = self.bind.db

friendpaste/paste/views.py

     return render_response('paste/index.html', form=form)
 
 def edit_snippet(request, id):
-    s = Snippet.load(local.application.db, id)
+    s = couchdb_proxy.load(Snippet, id)
     if not s:
         raise NotFound
     form = PasteForm(request.form, prefix='paste', **{
     if 'rss+xml' in mimetypes:
         return view_rss(request, id)
     elif 'application/json' in mimetypes and request.method=='PUT':
-        s = Snippet.load(local.application.db, id)
+        s = couchdb_proxy.store(Snippet, id)
         d=json.loads(request.data)
         old_revid = s.revid
         print d.get('snippet')