diff --git a/Samples/.idea/Samples.iml b/Samples/.idea/Samples.iml deleted file mode 100644 index 6711606..0000000 --- a/Samples/.idea/Samples.iml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/Samples/.idea/misc.xml b/Samples/.idea/misc.xml deleted file mode 100644 index 3f07456..0000000 --- a/Samples/.idea/misc.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Samples/.idea/modules.xml b/Samples/.idea/modules.xml deleted file mode 100644 index c50cd01..0000000 --- a/Samples/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Samples/.idea/workspace.xml b/Samples/.idea/workspace.xml deleted file mode 100644 index 8f9fc64..0000000 --- a/Samples/.idea/workspace.xml +++ /dev/null @@ -1,504 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1487278029476 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/HelloWord.py b/Samples/HelloWord.py deleted file mode 100644 index 2bad9b7..0000000 --- a/Samples/HelloWord.py +++ /dev/null @@ -1,52 +0,0 @@ -# This is an example to some things in python -# The basic stuff - -def myFunc(a, i): - """"This is a DOC String""""" - while i >= 0: - print(a[i]) - i -= 1 - -#Data types - https://www.programiz.com/python-programming/variables-datatypes -#int number -c = 1 -print(c,type(c)) -#float number -c = 1.0 -print(c,type(c)) -#complex number -c = 1 + 2j -print(c,type(c)) -#List type -c = [1, 2, 3, 4] -print(c, type(c)) -#Tuple type -# This type members can't be changed -c = (1, 2) -print(c, type(c)) -#String type -c = "luke" -#OR -c = 'luke' -print(c, type(c)) -#Set is an unordered collection of unique items -#{1, 1, 2, 2, 3, 3} == {1, 2, 3} -#c[1] doesn't work in a set -c = {1, 1, 2, 2, 3, 3} -print(c, type(c)) -#Dictionary is a collection of key-value pairs -#We use key to retrieve the respective value. But not the other way around. -c = {'key':'user', 'secound':2} -print("c['key'] : ",c['key']) -print("c['secound'] : ",c['secound']) - -#Conversion be tween Data Types -#The conversion must be between compatible types -print(float(5))#5.0 -print(int('5'))#5 -print(list((1,2,3))) -print(set((1,2,3))) -print(tuple([1,2,3])) -print(dict([(1,2),('key',2)])) - -exit() \ No newline at end of file diff --git a/Samples/ToolBox/TestTool.py b/Samples/ToolBox/TestTool.py deleted file mode 100644 index 3f5854f..0000000 --- a/Samples/ToolBox/TestTool.py +++ /dev/null @@ -1,20 +0,0 @@ -from ToolBox.Tool import Tool -from ToolBox.ToolDataBase import ToolDataBase - - -toolDataBase = ToolDataBase("test") -#Right case -try: - rightTool = Tool(toolDataBase) -except Exception as inst: - print("WRONG : Type of instance") -else: - print("SUCCESS") - -#Exception case -try: - wrongTool = Tool(None) -except Exception as inst: - print("SUCCESS", inst) -else: - print("WRONG : Type of instance") \ No newline at end of file diff --git a/Samples/ToolBox/Tool.py b/Samples/ToolBox/Tool.py deleted file mode 100644 index 9ce3b3b..0000000 --- a/Samples/ToolBox/Tool.py +++ /dev/null @@ -1,19 +0,0 @@ -from ToolBox.ToolDataBase import ToolDataBase - -class Tool(): - """ - This class is the Super class for all tool interfaces - """ - def __init__(self, toolDataBase): - if not isinstance(toolDataBase, ToolDataBase): - raise Exception('Not a valid type argument') - - self.dataBase = toolDataBase - - def runTool(self): - pass - - def saveData(self): - pass - -pass \ No newline at end of file diff --git a/Samples/ToolBox/ToolData.py b/Samples/ToolBox/ToolData.py deleted file mode 100644 index dc1d9b6..0000000 --- a/Samples/ToolBox/ToolData.py +++ /dev/null @@ -1,6 +0,0 @@ -class ToolData: - """ - This is the superclass to all Data returned by the use of any Tool - """ - -pass \ No newline at end of file diff --git a/Samples/ToolBox/ToolDataBase.py b/Samples/ToolBox/ToolDataBase.py deleted file mode 100644 index 02090f3..0000000 --- a/Samples/ToolBox/ToolDataBase.py +++ /dev/null @@ -1,8 +0,0 @@ -class ToolDataBase(object): - """ - This class is a superclass to comminicating a Tool with a DataBase - """ - def __init__(self, dataBaseAdress): - self.dataBaseAdress = dataBaseAdress - -pass \ No newline at end of file diff --git a/Samples/ToolBox/__pycache__/Tool.cpython-36.pyc b/Samples/ToolBox/__pycache__/Tool.cpython-36.pyc deleted file mode 100644 index 2336641..0000000 Binary files a/Samples/ToolBox/__pycache__/Tool.cpython-36.pyc and /dev/null differ diff --git a/Samples/ToolBox/__pycache__/ToolData.cpython-36.pyc b/Samples/ToolBox/__pycache__/ToolData.cpython-36.pyc deleted file mode 100644 index a349fe1..0000000 Binary files a/Samples/ToolBox/__pycache__/ToolData.cpython-36.pyc and /dev/null differ diff --git a/Samples/ToolBox/__pycache__/ToolDataBase.cpython-36.pyc b/Samples/ToolBox/__pycache__/ToolDataBase.cpython-36.pyc deleted file mode 100644 index 84f6cb3..0000000 Binary files a/Samples/ToolBox/__pycache__/ToolDataBase.cpython-36.pyc and /dev/null differ diff --git a/mainProject/db.sqlite3 b/mainProject/db.sqlite3 new file mode 100644 index 0000000..0db2f7b Binary files /dev/null and b/mainProject/db.sqlite3 differ diff --git a/mainProject/mainProject/__init__.py b/mainProject/mainProject/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainProject/mainProject/__pycache__/__init__.cpython-36.pyc b/mainProject/mainProject/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..3329091 Binary files /dev/null and b/mainProject/mainProject/__pycache__/__init__.cpython-36.pyc differ diff --git a/mainProject/mainProject/__pycache__/settings.cpython-36.pyc b/mainProject/mainProject/__pycache__/settings.cpython-36.pyc new file mode 100644 index 0000000..31d17e9 Binary files /dev/null and b/mainProject/mainProject/__pycache__/settings.cpython-36.pyc differ diff --git a/mainProject/mainProject/__pycache__/urls.cpython-36.pyc b/mainProject/mainProject/__pycache__/urls.cpython-36.pyc new file mode 100644 index 0000000..fa55581 Binary files /dev/null and b/mainProject/mainProject/__pycache__/urls.cpython-36.pyc differ diff --git a/mainProject/mainProject/__pycache__/wsgi.cpython-36.pyc b/mainProject/mainProject/__pycache__/wsgi.cpython-36.pyc new file mode 100644 index 0000000..8ef3ac4 Binary files /dev/null and b/mainProject/mainProject/__pycache__/wsgi.cpython-36.pyc differ diff --git a/mainProject/mainProject/settings.py b/mainProject/mainProject/settings.py new file mode 100644 index 0000000..af1a0fe --- /dev/null +++ b/mainProject/mainProject/settings.py @@ -0,0 +1,120 @@ +""" +Django settings for mainProject project. + +Generated by 'django-admin startproject' using Django 1.11. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.11/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '5)-apcgy6^utflx(um980n_#e=9)&5*7=+i^$57zvyf*o9l0fs' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'mainProject.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'mainProject.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.11/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.11/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.11/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.11/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/mainProject/mainProject/urls.py b/mainProject/mainProject/urls.py new file mode 100644 index 0000000..8a87275 --- /dev/null +++ b/mainProject/mainProject/urls.py @@ -0,0 +1,22 @@ +"""mainProject URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.11/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import include, url +from django.contrib import admin + +urlpatterns = [ + url(r'^uploadApp/', include('uploadApp.urls')), + url(r'^admin/', admin.site.urls), +] diff --git a/mainProject/mainProject/wsgi.py b/mainProject/mainProject/wsgi.py new file mode 100644 index 0000000..7d2d432 --- /dev/null +++ b/mainProject/mainProject/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for mainProject project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mainProject.settings") + +application = get_wsgi_application() diff --git a/mainProject/manage.py b/mainProject/manage.py new file mode 100644 index 0000000..1b9a1e2 --- /dev/null +++ b/mainProject/manage.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mainProject.settings") + try: + from django.core.management import execute_from_command_line + except ImportError: + # The above import may fail for some other reason. Ensure that the + # issue is really that Django is missing to avoid masking other + # exceptions on Python 2. + try: + import django + except ImportError: + raise ImportError( + "Couldn't import Django. Are you sure it's installed and " + "available on your PYTHONPATH environment variable? Did you " + "forget to activate a virtual environment?" + ) + raise + execute_from_command_line(sys.argv) diff --git a/mainProject/uploadApp/__init__.py b/mainProject/uploadApp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainProject/uploadApp/__pycache__/__init__.cpython-36.pyc b/mainProject/uploadApp/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..89aa119 Binary files /dev/null and b/mainProject/uploadApp/__pycache__/__init__.cpython-36.pyc differ diff --git a/mainProject/uploadApp/__pycache__/urls.cpython-36.pyc b/mainProject/uploadApp/__pycache__/urls.cpython-36.pyc new file mode 100644 index 0000000..d6fde99 Binary files /dev/null and b/mainProject/uploadApp/__pycache__/urls.cpython-36.pyc differ diff --git a/mainProject/uploadApp/__pycache__/views.cpython-36.pyc b/mainProject/uploadApp/__pycache__/views.cpython-36.pyc new file mode 100644 index 0000000..0059d66 Binary files /dev/null and b/mainProject/uploadApp/__pycache__/views.cpython-36.pyc differ diff --git a/mainProject/uploadApp/admin.py b/mainProject/uploadApp/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/mainProject/uploadApp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/mainProject/uploadApp/apps.py b/mainProject/uploadApp/apps.py new file mode 100644 index 0000000..fccfe48 --- /dev/null +++ b/mainProject/uploadApp/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class UploadappConfig(AppConfig): + name = 'uploadApp' diff --git a/mainProject/uploadApp/migrations/__init__.py b/mainProject/uploadApp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/mainProject/uploadApp/models.py b/mainProject/uploadApp/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/mainProject/uploadApp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/mainProject/uploadApp/tests.py b/mainProject/uploadApp/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/mainProject/uploadApp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/mainProject/uploadApp/urls.py b/mainProject/uploadApp/urls.py new file mode 100644 index 0000000..67d18f8 --- /dev/null +++ b/mainProject/uploadApp/urls.py @@ -0,0 +1,7 @@ +from django.conf.urls import url + +from . import views + +urlpatterns = [ + url(r'^$', views.index, name='index'), +] \ No newline at end of file diff --git a/mainProject/uploadApp/views.py b/mainProject/uploadApp/views.py new file mode 100644 index 0000000..0079249 --- /dev/null +++ b/mainProject/uploadApp/views.py @@ -0,0 +1,9 @@ +from django.shortcuts import render + +# Create your views here. + +from django.http import HttpResponse + + +def index(request): + return HttpResponse("Hello, world. You're at the uploadApp index.") \ No newline at end of file