From 3c2bccd69c80332e402550335478f0c739eeef93 Mon Sep 17 00:00:00 2001 From: sina lalehbakhsh Date: Wed, 10 Jul 2024 09:08:43 -0400 Subject: [PATCH] Add All Changes --- Steps /steps to create Django WebApp.txt | 3 +++ config/settings.py | 1 + pages/__init__.py | 0 pages/admin.py | 3 +++ pages/apps.py | 6 ++++++ pages/migrations/__init__.py | 0 pages/models.py | 3 +++ pages/tests.py | 3 +++ pages/views.py | 3 +++ 9 files changed, 22 insertions(+) create mode 100644 pages/__init__.py create mode 100644 pages/admin.py create mode 100644 pages/apps.py create mode 100644 pages/migrations/__init__.py create mode 100644 pages/models.py create mode 100644 pages/tests.py create mode 100644 pages/views.py diff --git a/Steps /steps to create Django WebApp.txt b/Steps /steps to create Django WebApp.txt index a1cbf60..6420bb7 100644 --- a/Steps /steps to create Django WebApp.txt +++ b/Steps /steps to create Django WebApp.txt @@ -90,3 +90,6 @@ python manage.py collectstatic +## write in terminal +docker-compose exec web python manage.py startapp pages +## ADD in config/setting.py -> INSTALLED_APPS = [ ... 'accounts', 'pages',] diff --git a/config/settings.py b/config/settings.py index c102334..74db50b 100644 --- a/config/settings.py +++ b/config/settings.py @@ -46,6 +46,7 @@ # Installed myself: 'accounts', + 'pages', ] MIDDLEWARE = [ diff --git a/pages/__init__.py b/pages/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pages/admin.py b/pages/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/pages/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/pages/apps.py b/pages/apps.py new file mode 100644 index 0000000..cdd024b --- /dev/null +++ b/pages/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PagesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'pages' diff --git a/pages/migrations/__init__.py b/pages/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pages/models.py b/pages/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/pages/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/pages/tests.py b/pages/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/pages/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/pages/views.py b/pages/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/pages/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.