adding database init and django restart scripts. Minor pynb modifications