-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editlogistics #63
Editlogistics #63
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в целом норм, я думаю можно мерджить
@@ -9,26 +9,18 @@ | |||
|
|||
@pytest.fixture | |||
def director_position_object(faker): | |||
return DirectorPosition.objects.create(id=faker.pyint(), director_position=faker.pystr()) | |||
return DirectorPosition.objects.create(director_position=faker.word()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
чем тебе pystr не угодил?
region=faker.pystr(), | ||
federal_district=faker.pystr(), | ||
) | ||
return City.objects.create(city=faker.city(), region=faker.word()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
и тут тоже pystr не избыточен
station_name=faker.pystr(), | ||
station_id=faker.pyint(), | ||
station_branch=faker.pystr(), | ||
station_name=faker.word(), station_branch=faker.word(), station_id=faker.random_int() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pystr, pyint
@@ -49,7 +49,7 @@ def __str__(self) -> str: | |||
|
|||
class Package(models.Model): | |||
package = models.IntegerField(verbose_name="Тара") | |||
factory = models.ForeignKey("Factory", on_delete=models.PROTECT) | |||
factory = models.ForeignKey(Factory, on_delete=models.PROTECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
можно и оставить кавычки
urlpatterns = [path("", include(router.urls))] | ||
urlpatterns = [ | ||
path("", include(router.urls)), | ||
path("factories/", FactoryListAPIView.as_view(), name="factory-list"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
factory наверное поинтереснее будет, как думаешь?
No description provided.