diff --git a/.gitignore b/.gitignore index 8872716..2f48bb6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ venv/ -db.sqlite3 \ No newline at end of file +db.sqlite3 +__pycache__/ \ No newline at end of file diff --git a/blog/__pycache__/__init__.cpython-37.pyc b/blog/__pycache__/__init__.cpython-37.pyc index 7f42922..5a1a55a 100644 Binary files a/blog/__pycache__/__init__.cpython-37.pyc and b/blog/__pycache__/__init__.cpython-37.pyc differ diff --git a/blog/__pycache__/settings.cpython-37.pyc b/blog/__pycache__/settings.cpython-37.pyc index a80d8c1..8922d56 100644 Binary files a/blog/__pycache__/settings.cpython-37.pyc and b/blog/__pycache__/settings.cpython-37.pyc differ diff --git a/blog/__pycache__/urls.cpython-37.pyc b/blog/__pycache__/urls.cpython-37.pyc index cd2d674..21b64a2 100644 Binary files a/blog/__pycache__/urls.cpython-37.pyc and b/blog/__pycache__/urls.cpython-37.pyc differ diff --git a/blog/__pycache__/wsgi.cpython-37.pyc b/blog/__pycache__/wsgi.cpython-37.pyc index 5d0e199..7aa5139 100644 Binary files a/blog/__pycache__/wsgi.cpython-37.pyc and b/blog/__pycache__/wsgi.cpython-37.pyc differ diff --git a/blog/settings.py b/blog/settings.py index f32af9e..62ce525 100644 --- a/blog/settings.py +++ b/blog/settings.py @@ -37,6 +37,7 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'main.apps.MainConfig', ] MIDDLEWARE = [ @@ -54,7 +55,7 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', - 'DIRS': [], + 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ @@ -118,3 +119,7 @@ # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_URL = '/static/' + +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] diff --git a/blog/urls.py b/blog/urls.py index 269c036..655779b 100644 --- a/blog/urls.py +++ b/blog/urls.py @@ -14,8 +14,9 @@ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin -from django.urls import path +from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), + path('',include('main.urls')), ] diff --git a/main/__init__.py b/main/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main/admin.py b/main/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/main/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/main/apps.py b/main/apps.py new file mode 100644 index 0000000..833bff6 --- /dev/null +++ b/main/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class MainConfig(AppConfig): + name = 'main' diff --git a/main/migrations/__init__.py b/main/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/main/models.py b/main/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/main/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/main/tests.py b/main/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/main/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/main/urls.py b/main/urls.py new file mode 100644 index 0000000..f4a591c --- /dev/null +++ b/main/urls.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from django.urls import path +from . import views + +urlpatterns = [ + path('', views.blogHome, name='blog-home') +] \ No newline at end of file diff --git a/main/views.py b/main/views.py new file mode 100644 index 0000000..1aebbc2 --- /dev/null +++ b/main/views.py @@ -0,0 +1,7 @@ +from django.shortcuts import render +from django.http import HttpResponse +# Create your views here. + + +def blogHome(request): + return render(request,'index.html') diff --git a/Static/CSS/style.css b/static/css/style.css similarity index 100% rename from Static/CSS/style.css rename to static/css/style.css diff --git a/Static/CSS/style1.css b/static/css/style1.css similarity index 100% rename from Static/CSS/style1.css rename to static/css/style1.css diff --git a/Static/images/back.jpeg b/static/images/back.jpeg similarity index 100% rename from Static/images/back.jpeg rename to static/images/back.jpeg diff --git a/Static/images/image1.jpeg b/static/images/image1.jpeg similarity index 100% rename from Static/images/image1.jpeg rename to static/images/image1.jpeg diff --git a/Static/images/image2.jfif b/static/images/image2.jfif similarity index 100% rename from Static/images/image2.jfif rename to static/images/image2.jfif diff --git a/Static/images/image3.jfif b/static/images/image3.jfif similarity index 100% rename from Static/images/image3.jfif rename to static/images/image3.jfif diff --git a/static/CSS/style.css b/static/static/CSS/style.css similarity index 100% rename from static/CSS/style.css rename to static/static/CSS/style.css diff --git a/static/CSS/uikit-rtl.css b/static/static/CSS/uikit-rtl.css similarity index 100% rename from static/CSS/uikit-rtl.css rename to static/static/CSS/uikit-rtl.css diff --git a/static/CSS/uikit-rtl.min.css b/static/static/CSS/uikit-rtl.min.css similarity index 100% rename from static/CSS/uikit-rtl.min.css rename to static/static/CSS/uikit-rtl.min.css diff --git a/static/CSS/uikit.css b/static/static/CSS/uikit.css similarity index 100% rename from static/CSS/uikit.css rename to static/static/CSS/uikit.css diff --git a/static/CSS/uikit.min.css b/static/static/CSS/uikit.min.css similarity index 100% rename from static/CSS/uikit.min.css rename to static/static/CSS/uikit.min.css diff --git a/static/JS/uikit-icons.js b/static/static/JS/uikit-icons.js similarity index 100% rename from static/JS/uikit-icons.js rename to static/static/JS/uikit-icons.js diff --git a/static/JS/uikit-icons.min.js b/static/static/JS/uikit-icons.min.js similarity index 100% rename from static/JS/uikit-icons.min.js rename to static/static/JS/uikit-icons.min.js diff --git a/static/JS/uikit.js b/static/static/JS/uikit.js similarity index 100% rename from static/JS/uikit.js rename to static/static/JS/uikit.js diff --git a/static/JS/uikit.min.js b/static/static/JS/uikit.min.js similarity index 100% rename from static/JS/uikit.min.js rename to static/static/JS/uikit.min.js diff --git a/static/images/1_2UYnnJKYwLM4_TATq2f06g.jpeg b/static/static/images/1_2UYnnJKYwLM4_TATq2f06g.jpeg similarity index 100% rename from static/images/1_2UYnnJKYwLM4_TATq2f06g.jpeg rename to static/static/images/1_2UYnnJKYwLM4_TATq2f06g.jpeg diff --git a/Static/templates/index.html b/static/templates/index.html similarity index 100% rename from Static/templates/index.html rename to static/templates/index.html diff --git a/templates/login.html b/static/templates/templates/login.html similarity index 100% rename from templates/login.html rename to static/templates/templates/login.html diff --git a/templates/sign_up.html b/static/templates/templates/sign_up.html similarity index 100% rename from templates/sign_up.html rename to static/templates/templates/sign_up.html diff --git a/Static/templates/index1.html b/templates/index.html similarity index 91% rename from Static/templates/index1.html rename to templates/index.html index 2f05725..93c0061 100644 --- a/Static/templates/index1.html +++ b/templates/index.html @@ -1,10 +1,12 @@ + +{% load static %} Latest Blogs - + @@ -35,7 +37,7 @@

Latest Blogs

By Admin September 24,2020

- +

Contact Admin For More Blogs

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, @@ -46,9 +48,8 @@

Contact Admin For More Blogs

-
-

By Admin September 26,2020

- +
{% static 'images/image1.jpeg' %}span>September 26,2020

+

Contact Admin For More Blogs

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, @@ -61,20 +62,20 @@

Contact Admin For More Blogs

By Admin October 2,2020

- +

Contact Admin For More Blogs

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book

Read More 7 people liked 3.. -

+

../images/image3.jfif

By Admin October 2,2020

- +

Contact Admin For More Blogs

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, @@ -87,7 +88,7 @@

Contact Admin For More Blogs

By Admin September 26,2020

- +

Contact Admin For More Blogs

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, @@ -100,7 +101,7 @@

Contact Admin For More Blogs

By Admin September 26,2020

- +

Contact Admin For More Blogs

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,