Questions tagged as 'django'

0
answers

How do I show only one element present in the database according to the id in Django?

I am trying to show only the element saved in the database that corresponds to the other element. When I do this out of the script, it works perfectly, but when I play in the script it returns all the elements. I'll put a part of the code:...
asked by 20.06.2018 / 16:19
0
answers

indentation with highlight.js

I'm having problems with the indentation with highlight.js, the code is being generated by marked.js. Has anyone gone through this or do you know any solutions? index.html: <!-- highlight.css --> <link rel="stylesheet" href="https:...
asked by 14.06.2018 / 04:23
1
answer

Login 2.0 Django, authentication

I'm trying to make a login page, but I'm having some difficulties. For some reason I can not understand, every time I type the user and the password, whether it is right or not, it gives the answer that the user does not exist. My data base i...
asked by 19.06.2018 / 13:18
1
answer

Errors in Django server validation?

I am putting the manage.py runserver and give these errors in the site packs folder. Has it happened to you yet?     
asked by 21.06.2018 / 04:45
0
answers

django ModelForm with checkbox with value ---------

Good evening! How do I remove --------- from my form, in some options I put a default in the model but for this option I can not do this, How can I solve this problem?     
asked by 01.06.2018 / 00:17
0
answers

Generate histogram in django

Hello, I've been trying to generate a histogram in django for a project I'm developing. The code usually generates the histogram without difficulty the first time, however, when I try again, it returns me the following error "RuntimeError: main...
asked by 04.06.2018 / 16:09
0
answers

PasswordResetView does not send email

I'm doing a project where I'm using the Views based on Django classes. More specifically, I'm using Views to reset my password. Here are my codes: # View de exibição do formulário class passwordResetView(PasswordResetView):...
asked by 29.05.2018 / 23:07
0
answers

Render html file in template in django

I have a class in Django that models a Post and would like to allow a user to upload a file but how do I render that file in the django template ??? class Article(DateAbstractModel): 'Modelo de um artigo do site' name = models.CharFi...
asked by 26.05.2018 / 03:20
0
answers

how to send jquery / ajax with more than one data using django function based view

I would like to submit a form and a list when submitting the form, type I have a form and a list with ids areas = [1,6,5] how do I get the two to be sent in the post, I want to take this list and use in mine that is also the view that treats the...
asked by 01.06.2018 / 14:16
1
answer

How to create a registration form with Django

I recently studied Django, but I came across a problem in creating forms, I tried to go in the official documentation of the Framework but I did not find the solution. forms.py from django import forms from .models import Novo_Usuario cl...
asked by 03.06.2018 / 16:59