Questions tagged as 'djangorestframework'

2
answers

Django Rest Framework without styles or scripts

Once I have the API working, when I enter the graphical environment ( domain.com/API ) of tests I get no styles, meaning that all < a href="/ questions / tagged / css" class="post-tag" title = 'show questions with the tag "css"'> css and the...
asked by 11.05.2016 / 15:45
3
answers

Django REST Framework Serializing models that have fields / relationships ForeignKey and ManyToManyFields

The challenge of this question is clear from the update 2 which is the current state of it, you can read it full to understand its context if you want :) I have the following model that I want to serialize to expose via REST class Rehab...
asked by 08.03.2016 / 17:25
1
answer

How can I reuse the django permissions in django rest framework?

I have already asked this question and it can be a song but I hope that someone will help me, I am currently doing a project with django restframework, in which I will have two groups (Teachers, Students, School) and these already have their per...
asked by 24.05.2016 / 00:24
1
answer

Django REST Multiple Models (base_name & queryset) error

I am trying to use the Django REST Multiple Models and I have created the models and the viewset. But when trying to enter the url of the api, I get an error: link    'base_name' argument not specified, and could not automatically   dete...
asked by 24.05.2016 / 10:50
1
answer

Multiple filtering Django Rest Framework

I wanted to do a multiple filtering by url with the API Django Rest Framework that is to say that for example type www.domain.com/clientes/Nike/ES and return me all Nike customers from Spain, the thing is that I do not know how to cross the...
asked by 19.05.2016 / 11:02
2
answers

Render a JSON in a bootstrap table Django REST framework

I have a model that I have called Empleado which has a foreign key to a model Direccion to keep a record of the employee's addresses. Serializer: from rest_framework import serializers from models import Empleado, Direccion...
asked by 03.02.2016 / 19:20
1
answer

Filtering API Rest Framework Django (Extra Field FK)

I would like to be able to filter by the value of another field in the table (FK) not only by id Right now if I write link it returns the results I want , but I would like to be able to filter in the following way (for another field of...
asked by 23.05.2016 / 13:18
0
answers

REST API - Serialized models do not take hostname from the production server - Django REST Framework

I am exposing an application (at the moment it is only your user scheme) with Django Rest Framework, and it happens to me that every model that I have serialized, in the url attribute, I have is the address of the localhost of my development mac...
asked by 20.02.2016 / 19:15
1
answer

Get the first element of an array with AngularJS

I'm starting in angularjs and I've already created my first API with djangorestframework . I have this factory and a controller to consume the data: (function(){ "use strict"; angular.module('core.controllers', []) .controller('...
asked by 22.04.2016 / 04:13
1
answer

DJANGO DRF, Serialize related models

My problem is this: In my app I have the following models inside the 'models.py' class Carrera(models.Model): nombre = models.CharField(max_length=50) class Materia(models.Model): nombre = models.CharField(max_length=50) niv...
asked by 11.10.2018 / 17:10