Suppose here is my models.py
models.py
from django.db import models
from django.contrib.auth.models import *
# Create your models here.
class A(models.Model):
p = models.CharField(max_length=200)
class B(models.Model):
d = models.OneToOneField(User)
e = models.ForeignKey(A)
class C(models.Model):
f = models.CharField(max_length=200)
g = models.ForeignKey(A,related_name="c")
i wanto import these models inside my views like this.
from app import models
def import():
list=['A','B','C']
for x in list:
from model import x
import()
Please suggest me a better solution ,I am new to python django.Thanks in advance.
edit
i want to use this loop for some reason.