From 1e7ff8f38df54a84ad2e1f8d7491f5baa70a0d34 Mon Sep 17 00:00:00 2001 From: surya Date: Sun, 7 Jul 2024 08:17:43 +0530 Subject: [PATCH] Added Home Page Added the Home Page and cleared some code --- blog/__pycache__/urls.cpython-310.pyc | Bin 568 -> 603 bytes blog/__pycache__/views.cpython-310.pyc | Bin 2405 -> 2475 bytes blog/urls.py | 1 + blog/views.py | 10 ++++------ templates/blog/blogDetail.html | 2 +- templates/blog/blogList.html | 2 +- templates/blog/home.html | 7 ------- templates/index.html | 20 ++++++++++++++++++++ templates/users/explore.html | 18 ------------------ templates/users/people.html | 25 ------------------------- templates/users/profile.html | 9 +-------- 11 files changed, 28 insertions(+), 66 deletions(-) create mode 100644 templates/index.html delete mode 100644 templates/users/explore.html delete mode 100644 templates/users/people.html diff --git a/blog/__pycache__/urls.cpython-310.pyc b/blog/__pycache__/urls.cpython-310.pyc index 577dcc22da86a2be62e2ac679c8470b43fbe98a4..3a2ade3c732286ee9858e3a047281b1596655e01 100644 GIT binary patch delta 251 zcmdnNa+^gvpO=@50SL?)y3+nKGB7*_agYHwkmCTv#gis#8`h_Aq_Fier!uB+rZQ)- zEnr{BkirEO;RcFufJJzqBD_EmPOu0cRD>TW!UYx)fQkqLMYvOhK)iJJD4rDIUC33L^R!&;V^I`OP94{Kg(d9i*Jiyx4hc)yU5cXA-365A~nknrSU j#soG2p!y<#$u}82B}9Ns9tIvpK4v~fAt>ZyTW!j&Qb;-#}iai<6dGiVA;Jft)6cL5{M ot<8 diff --git a/blog/__pycache__/views.cpython-310.pyc b/blog/__pycache__/views.cpython-310.pyc index 5b1f679b993e0b9c08a51e60faca810e2d930169..132fee1acfa2cbe0fa09643cb6a1817605bc46cf 100644 GIT binary patch delta 1034 zcmZuv&rcIU6yDk2U0R9@l8B{HK(HD>5K$3KC>RqDjY>qrK~kM5Y_sj^>^7*`#zZ)I zz%-M1@}S=QmGF1?C+yvuw6doN8xk74 z0QtsDkN|?E&?v{`6)QCMv3OS~Q6to$oVg{@#Ao8jy9#KwisC)_Ig*Ujg6nNXmg74$ zKPc6nvdFwwXZ+)+fbAMA zK7ufJ)LKIP)*q_p;7H`OGgEvVof8N+3_gVrOKTIMwgR5dh4mA8E@^yn4W8uwni-d^-5B$4Dz-#BDHJ z7}Z1g0+JN@RoLa#;w#IkQTAeLJE*!GIe9!0jOEu6+WKNXb=#}5JLtH9un17hr^P$- zzMTO(vQ}A8a@=)??ZD5{GRGd^<#8M}$F}$a0;Y8^A5Ste7poqvyX+=`2)`d7DVcED R@Txt-w${^SYo?V{{sGV%$9(_* delta 1020 zcmaJ=&2G~`5cb+@d*d`!n*In0(h_I`X+dqFv;`GJOIw7HDxeZVT%t7I1V>H`>kSCW zRwc@X9+0Yi0YF?RSDu0c;)s0b33vdQG0;RDur=S#?96;Kvul4G{$9uhxtycHbF==c zF?*0JlIUP2rrTO&=-^X%Hv=99aswnh1aOJeTI7xXR`W&ch%J}K zwre&?%p$|pxa7p zo&ghNw-UPJ2Tiq4KF<#( zbPe>x4t83+F2lsA`F=w01ffhEFZ4R0taa)YH9AMYU{P9exzFIi5|p0O08KC#CA8F-s=YaqEQoYHW~#8l&TD7$c4WBst03kNukD z)lRL=MG+l67)P@Na1P{$1;8{)7!f6PXcd*B@5!iIHs?!ua3!=6i1r5}hQRnulIG8W zxv2Kd>1F{Prw~pf9CaZk!Az`%$9*>x7@y>-)w*8`!#elj zYLTWgtaSYh7>T*M6Lh7}L9Y-o3QJ!(96K><7;zia5To)$T!Ce)GN`_=dxZ%Man`x4 zdH#KmKZE', views.BlogDetailView.as_view(), name='Blog'), path('blog/create/', views.BlogCreateView.as_view(), name='Blog Create'), path('post/', views.PostDetailView.as_view(), name='Post'), diff --git a/blog/views.py b/blog/views.py index 6c9e863..4e5d0e0 100644 --- a/blog/views.py +++ b/blog/views.py @@ -5,14 +5,10 @@ from .models import * # Create your views here. -def home(request): - blogs = { - 'blog': Blog.objects.all() - } - +def news(request): allow_empty = True queryset = None - model = Post + model = Blog paginate_by = None paginate_orphans = 0 context_object_name = 'posts' @@ -75,3 +71,5 @@ class PostCreateView(LoginRequiredMixin, CreateView): def about(request): return render(request, 'blog/about.html', {'title': 'About'}) +def home(request): + return render(request, 'index.html', {'title': 'About'}) \ No newline at end of file diff --git a/templates/blog/blogDetail.html b/templates/blog/blogDetail.html index e28952e..02e7c72 100644 --- a/templates/blog/blogDetail.html +++ b/templates/blog/blogDetail.html @@ -1,4 +1,4 @@ -{% extends 'base2.html' %} +{% extends 'base.html' %} {% block content %} {% load markdown_extras %} diff --git a/templates/blog/blogList.html b/templates/blog/blogList.html index 28f6dbb..f004fc1 100644 --- a/templates/blog/blogList.html +++ b/templates/blog/blogList.html @@ -1,4 +1,4 @@ -{% extends 'base2.html' %} +{% extends 'base.html' %} {% block content %} {% load markdown_extras %} diff --git a/templates/blog/home.html b/templates/blog/home.html index 2f712a1..898bba4 100644 --- a/templates/blog/home.html +++ b/templates/blog/home.html @@ -43,13 +43,6 @@ - {% if user.is_authenticated %} -
- {% csrf_token %} - -
- {% endif %} - diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..728eca3 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,20 @@ +{% extends 'base.html' %} + +{% block content %} + +
+
+

