Skip to content

Commit

Permalink
fix pre commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sudan45 committed Sep 13, 2024
1 parent 5ff770b commit 3df0dd4
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 48 deletions.
4 changes: 2 additions & 2 deletions common/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class CommonConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'common'
default_auto_field = "django.db.models.BigAutoField"
name = "common"
1 change: 0 additions & 1 deletion common/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ class UserResource(models.Model):
class Meta:
abstract = True
ordering = ["-id"]
# Create your models here.
2 changes: 0 additions & 2 deletions common/tests.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from django.test import TestCase

# Create your tests here.
2 changes: 0 additions & 2 deletions common/views.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from django.shortcuts import render

# Create your views here.
64 changes: 41 additions & 23 deletions content/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Generated by Django 5.1.1 on 2024-09-13 11:07

import django.db.models.deletion
import uuid

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models

Expand All @@ -16,35 +17,52 @@ class Migration(migrations.Migration):

operations = [
migrations.CreateModel(
name='Tag',
name="Tag",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=20)),
('description', models.CharField(blank=True, max_length=50, null=True)),
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("name", models.CharField(max_length=20)),
("description", models.CharField(blank=True, max_length=50, null=True)),
],
),
migrations.CreateModel(
name='Content',
name="Content",
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('modified_at', models.DateTimeField(auto_now=True)),
('title', models.CharField(max_length=100)),
('document_type', models.IntegerField(choices=[(1, 'Word'), (2, 'PDF')])),
('document_file', models.FileField(upload_to='documents')),
('extracted_file', models.FileField(upload_to='documents')),
('content_id', models.UUIDField(default=uuid.uuid4, editable=False)),
('description', models.TextField()),
('is_deleted', models.BooleanField(default=False)),
('deleted_at', models.DateTimeField(null=True)),
('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
('deleted_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
('modified_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='%(class)s_modified', to=settings.AUTH_USER_MODEL)),
('tag', models.ManyToManyField(to='content.tag')),
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("created_at", models.DateTimeField(auto_now_add=True)),
("modified_at", models.DateTimeField(auto_now=True)),
("title", models.CharField(max_length=100)),
("document_type", models.IntegerField(choices=[(1, "Word"), (2, "PDF")])),
("document_file", models.FileField(upload_to="documents")),
("extracted_file", models.FileField(upload_to="documents")),
("content_id", models.UUIDField(default=uuid.uuid4, editable=False)),
("description", models.TextField()),
("is_deleted", models.BooleanField(default=False)),
("deleted_at", models.DateTimeField(null=True)),
(
"created_by",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
related_name="%(class)s_created",
to=settings.AUTH_USER_MODEL,
),
),
(
"deleted_by",
models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
),
(
"modified_by",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
related_name="%(class)s_modified",
to=settings.AUTH_USER_MODEL,
),
),
("tag", models.ManyToManyField(to="content.tag")),
],
options={
'ordering': ['-id'],
'abstract': False,
"ordering": ["-id"],
"abstract": False,
},
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,42 @@
class Migration(migrations.Migration):

dependencies = [
('content', '0001_initial'),
("content", "0001_initial"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.AlterField(
model_name='content',
name='deleted_at',
model_name="content",
name="deleted_at",
field=models.DateTimeField(blank=True, default=django.utils.timezone.now),
preserve_default=False,
),
migrations.AlterField(
model_name='content',
name='deleted_by',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL),
model_name="content",
name="deleted_by",
field=models.ForeignKey(
blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL
),
),
migrations.AlterField(
model_name='content',
name='description',
field=models.TextField(help_text='Content text'),
model_name="content",
name="description",
field=models.TextField(help_text="Content text"),
),
migrations.AlterField(
model_name='content',
name='document_file',
field=models.FileField(blank=True, upload_to='documents'),
model_name="content",
name="document_file",
field=models.FileField(blank=True, upload_to="documents"),
),
migrations.AlterField(
model_name='content',
name='extracted_file',
field=models.FileField(blank=True, upload_to='documents'),
model_name="content",
name="extracted_file",
field=models.FileField(blank=True, upload_to="documents"),
),
migrations.AlterField(
model_name='content',
name='tag',
field=models.ManyToManyField(blank=True, to='content.tag'),
model_name="content",
name="tag",
field=models.ManyToManyField(blank=True, to="content.tag"),
),
]

0 comments on commit 3df0dd4

Please sign in to comment.