Posts by piresthiago10 • 39 points
13 posts
-
0
votes1
answer280
viewsA: Override Viewset POST action to save and update data in Django Rest Framework
The Product class of models was imported, obtained and changed their objects and then used the product.save() to change the database. from estoque_entrada.models import EstoqueEntrada from…
-
0
votes1
answer280
viewsQ: Override Viewset POST action to save and update data in Django Rest Framework
I am creating an application for stock control and am having the following difficulty. When I enter a [product input] the input quantity must be added to the stock quantity of [product]. There is…
-
1
votes1
answer497
viewsA: Angular 8 scroll manipulation
The solution I found was this Typescript import { Component, OnInit, HostListener, ViewChild, ElementRef } from '@angular/core'; @Component({ selector: 'app-navbar', templateUrl:…
-
-2
votes1
answer497
viewsQ: Angular 8 scroll manipulation
I am developing a component in Angular version 8 and in the html part of the component I am using the following navbar: https://bootsnipp.com/snippets/kl8Q3 but when I try to embed javascript in my…
-
0
votes1
answer112
viewsA: SSL certificate error when using Pip install on Raspberry
The link used by Pip https://www.piwheels.org/simple appears to be recent (used on 17/04/2020) and the safety certificate used by it seems not yet to be recognized with reliable. To circumvent this…
-
-1
votes1
answer112
viewsQ: SSL certificate error when using Pip install on Raspberry
I am trying to install the opencv library to use it in a project on a Raspberry device with Raspbian and when using the Pip command I get the following error: (venv) pi@raspberrypi:~/teste $ pip…
-
0
votes1
answer39
viewsQ: File list gives errors when going through . Decode()
In the following code for file transfer using Python sockets: Client: lista_arquivos = ['C:\Users\fulano\Imagens\passaro.jpg', 'C:\Users\fulano\Imagens\cachorro.jpg',…
-
-1
votes1
answer84
viewsQ: module 'Docker' has no attribute 'Client'
I’m using the Docker-py in version 3.7 of Python and when I try to execute the function that uses it an Attributeerror is returned My code: from django.shortcuts import render from django.http…
-
0
votes1
answer37
viewsQ: Mongodb does not return query correctly
I have the following code: from pymongo import MongoClient class ConectaMongodb: def conecta(self): client = MongoClient('mongodb://localhost:27017') db = client.starwars_api return db def…
-
1
votes2
answers193
viewsA: Capture Json information using Python
I ended up finding another possible solution: planeta = resp.json() valor = planeta['results'][0] print(planeta.keys()) print(f'Repository name: {valor["name"]}')
-
1
votes2
answers193
viewsQ: Capture Json information using Python
I am working with the SWAPI API with Python and find the following difficulty: When I get the information from a Json, Dict is returned when I access the key search, I get a list, but I cannot get…
-
0
votes1
answer562
viewsQ: Undefined variable with import python
I am having problems with the inheritance of attributes between a mother class and a daughter class that are in two different files. When using them in the same file no error is displayed:…
python-3.xasked piresthiago10 39 -
0
votes2
answers290
viewsA: Unwanted white space between image and border
An alternative solution to your problem is to add width and height in figure.photo-caption: <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"> <title>…