87👍
You need to make manage.py executable to excecute it. Do chmod +x manage.py
to make it excecutable. Alternately you can do python manage.py <cmd>
instead.
16👍
To give yourself execute permission for the file containing the script use the command:
chmod u+rwx filename.py
To give other users permission to read and execute but not alter the shell script use:
chmod go+rx filename.py
- [Django]-How do I get the default value for a field in a Django model?
- [Django]-Django import error – No module named core.management
- [Django]-Target WSGI script cannot be loaded as Python module
- [Django]-Threaded Django task doesn't automatically handle transactions or db connections?
- [Django]-How to perform OR condition in django queryset?
- [Django]-Can Django automatically create a related one-to-one model?
0👍
Add this line at the top of your python code;
#!/usr/bin/python3
Then make your file executable by writing chmod +x <file.py> on terminal
then try again
- [Django]-What are the limitations of Django's ORM?
- [Django]-Django query case-insensitive list match
- [Django]-How to test custom django-admin commands
-2👍
I typed su root space
after root and it worked.
root
was my admin password then the CMD after with a space after the admin password.
- [Django]-Linking to the django admin site
- [Django]-Inject errors into already validated form?
- [Django]-Direct assignment to the forward side of a many-to-many set is prohibited. Use emails_for_help.set() instead
Source:stackexchange.com