15 changed files with 227 additions and 28 deletions
@ -1,7 +1,11 @@ |
|||
from django.contrib import admin |
|||
from .models import Post |
|||
from .models import Post, Index_Post |
|||
|
|||
class PostAdmin(admin.ModelAdmin): |
|||
list_display = ('title', 'short_description', 'pub_date') |
|||
|
|||
class IndexPostAdmin(admin.ModelAdmin): |
|||
list_display = ('title', 'content', 'pub_date') |
|||
|
|||
admin.site.register(Post, PostAdmin) |
|||
admin.site.register(Index_Post, IndexPostAdmin) |
|||
@ -0,0 +1,22 @@ |
|||
# Generated by Django 4.2.7 on 2024-01-27 21:42 |
|||
|
|||
from django.db import migrations, models |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('blog', '0002_post_short_description'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.CreateModel( |
|||
name='Index_Post', |
|||
fields=[ |
|||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|||
('title', models.CharField(max_length=200)), |
|||
('content', models.TextField()), |
|||
('pub_date', models.DateTimeField(verbose_name='date published')), |
|||
], |
|||
), |
|||
] |
|||
@ -0,0 +1,28 @@ |
|||
# Generated by Django 4.2.7 on 2024-01-27 21:51 |
|||
|
|||
from django.db import migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('blog', '0003_index_post'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RenameField( |
|||
model_name='index_post', |
|||
old_name='content', |
|||
new_name='IndexContent', |
|||
), |
|||
migrations.RenameField( |
|||
model_name='index_post', |
|||
old_name='pub_date', |
|||
new_name='IndexPub_date', |
|||
), |
|||
migrations.RenameField( |
|||
model_name='index_post', |
|||
old_name='title', |
|||
new_name='IndexTitle', |
|||
), |
|||
] |
|||
@ -0,0 +1,28 @@ |
|||
# Generated by Django 4.2.7 on 2024-01-27 21:57 |
|||
|
|||
from django.db import migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('blog', '0004_rename_content_index_post_indexcontent_and_more'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.RenameField( |
|||
model_name='index_post', |
|||
old_name='IndexContent', |
|||
new_name='content', |
|||
), |
|||
migrations.RenameField( |
|||
model_name='index_post', |
|||
old_name='IndexPub_date', |
|||
new_name='pub_date', |
|||
), |
|||
migrations.RenameField( |
|||
model_name='index_post', |
|||
old_name='IndexTitle', |
|||
new_name='title', |
|||
), |
|||
] |
|||
@ -0,0 +1,110 @@ |
|||
{% load static %} |
|||
|
|||
<!DOCTYPE html> |
|||
<html> |
|||
|
|||
<head> |
|||
<!-- Basic --> |
|||
<meta charset="utf-8" /> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
|||
<!-- Mobile Metas --> |
|||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> |
|||
<!-- Site Metas --> |
|||
<meta name="keywords" content="" /> |
|||
<meta name="description" content="" /> |
|||
<meta name="author" content="" /> |
|||
|
|||
<title>Prudellic</title> |
|||
|
|||
<!-- slider stylesheet --> |
|||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css" /> |
|||
|
|||
<!-- bootstrap core css --> |
|||
<link rel="stylesheet" type="text/css" href="{% static 'blog/css/bootstrap.css' %}" /> |
|||
|
|||
<!-- fonts style --> |
|||
<link href="https://fonts.googleapis.com/css?family=Baloo+Chettan|Dosis:400,600,700|Poppins:400,600,700&display=swap" rel="stylesheet" /> |
|||
<!-- Custom styles for this template --> |
|||
<link href="{% static 'blog/css/style.css' %}" rel="stylesheet" /> |
|||
<!-- responsive style --> |
|||
<link href="{% static 'blog/css/responsive.css' %}" rel="stylesheet" /> |
|||
</head> |
|||
|
|||
<body> |
|||
|
|||
<!-- header section strats --> |
|||
<header class="header_section"> |
|||
<div class="container"> |
|||
<div class="header_nav"> |
|||
<a class="navbar-brand brand_desktop" href="index.html"> |
|||
<img src="{% static 'blog/images/logo.png' %}" alt="" /> |
|||
</a> |
|||
<div class="main_nav"> |
|||
<div class="top_nav"> |
|||
<ul class=" "> |
|||
<li class=""> |
|||
<a class="" href=""> |
|||
<img src="{% static 'blog/images/mail.png' %}" alt="" /> |
|||
<span>info@prudellic.com</span> |
|||
</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
<div class="bottom_nav"> |
|||
<nav class="navbar navbar-expand-lg custom_nav-container"> |
|||
<a class="navbar-brand brand_mobile" href="index.html"> |
|||
<img src="{% static 'blog/images/logo.png' %}" alt="" /> |
|||
</a> |
|||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> |
|||
<span class="navbar-toggler-icon"></span> |
|||
</button> |
|||
<div class="collapse navbar-collapse" id="navbarSupportedContent"> |
|||
<div class="d-flex ml-auto flex-column flex-lg-row align-items-center"> |
|||
|
|||
{% include 'blog/menu.html' %} |
|||
|
|||
<form class="form-inline"> |
|||
<button class="btn ml-3 ml-lg-5 nav_search-btn" type="submit"></button> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</nav> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</header> |
|||
<!-- end header section --> |
|||
</div> |
|||
|
|||
{% for post in index_posts %} |
|||
<section class="about_section layout_padding"> |
|||
<div class="container-fluid"> |
|||
<div class="row"> |
|||
<div class="col-md-10 ml-auto pr-0"> |
|||
<div class="about_container"> |
|||
<div class="row"> |
|||
<div class="col-lg-3 col-md-5"> |
|||
<div class="detail-box"> |
|||
<div class="heading_container"> |
|||
<h2> |
|||
{{ post.title }} |
|||
</h2> |
|||
</div> |
|||
<p> |
|||
{{ post.content|linebreaksbr }} |
|||
</p> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
{% endfor %} |
|||
<!-- end about section --> |
|||
|
|||
</body> |
|||
|
|||
</html> |
|||
@ -0,0 +1,11 @@ |
|||
<ul class="navbar-nav "> |
|||
<li class="nav-item active"> |
|||
<a class="nav-link" href=""> Home </a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a class="nav-link" href="blog"> Blog </a> |
|||
</li> |
|||
<li class="nav-item"> |
|||
<a class="nav-link" href="sexy"> Sexy Stories </a> |
|||
</li> |
|||
</ul> |
|||
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue