Refactor project structure and update configurations for State Corp backend
- Updated project description in __init__.py - Enhanced .gitignore to exclude additional data files - Modified User model to remove first_name and last_name fields - Improved instance save method in services.py to include updated_at field - Added API tokens to .env.example for external services - Cleaned up test files for better readability - Updated Dockerfile and docker-compose.yml for improved setup - Revised README.md to reflect project changes and added changelog
This commit is contained in:
@@ -16,9 +16,7 @@ class UserFactory(factory.django.DjangoModelFactory):
|
||||
|
||||
email = factory.LazyAttribute(lambda _: fake.unique.email())
|
||||
username = factory.LazyAttribute(lambda _: fake.unique.user_name())
|
||||
phone = factory.LazyAttribute(
|
||||
lambda _: f"+7{fake.numerify('##########')}"
|
||||
)
|
||||
phone = factory.LazyAttribute(lambda _: f"+7{fake.numerify('##########')}")
|
||||
is_verified = False
|
||||
is_staff = False
|
||||
is_superuser = False
|
||||
@@ -58,7 +56,9 @@ class ProfileFactory(factory.django.DjangoModelFactory):
|
||||
|
||||
class Meta:
|
||||
model = Profile
|
||||
django_get_or_create = ("user",) # Используем get_or_create для избежания дубликатов
|
||||
django_get_or_create = (
|
||||
"user",
|
||||
) # Используем get_or_create для избежания дубликатов
|
||||
|
||||
user = factory.SubFactory(UserFactory)
|
||||
first_name = factory.LazyAttribute(lambda _: fake.first_name())
|
||||
|
||||
Reference in New Issue
Block a user