Commit graph

253 commits

Author SHA1 Message Date
Griatch
554d1b9834 Fixed the *_family manager methods to correctly return typeclasses subclassed at any depth. 2014-12-21 23:08:20 +01:00
Griatch
9ee6b718da Some issues with unique restraint when re-saving objects. 2014-12-21 15:02:34 +01:00
Griatch
4e0b5be962 Fixed creation. Time to start cleaning the .dbobj hierarchy. 2014-12-20 19:29:38 +01:00
Griatch
e28d544fb0 The manager wrapper has trouble finding the path of the current class. 2014-12-20 19:19:48 +01:00
Griatch
043ebf7213 Fixed metaclass to handle proxy correctly. Some issues with getting path properties set correctly. 2014-12-20 19:04:49 +01:00
Griatch
32e44dceab Made the proxy typeclass system work in principle, using a wrapper of the __new__ method for the class. 2014-12-20 18:30:39 +01:00
Griatch
8314d8ba5e Now solving issues with faulty imports. Still nothing functional. 2014-12-20 17:03:34 +01:00
Griatch
08d0442f9c Strange issue with __init__, proxy implementation not working at the moment. 2014-12-19 16:56:28 +01:00
Griatch
3adeade69a Some errors in the proxy setting. 2014-12-19 16:41:20 +01:00
Griatch
236c0d17d3 First non-tested version of moving typeclasses to proxy models. 2014-12-19 16:29:41 +01:00
Griatch
5b42b31240 API change. Removed managers for Attributes and Tags - these are instead incoorporated into the TypedObjectManager which all Typeclassed object handlers inherit from. This concludes the refactor started in #529. This means that access to Attributes/Permissions/Aliases and Tags/nicks are done directly through e.g. ObjectDB.objects.get_by_tag() (or ev.managers.objects.get_by_tag) rather than using Tag.get_obj_with_tag and specifying the model type manually. The create_tag() method was also moved into the TypedObjectManager as part of removing the Tagmanager. As part of this change, Tag and Attribute was also removed from the ev interface. 2014-10-25 22:40:38 +02:00
Griatch
5b38f27554 Made property assignment go to Typeclass if that property were already defined on typeclass; otherwise relegate to dbobj as before. This fixes issues with property assignments on the Typeclass level. There are no obvious regressions in testing this but it's something to keep an eye out for in case there are any unexpected side effects. 2014-09-30 14:12:58 +02:00
Griatch
bb36f2cb76 Changed to Django1.7. Django 1.6 no longer supported. To change, upgrade django to 1.7+ and then run manage.py migrate, possibly followed by manage.py migrate --fake for objects and players. 2014-09-17 10:49:42 +02:00
Griatch
0bf4f3cfea Removed all old south migrations, leaving migration dirs empty for future django1.7 migrations. 2014-09-17 09:45:41 +02:00
Griatch
5d08d3b3fb Added clear() method to nattributehandler. Resolves #542. 2014-08-05 09:05:44 +02:00
Griatch
3014909feb Fixed attribute bug in typeclass swap. 2014-08-04 12:15:10 +02:00
Griatch
a0189a91ad Fixed clearing in Tags vith tags.clear() 2014-07-08 09:22:49 +02:00
Griatch
50e7b37191 Addded sorted returns of Tags, as per #534. 2014-07-07 22:47:26 +02:00
Griatch
9dfe620b2b Started moving tag/attribute handlers to TypeObjectManager as per #529 2014-07-06 16:03:27 +02:00
Griatch
e6950aadf2 Changed how lazy-loading of handlers work, using a werkzeug recipe. Much more efficient now. 2014-07-06 13:10:03 +02:00
Griatch
680e603c4d Changed how Tags and Attribues cache and track which objects they use, as suggested in #529. 2014-07-05 20:32:08 +02:00
Griatch
d05c92792c Some cleanup and making unittests succeed again 2014-07-01 01:10:44 +02:00
Griatch
05d21ef4f7 Updated create.create_object to be faster. Made AttributeHandler.add() handle bulk-adding of Attributes and with a slightly more efficient way to create new Attributes. 2014-07-01 00:46:20 +02:00
Griatch
cda13989f6 Run Migrations! Made Tags unique based on the combination of their db_key, db_category AND their db_tagtype fields. 2014-06-30 20:14:58 +02:00
Kelketek Rritaa
54bb593f5e Prevent editing of attributes which are not Python literals through the admin interface. 2014-06-29 09:14:01 -05:00
Kelketek Rritaa
a1b596a847 Fixed an issue where saving an attribute/tag would make duplicates. 2014-06-28 18:01:00 -05:00
Kelketek Rritaa
ca3f92acd0 Admin interface greatly improved. Support for editing Attributes added.
Resolves #503. Resolves #201.
2014-06-28 16:30:01 -05:00
Griatch
c60a5fdea1 Fixed and refactored OOB system and tested with new websocket client 2014-06-28 18:10:20 +02:00
Griatch
53b204bb76 Fixed code to pass unittests. Change script's is_valid method to correctly catch if it is checked on an object which is already deleted, as per #509. 2014-06-15 13:19:38 +02:00
Griatch
3a6a8d5c48 Made objects clear more handlers on deletion, also scramble some methods and all database access wrappers to avoid an object memory instance being accessed after it has been deleted. See #509. 2014-06-15 12:27:48 +02:00
Griatch
57144b2c21 Made objects auto-unsubscribe from tickerhandler when deleted (resolves #515). Fixed a bug that made typeclass loading mechanism not report errors as verbosely as it could. 2014-06-14 19:31:19 +02:00
Griatch
ce2d11ad12 Fixed bug in taghandler. Resolves #516. 2014-06-14 18:21:40 +02:00
Griatch
f49f33d40d Made more work around memory profiling, added a small Script and display program for logging memory usage 2014-05-18 10:54:04 +02:00
Griatch
58af67bdf2 Fixed flush protection for instances, memory is successfully made available on an idmapper flush now. 2014-05-17 14:38:43 +02:00
Griatch
5e4af3f851 Implemented and tested set_recache_protection() on all idmapped objects, to avoid them getting recached. Added successfully to nattribute handler. 2014-05-15 10:05:41 +02:00
Griatch
a617924fb0 Made flush_cache work correctly on idmapper; added _idmapper_cache_flush_safe variable for 'securing' objects from cache cleanups. Nothing using this system yet. 2014-05-15 09:51:24 +02:00
Griatch
cfd2f111f1 Updating to make unittests work 2014-05-11 19:41:37 +02:00
Griatch
9bfb829274 Implemented WeakSharedMemoryModel for Attributes. 2014-05-11 15:23:11 +02:00
Griatch
f67effa0f9 Made Attributes into a normal Model instead of a SharedMemoryModel (like Tags). Removed artificial exclusivity of strvalue and value on Attributes. 2014-05-11 08:57:36 +02:00
Griatch
e11b242365 Continued with weakref and lazyloading fixes. 2014-05-11 01:05:59 +02:00
Griatch
0030530021 Added weak reverse references from all handlers. 2014-05-10 17:12:49 +02:00
Griatch
4e3789cede Added lazy-loading of on-model handlers. 2014-05-10 13:31:50 +02:00
Griatch
fdca3ddec9 Some minor refactoring. 2014-05-05 00:07:04 +02:00
Griatch
42c0235d0d Added an example unittest to test_utils_utils.py. 2014-05-03 23:51:08 +02:00
Griatch
4ab5e2aa22 Fixed Attributehandler.get() default return value. 2014-04-25 09:01:49 +02:00
Griatch
c402f9424c Added more verbose logging of typeclass module's syntax errors. 2014-04-23 20:29:38 +02:00
Griatch
93d9545819 Added include_children and include_parents to the typeclass_search manager method, for searching typeclass parent- and child-hierarchies. Resolves #405. 2014-04-21 15:18:13 +02:00
Griatch
12dd202795 Added functionality to TypedObject.swap_typeclass to handle various typeclasses safely. Resolves #390. 2014-04-21 11:52:48 +02:00
Griatch
792b3c9282 Some cleanup code fixes. 2014-04-20 18:11:41 +02:00
Griatch
972e47e66c Fixed more cleanup of Attibute/Tag/Nick/Permission handlers when object is deleted. 2014-04-20 16:47:03 +02:00