Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

463
Visualizações
ValueError: invalid literal for int() with base 10(Django)

error in cmd
Code

I tried to create a project where to manage a garage, but when I create the model in application"utiliser", I got this problem. Thanks!

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

In your code, you are trying to assign string client as the default value for your ForeignKey. ForeignKeys are represented as integers and that is why you get this error. You can assign id value of the foreign object (if exists), or use null=True which will make default NULL. If there is no data at all in this object, then remove default value, migrations and flush database, then you will get not-nullable ForeignKey field.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda