Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

small changes to README

  • Loading branch information...
commit 7716a12180fd6bdfa68f9c1bf01f369176d8964c 1 parent 52fa805
Christo Crampton toast38coza authored

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. +5 2 README.mkd
7 README.mkd
Source Rendered
@@ -96,12 +96,15 @@ You can then send a POST to:
96 96
97 97 You can also add you own custom methods to a ModelEndpoint. Adhoc methods in a ModelEndpoint observe the same rules as the get(), update() and delete() methods - with the noticable exception that self.pk _may_ not be set.
98 98
99   -For example, you could add a method called `about` that will list all the Categories available (not actually a good idea in real life):
  99 +For example, you could add a method called `about` that will display some info about the Model or Record (just used for illustration: not actually a good idea in real life):
100 100
101 101 import ajax
102 102 from my_app.models import Category
103 103
104 104 class CategoryEndpoint(ajax.endpoints.ModelEndpoint):
  105 +
  106 + ...
  107 +
105 108 def about(self,request):
106 109 pk = self.pk
107 110 if pk:
@@ -109,7 +112,7 @@ For example, you could add a method called `about` that will list all the Catego
109 112 else:
110 113 return {"message" : "run an operation on model: %s"%self.model.__name__}
111 114
112   -This would now be available at:
  115 +Now, in addition to the endpoints above, this method would be available at:
113 116
114 117 * `/ajax/my_app/category/about.json` - would return "run an operation on model: ..."
115 118

0 comments on commit 7716a12

Please sign in to comment.
Something went wrong with that request. Please try again.