Вы находитесь на странице: 1из 1

Unfortunately, like many uses of simple iteration, that would require the loop to check each individual

object
in the module to see if it is in fact a model or if its something else entirely. After all, Python modules
can contain
anything, and many models make use of tuples and module-level constants to help do their work, so
theres no
guarantee that each item in the modules namespace is in fact a Django model.
Instead, cache.get_models() retrieves a list of proper Django models that are specific to the given
application
module. Its no coincidence that both cache.get_apps() and cache.get_app() return application modules;
cache.get_models() is suitable for use with both of these methods. That means that a list of models can
be retrieved
even without an application, but knowing the application in advance reduces the number of models
retrieved.
The following code demonstrates how these techniques can be used in combination to retrieve a list of
models
for each of the known applications in use on the site.

>>> from django.db.models.loading import cache
>>> for app in cache.get_apps():
...
app_label = app.__name__.split('.')[-2]
...
for model in cache.get_models(app):
...
print('%s.%s' % (app_label, model.__name__))
nature that was the basis for all phenomena and experiences. 3 Such a belief was the product
of previous developments within Buddhist thought and itself was the precursor to later
developments, such as the Great Completeness (rdzogs chen) tradition of Atiyoga.4 As the
Secret Essence was on the forefront of Buddhist Tantric development during the age when
Buddhism was first formally adopted by the Tibetans, its importance for a correct
understanding of Tibetan Buddhisms early history should not be underestimated. However,
an understanding of this branch of tantra as it presently exists within the Tibetan Buddhist
tradition must precede any attempt at uncovering the historical evolution of Mahyoga and
its relationship to early Tibetan Buddhism.
In the present state of scholarship, there are two substantial works on Mahyoga. Herbert
Guenthers Matrix of Mystery and Gyurme Dorjes 1987 doctoral thesis for the University of
Londons School of Oriental and African Studies (SOAS). In the Matrix of Mystery Guenther
interprets the Secret Essence through a combination of Existentialism, nuclear physics, and
New Age terminology. Yet, he does so from the perspective of the Great Completeness, or
rdzogs chen, tradition that belongs to the Atiyoga Vehicle, the highest of the nine Old School
vehicles. Such is evident not only from the subtitle to his bookScientific and Humanistic
Aspects of rDzogs-chen Thoughtbut also from a passage at the beginning of the Matrix of
Mystery equivalent to the authors promise to compose (rtsom par dam bca):

Вам также может понравиться