osuosl / orvsd_central

5 stars 2 forks source link

Add/Delete sites to match what we host. #164

Closed dean closed 9 years ago

dean commented 9 years ago

Given a text file with a list of moodle directories + subdomains (example included in config/) this corrects ORVSD sites to match it. It also checks if sites in the file have the default nginx page to prevent unused sites from getting into the db.

dean commented 9 years ago

r?

dean commented 9 years ago

Cleaned up the codebase in that spot. r?

Kennric commented 9 years ago

I'd prefer not putting the list of sites in the repo - this is something we hopefully will only need to do once, but worst case only rarely - if we need to do it again, we will want to re-generate that site list. Can we have the management command take a filename on the command line, and just require an admin to bring their own file of sites? (also, document the format and origin of that file).

dean commented 9 years ago

The current way to run the update_sites command requires an input file of sites. The required format for the input file is in the docstring for the command and if the file isn't in the correct format (being that the parser does not find any sites in the input file) then the program will exit as to not purge all existing sites.

The current command to run is as follows:

python manage.py update_sites -d <filename_of_sites_list>

I'll remove the list of sites from the repo.

dean commented 9 years ago

Removed the sites file. r?

Kennric commented 9 years ago

Looks good +1