Challenge: Zoo Market Table
Note
The existing fields you can see in the Django documentation .
The presented code for the task is part of the framework and cannot work separately, so errors will be received when you try to
Run Code
. Use theSubmit Task
button to solve this task.
Tarefa
Swipe to start coding
Create the following Animal
table in the database using the Django ORM:
ER model of this table:
Ignore the records in the table. You only need to make the table structure.
Solução
9
1
2
3
4
5
6
7
8
from django.db import models
class Animal(models.Model):
name = models.CharField(max_length=40)
kind = models.CharField(max_length=20)
age = models.IntegerField()
price = models.FloatField()
Tudo estava claro?
Obrigado pelo seu feedback!
Seção 3. Capítulo 3
9
1
2
3
4
5
6
7
8
9
from django.db import models
class ___(models.___):
___ = models.___(max_length=___)
___ = ___.CharField(___=20)
___ = models.___()
___ = models.___()
Pergunte à IA
Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo