Open kmrn777 opened 2 years ago
Did you press the green run button on repliy?
On Wed, May 25, 2022 at 10:01 AM kmrn777 @.***> wrote:
i try to run your project (python manage.py runserver) and what i get on cmd is: Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\kmrn_\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in
bootstrap_inner self.run() File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self.
target(self.args, *self.kwargs) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(args, kwargs) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run autoreload.raise_last_exception() File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py", line 87, in raise_last_exception raise exception[1] File "C:\Users\kmrn \AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management_ init_.py", line 398, in execute autoreload.checkerrors(django.setup)() File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(args, kwargs) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django init_.py", line 24, in setup apps.populate(settings.INSTALLEDAPPS) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\registry.py", line 91, in populate appconfig = AppConfig.create(entry) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\config.py", line 228, in create importmodule(entry) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\importlib init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'rest_framework'
— Reply to this email directly, view it on GitHub https://github.com/divanov11/proshop_django/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOQDF4B3WYBXZM6WUHXC4GLVLZMFLANCNFSM5W5ZDEZQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
@Gabriel7553 excuse me?
If you are using windows you should use virtualenv then run the server
1 -first install it by using this commnd line in root project pip install virtualenv
2 - create your virtual env by typing: virtualenv myenv
4 -then run your virtualenv : myenv\scripts\activate
, if you are using mac type : source myenv/bin/activate
5 - then run server : python manage.py runserver
Make sure you run:
pip install djangorestframework
This will install the required module.
To check if you have it installed, run:
pip list
This will display all the modules you have installed.
Good Luck!
i try to run your project (python manage.py runserver) and what i get on cmd is: Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\kmrn_\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrapinner self.run() File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self._target(*self._args, self.kwargs) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(*args, *kwargs) File "C:\Users\kmrn_\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management\commands\runserver.py", line 125, in inner_run autoreload.raise_lastexception() File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py", line 87, in raise_last_exception raise exception[1] File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\core\management__init__.py", line 398, in execute autoreload.checkerrors(django.setup)() File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\utils\autoreload.py", line 64, in wrapper fn(args, kwargs) File "C:\Users\kmrn_\AppData\Local\Programs\Python\Python310\lib\site-packages\django__init.py", line 24, in setup apps.populate(settings.INSTALLEDAPPS) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\registry.py", line 91, in populate appconfig = AppConfig.create(entry) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\site-packages\django\apps\config.py", line 228, in create importmodule(entry) File "C:\Users\kmrn\AppData\Local\Programs\Python\Python310\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'rest_framework'