Questions tagged as 'django'

3
answers

Problem importing model

Hello, I can not do import of this model I have the model: class Contrato(models.Model): within models.py and inside my serializers.py need to do import from models import Contrato nor from apps.contratos.models import C...
asked by 04.05.2015 / 04:57
1
answer

"Column 'model_id' can not be null" Django Cascade

I have a problem deleting 2 foreign keys from a foreign key. I'll explain better: This is the credit card model hierarchy I have: CreditCard Customer Address Phone I'm trying to delete the address and phone, t...
asked by 12.07.2017 / 00:19
1
answer

Send form Django

I'm new to python and I'm trying to make a registration, when I click send nothing happens, no post views.py from django.http import HttpResponse from django.shortcuts import render from portal.cadastro.forms import CadastroForm...
asked by 09.08.2017 / 19:06
1
answer

Installing Django with Python3 [closed]

I got a project to do only with Python on v.3.4 + and I'm not getting Django running on non-2.7 versions. Does anyone know a link that teaches the whole installation of django in this new version of Python?     
asked by 21.06.2018 / 05:33
3
answers

Django: How to group records using the YEAR from a FieldDate field? [closed]

I can not make a query that returns only the "YEARS" that have records! Considering also that the field of my model is a FieldDate.     
asked by 13.12.2013 / 15:29
2
answers

UnitTest Django Views: I can not login to the system by unittest [closed]

I need to give post in my view of "creation of requests", but when I try to give post , I'm redirected to my login screen, I'm trying to login to the system and then give the post in that view , but I did not succeed. Could someone...
asked by 26.02.2014 / 15:44
2
answers

Relationship with Django Admin

I'm a beginner with Python and Django and I'm doing a generic menu, I'd like to know how to list in the Django Admin menu-related items in the Menu ModelAdmin class Menu(models.Model): menu = models.CharField('Menu', max_length=150)...
asked by 31.07.2017 / 23:18
0
answers

Error executing manage.py startapp on the count

I am learning how to use django and I came across an error when following a documentation tutorial. When I run the manage.py startapp polls command I would create an app in the directory in my project it gives the error that appears in this im...
asked by 27.12.2018 / 22:37
0
answers

Problem with ID and name of new HTML elements

My doubt is conceptual. I have a script that generates new rows for a table. I need to apply functions to the individual rows, but as the new rows are clones from the first rotate in to adjust these functions individually. Is there a way to indi...
asked by 26.12.2018 / 20:34
0
answers

How to create include a Checkbox in a Datatable table in Django

Hello! I'm with a Boolean field in the table but I did not find in my search anything that would help me change the Boolean by a Checkbox. How do I do that? Follow my Model.py class TelefoneCredor(models.Model): telefone = models.BigInte...
asked by 05.01.2019 / 17:55