Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/d/y/dycapo-HEAD/rest/management/commands/restifymodels.py   dycapo(Download)
            if location.point == 'posi':
                try:
                    person = server.models.Person.objects.get(location=location)
                    location.href = self.get_href("location_person_handler", [person.username])
                    location.save()

src/d/y/dycapo-HEAD/rest/wrappers/location.py   dycapo(Download)
                    return trip.locations.all()
            if username:
                person = server.models.Person.objects.get(username=username)
                result = server.common.getPosition(user,person)
                return rest.utils.extract_result_from_response(result)
                return location
            if username:
                person = server.models.Person.objects.get(username=username)
                result = server.common.getPosition(user,person)
                return rest.utils.extract_result_from_response(result)
        location = rest.utils.populate_object_from_dictionary(location, dict_location)
        try:
            person = server.models.Person.objects.get(username=username)
        except server.models.Person.DoesNotExist:
            return piston.utils.rc.NOT_FOUND

src/d/y/dycapo-HEAD/rest/wrappers/person.py   dycapo(Download)
        else:
            try:
                person = server.models.Person.objects.get(username=username)
                return person
            except server.models.Person.DoesNotExist:

src/d/y/dycapo-HEAD/rest/utils.py   dycapo(Download)
    try:
        return server.models.Person.objects.get(
                                         username=request.META['REMOTE_USER']
                                         )
    except (server.models.Person.DoesNotExist, KeyError):

src/d/y/dycapo-HEAD/authentication.py   dycapo(Download)
    def authenticate(self,username,password):
         # checks that the username is valid
        try:
            user = Person.objects.get(username=username)
        except Person.DoesNotExist: