small rename
This commit is contained in:
parent
1334da35bb
commit
30f74f6051
|
|
@ -48,11 +48,11 @@ class BaseModel( models.Model ):
|
||||||
await sync_to_async(lambda: [ getattr(self, f) for f in fields ])()
|
await sync_to_async(lambda: [ getattr(self, f) for f in fields ])()
|
||||||
|
|
||||||
|
|
||||||
_model_dict_presentations = {}
|
_model_presentations = {}
|
||||||
@classmethod
|
@classmethod
|
||||||
def dict_presentation( cls, name ):
|
def presentation( cls, name ):
|
||||||
def attacher_decorator( f ):
|
def attacher_decorator( f ):
|
||||||
cls._model_dict_presentations[name] = f
|
cls._model_presentations[name] = f
|
||||||
return f
|
return f
|
||||||
return attacher_decorator
|
return attacher_decorator
|
||||||
|
|
||||||
|
|
@ -62,8 +62,8 @@ class BaseModel( models.Model ):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if presentation_name:
|
if presentation_name:
|
||||||
assert presentation in self._model_dict_presentations, f"This model '{self.__class__}' does not have a '{presentation_name}' presentation!"
|
assert presentation in self._model_presentations, f"This model '{self.__class__}' does not have a '{presentation_name}' presentation!"
|
||||||
fields.extend( self._model_dict_presentations[presentation_name].fields )
|
fields.extend( self._model_presentations[presentation_name].fields )
|
||||||
|
|
||||||
results = {}
|
results = {}
|
||||||
for f in fields:
|
for f in fields:
|
||||||
|
|
|
||||||
2
setup.py
2
setup.py
|
|
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='asyncron',
|
name='asyncron',
|
||||||
version='0.1.8',
|
version='0.1.9',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
#include_package_data=True, # Include static files from MANIFEST.in
|
#include_package_data=True, # Include static files from MANIFEST.in
|
||||||
install_requires=[
|
install_requires=[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user