django-class-registry 0.0.3
Register any classes like Django's admin.
Allows you to create any Registry, similar to how django's admin has you register classes, or their template library has you register tags.
Usage
from class_registry import Registry site = Registry() @site.register class MyCoolClass(object): """ My class that should be registered. """ key = "ABC" >>> site["ABC"] <class 'MyCoolClass'>
Alternate use
Or, if you want your own key name, specify it when you register the class.:
container = Registry(key_name="other_key") @container.register class MyCoolClass(object): other_key = "POL-COOL-CLS"
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-class-registry-0.0.3.tar.gz (md5) | Source | 2012-01-23 | 3KB | 178 | |
- Author: imtapps
- Home Page: http://github.com/imtapps/django-class-registry
-
Categories
- Development Status :: 5 - Production/Stable
- Environment :: Web Environment
- Framework :: Django
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Topic :: Software Development
- Topic :: Software Development :: Libraries :: Application Frameworks
- Package Index Owner: imtapps
- DOAP record: django-class-registry-0.0.3.xml
