Answers for "model object means in django"

1

model object means in django

CREATE TABLE myapp_person (
    "id" serial NOT NULL PRIMARY KEY,
    "first_name" varchar(30) NOT NULL,
    "last_name" varchar(30) NOT NULL
);
Posted by: Guest on July-21-2020
0

model object means in django

from django.db import models

class Person(models.Model):
    first_name = models.CharField(max_length=30)
    last_name = models.CharField(max_length=30)
Posted by: Guest on July-21-2020
0

create django object

Author.objects.create(name="Joe")
Posted by: Guest on May-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language