Permalink
Browse files

prior and posterior node fields added, and verbose names were corrected.

  • Loading branch information...
gnowgi committed Nov 15, 2011
1 parent c473919 commit b4a9c9dac7e4582b65dc7d5d6329d7d133f653dd
View
@@ -313,8 +313,8 @@ def get_absolute_url(self):
class Meta:
"""Attributetype's Meta"""
ordering = ['-creation_date']
- verbose_name = _('object type')
- verbose_name_plural = _('object types')
+ verbose_name = _('attribute type')
+ verbose_name_plural = _('attribute types')
permissions = (('can_view_all', 'Can view all'),
('can_change_author', 'Can change author'), )
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: django-gstudio
-Version: 0.1.dev
+Version: 0.2.dev
Summary: A collaborative blogspace for constructing and publishing semantic knowledge networks and ontologies
Home-page: http://github.com/gnowgi/django-gstudio
Author: gnowgi
@@ -22,35 +22,32 @@ Description: ==================
================
* metaTypes
* objectTypes
+ * objects
+ * relations
+ * relationtypes
+ * attributes
+ * attributetypes
+
+ All the nodes above are also registered with django-reversion for
+ version control.
- Currently gnowledge studio provides support for Metatypes and
- Objecttypes. Using metatypes you can define different kinds of
- concepts, like "concept names", "action names", "scientific concept",
- "phylem" etc. Objecttypes are any regular classes, which can be
- defined as members of Metatypes. Both objecttypes and metatypes can
- have parent, siblings and children to create hierarchical structures.
- In our next release we will have objects as members of objecttypes.
- While we shape this project, if you are interested in joining, visit
- us at metastudio.org.
+ In our next release we will add dependency relation, and create
+ appropriate fields for relations and atttributes. While we shape this
+ project, if you are interested in joining, visit us at metastudio.org.
Nodes soon to come:
==================
- * objects
- * relationTypes
- * attributeTypes
- * relations
- * attributes
+ * system (ontology)
+ * systemtype (ontologytype)
Features you will see soon:
===========================
* dependency relation
* context graphs and concept graphs
- * optional version control
Other features to come:
======================
- * version control to track history
* rdf feed to a triple store
* export and import of standard knowledge representation languages: CL, OWL, XTM etc.
@@ -319,7 +316,7 @@ Description: ==================
Keywords: django,blog,weblog,zinnia,post,news,gnowsys,gnowledge,semantic,networks,ontolgies
Platform: UNKNOWN
Classifier: Framework :: Django
-Classifier: Development Status :: 1 - Development/Planning
+Classifier: Development Status :: 2 - Development/Pre-Alpha
Classifier: Environment :: Web Environment
Classifier: Programming Language :: Python
Classifier: Intended Audience :: Developers
@@ -2,4 +2,5 @@ BeautifulSoup>=3.2.0
django-mptt>=0.4.2
django-tagging>=0.3.1
django-xmlrpc>=0.1.3
-pyparsing>=1.5.5
+pyparsing>=1.5.5
+django-reversion>=1.5.1
@@ -9,6 +9,6 @@
admin.site.register(Objecttype, ObjecttypeAdmin)
admin.site.register(Metatype, MetatypeAdmin)
-# for reversion support in the gstudio admin interface
+
@@ -30,6 +30,8 @@ class ObjecttypeAdmin(reversion.VersionAdmin):
date_hierarchy = 'creation_date'
fieldsets = ((_('Content'), {'fields': ('title', 'content', 'parent',
'image', 'status')}),
+ (_('Dependency'), {'fields': ('priornode', 'posteriornode',),
+ 'classes': ('collapse', 'collapse-closed')}),
(_('Options'), {'fields': ('featured', 'excerpt', 'template',
'related', 'authors',
'creation_date',
View
@@ -38,6 +38,50 @@
from gstudio.signals import ping_external_urls_handler
import reversion
+NODETYPE_CHOICES = (
+ ('OT', 'Gbobjecttypes'),
+ ('RT', 'Gbrelationtypes'),
+ ('MT', 'Gbmetatypes'),
+ ('AT', 'Gbattributetypes'),
+ )
+
+DEPTYPE_CHOICES = (
+ ('0', 'Concept-Concept'),
+ ('1', 'Activity-Activity'),
+ ('2', 'Question-Question'),
+ ('3', 'Concept-Activity'),
+ ('4', 'Activity-Concept'),
+ ('5', 'Question-Concept'),
+ ('6', 'Concept-Question'),
+ ('7', 'Question-Activity'),
+ ('8', 'Activity-Question'),
+ )
+
+FIELD_TYPE_CHOICES = (
+ ('01', 'CharField'),
+ ('02', 'TextField'),
+ ('03', 'IntegerField'),
+ ('04', 'CommaSeparatedIntegerField'),
+ ('05', 'BigIntegerField'),
+ ('06', 'PositiveIntegerField'),
+ ('07', 'DecimalField'),
+ ('08', 'FloatField'),
+ ('09', 'BooleanField'),
+ ('10', 'NullBooleanField'),
+ ('11', 'DateField'),
+ ('12', 'DateTimeField'),
+ ('13', 'TimeField'),
+ ('14', 'EmailField'),
+ ('15', 'FileField'),
+ ('16', 'FilePathField'),
+ ('17', 'ImageField'),
+ ('18', 'URLField'),
+ ('19', 'IPAddressField'),
+ )
+
+
+
+
class Author(User):
"""Proxy Model around User"""
@@ -116,6 +160,12 @@ class Objecttype(models.Model):
parent = models.ForeignKey('self', null=True, blank=True,
verbose_name=_('has parent objecttype'),
related_name='subtypes')
+ priornode = models.ManyToManyField('self', null=True, blank=True,
+ verbose_name=_('has prior nodes'),
+ related_name='posteriors')
+ posteriornode = models.ManyToManyField('self', null=True, blank=True,
+ verbose_name=_('has posterior nodes'),
+ related_name='priornodes')
image = models.ImageField(_('image'), upload_to=UPLOAD_TO,
blank=True, help_text=_('used for illustration'))
@@ -326,6 +376,12 @@ class Meta:
if not reversion.is_registered(Metatype):
reversion.register(Metatype, follow=["parent"])
+if not reversion.is_registered(Objecttype):
+ reversion.register(Objecttype, follow=["priornode"])
+if not reversion.is_registered(Objecttype):
+ reversion.register(Objecttype, follow=["posteriornode"])
+
+
moderator.register(Objecttype, ObjecttypeCommentModerator)
mptt.register(Metatype, order_insertion_by=['title'])
View
@@ -313,8 +313,8 @@ def get_absolute_url(self):
class Meta:
"""Relationtype's Meta"""
ordering = ['-creation_date']
- verbose_name = _('object type')
- verbose_name_plural = _('object types')
+ verbose_name = _('relation type')
+ verbose_name_plural = _('relation types')
permissions = (('can_view_all', 'Can view all'),
('can_change_author', 'Can change author'), )
View
@@ -35,5 +35,5 @@
'django-tagging>=0.3.1',
'django-xmlrpc>=0.1.3',
'pyparsing>=1.5.5',
- 'django-reversioin>=1.5.1',
+ 'django-reversion>=1.5.1',
])

0 comments on commit b4a9c9d

Please sign in to comment.