summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSmári McCarthy <smari@hilbert.(none)>2009-08-29 18:08:36 +0000
committerSmári McCarthy <smari@hilbert.(none)>2009-08-29 18:08:36 +0000
commit65e65563b077eb04f9f8759fdbfee6af72c58229 (patch)
treee36c76e18b753cca85f49e483a1b53afd2ff7980
parent924e576620f3b3ff4a670320e23ad09468308f03 (diff)
downloadtangiblebit-65e65563b077eb04f9f8759fdbfee6af72c58229.tar.gz
tangiblebit-65e65563b077eb04f9f8759fdbfee6af72c58229.zip
Added FAB5 presentation.
-rw-r--r--doc/Presentations/FAB5_India_Foo_Session.odpbin0 -> 28320 bytes
-rw-r--r--doc/tb.rst17
-rw-r--r--server/materials/models.py10
3 files changed, 26 insertions, 1 deletions
diff --git a/doc/Presentations/FAB5_India_Foo_Session.odp b/doc/Presentations/FAB5_India_Foo_Session.odp
new file mode 100644
index 0000000..630ecf7
--- /dev/null
+++ b/doc/Presentations/FAB5_India_Foo_Session.odp
Binary files differ
diff --git a/doc/tb.rst b/doc/tb.rst
index 861d97a..6e630d0 100644
--- a/doc/tb.rst
+++ b/doc/tb.rst
@@ -103,6 +103,8 @@ useful tool.
Project organization
~~~~~~~~~~~~~~~~~~~~
+The directories are structured like so:
+
* clients - Standalone clients
- tb-get - apt-get like shell client (uses XMLRPC)
* server - Django server implementation
@@ -117,3 +119,18 @@ Project organization
* media - Contains media files pertaining to the server
* unittests - Unit tests common to all.
* doc - Documentation
+
+Within each of the server modules (sites, inventory, materials, etc) each relevant
+type of database object is handled. All objects should be handleable on the server
+side both through the web interface and through the XMLRPC interface, as well as
+being exportable as XML and JSON objects.
+
+The database model for Tangiblebit is somewhat simpler.
+
+* **Site** - a geographic location
+* **Object** - a physically representable object design
+* **Material** - a simple material. Materials have many physical properties that don't readily apply to compound objects,
+and it would not make sense to generalize materials to objects, as
+* **Inventory** - a list of physical objects available at a site. A site can have more than one inventory.
+* **Users** - people who exist and can be at sites
+* **Orders** - requests from users for objects or materials
diff --git a/server/materials/models.py b/server/materials/models.py
index 5af19e3..8fde02b 100644
--- a/server/materials/models.py
+++ b/server/materials/models.py
@@ -6,6 +6,9 @@ from objects.models import *
class MaterialCategory(models.Model):
name = models.CharField(max_length=100)
+ def __unicode__(self):
+ return self.name
+
class Material(models.Model):
# DEFINEME
name = models.CharField(max_length=500)
@@ -22,7 +25,6 @@ class Material(models.Model):
modulus_elasticity = models.FloatField("Modulus of elasticity", blank=True)
modulus_youngs = models.FloatField("Young's modulus", blank=True)
- hardness_mohs = models.FloatField(blank=True)
hardness_brinnel = models.FloatField(blank=True)
thermal_inductance = models.FloatField(blank=True)
@@ -31,9 +33,13 @@ class Material(models.Model):
electrical_inductance = models.FloatField(blank=True)
electrical_capacity = models.FloatField(blank=True)
+
# nuclear profile? radioactivity_profile?
# electrical profile?
# thermal profile?
+
+ def __unicode__(self):
+ return self.name
class Process(models.Model):
@@ -46,6 +52,8 @@ class Process(models.Model):
outputobjects = models.ManyToManyField(Object, related_name="%(class)s_outputobj")
outputintangibles = models.ManyToManyField(Intangible, related_name="%(class)s_outputintang")
+ def __unicode__(self):
+ return self.name
#
# Registering tables with admin site