small rename

This commit is contained in:
aliqandil 2025-03-13 22:53:33 +03:30
parent 1334da35bb
commit 30f74f6051
2 changed files with 6 additions and 6 deletions

View File

@ -48,11 +48,11 @@ class BaseModel( models.Model ):
await sync_to_async(lambda: [ getattr(self, f) for f in fields ])()
_model_dict_presentations = {}
_model_presentations = {}
@classmethod
def dict_presentation( cls, name ):
def presentation( cls, name ):
def attacher_decorator( f ):
cls._model_dict_presentations[name] = f
cls._model_presentations[name] = f
return f
return attacher_decorator
@ -62,8 +62,8 @@ class BaseModel( models.Model ):
"""
if presentation_name:
assert presentation in self._model_dict_presentations, f"This model '{self.__class__}' does not have a '{presentation_name}' presentation!"
fields.extend( self._model_dict_presentations[presentation_name].fields )
assert presentation in self._model_presentations, f"This model '{self.__class__}' does not have a '{presentation_name}' presentation!"
fields.extend( self._model_presentations[presentation_name].fields )
results = {}
for f in fields:

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup(
name='asyncron',
version='0.1.8',
version='0.1.9',
packages=find_packages(),
#include_package_data=True, # Include static files from MANIFEST.in
install_requires=[