From 390b3f704b6c9d6e4425895b582caa1a77053f98 Mon Sep 17 00:00:00 2001 From: Rushil Umaretiya <2023rumareti@tjhsst.edu> Date: Tue, 20 Oct 2020 01:21:22 -0400 Subject: [PATCH] moved notions_updater to notes, merged the settings and apps --- config/settings.py | 6 +++--- config/urls.py | 4 ++-- {notion_updater => notes}/__init__.py | 0 {notion_updater => notes}/admin.py | 0 notes/apps.py | 5 +++++ {notion_updater => notes}/models.py | 0 {static => notes/static/notes}/css/base.css | 0 .../static/notes}/css/meeting.css | 0 .../templates/notes}/base.html | 0 .../templates/notes}/meeting.html | 2 +- .../templates/notes}/test.html | 0 {notion_updater => notes}/tests.py | 0 {notion_updater => notes}/urls.py | 2 +- {notion_updater => notes}/views.py | 0 notion_updater/apps.py | 5 ----- notion_updater/migrations/0001_initial.py | 21 ------------------- notion_updater/migrations/__init__.py | 0 pages/migrations/__init__.py | 0 18 files changed, 12 insertions(+), 33 deletions(-) rename {notion_updater => notes}/__init__.py (100%) rename {notion_updater => notes}/admin.py (100%) create mode 100644 notes/apps.py rename {notion_updater => notes}/models.py (100%) rename {static => notes/static/notes}/css/base.css (100%) rename {static => notes/static/notes}/css/meeting.css (100%) rename {templates => notes/templates/notes}/base.html (100%) rename {notion_updater/templates => notes/templates/notes}/meeting.html (83%) rename {notion_updater/templates => notes/templates/notes}/test.html (100%) rename {notion_updater => notes}/tests.py (100%) rename {notion_updater => notes}/urls.py (80%) rename {notion_updater => notes}/views.py (100%) delete mode 100644 notion_updater/apps.py delete mode 100644 notion_updater/migrations/0001_initial.py delete mode 100644 notion_updater/migrations/__init__.py delete mode 100644 pages/migrations/__init__.py diff --git a/config/settings.py b/config/settings.py index fac603c..387beea 100644 --- a/config/settings.py +++ b/config/settings.py @@ -11,7 +11,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path -from my_secrets import secrets +from my_secrets.secrets import * # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -30,6 +30,7 @@ ALLOWED_HOSTS = [] INSTALLED_APPS = [ 'pages', + 'notes', 'django.contrib.admin', 'django.contrib.auth', @@ -37,8 +38,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', - 'pages', - 'notion_updater', + 'django_extensions', 'django_secrets' ] diff --git a/config/urls.py b/config/urls.py index f6676c1..5ec3a6d 100644 --- a/config/urls.py +++ b/config/urls.py @@ -18,6 +18,6 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), - path('notes/', include('notion_updater.urls')), + path('notes/', include('notes.urls')), path('', include('pages.urls')) -] \ No newline at end of file +] diff --git a/notion_updater/__init__.py b/notes/__init__.py similarity index 100% rename from notion_updater/__init__.py rename to notes/__init__.py diff --git a/notion_updater/admin.py b/notes/admin.py similarity index 100% rename from notion_updater/admin.py rename to notes/admin.py diff --git a/notes/apps.py b/notes/apps.py new file mode 100644 index 0000000..b6155ac --- /dev/null +++ b/notes/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class NotesConfig(AppConfig): + name = 'notes' diff --git a/notion_updater/models.py b/notes/models.py similarity index 100% rename from notion_updater/models.py rename to notes/models.py diff --git a/static/css/base.css b/notes/static/notes/css/base.css similarity index 100% rename from static/css/base.css rename to notes/static/notes/css/base.css diff --git a/static/css/meeting.css b/notes/static/notes/css/meeting.css similarity index 100% rename from static/css/meeting.css rename to notes/static/notes/css/meeting.css diff --git a/templates/base.html b/notes/templates/notes/base.html similarity index 100% rename from templates/base.html rename to notes/templates/notes/base.html diff --git a/notion_updater/templates/meeting.html b/notes/templates/notes/meeting.html similarity index 83% rename from notion_updater/templates/meeting.html rename to notes/templates/notes/meeting.html index 27e1639..60729a8 100644 --- a/notion_updater/templates/meeting.html +++ b/notes/templates/notes/meeting.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'notion/base.html' %} {% load static %} {% block css %} <link rel="stylesheet" href="{% static 'css/meeting.css' %}"> diff --git a/notion_updater/templates/test.html b/notes/templates/notes/test.html similarity index 100% rename from notion_updater/templates/test.html rename to notes/templates/notes/test.html diff --git a/notion_updater/tests.py b/notes/tests.py similarity index 100% rename from notion_updater/tests.py rename to notes/tests.py diff --git a/notion_updater/urls.py b/notes/urls.py similarity index 80% rename from notion_updater/urls.py rename to notes/urls.py index 737ef65..ae2334a 100644 --- a/notion_updater/urls.py +++ b/notes/urls.py @@ -1,5 +1,5 @@ from django.urls import path -import notion_updater.views as views +from . import views urlpatterns = [ path('', views.test), diff --git a/notion_updater/views.py b/notes/views.py similarity index 100% rename from notion_updater/views.py rename to notes/views.py diff --git a/notion_updater/apps.py b/notion_updater/apps.py deleted file mode 100644 index 99f2bc8..0000000 --- a/notion_updater/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class NotionUpdaterConfig(AppConfig): - name = 'notion_updater' diff --git a/notion_updater/migrations/0001_initial.py b/notion_updater/migrations/0001_initial.py deleted file mode 100644 index 60aa7fb..0000000 --- a/notion_updater/migrations/0001_initial.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.1.2 on 2020-10-19 21:40 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ] - - operations = [ - migrations.CreateModel( - name='NotionPage', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('url', models.URLField(max_length=300)), - ], - ), - ] diff --git a/notion_updater/migrations/__init__.py b/notion_updater/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/pages/migrations/__init__.py b/pages/migrations/__init__.py deleted file mode 100644 index e69de29..0000000