Answer the question
In order to leave comments, you need to log in
Is it a link to the file name?
Hi everyone, please advise. django.db
that's the name of the file, right?
what does the class hierarchy look like models.Model
?
it would be easier to do
import django
class Musician(django.Models):
models = {
"Model" : class Model():
.... ,
"Hello" : class Hello():
....
}
from django.db import models
class Musician(models.Model):
first_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
instrument = models.CharField(max_length=100)
Answer the question
In order to leave comments, you need to log in
django , db and models are python modules.
Modules can be both a file and a folder with an __init__.py file inside.
Model is a class defined in one of the files in the django/db/models/ folder and imported in the django/db/models/__init__.py file
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question