File tree Expand file tree Collapse file tree 6 files changed +41
-5
lines changed
Expand file tree Collapse file tree 6 files changed +41
-5
lines changed Original file line number Diff line number Diff line change 1+ # Generated by Django 4.0.2 on 2022-02-24 22:59
2+
3+ from django .db import migrations , models
4+
5+
6+ class Migration (migrations .Migration ):
7+
8+ dependencies = [
9+ ('posts' , '0004_alter_post_username' ),
10+ ]
11+
12+ operations = [
13+ migrations .AlterField (
14+ model_name = 'post' ,
15+ name = 'created_at' ,
16+ field = models .DateTimeField (auto_now_add = True ),
17+ ),
18+ ]
Original file line number Diff line number Diff line change 1+ # Generated by Django 4.0.2 on 2022-02-24 23:19
2+
3+ from django .db import migrations , models
4+
5+
6+ class Migration (migrations .Migration ):
7+
8+ dependencies = [
9+ ('posts' , '0005_alter_post_created_at' ),
10+ ]
11+
12+ operations = [
13+ migrations .AlterField (
14+ model_name = 'post' ,
15+ name = 'created_at' ,
16+ field = models .DateTimeField (auto_now_add = True , db_index = True ),
17+ ),
18+ ]
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ class Post(models.Model):
99 username = models .ManyToManyField (User , blank = True )
1010 title = models .CharField (max_length = 280 , default = 'title' )
1111 content = models .TextField ()
12- created_at = models .DateField (auto_now_add = True )
12+ created_at = models .DateTimeField (auto_now_add = True , db_index = True )
1313 author_photo = models .CharField (max_length = 150 )
1414 author_screen_name = models .CharField (max_length = 64 )
1515 author_name = models .CharField (max_length = 64 )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ <h1 class="section__title">استكشف معنا ماتم اختياره من م
1818 < div class ="post ">
1919 < div class ="post__img "> {{post.thumnail_photo|safe}}</ div >
2020 < div class ="post__meta ">
21- < span > {{post.created_at}}</ span >
21+ < span > {{post.created_at.date }}</ span >
2222 < span > by {{post.author_screen_name}}</ span >
2323 </ div >
2424 < h3 class ="post__title " {% if post.rtl is True %} style ="direction: rtl; " {% endif %} > {{post.title}}</ h3 >
@@ -41,7 +41,7 @@ <h3 class="post__title" {% if post.rtl is True %} style="direction: rtl;" {% end
4141 < div class ="post ">
4242 < div class ="post__img "> {{post.thumnail_photo|safe}}</ div >
4343 < div class ="post__meta ">
44- < span > {{post.created_at}}</ span >
44+ < span > {{post.created_at.date }}</ span >
4545 < span > by {{post.author_screen_name}}</ span >
4646 </ div >
4747 < h3 class ="post__title " {% if post.rtl is True %} style ="direction: rtl; " {% endif %} > {{post.title}}</ h3 >
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ <h1 class="section__title">هنا تجد كل منشوراتك اذا تم تج
1717 < div class ="post ">
1818 < div class ="post__img "> {{post.thumnail_photo|safe}}</ div >
1919 < div class ="post__meta ">
20- < span > {{post.created_at}}</ span >
20+ < span > {{post.created_at.date }}</ span >
2121 < span > by {{post.author_screen_name}}</ span >
2222 </ div >
2323 < h3 class ="post__title "> {{post.title}}</ h3 >
Original file line number Diff line number Diff line change 8787 style ="fill: none; stroke-miterlimit: 10; stroke-width: 32px; " />
8888 < polyline points ="256 128 256 272 352 272 "
8989 style ="fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 32px; " />
90- </ svg > < span > {{post.created_at}}</ span >
90+ </ svg > < span > {{post.created_at.date }}</ span >
9191 </ li >
9292 < li >
9393 < svg xmlns ="http://www.w3.org/2000/svg " width ="512 " height ="512 " viewBox ="0 0 512 512 ">
You can’t perform that action at this time.
0 commit comments