10👍
✅
Found my solution by encoding this:
@echo off
cmd /k "cd /d C:\path\to\your\env\scripts & activate & cd /d C:\path\to\your\env\[projectname] & python manage.py runserver"
5👍
Call the activate.bat
script in your batch file, before you run manage.py
,
CALL \path\to\env\Scripts\activate.bat
python manage.py runserver
- [Django]-Django URLResolver error
- [Django]-How to lock access to django redis cache
- [Django]-Cannot type password. (creating a Django admin superuser)
- [Django]-Sphinx search in django admin
- [Django]-Tastypie-nonrel, django, mongodb: too many nestings
0👍
If your virtualenv is created via virtualenvwrapper:
workon yourenvname & python manage.py runserver
- [Django]-Django-CMS AppHooks with conflicting urls?
- [Django]-How do you access/configure summaries/snippets in Django Haystack
0👍
I had to use absolute path to python in order to run "manage.py".
cmd /k "cd /d C:\path\to\project\.venv\Scripts & activate & python C:\path\to\project\manage.py runserver"
where & activate
runs C:\path\to\project\.venv\Scripts\activate.bat
and & python
runs python at C:\path\to\project\.venv\Scripts\python
you get the same result with:
call "C:\path\to\project\.venv\Scripts\activate.bat"
C:\path\to\project\.venv\Scripts\python "C:\path\to\project\manage.py" runserver
I guess my problem is that i have many pythons installed
👤Erd
- [Django]-Renderer returned unicode, and did not specify a charset value
- [Django]-Django container can't access postgres container
- [Django]-Errors When Installing MySQL-python module for Python 2.7
- [Django]-Django-rest-swagger doesn't work when I want to use get_serializer_class() to return different fields for different user based on the url parameters
Source:stackexchange.com