예제 #1
0
파일: views.py 프로젝트: spsu/sylph
def reset(request):
	"""Reset everything, tear down and rebuild database, and begin the
	install process all over. Obviously this will need to be locked
	down when the software is complete."""
	template = 'core/backend/install/reset.html'
	if is_installed():
		template = 'core/backend/reset-database.html'

	if request.method == 'POST':
		reset_database()
		return HttpResponseRedirect('/')

	return render_to_response(template,
					context_instance=RequestContext(request))
예제 #2
0
 def handle(self, *args, **options):
     reset_database()
     print "Database reset."