old_contents: from djsilver.models import *
  
  import sys
  
  try:
      dept = sys.argv[1]
  except:
      print "Usage: python %s [deptartment name]" % sys.argv[0]
      sys.exit()
  
  faculty = FacultyHomePageDepartments.objects.using('silverstripe_faculty_pages').filter(departmentid__departmentname="%s" % dept).order_by("facultyhomepageid__lastname")
  for f in faculty:
      try:
          print f.facultyhomepageid.id.urlsegment
          #print f.facultyhomepageid.get_slug()
      except:
          pass
  
  
new_contents: from djsilver.models import FacultyHomePageDepartments
  from djsilver.config import DATABASE_NAME
  
  import sys
  
  try:
      dept = sys.argv[1]
  except:
      print "Usage: python %s [deptartment name]" % sys.argv[0]
      sys.exit()
  
  faculty = FacultyHomePageDepartments.objects.using(DATABASE_NAME).filter(departmentid__departmentname="%s" % dept).order_by("facultyhomepageid__lastname")
  for f in faculty:
      try:
          print f.facultyhomepageid.id.urlsegment
          #print f.facultyhomepageid.get_slug()
      except:
          pass
  
  
subject: update shell script to use config value for database name