diff options
author | coderick14 | 2017-05-17 15:40:18 +0530 |
---|---|---|
committer | coderick14 | 2017-05-17 15:41:00 +0530 |
commit | a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055 (patch) | |
tree | 20181e6b1936f50ad48d8e35720d64a37566f558 /sbhs_server/pages | |
parent | 6f4a84c1e58ff4d54aab94cbee26e995328b05b8 (diff) | |
download | SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.gz SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.tar.bz2 SBHS-2018-Rpi-a1e0a5502f04da68b6a9ca8508dda3f9d7e1d055.zip |
Upgrade to Django 1.11
- Database integration yet to be tested
Diffstat (limited to 'sbhs_server/pages')
-rw-r--r-- | sbhs_server/pages/__init__.py | 0 | ||||
-rw-r--r-- | sbhs_server/pages/admin.py | 3 | ||||
-rw-r--r-- | sbhs_server/pages/management/__init__.py | 0 | ||||
-rw-r--r-- | sbhs_server/pages/management/commands/__init__.py | 0 | ||||
-rw-r--r-- | sbhs_server/pages/management/commands/arm.diff | 14 | ||||
-rw-r--r-- | sbhs_server/pages/management/commands/zip_client.py | 66 | ||||
-rw-r--r-- | sbhs_server/pages/models.py | 3 | ||||
-rw-r--r-- | sbhs_server/pages/tests.py | 3 | ||||
-rw-r--r-- | sbhs_server/pages/views.py | 41 |
9 files changed, 0 insertions, 130 deletions
diff --git a/sbhs_server/pages/__init__.py b/sbhs_server/pages/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/sbhs_server/pages/__init__.py +++ /dev/null diff --git a/sbhs_server/pages/admin.py b/sbhs_server/pages/admin.py deleted file mode 100644 index 8c38f3f..0000000 --- a/sbhs_server/pages/admin.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.contrib import admin - -# Register your models here. diff --git a/sbhs_server/pages/management/__init__.py b/sbhs_server/pages/management/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/sbhs_server/pages/management/__init__.py +++ /dev/null diff --git a/sbhs_server/pages/management/commands/__init__.py b/sbhs_server/pages/management/commands/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/sbhs_server/pages/management/commands/__init__.py +++ /dev/null diff --git a/sbhs_server/pages/management/commands/arm.diff b/sbhs_server/pages/management/commands/arm.diff deleted file mode 100644 index 868bec1..0000000 --- a/sbhs_server/pages/management/commands/arm.diff +++ /dev/null @@ -1,14 +0,0 @@ ---- a/sbhs_server/pages/management/commands/zip_client.py -+++ b/sbhs_server/pages/management/commands/zip_client.py -@@ -33,6 +33,10 @@ class Command(BaseCommand): - run_file_dirpath = os.path.join(dirpath, "run_file") - - os.mkdir(tmp_dirpath) -+ for root, dirs, files in os.walk(dirpath): -+ for f in files: -+ shutil.copy(os.path.join(dirpath, f), os.path.join(tmp_dirpath, f)) -+ - distutils.dir_util.copy_tree(scilab_codes_dirpath, tmp_dirpath) - try: - shutil.rmtree(tmp_dirpath + "/" + scilab_codes_dirname + "/.git") - diff --git a/sbhs_server/pages/management/commands/zip_client.py b/sbhs_server/pages/management/commands/zip_client.py deleted file mode 100644 index 89263bf..0000000 --- a/sbhs_server/pages/management/commands/zip_client.py +++ /dev/null @@ -1,66 +0,0 @@ -from django.core.management.base import BaseCommand -import os, zipfile, shutil, distutils.core -from sbhs_server import settings - -class Command(BaseCommand): - args = '' - help = 'ZIP all clients for all architectures.' - - def handle(self, *args, **options): - def zipdir(path, zip, rootname): - for root, dirs, files in os.walk(path): - for file in files: - pathname = os.path.join(root, file) - zip.write(pathname, rootname + "/" + pathname.replace(path, "")) - - scilab_codes_dirname = "scilab_codes" - scilab_codes_dirpath = os.path.join(settings.SBHSCLIENT_STATIC_DIR, scilab_codes_dirname) - zipped_dirname = "zipped" - zipped_dirpath = os.path.join(settings.SBHSCLIENT_STATIC_DIR, zipped_dirname) - - dirs = os.listdir(settings.SBHSCLIENT_STATIC_DIR) - print dirs - dirs.remove(scilab_codes_dirname) - dirs.remove(zipped_dirname) - print dirs - dirs = [d for d in dirs if os.path.isdir(os.path.join(settings.SBHSCLIENT_STATIC_DIR, d))] - print dirs - dirs = [d for d in dirs if not d.startswith(".")] - - for dirname in dirs: - print dirname - dirpath = os.path.join(settings.SBHSCLIENT_STATIC_DIR, dirname) - tmp_dirpath = os.path.join(zipped_dirpath, dirname) - common_files_dirpath = os.path.join(dirpath, "common_files") - run_file_dirpath = os.path.join(dirpath, "run_file") - - os.mkdir(tmp_dirpath) - for f in os.listdir(dirpath): - if os.path.isfile(os.path.join(dirpath, f)): - shutil.copy(os.path.join(dirpath, f), os.path.join(tmp_dirpath, f)) - - if dirname not in ["analysis", "local"]: - distutils.dir_util.copy_tree(scilab_codes_dirpath, tmp_dirpath) - else: - distutils.dir_util.copy_tree(dirpath, tmp_dirpath) - try: - shutil.rmtree(tmp_dirpath + "/" + scilab_codes_dirname + "/.git") - except: - pass - - try: - for root, dirs, files in os.walk(tmp_dirpath): - if os.path.exists(os.path.join(root, "scilabread.sce")): - distutils.dir_util.copy_tree(run_file_dirpath, root) - except: - pass - - try: - distutils.dir_util.copy_tree(common_files_dirpath, os.path.join(tmp_dirpath, "common_files")) - except: - pass - - zipf = zipfile.ZipFile(os.path.join(zipped_dirpath, "sbhsclient/scilab_codes_" + dirname + ".zip"), 'w', zipfile.ZIP_DEFLATED) - zipdir(tmp_dirpath, zipf, "scilab_codes_" + dirname) - zipf.close() - shutil.rmtree(tmp_dirpath) diff --git a/sbhs_server/pages/models.py b/sbhs_server/pages/models.py deleted file mode 100644 index 71a8362..0000000 --- a/sbhs_server/pages/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/sbhs_server/pages/tests.py b/sbhs_server/pages/tests.py deleted file mode 100644 index 7ce503c..0000000 --- a/sbhs_server/pages/tests.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.test import TestCase - -# Create your tests here. diff --git a/sbhs_server/pages/views.py b/sbhs_server/pages/views.py deleted file mode 100644 index 4b88086..0000000 --- a/sbhs_server/pages/views.py +++ /dev/null @@ -1,41 +0,0 @@ -from django.shortcuts import render -from django.template.loader import render_to_string -from django.http import HttpResponseNotFound, HttpResponseServerError - -# Create your views here. - -def index(req): - return render(req, "pages/index.html") - -def about(req): - return render(req, "pages/about.html") - -def contact(req): - return render(req, "pages/contact.html") - -def info(req): - return render(req, "pages/info.html") - -def downloads(req): - return render(req, "pages/downloads.html") - -def theory(req): - return render(req, "pages/theory.html") - -def procedure(req): - return render(req, "pages/procedure.html") - -def experiments(req): - return render(req, "pages/experiments.html") - -def feedback(req): - return render(req, "pages/feedback.html") - -def quiz(req): - return render(req, "pages/quiz.html") - -def e404(req): - return HttpResponseNotFound(render_to_string('pages/e404.html')) - -def e500(req): - return HttpResponseServerError(render_to_string('pages/e500.html')) |