diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..108d381
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,100 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+wheels/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+local_settings.py
+
+# Flask stuff:
+instance/
+.webassets-cache
+
+# Scrapy stuff:
+.scrapy
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+# Jupyter Notebook
+.ipynb_checkpoints
+
+# pyenv
+.python-version
+
+# celery beat schedule file
+celerybeat-schedule
+
+# SageMath parsed files
+*.sage.py
+
+# dotenv
+.env
+
+# virtualenv
+.venv
+venv/
+ENV/
+
+# Spyder project settings
+.spyderproject
+.spyproject
+
+# Rope project settings
+.ropeproject
+
+# mkdocs documentation
+/site
+
+*.sqlite3
diff --git a/README.md b/README.md
index 278ee81..9b4ffa7 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,43 @@
-# Pip-Version-Viewer
\ No newline at end of file
+# Django Version Viewer
+
+The pip package version viewer plugin allows a queryable endpoint to display a list of dicts representing all installed pip packages in the environment that django is running in. It also allows the insertion of a template tag to any template to display a link which calls up a pop up modal displaying all installed pip packages. You may also configure which users have access to the link and endpoint.
+
+---------------------------------------
+## Installation
+---------------------------------------
+
+Add the following to `INSTALLED_APPS` in `settings.py`
+
+ INSTALLED_APPS = [
+ 'django_version_viewer'
+ ]
+
+Add `django_version_viewer` include to `urls.py`
+
+ urlpatterns = [
+ ...
+ url(r'^django_version_viewer/', include('django_version_viewer.urls')),
+ ...
+ ]
+
+You can set your own access permissions on the template tag and route by defining your own
+`Accessor` class. This class must have a `allow_access` method that returns a `boolean`. By defualt,
+django_version_viewer only allows superusers access to the route and template tag.
+
+ # Django Version Viewer settings:
+ # default class only allows superusers access
+ ACCESSOR_CLASS_PATH = 'mypathto.my.AccessorClass'
+
+
+Override the `base.html` django Admin template (or the template of your choosing) by creating a `base.html` file inside a `templates/admin` directory in your project.
+
+Make sure you insert the necessary `src` and `link` blocks so that the popup modal works properly.
+
+
+
+
+
+Finally, load the template tags file and insert the template tag where ever you want the "Installed Versions" link to show up:
+
+ {% load pip_version_viewer_tags %}
+ {% show_pip_package_versions %}
diff --git a/django_version_viewer/__init__.py b/django_version_viewer/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/django_version_viewer/mixins.py b/django_version_viewer/mixins.py
new file mode 100644
index 0000000..e65d6c5
--- /dev/null
+++ b/django_version_viewer/mixins.py
@@ -0,0 +1,6 @@
+
+
+class Accessor(object):
+
+ def allow_access(self, request):
+ return request.user.is_superuser
diff --git a/django_version_viewer/pip_viewer.py b/django_version_viewer/pip_viewer.py
new file mode 100644
index 0000000..f217da3
--- /dev/null
+++ b/django_version_viewer/pip_viewer.py
@@ -0,0 +1,8 @@
+import pip
+from operator import itemgetter
+
+
+def list_package_versions():
+ installed_packages = pip.get_installed_distributions()
+ results = [{"package_name": i.key, "package_version": i.version} for i in installed_packages]
+ return sorted(results, key=itemgetter('package_name'))
diff --git a/django_version_viewer/templates/version_viewer.html b/django_version_viewer/templates/version_viewer.html
new file mode 100644
index 0000000..8c66b1b
--- /dev/null
+++ b/django_version_viewer/templates/version_viewer.html
@@ -0,0 +1,56 @@
+{% block content %}
+