hello
I want to use django-select2-forms in my project . this package is here:
https://pypi.python.org/pypi/django-select2-forms/2.0.1I followed the exact instructions but It does not install
here is things I did:
1:
pip install django-select2-forms
I can see select2 has been installed in my site package
2: I added this line to my_installed_packages in settings.py:
3: I added this line to main urls.py:
url(r'^select2/', include('select2.urls')),
after that i put this models in my models.py they are from it's example:
class Author(models.Model):
name = models.CharField(max_length=100)
def __str__(self):
return self.name
class Entry(models.Model):
author = select2.fields.ForeignKey(Author,
overlay="Choose an author...",
on_delete=models.CASCADE)
but when i run :
python manage.py makemigrations
I get this error:
author = select2.fields.ForeignKey(Author,
NameError: name 'select2' is not defined
I searched for this but i could not find anything.
would you help me please?
thanks