0.7.9
This commit is contained in:
		| @@ -12,7 +12,7 @@ from signals import * | ||||
| __all__ = (document.__all__ + fields.__all__ + connection.__all__ + | ||||
|            queryset.__all__ + signals.__all__) | ||||
|  | ||||
| VERSION = (0, 7, 8) | ||||
| VERSION = (0, 7, 9) | ||||
|  | ||||
|  | ||||
| def get_version(): | ||||
|   | ||||
| @@ -122,9 +122,11 @@ def get_document(name): | ||||
|     doc = _document_registry.get(name, None) | ||||
|     if not doc: | ||||
|         # Possible old style name | ||||
|         end = name.split('.')[-1] | ||||
|         possible_match = [k for k in _document_registry.keys() if k == end] | ||||
|         if len(possible_match) == 1 and end != name: | ||||
|         single_end = name.split('.')[-1] | ||||
|         compound_end = '.%s' % single_end | ||||
|         possible_match = [k for k in _document_registry.keys() | ||||
|                           if k.endswith(compound_end) or k == single_end] | ||||
|         if len(possible_match) == 1: | ||||
|             doc = _document_registry.get(possible_match.pop(), None) | ||||
|     if not doc: | ||||
|         raise NotRegistered(""" | ||||
|   | ||||
| @@ -1364,7 +1364,8 @@ class SequenceField(IntField): | ||||
|         if issubclass(owner, Document): | ||||
|             return owner._get_collection_name() | ||||
|         else: | ||||
|             return owner._class_name | ||||
|             return ''.join('_%s' % c if c.isupper() else c | ||||
|                             for c in owner._class_name).strip('_').lower() | ||||
|  | ||||
|     def __get__(self, instance, owner): | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user