Closed suryansh1 closed 4 years ago
Manage.py is just a wrapper used to call various Commands listed in the commands directory
Output of manage ``
Type 'manage.py help
Available subcommands:
[auth] changepassword createsuperuser
[captcha] captcha_clean
[django] check compilemessages createcachetable dbshell diffsettings dumpdata flush inspectdb loaddata makemessages makemigrations migrate sendtestemail shell showmigrations sqlflush sqlmigrate sqlsequencereset squashmigrations startapp startproject test testserver
[sessions] clearsessions
[staticfiles] collectstatic findstatic runserver
[vital] AddNotificationMessage AutoStartVMs ChangesRequiringUsersLogout CollectCourseStats CollectXenDomDetails DeleteNotificationMessage EmailCommonNotification ForceLogoutInactiveUsers ForceRebaseVms RegenerateConfFiles RemoveCourse RemoveOldVitalUsers ResetActivationCode ResetCourse ResetSftpAllUsers ResetStudentEnvironment ShutdownVMsOnXen StartServerStatsCollection TestMultipleStudentVMs UnblockAll UnblockUserByEmailId ZmqSlave ``
I have created a command line utility called manage. It is a bash script which resides in /usr/local/bin directory in dev right now.
This utility takes the arguments and passed to it and then internally does the original call to the python script, with these arguments.
Example, instead of /home/vital/.virtualenvs/vital/bin/python2.7 /home/vital/vital2.0/source/virtual_lab/vital_site/manage.py CollectCourseStats -a, we can just do manage CollectCourseStats -a
Same goes for manage RemoveCourse -c 13
I have even added a small tutorial in the commented section of the utility, for someone unfamiliar with bash scripts. This is the output currently, in dev
The current call involves a long winded command
home/vital/.virtualenvs/vital/bin/python2.7 /home/vital/vital2.0/source/virtual_lab/vital_site/manage.py CollectCourseStats -a
This needs to be simplified to something which can be used by someone without much knowledge of Vital