Questions tagged as 'django'

1
answer

Images with Django - display and static

I'm a beginner in Django and I'm developing a simple blog. I know that the configuration of the static files needs to be different for the development and production environment, but I always get caught up in understanding how it works sin...
asked by 04.10.2017 / 17:40
1
answer

Error in form django

I'm trying to run a form in django but it returns this error form = TopicoForm() raise ValueError('ModelForm has no model class specified.') this is my models class Topico(models.Model): titulo = models.CharField('Título', max_le...
asked by 25.11.2017 / 01:19
1
answer

How to use objects.filter in django?

Good afternoon, I have a model here in my django Subject, and I want to make the listing of it in the html, however every subject has as foreign key the id of the model category, as I make a variable to receive the objects.filter only of the sub...
asked by 24.11.2017 / 15:46
1
answer

Get input by view

I have a form with inputs: email, first and last name. The email will always have a defined format, so I want to get the elements and have them automatically fill in the other fields, for example: User types email Email: [email protected]...
asked by 14.08.2017 / 13:57
1
answer

Django returning ValueError

I am creating a project to send emails, however I am doing some tests and I came across the following problem:    The view send_mail.core.views.index did not return an HttpResponse object. It returned None instead. Below are my lines of c...
asked by 17.08.2017 / 18:49
1
answer

Update values of a chart using Django

I'm joking on a solo project to make a website to show the current coffee quote along with a line graph of the daily variation of that price as a function of time. I get the price of coffee making "webscraping" (yes, I know it's not cool but...
asked by 08.06.2017 / 17:07
1
answer

AssertionError: b 'Working with test classes in Django (TDD)

I'm starting my test studies with Django and am getting an error where it apparently should not, so much so that the description of traceback makes me pretty confused. I have a class that tests if the return of my view is compatible with its...
asked by 02.06.2017 / 05:02
1
answer

Django runserver does not work

The command: python manage.py runserver 80 Returns the following: (Pus screenshot, because the text is defaced here) The localhost address is inaccessible regardless of port (8080, 8000, 80) As far as I understand, it's a char...
asked by 15.07.2017 / 18:10
2
answers

Classes within classes (Python / Django)

Hello, I'm starting to study about python because of Django. I have a doubt that many may consider trivial but I do not know the answer. I'm building a Template with the following features: class Candidato(models.Model): nome =...
asked by 07.07.2017 / 19:11
1
answer

How to get the current user in the Django model?

Hello, I am creating an application in django and I have a model with the NewDemand class in which I need when the user creates a demand, the face name is saved in a field. Here's my class: class NewDemand(models.Model): name = models....
asked by 12.06.2017 / 17:03