submission api, briefcase api - api endpoints, closes #263

closes #263 
OK, the reassignment of a var with the same name is what seems a bit
unclear, but that's fine then
On Sep 19, 2014 4:09 PM, "ukanga" <notifications@github.com> wrote:

> In onadata/apps/api/viewsets/briefcase_api.py:
>
> > +        if instances.count():
> > +            last_instance = instances[instances.count() - 1]
> > +            self.resumptionCursor = last_instance.pk
> > +        elif instances.count() == 0 and cursor:
> > +            self.resumptionCursor = cursor
> > +        else:
> > +            self.resumptionCursor = 0
> > +
> > +        return instances
> > +
> > +    def create(self, request, *args, **kwargs):
> > +        xform_def = request.FILES.get('form_def_file', None)
> > +        response_status = status.HTTP_201_CREATED
> > +        username = kwargs.get('username')
> > +        form_user = username and get_object_or_404(User, username=username)
> > +        form_user = form_user or request.user
>
> It flows to the next line, seemed not that readable, trying to avoid that.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/onaio/onadata/pull/563/files#r17806435>.
>