Beyond Heroes

+

+ The project that rose from the ashes of a game that was once. We aim to recreate the experience that we enjoyed throughout the years, while also adding new features that make it truly Beyond Heroes and Generals.
+ Join Us on this journey to relive the old days and experience something new by clicking on the button below! +

+
+
+
+ +
+ +{% endblock %} \ No newline at end of file diff --git a/templates/users/explore.html b/templates/users/explore.html deleted file mode 100644 index 47aa888..0000000 --- a/templates/users/explore.html +++ /dev/null @@ -1,18 +0,0 @@ -{% extends 'base.html' %} -{% block content %} -

Explore

-

Know your potential

-
-
-
-

Why this community is built

-

The TechBlog™ community is buit for people who love to share and help other people whenever they get stuck. We have built this platform for people to help each other and make project making fun. We encourage people to get together and work in harmony for the wellbeing of all. People can make groups to work on a project or send blogs or videos that explain a topic or problem very significantly and make work much easier for other co-workers or users. Our main goal is to help everyone and enhance the art of Problem Solving through this platform.

-
-
-
-

What do we offer

-

The TechBlog™ community offers a platform for group work and online chat to all and allow our members to share text, images, videos, codes, projects and even more... with any other member.

-
-
-
-{% endblock %} \ No newline at end of file diff --git a/templates/users/people.html b/templates/users/people.html deleted file mode 100644 index fa7495c..0000000 --- a/templates/users/people.html +++ /dev/null @@ -1,25 +0,0 @@ -{% extends 'base.html' %} -{% block content %} -

People

-

Know the people around you better!

-
-
    - {% for object in users %} -
  • -
    - {{ object.username }} - -

    Email: {{ object.email }}

    - -
    -
    -
  • - {% endfor %} -
- - - - - -
-{% endblock %} \ No newline at end of file diff --git a/templates/users/profile.html b/templates/users/profile.html index 82ddf66..3d7c056 100644 --- a/templates/users/profile.html +++ b/templates/users/profile.html @@ -51,14 +51,7 @@ - - {% if user.is_authenticated %} -
- {% csrf_token %} - -
- {% endif %} - +