Changeset 1507:6edaa6b22268

Show
Ignore:
Timestamp:
03/09/10 21:20:34 (5 months ago)
Author:
Ferllings <cedric@…>
Branch:
default
Message:

merge

Location:
src/domogik/ui/djangodomo/core
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • src/domogik/ui/djangodomo/core/models.py

    r1506 r1507  
    219219class Accounts(pipes.DmgPipe): 
    220220    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         
    222228    @staticmethod 
    223229    def getAllUsers(): 
     
    225231        if resp : 
    226232            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   
  • src/domogik/ui/djangodomo/core/views.py

    r1506 r1507  
    319319    try: 
    320320        resultAllAccounts = Accounts.getAllUsers() 
     321        resultAllPeoples = Accounts.getAllPeoples() 
    321322    except ResourceNotAvailableException: 
    322323        return render_to_response('error/ResourceNotAvailableException.html') 
     
    329330        status=status, 
    330331        msg=msg, 
    331         accounts_list=resultAllAccounts.account 
     332        accounts_list=resultAllAccounts.account, 
     333        peoples_list=resultAllPeoples.person 
    332334    ) 
    333335