Hi,
I wonder if anyone could help please.
I have built a django project (basic web project) on pi zero, all works well.
It’s in a base directory called web, which is in in an virtual environment called (w_env)
I have copied the whole project (web) on it on to my laptop with same structure onto the c drive.
Laptop has windows Linux wsl. (Ubuntu)
I type cd /mnt/c/web
And then source w_env/bin/activate
(w_env)web etc etc
All works well just as I’m on if on raspberry pi zero, same directory structure etc.
installed pipx Django, all good
Tested/checked Django version in both web directory and web/web directory and it prints Django version 6 in both.
All works well and Django appears to be installed in the virtual environment (w_env).
But when I try to run the server from (w_env)web python3 manage.py runserver
(web being the base directory)
Returns an Error from manage.py file
It says it can not find the installed Django module, is it installed? Have you activated virtual environment? Is path correct in settings.py?
Any ideas what the path should be in settings.py assuming this is the cause of the problem?
Current path in settings.py (generated Django code on raspberry pi)
From pathlab import Path
BASE_DIR = Path(_file_).resolve().parent.parent
Maybe it is not possible to copy a complete web Django project and use it on a different machine?
Thanks Steve