Skip to content

Commit

Permalink
Merge pull request #18 from Pet-projects-CodePET/general
Browse files Browse the repository at this point in the history
Создала приложение general, с базовой моделью.
  • Loading branch information
ArtemKAF authored Feb 2, 2024
2 parents f1de6b4 + c611a81 commit 98559d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

SECRET_KEY = getenv("SECRET_KEY")


ALLOWED_HOSTS = list(
str(getenv("ALLOWED_HOSTS", default=["localhost,127.0.0.1"])).split(",")
)
Expand All @@ -22,6 +23,7 @@
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"general",
]

THIRD_PARTY_APPS = [
Expand Down
11 changes: 11 additions & 0 deletions src/backend/general/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from django.db import models


class CreatedModifiedFields(models.Model):
"""Базовая модель"""

created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)

class Meta:
abstract = True

0 comments on commit 98559d7

Please sign in to comment.