Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
n5q committed Aug 26, 2023
1 parent 66e1524 commit eab7c8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib64

This file was deleted.

3 changes: 2 additions & 1 deletion twitterclone/main/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.contrib import admin

from . import models
# Register your models here.
admin.site.register(models.Post)
10 changes: 10 additions & 0 deletions twitterclone/main/models.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
from django.db import models

# Create your models here.
class Post(models.Model):
title = models.CharField(max_length=100)
body = models.TextField()
date = models.DateTimeField(auto_now_add=True)
likes = models.IntegerField(default=0)
dislikes = models.IntegerField(default=0)
author = models.CharField(max_length=50)

def __str__(self) -> str:
return self.title

0 comments on commit eab7c8c

Please sign in to comment.