Repository: djangopackages/djangopackages

Issue:
Packages API should support filtering
Right now there is no way to get list of packages of a specific category. _Category_ resource does not contain list of resource_url of packages just like the _Grid_ resource does and there is no way to apply a filter on _Package_ resource.

Ideally the _Category_ resource should contain a list of packages like the _Grid_ resource does:

```
    packages: [
        "/api/v1/package/django-cms/"
        "/api/v1/package/django-page-cms/"
        "/api/v1/package/django-lfc/"
        "/api/v1/package/merengue/"
        "/api/v1/package/mezzanine/"
        "/api/v1/package/philo/"
        "/api/v1/package/pylucid/"
        "/api/v1/package/django-gitcms/"
        "/api/v1/package/django-simplepages/"
        "/api/v1/package/djpcms/"
        "/api/v1/package/feincms/"
    ]
```

Furthermore, there should be a filter on _Package_ resource like this:

`/package/?category=apps`



Discussion:
I am attempting to fix this myself.


Resolving patch:
diff --git a/settings/base.py b/settings/base.py
--- a/settings/base.py
+++ b/settings/base.py
@@ -200,18 +200,6 @@
             'django.template.loaders.app_directories.Loader',
     )
 
-#TEST_RUNNER = 'testrunner.OurTestRunner'
-TEST_RUNNER = 'testrunner.OurCoverageRunner'
-
-COVERAGE_MODULE_EXCLUDES = [
-    'tests$', 'settings$', 'urls$', 'locale$',
-    'migrations', 'fixtures', 'big_email_send$',
-    'load_dev_data$', 'fix_grid_element$',
-    'package_updater$', 'searchv2_build$'
-]
-COVERAGE_MODULE_EXCLUDES += PREREQ_APPS + ["djkombu", ]
-COVERAGE_REPORT_HTML_OUTPUT_DIR = "coverage"
-
 PACKAGINATOR_HELP_TEXT = {
     "REPO_URL": "Enter your project repo hosting URL here.<br />Example: https://github.com/opencomparison/opencomparison",
     "PYPI_URL": "<strong>Leave this blank if this package does not have a PyPI release.</strong><br />What PyPI uses to index your package. <br />Example: django-uni-form",
diff --git a/settings/travis.py b/settings/travis.py
deleted file mode 100644
--- a/settings/travis.py
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- coding: utf-8 -*-
-"""TravisCI settings which allow us to run our test suite on the TravisCI
-continuous integration service.
-"""
-
-
-from settings.base import *
-
-
-DATABASES = {
-    "default": {
-        "ENGINE": "django.db.backends.sqlite3",
-        "NAME": ":memory:",
-        "USER": "",
-        "PASSWORD": "",
-        "HOST": "",
-        "PORT": "",
-    },
-}


Test patch:
diff --git a/docs/testing_instructions.rst b/docs/testing_instructions.rst
--- a/docs/testing_instructions.rst
+++ b/docs/testing_instructions.rst
@@ -8,8 +8,8 @@ Running the test suite
 
 To run all of the Packaginator tests::
 
-    python manage.py test --settings.base
+    python manage.py test --settings.test
 
 To run tests for a particular Packaginator app, for example the feeds app::
 
-    python manage.py test feeds --settings.base
\ No newline at end of file
+    python manage.py test feeds --settings.test
diff --git a/settings/test.py b/settings/test.py
new file mode 100644
--- /dev/null
+++ b/settings/test.py
@@ -0,0 +1,39 @@
+# -*- coding: utf-8 -*-
+"""Local test settings and globals which allows us to run our test suite
+locally.
+"""
+
+
+from settings.base import *
+
+
+########## DEBUG
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+SERVE_MEDIA = DEBUG
+
+
+########## TEST
+TEST_RUNNER = 'testrunner.OurCoverageRunner'
+
+COVERAGE_MODULE_EXCLUDES = [
+    'tests$', 'settings$', 'urls$', 'locale$',
+    'migrations', 'fixtures', 'big_email_send$',
+    'load_dev_data$', 'fix_grid_element$',
+    'package_updater$', 'searchv2_build$'
+]
+COVERAGE_MODULE_EXCLUDES += PREREQ_APPS + ["djkombu", ]
+COVERAGE_REPORT_HTML_OUTPUT_DIR = "coverage"
+
+
+########## DATABASES
+DATABASES = {
+    "default": {
+        "ENGINE": "django.db.backends.sqlite3",
+        "NAME": ":memory:",
+        "USER": "",
+        "PASSWORD": "",
+        "HOST": "",
+        "PORT": "",
+    },
+}