Commit e64922a2 authored by Antony Chazapis's avatar Antony Chazapis
Browse files

Removed models from API.

parent 67fc7478
#
# Copyright (c) 2011 Greek Research and Technology Network
#
from api.models import Container, Object, Metadata
from django.contrib import admin
admin.site.register(Container)
admin.site.register(Object)
admin.site.register(Metadata)
\ No newline at end of file
#
# Copyright (c) 2011 Greek Research and Technology Network
#
from django.db import models
class Container(models.Model):
account = models.CharField(max_length = 256)
name = models.CharField(max_length = 256)
date_created = models.DateTimeField(auto_now_add = True)
def __unicode__(self):
return self.name
class Object(models.Model):
container = models.ForeignKey(Container)
name = models.CharField(max_length = 1024)
length = models.IntegerField()
type = models.CharField(max_length = 256)
hash = models.CharField(max_length = 256)
data = models.FileField(upload_to = 'data', max_length = 256)
date_created = models.DateTimeField(auto_now_add = True)
date_modified = models.DateTimeField(auto_now = True)
def __unicode__(self):
return self.name
class Metadata(models.Model):
object = models.ForeignKey(Object)
name = models.CharField(max_length = 256)
value = models.CharField(max_length = 1024)
date_created = models.DateTimeField(auto_now_add = True)
date_modified = models.DateTimeField(auto_now = True)
\ No newline at end of file
from django.db import models
# Create your models here.
......@@ -100,7 +100,7 @@ INSTALLED_APPS = (
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
'django.contrib.admindocs',
# 'django.contrib.admin',
# 'django.contrib.admindocs',
'api'
)
......@@ -3,12 +3,7 @@
#
from django.conf.urls.defaults import *
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
(r'^v1/', include('pithos.api.urls')),
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
(r'^admin/', include(admin.site.urls))
(r'^v1/', include('pithos.api.urls'))
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment