Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added app/app/__init__.py
Empty file.
Binary file added app/app/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added app/app/__pycache__/settings.cpython-37.pyc
Binary file not shown.
Binary file added app/app/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file added app/app/__pycache__/wsgi.cpython-37.pyc
Binary file not shown.
9 changes: 9 additions & 0 deletions app/app/management/commands/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.core.management.commands.runserver import Command as RunServer

class Command(RunServer):

def check(self, *args, **kwargs):
self.stdout.write(self.style.WARNING("SKIPPING SYSTEM CHECKS!\n"))

def check_migrations(self, *args, **kwargs):
self.stdout.write(self.style.WARNING("SKIPPING MIGRATION CHECKS!\n"))
123 changes: 123 additions & 0 deletions app/app/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
"""
Django settings for app project.

Generated by 'django-admin startproject' using Django 2.2.3.

For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/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/2.2/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 's$%t4oz0c0^$-e1%ize(z^&@3$k6iuuump5%v-*0ivpph4^@p^'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = ['*']


# Application definition

INSTALLED_APPS = [
'home',
'manufacturers',
'logistics',
'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 = 'app.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 = 'app.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.2/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/2.2/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/2.2/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/2.2/howto/static-files/

STATIC_URL = '/static/'
7 changes: 7 additions & 0 deletions app/app/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin
from django.urls import path , include

urlpatterns = [
path('admin/', admin.site.urls),
path('', include('home.urls'))
]
16 changes: 16 additions & 0 deletions app/app/wsgi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"""
WSGI config for app 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/2.2/howto/deployment/wsgi/
"""

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')

application = get_wsgi_application()
Binary file added app/db.sqlite3
Binary file not shown.
Empty file added app/home/__init__.py
Empty file.
Binary file added app/home/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added app/home/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added app/home/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file added app/home/__pycache__/admin.cpython-37.pyc
Binary file not shown.
Binary file added app/home/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file added app/home/__pycache__/models.cpython-37.pyc
Binary file not shown.
Binary file added app/home/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file added app/home/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file added app/home/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file added app/home/__pycache__/views.cpython-37.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions app/home/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions app/home/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class HomeConfig(AppConfig):
name = 'home'
Empty file added app/home/migrations/__init__.py
Empty file.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions app/home/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
10 changes: 10 additions & 0 deletions app/home/templates/home/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<html>
<head>
HOME PAGE
</head><br>
<body>
<br><br>
<a href="/manufacturers"><button>Manufacturers</button></a><br>
<a href="/logistics"><button>Logistics</button></a><br>
</body>
</html>
3 changes: 3 additions & 0 deletions app/home/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
8 changes: 8 additions & 0 deletions app/home/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.contrib import admin
from django.urls import path , include
from . import views
urlpatterns = [
path('', views.home , name = 'home'),
path('manufacturers/', include('manufacturers.urls')),
path('logistics/', include('logistics.urls')),
]
4 changes: 4 additions & 0 deletions app/home/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from django.shortcuts import render

def home(request):
return render(request, 'home/home.html')
Empty file added app/logistics/__init__.py
Empty file.
Binary file added app/logistics/__pycache__/__init__.cpython-35.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/admin.cpython-37.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/models.cpython-37.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/views.cpython-35.pyc
Binary file not shown.
Binary file added app/logistics/__pycache__/views.cpython-37.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions app/logistics/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions app/logistics/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class LogisticsConfig(AppConfig):
name = 'logistics'
Empty file.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions app/logistics/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
3 changes: 3 additions & 0 deletions app/logistics/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
7 changes: 7 additions & 0 deletions app/logistics/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.contrib import admin
from django.urls import path, include
from . import views

urlpatterns = [
path('', views.index, name = 'index')
]
5 changes: 5 additions & 0 deletions app/logistics/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.shortcuts import render
from django.http import HttpResponse

def index(request):
return HttpResponse('<h1>LOGS</h1>')
21 changes: 21 additions & 0 deletions app/manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
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?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
9 changes: 9 additions & 0 deletions app/management/commands/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from django.core.management.commands.runserver import Command as RunServer

class Command(RunServer):

def check(self, *args, **kwargs):
self.stdout.write(self.style.WARNING("SKIPPING SYSTEM CHECKS!\n"))

def check_migrations(self, *args, **kwargs):
self.stdout.write(self.style.WARNING("SKIPPING MIGRATION CHECKS!\n"))
Empty file added app/manufacturers/__init__.py
Empty file.
Binary file not shown.
Binary file not shown.
Binary file added app/manufacturers/__pycache__/admin.cpython-35.pyc
Binary file not shown.
Binary file added app/manufacturers/__pycache__/admin.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file added app/manufacturers/__pycache__/models.cpython-35.pyc
Binary file not shown.
Binary file added app/manufacturers/__pycache__/models.cpython-37.pyc
Binary file not shown.
Binary file added app/manufacturers/__pycache__/urls.cpython-35.pyc
Binary file not shown.
Binary file added app/manufacturers/__pycache__/urls.cpython-37.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions app/manufacturers/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
5 changes: 5 additions & 0 deletions app/manufacturers/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class ManufacturersConfig(AppConfig):
name = 'manufacturers'
Loading