applegrew / django-select2

This is a Django integration for Select2
MIT License
710 stars 316 forks source link

module tests has no attribute testapp #570

Closed yangmeijian closed 4 years ago

yangmeijian commented 4 years ago

Hi I am new to Django and learning this fantasic package.

I git cloned the files and cd into testapp folder, but when I run python manage.py runserver I got this error. I copied the manage.py file in the tests folder and change "settings" to ""testapp.settings". I still got this error. I also commented out 'tests.testapp' in the settings.py but still sam error.

Can you please help on running the testapp? It is definitely the best resource to learn django-select2 and I am lost without being able to see how it works. Thanks.

yangmeijian commented 4 years ago

Traceback: File "C:\Users\yang\AppData\Local\Continuum\anaconda3\lib\site-packages\django\apps\config.py", line 118, in create cls = getattr(mod, cls_name) AttributeError: module 'tests' has no attribute 'testapp'

During handling of the above exception, another exception occurred:

......... File "C:\Users\yang\AppData\Local\Continuum\anaconda3\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'tests.testapp'

File "C:\Users\yang\AppData\Local\Continuum\anaconda3\lib\pathlib.py", line 1346, in exists self.stat() File "C:\Users\yang\AppData\Local\Continuum\anaconda3\lib\pathlib.py", line 1168, in stat return self._accessor.stat(self) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

yangmeijian commented 4 years ago

Figured this out with app running successfully.