Skip to content

Commit

Permalink
Bump Package Versions (#42)
Browse files Browse the repository at this point in the history
* Ensure Django Model Classes Implement a `__str__` Method

* This commit removes unnecessary dependencies from the requirements file and updates the versions of Python package dependencies.
 - Remove unnecessary dependencies from requirements file
- Streamline project
- Improve performance
- Update versions of Python package dependencies
- Ensure compatibility
- Optimize performance

---------

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
  • Loading branch information
vasudev-gm and pixeebot[bot] authored Apr 29, 2024
1 parent a045ff9 commit ff13d04
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 56 deletions.
50 changes: 0 additions & 50 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions apidemo/test_app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class Department(models.Model):
title = models.CharField(max_length=100)

def __str__(self) -> str:
return f"{self.title}"
model_name = self.__class__.__name__
fields_str = ", ".join((f"{field.name}={getattr(self, field.name)}" for field in self._meta.fields))
return f"{model_name}({fields_str})"

# The Employee class represents an employee with attributes such as first name, last name, department,
# and birthdate.
Expand All @@ -18,4 +20,6 @@ class Employee(models.Model):
birthdate = models.DateField(null=True, blank=True)

def __str__(self) -> str:
return f"{self.first_name} {self.last_name}"
model_name = self.__class__.__name__
fields_str = ", ".join((f"{field.name}={getattr(self, field.name)}" for field in self._meta.fields))
return f"{model_name}({fields_str})"
7 changes: 3 additions & 4 deletions requirement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ click==8.1.7; python_version >= '3.7'
colorama==0.4.6; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6'
django==5.0.4; python_version >= '3.10'
django-ninja==1.1.0; python_version >= '3.7'
granian==1.2.3; python_version >= '3.8'
granian==1.3.0; python_version >= '3.8'
orjson==3.10.1; python_version >= '3.8'
packaging==23.2; python_version >= '3.7'
packaging==24.0; python_version >= '3.7'
pltable==1.1.0
pydantic==2.5.3; python_version >= '3.7'
pydantic-core==2.14.6; python_version >= '3.7'
python-dotenv==1.0.1; python_version >= '3.8'
sqlparse==0.4.4; python_version >= '3.5'
typer==0.11.1; python_version >= '3.7'
sqlparse==0.5.0; python_version >= '3.8'
typing-extensions==4.9.0; python_version >= '3.8'
tzdata==2024.1; python_version >= '2'

0 comments on commit ff13d04

Please sign in to comment.