mirror of
https://github.com/nikdoof/test-auth.git
synced 2026-01-30 16:08:14 +00:00
api_status_description now provides english description of API key status
This commit is contained in:
@@ -39,6 +39,12 @@ class EVEAccount(EVEAPIModel):
|
|||||||
verbose_name="API Status",
|
verbose_name="API Status",
|
||||||
help_text="End result of the last attempt at updating this object from the API.")
|
help_text="End result of the last attempt at updating this object from the API.")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def api_status_description(self):
|
||||||
|
for choice in API_STATUS_CHOICES:
|
||||||
|
if choice[0] == self.api_status:
|
||||||
|
return choice[1]
|
||||||
|
|
||||||
def in_corp(self, corpid):
|
def in_corp(self, corpid):
|
||||||
for char in self.characters.all():
|
for char in self.characters.all():
|
||||||
if char.corporation_id == corpid:
|
if char.corporation_id == corpid:
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ setup.</p>
|
|||||||
<tr><td>{{ acc.api_user_id }}</td>
|
<tr><td>{{ acc.api_user_id }}</td>
|
||||||
<td>{{ acc.api_key }}</td>
|
<td>{{ acc.api_key }}</td>
|
||||||
<td>{{ acc.description }}</td>
|
<td>{{ acc.description }}</td>
|
||||||
<td>{{ acc.api_status }}</td>
|
<td>{{ acc.api_status_description }}</td>
|
||||||
<td><a href="/profile/del/eveapi/{{ acc.api_user_id }}/">Delete</a></td>
|
<td><a href="/profile/del/eveapi/{{ acc.api_user_id }}/">Delete</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user