Skip to content

Commit

Permalink
feat: clients api
Browse files Browse the repository at this point in the history
  • Loading branch information
Shavkatjon-O committed Sep 11, 2024
1 parent 6a51fbd commit 85e6f9d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
20 changes: 20 additions & 0 deletions apps/anons/migrations/0003_alter_anons_read_by.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 5.0.7 on 2024-09-11 10:32

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


class Migration(migrations.Migration):

dependencies = [
('anons', '0002_anons_read_by_delete_anonsreader'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.AlterField(
model_name='anons',
name='read_by',
field=models.ManyToManyField(related_name='read_anons', to=settings.AUTH_USER_MODEL),
),
]
4 changes: 1 addition & 3 deletions apps/anons/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ class Anons(BaseModel):
title = models.CharField(max_length=256)
description = models.TextField()

read_by = models.ManyToManyField(
User, related_name="read_anons", null=True, blank=True
)
read_by = models.ManyToManyField(User, related_name="read_anons")

class Meta:
verbose_name = "Anons"
Expand Down
4 changes: 2 additions & 2 deletions apps/clients/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class Client(BaseModel):
address = models.TextField()

identification_number = models.CharField(max_length=64, unique=True)
credit_score = models.IntegerField(blank=True, null=True)
credit_score = models.IntegerField(null=True, blank=True)

image = models.ImageField(upload_to="clients", blank=True, null=True)
image = models.ImageField(upload_to="clients", null=True, blank=True)

is_active = models.BooleanField(default=True)

Expand Down

0 comments on commit 85e6f9d

Please sign in to comment.