Posts by Eudson Durães • 98 points
10 posts
-
-1
votes1
answer171
viewsQ: How to dynamically change the color of the bars on the chart in Chart.js
I wanted to change the color of each bar of the chart according to its value. If the value is less than zero, the bar should turn red and if it is greater than zero it turns green. function…
-
1
votes1
answer374
viewsQ: How to logout in Django?
I managed to create and log a user into the system, but the logout does not work and I do not understand the reason. View: def logout_view(request): logout(request) return redirect('home') html file…
-
0
votes1
answer225
viewsQ: How can I manipulate data from a form in Django?
I’m a beginner in Django and wanted to know how I can manipulate data sent by the form. I have the following form: class CreateNewUser(forms.Form): Nome = forms.CharField(max_length=200) email =…
-
0
votes1
answer122
viewsQ: Slow loading of files into Static folder in Django
I am learning Django and I noticed that the static files take time to load, example; I have a css file that defines the style of the home, I change the font color and update the page and nothing…
-
0
votes1
answer307
viewsA: Input in multiple attributes of a Python class
I managed to do it that way: class Pessoa(): def __init__(self,nome, idade): self.nome = nome self.idade = idade nome = input("Qual é seu nome? ") idade = input("Qual é sua idade? ") pessoa =…
-
1
votes3
answers484
viewsQ: I can’t make the Pygame window close button work
I’m learning to use Pygame functions, but I got caught up in this problem. I created a window with Pygame, and then I made this code so when I click the exit button the window closes. Code while…
-
0
votes1
answer28
viewsQ: Unexpected return of the method
I am learning POO in python, I have created a client class that has three attributes; name, Cpf and age. And I also created a method that stores these attributes inside a tuple and returns this…
-
2
votes2
answers418
viewsA: name ' ' is not defined
You are returning the wrong variable, the right one would be to store the variables n1, N2, N3 within a list and return that list, and then pass this list as parameter in the second function. def…
-
0
votes2
answers88
viewsQ: Library import inside or outside functions
I was wondering if it is correct to import libraries within functions? Or it is better to import the library in the file that the function is called, but the function will only work if the library…
pythonasked Eudson Durães 98 -
3
votes1
answer285
viewsQ: Does the Python Tkinter library still exist?
I use Ubuntu and as this library does not come installed by default on linux, I was trying to install it via Pip but I can not find it on the official Python site.