feat: add TimeStampedModel base.py-tpl to project initialization
This commit is contained in:
2 files changed
+12
No files matched your search
@@ -0,0 +1,11 @@
|
||||
"""generated with djinit"""
|
||||
|
||||
from django.db import models
|
||||
|
||||
|
||||
class TimeStampedModel(models.Model):
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
@@ -71,6 +71,7 @@ class DjangoHelper:
|
||||
("urls.py", "config/urls.py-tpl", urls_context),
|
||||
("wsgi.py", "config/wsgi.py-tpl", {"project_name": project_name}),
|
||||
("asgi.py", "config/asgi.py-tpl", {"project_name": project_name}),
|
||||
("base.py", "components/base.py-tpl", {}),
|
||||
]
|
||||
CommonUtils.create_files_from_templates(project_config_dir, project_files, f"{project_name}/")
|
||||
|
||||
|
||||
Reference in new issue
Block a user