Commit 56ff07222b77820fba89b5c45f68f1c3f0457618

Authored by Luan
1 parent a5b13f2c

Updating open-data

Showing 1 changed file with 7 additions and 7 deletions   Show diff stats
src/templates/open-data.html
... ... @@ -39,7 +39,7 @@
39 39 {% trans "Fields" %}: <i>user, address and real_name</i>
40 40 <p><strong>{% trans "The address field is not shown for user's privacy, but you can use it to filter" %}</strong></p>
41 41 <ul>
42   - <li><i>user</i> - {% trans "It's a relation to the user described above" %}</li>
  42 + <li><i>user</i> - {% trans "It has a relationshop with the user described above" %}</li>
43 43 <li><i>address</i> - {% trans "An email address" %}</li>
44 44 <li><i>real_name</i> - {% trans "The user's real name" %}</li>
45 45 </ul>
... ... @@ -49,7 +49,7 @@
49 49 <strong><a href="{{ BASE_API_URL }}message/">message</a></strong>:
50 50 {% trans "Fields" %}: <i>from_address, body, id, received_time and subject</i>
51 51 <ul>
52   - <li><i>from_address</i> - {% trans "It's a relation with the emailaddress described above" %}</li>
  52 + <li><i>from_address</i> - {% trans "It has a relationship with the emailaddress described above" %}</li>
53 53 <li><i>body</i> - {% trans "The message's body" %}</li>
54 54 <li><i>subject</i> - {% trans "The message's subject" %}</li>
55 55 <li><i>id</i> - {% trans "The message's id" %}</li>
... ... @@ -126,16 +126,16 @@
126 126 <p><i>...{{ BASE_API_URL }}wiki/?name={% trans "WikiName" %}</i></p>
127 127 <p>{% trans "Where &quot;name&quot; is the fieldname and &quot;WikiName&quot; is the value you want to filter." %}</p>
128 128 <h4>{% trans "Usage" %}</h4>
129   - <p>{% trans "You can also filter using Django lookup fields as below" %}</p>
  129 + <p>{% trans "You can also filter using Django lookup fields with the double underscores, just as below" %}</p>
130 130 <p><i>...{{ BASE_API_URL }}wiki/?wiki_text__startswith={% trans "Wiki" %}</i></p>
131 131 <p><i>...{{ BASE_API_URL }}ticket/?author__endswith={% trans "test" %}</i></p>
132 132 <p><i>...{{ BASE_API_URL }}message/?body__contains={% trans "test" %}</i></p>
133   - <h4>{% trans "Usage with related models" %}</h4>
134   - <p>{% trans "You can use related fields to filter too. So, you can filter by any field of emailaddress using the 'from_address' field of message, which has a relation to emailaddress. You will achieve the relation fields by using double underscore and the field's name. See the example below" %}</p>
  133 + <h4>{% trans "Usage with relationships" %}</h4>
  134 + <p>{% trans "You can use related fields to filter too. So, you can filter by any field of emailaddress using the 'from_address' field of message, which has a relation to emailaddress. You will achieve the related fields by using double underscore and the field's name. See the example below" %}</p>
135 135 <p><i>...{{ BASE_API_URL }}message/?from_address__real_name__contains=Name</i></p>
136   - <p>{% trans "So, real_name is a field of emailaddress, and you had access to this field by a message field called from_address and using double underscore to say you want to use a field of that relation" %}</p>
  136 + <p>{% trans "So, real_name is a field of emailaddress, and you had access to this field by a message field called from_address and using double underscore to say you want to use a field of that relationship" %}</p>
137 137 <p><strong>{% trans "Note: email filters must be exact. Which means that __contains, __startswith, __endswith and others won't work" %}</strong></p>
138   - <p>{% trans "Another example of usage with relations to retrieve all messages of a given username or email" %}</p>
  138 + <p>{% trans "Another example of usage with relations. Used to retrieve all messages of a given user, using the username or the email field" %}</p>
139 139 <p><i>...{{ BASE_API_URL }}message/?from_address__user__username=username</i></p>
140 140 <p><i>...{{ BASE_API_URL }}message/?from_address__user__email=usermailexample@host.com</i></p>
141 141 </li>
... ...