summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Zamotaev <nzamotaev@luxoft.com>2018-06-20 17:52:51 +0300
committerNikolay Zamotaev <nzamotaev@luxoft.com>2018-06-22 14:45:33 +0000
commit86a6be432c34977483f384c1e05d3945c6a40b5a (patch)
tree6099d9acf4e0c9c87cdffe20940e7eb34ca7fc72
parenta3a904bb9733ff88a83e8fdf940d6d1890b4c6ae (diff)
[deployment-server] Removed unneeded data fields
Due to becoming deployment server, instead of appstore, price, rating and "top app" no longer make sense, so they were removed. Change-Id: I3a696aa920186735008f97ecc35e269c5c4c038b Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r--README.md4
-rw-r--r--store/api.py3
-rw-r--r--store/migrations/0001_initial.py3
-rw-r--r--store/models.py3
4 files changed, 1 insertions, 12 deletions
diff --git a/README.md b/README.md
index 9f38da1..a5c0fd2 100644
--- a/README.md
+++ b/README.md
@@ -104,9 +104,7 @@ Basic workflow:
Returns:
```
[{ "category": "Entertainment",
- "rating": 5.0,
"name": "Nice App",
- "price": 0.42,
"vendor": "Pelagicore",
"briefDescription": "Nice App is a really nice app.",
"category_id": 4,
@@ -194,8 +192,6 @@ Returns a JSON array (not an object!). Each field is a JSON object:
| `id` | The unique id of the application |
| `name` | The name of the application |
| `vendor` | The name of the vendor of this application
-| `rating` | The rating of this application
-| `price` | The price as floating point number
| `briedDescription` | A short (one line) description of the application
| `category` | The name of the category the application is in
| `category_id` | The id of the category the application is in
diff --git a/store/api.py b/store/api.py
index a6e4c9a..6a8b8dc 100644
--- a/store/api.py
+++ b/store/api.py
@@ -101,9 +101,8 @@ def appList(request):
if catId != -1: # All metacategory
apps = apps.filter(category__exact = catId)
- appList = list(apps.values('id', 'name', 'vendor__name', 'rating', 'price', 'briefDescription', 'category'))
+ appList = list(apps.values('id', 'name', 'vendor__name', 'briefDescription', 'category'))
for app in appList:
- app['price'] = float(app['price'])
app['category_id'] = app['category']
app['category'] = Category.objects.all().filter(id__exact = app['category_id'])[0].name
app['vendor'] = app['vendor__name']
diff --git a/store/migrations/0001_initial.py b/store/migrations/0001_initial.py
index 496cde9..4142c6d 100644
--- a/store/migrations/0001_initial.py
+++ b/store/migrations/0001_initial.py
@@ -54,9 +54,6 @@ class Migration(migrations.Migration):
('description', models.TextField()),
('dateAdded', models.DateField(auto_now_add=True)),
('dateModified', models.DateField(auto_now=True)),
- ('rating', models.FloatField()),
- ('isTopApp', models.BooleanField(default=False)),
- ('price', models.DecimalField(max_digits=8, decimal_places=2)),
],
options={
},
diff --git a/store/models.py b/store/models.py
index e305045..d62ae6a 100644
--- a/store/models.py
+++ b/store/models.py
@@ -122,9 +122,6 @@ class App(models.Model):
description = models.TextField()
dateAdded = models.DateField(auto_now_add = True)
dateModified = models.DateField(auto_now = True)
- rating = models.FloatField()
- isTopApp = models.BooleanField(default = False)
- price = models.DecimalField(decimal_places = 2, max_digits = 8)
def __unicode__(self):
return self.name + " [" + self.id + "]"