Merge public app into api.
authorAntony Chazapis <chazapis@gmail.com>
Thu, 24 Nov 2011 10:01:47 +0000 (12:01 +0200)
committerAntony Chazapis <chazapis@gmail.com>
Thu, 24 Nov 2011 10:01:47 +0000 (12:01 +0200)
Fixes $1678

README.upgrade
pithos/api/public.py [moved from pithos/public/functions.py with 99% similarity]
pithos/public/__init__.py [deleted file]
pithos/public/models.py [deleted file]
pithos/public/urls.py [deleted file]
pithos/public/views.py [deleted file]
pithos/settings.py.dist
pithos/urls.py

index 3f6f39b..4ab21fe 100644 (file)
@@ -14,8 +14,8 @@ UPGRADE
 
 0.7.10 -> 0.7.11
 ----------------
 
 0.7.10 -> 0.7.11
 ----------------
+* Add 'south', remove 'pithos.public' in INSTALLED_APPS in settings.py
 * Install python-django-south
 * Install python-django-south
-* Add 'south' in INSTALLED_APPS in settings.py
 * Setup south:
     python manage.py syncdb
     python manage.py migrate im 0001 --fake
 * Setup south:
     python manage.py syncdb
     python manage.py migrate im 0001 --fake
similarity index 99%
rename from pithos/public/functions.py
rename to pithos/api/public.py
index fc14068..86191df 100644 (file)
@@ -88,6 +88,7 @@ def public_read(request, v_public):
     #                       badRequest (400),
     #                       notModified (304)
     
     #                       badRequest (400),
     #                       notModified (304)
     
+    print '***', v_public
     try:
         v_account, v_container, v_object = request.backend.get_public(request.user_uniq,
                                                     decode_url(v_public))
     try:
         v_account, v_container, v_object = request.backend.get_public(request.user_uniq,
                                                     decode_url(v_public))
diff --git a/pithos/public/__init__.py b/pithos/public/__init__.py
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/pithos/public/models.py b/pithos/public/models.py
deleted file mode 100644 (file)
index 71a8362..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.db import models
-
-# Create your models here.
diff --git a/pithos/public/urls.py b/pithos/public/urls.py
deleted file mode 100644 (file)
index 613ed3e..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2011 GRNET S.A. All rights reserved.
-# 
-# Redistribution and use in source and binary forms, with or
-# without modification, are permitted provided that the following
-# conditions are met:
-# 
-#   1. Redistributions of source code must retain the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer.
-# 
-#   2. Redistributions in binary form must reproduce the above
-#      copyright notice, this list of conditions and the following
-#      disclaimer in the documentation and/or other materials
-#      provided with the distribution.
-# 
-# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
-# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
-# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
-# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-# 
-# The views and conclusions contained in the software and
-# documentation are those of the authors and should not be
-# interpreted as representing official policies, either expressed
-# or implied, of GRNET S.A.
-
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('pithos.public.functions',
-    (r'^$', 'method_not_allowed'),
-    (r'^(?P<v_public>.+?)/?$', 'public_demux')
-)
diff --git a/pithos/public/views.py b/pithos/public/views.py
deleted file mode 100644 (file)
index 60f00ef..0000000
+++ /dev/null
@@ -1 +0,0 @@
-# Create your views here.
index 1c791de..61855f2 100644 (file)
@@ -153,7 +153,6 @@ INSTALLED_APPS = (
 #    'django.contrib.admindocs',
     'pithos.im',
     'pithos.api',
 #    'django.contrib.admindocs',
     'pithos.im',
     'pithos.api',
-    'pithos.public',
     'pithos.ui',
     'south'
 )
     'pithos.ui',
     'south'
 )
index dea4a01..17cc94b 100644 (file)
@@ -37,7 +37,7 @@ from django.conf.urls.defaults import include, patterns
 urlpatterns = patterns('',
     (r'^v1(?:$|/)', include('pithos.api.urls')),
     (r'^v1\.0(?:$|/)', include('pithos.api.urls')),
 urlpatterns = patterns('',
     (r'^v1(?:$|/)', include('pithos.api.urls')),
     (r'^v1\.0(?:$|/)', include('pithos.api.urls')),
-    (r'^public(?:$|/)', include('pithos.public.urls')),
+    (r'^public/(?P<v_public>.+?)/?$', 'pithos.api.public.public_demux'),
     (r'^im/', include('pithos.im.urls')),
     (r'^ui', include('pithos.ui.urls'))
 )
     (r'^im/', include('pithos.im.urls')),
     (r'^ui', include('pithos.ui.urls'))
 )