From 43cfed01352edd7d10f7587f2231309b02261002 Mon Sep 17 00:00:00 2001 From: Kumi Date: Fri, 5 Aug 2022 16:11:28 +0000 Subject: [PATCH] Add restoroo-frontend as submodule Add apps for restaurant backend views and public views --- .gitmodules | 3 +++ frontend | 1 + {templates => myrestaurant}/__init__.py | 0 myrestaurant/admin.py | 3 +++ myrestaurant/apps.py | 6 ++++++ myrestaurant/migrations/__init__.py | 0 myrestaurant/models.py | 3 +++ myrestaurant/tests.py | 3 +++ myrestaurant/views.py | 3 +++ public/__init__.py | 0 public/admin.py | 3 +++ public/apps.py | 6 ++++++ public/migrations/__init__.py | 0 public/models.py | 3 +++ public/tests.py | 3 +++ public/views.py | 3 +++ restoroo/settings.py | 9 +++++++-- 17 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 frontend rename {templates => myrestaurant}/__init__.py (100%) create mode 100644 myrestaurant/admin.py create mode 100644 myrestaurant/apps.py create mode 100644 myrestaurant/migrations/__init__.py create mode 100644 myrestaurant/models.py create mode 100644 myrestaurant/tests.py create mode 100644 myrestaurant/views.py create mode 100644 public/__init__.py create mode 100644 public/admin.py create mode 100644 public/apps.py create mode 100644 public/migrations/__init__.py create mode 100644 public/models.py create mode 100644 public/tests.py create mode 100644 public/views.py diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..07e9d53 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "frontend"] + path = frontend + url = git@git.kumi:restoroo/restoroo-frontend.git diff --git a/frontend b/frontend new file mode 160000 index 0000000..e117a67 --- /dev/null +++ b/frontend @@ -0,0 +1 @@ +Subproject commit e117a67e55ec78cbee83e9fd6ea799982a3cb22e diff --git a/templates/__init__.py b/myrestaurant/__init__.py similarity index 100% rename from templates/__init__.py rename to myrestaurant/__init__.py diff --git a/myrestaurant/admin.py b/myrestaurant/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/myrestaurant/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/myrestaurant/apps.py b/myrestaurant/apps.py new file mode 100644 index 0000000..0c3e0bb --- /dev/null +++ b/myrestaurant/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class MyrestaurantConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'myrestaurant' diff --git a/myrestaurant/migrations/__init__.py b/myrestaurant/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myrestaurant/models.py b/myrestaurant/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/myrestaurant/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/myrestaurant/tests.py b/myrestaurant/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/myrestaurant/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/myrestaurant/views.py b/myrestaurant/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/myrestaurant/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/public/__init__.py b/public/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/public/admin.py b/public/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/public/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/public/apps.py b/public/apps.py new file mode 100644 index 0000000..74e8998 --- /dev/null +++ b/public/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PublicConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'public' diff --git a/public/migrations/__init__.py b/public/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/public/models.py b/public/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/public/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/public/tests.py b/public/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/public/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/public/views.py b/public/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/public/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/restoroo/settings.py b/restoroo/settings.py index 1cb674f..e691fca 100644 --- a/restoroo/settings.py +++ b/restoroo/settings.py @@ -30,6 +30,7 @@ INSTALLED_APPS = [ 'phonenumber_field', 'core', + ] AUTH_USER_MODEL = "core.User" @@ -50,8 +51,8 @@ ROOT_URLCONF = 'restoroo.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], - 'APP_DIRS': True, + 'DIRS': [BASE_DIR / "templates"], + 'APP_DIRS': False, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', @@ -132,6 +133,10 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.0/howto/static-files/ +STATICFILES_DIRS = [ + BASE_DIR / "frontend/static/", +] + STATIC_URL = '/static/' STATIC_ROOT = None if DEBUG else CONFIG_FILE.config.get("RESTOROO", "StaticRoot", fallback=BASE_DIR / "static")