Changeset 1507:6edaa6b22268
- Timestamp:
- 03/09/10 21:20:34 (5 months ago)
- Author:
- Ferllings <cedric@…>
- Branch:
- default
- Message:
-
merge
- Location:
- src/domogik/ui/djangodomo/core
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1506
|
r1507
|
|
| 219 | 219 | class Accounts(pipes.DmgPipe): |
| 220 | 220 | uri = "http://127.0.0.1:8080/account" |
| 221 | | |
| | 221 | |
| | 222 | @staticmethod |
| | 223 | def Auth(login, password): |
| | 224 | resp = Accounts.objects.get({'parameters':"auth/" + login + "/" + password}) |
| | 225 | if resp : |
| | 226 | return resp |
| | 227 | |
| 222 | 228 | @staticmethod |
| 223 | 229 | def getAllUsers(): |
| … |
… |
|
| 225 | 231 | if resp : |
| 226 | 232 | return resp |
| 227 | | |
| 228 | | @staticmethod |
| 229 | | def Auth(login, password): |
| 230 | | resp = Accounts.objects.get({'parameters':"auth/" + login + "/" + password}) |
| 231 | | if resp : |
| 232 | | return resp |
| | 233 | |
| | 234 | @staticmethod |
| | 235 | def getAllPeoples(): |
| | 236 | resp = Accounts.objects.get({'parameters':"person/list/"}) |
| | 237 | if resp : |
| | 238 | return resp |
-
|
r1506
|
r1507
|
|
| 319 | 319 | try: |
| 320 | 320 | resultAllAccounts = Accounts.getAllUsers() |
| | 321 | resultAllPeoples = Accounts.getAllPeoples() |
| 321 | 322 | except ResourceNotAvailableException: |
| 322 | 323 | return render_to_response('error/ResourceNotAvailableException.html') |
| … |
… |
|
| 329 | 330 | status=status, |
| 330 | 331 | msg=msg, |
| 331 | | accounts_list=resultAllAccounts.account |
| | 332 | accounts_list=resultAllAccounts.account, |
| | 333 | peoples_list=resultAllPeoples.person |
| 332 | 334 | ) |
| 333 | 335 | |