Questions tagged as 'django-rest-framework'

0
answers

Which web service python to use in an application using knockoutjs?

I need to create a web service in python for my Django application. My application was built using django and knockoutjs, however I do not use models or forms, I use the ko.observable knockout. I thought of using django Rest_Framework, but it us...
asked by 10.09.2015 / 15:46
1
answer

Django-rest pass validations in two fields

How to retrieve values from html elements in a custom validation with Django-rest? How would django-rest be similar to the code below? def clean(self): password1 = self.cleaned_data.get('password1') password2 = self.cleaned_data.get...
asked by 05.01.2016 / 20:38
2
answers

Query that feeds grid and subgrid? [closed]

How to, for example, generate: Autor 1 +-- Livro 1 +-- Livro 2 Autor 2 +-- Livro 3 +-- Livro 4 using django-rest-framework? This in one query only? I searched for it with query and details .. but not exactly like this ..: /     
asked by 13.12.2013 / 14:07
1
answer

How to submit a post using Django Rest Framework and Angular.js

How do I submit a post on Angular? I did a test here and required to report to PK: index.controller('EditController', function($scope, $http) { $scope.save = function() { var in_data = { name: $scope.Job.name, description: $scope.Job.descr...
asked by 01.05.2014 / 22:45
0
answers

Django 2.0.9 - Upload file and send by email

I'm new to Django and I'm creating a web environment that sends emails. I can send the email without the attachment, however I need to include attachment. I'm using the form with the FILE FIELD field, but when I send the email the following erro...
asked by 28.10.2018 / 15:27
0
answers

Django-rest-framework update user from another user

I need to change users from another user. But when I call serializer.save () it is not saved in the database and does not display an error. My user model: class User(AbstractBaseUser, PermissionsMixin): class Meta: db_table='emp...
asked by 06.01.2018 / 04:49
2
answers

Django Rest compare user id 'sector' id with publication 'sector' id

Well, I'm messing with an API and I want it to return the content only when the user sector is the same as the publishing sector. Publications API: The user has a sector field also equal to this, and I am already getting the id of th...
asked by 11.09.2017 / 02:57
0
answers

How to get nested rest?

I have classes Pessoas , Profissoes , ProfissoesPessoa and QualificacoesProfissoesPesssoa In theory, my Models are as follows: # -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.model...
asked by 25.03.2016 / 20:15
1
answer

Django Rest Framework with Images

Well I'm still studying this framework, I researched a little tried some ways but they did not work. Error:    'UnboundLocalError at / api / services / 1 / local variable' Service '   referenced before assignment ' Code: Serializer...
asked by 26.07.2018 / 05:24
1
answer

How to use the token to validate the login of a Django Rest Framework user

Hello, I'm kind of lost as a user authentication by django-rest-framework, I was following the CodingEntrepreneurs channel tutorial in Blog API 32 video ( link ) it explains how to do user authentication via token with django-rest-jwt, but I fou...
asked by 03.09.2017 / 18:30