Smart Selects

25 views
Skip to first unread message

vimal devapp raj

unread,
Jul 6, 2018, 8:31:34 AM7/6/18
to django...@googlegroups.com
Hi Team,

I am using django smart select with django version : 1.6.1

django-smart-selects (1.5.4) version

ERROR : ImportError: No module named apps

models.py
========
from smart_selects.db_fields import ChainedForeignKey

class Continent(models.Model):
    name = models.CharField(max_length=255)

class Country(models.Model):
    continent = models.ForeignKey(Continent, on_delete=models.CASCADE)
    name = models.CharField(max_length=255)

class Location(models.Model):
    continent = models.ForeignKey(Continent, on_delete=models.CASCADE)
    country = ChainedForeignKey(
        'Country',
        chained_field="continent",
        chained_model_field="continent",
        show_all=False,
        auto_choose=True
    )
    city = models.CharField(max_length=50)
    street = models.CharField(max_length=100)

settings.py:
=========
added 'smart_selects' to installed apps

Please help me in fixing the above mentioned error. Thanks in advance.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages