{ "info": { "author": "Kevin London", "author_email": "kevinlondon@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "=============================\ndjango-redis-views\n=============================\n\n.. image:: https://badge.fury.io/py/django-redis-views.png\n :target: https://badge.fury.io/py/django-redis-views\n\n.. image:: https://travis-ci.org/kevinlondon/django-redis-views.png?branch=master\n :target: https://travis-ci.org/kevinlondon/django-redis-views\n\nSimple Redis-based generic views for serving your Django-backed Ember CLI apps.\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-redis-views.readthedocs.org.\n\nFeatures\n--------\n\n* Serves your single page javascript apps easily through Django views.\n* Works out-of-the-box with `ember-cli-deploy\n `_ and \n `ember-deploy-redis `_.\n\nBackground\n----------\n\nEmber CLI and other single-page javascript apps can be challenging to deploy.\n\nLuke Melia presented a talk called \n`Lightning Fast Deployment of Your Rails-backed JavaScript app `_,\nwhich eventually led to the creation of `ember-cli-deploy `_.\n\nThis project acts as the glue between `ember-cli-deploy` and Django by\nproviding generic views to serve `Redis `_-backed index pages for single\npage javascript applications.\n\n\nQuickstart\n----------\n\nLet's assume we already have an Ember CLI app that we're ready to deploy.\nWe're using the `ember-deploy-redis\n`_ adapter and we \nran `ember deploy` to push the `index.html` file into Redis.\nIn this case, we'll pretend that the\nEmber CLI project's name is `ember-cli-my-great-app`.\n\nFirst, install django-redis-views::\n\n pip install django-redis-views\n\nIn your Django settings file, set the Redis url. For example, you may want\nto access Redis on the localhost running on the default port. In which case,\nyou would add something like this to the your `settings.py` file::\n\n REDIS_URL = 'redis://localhost:6379/0'\n\nThen, to use it in your Django project, first add a new view to a\n`views.py` file::\n\n from redis_views import RedisView\n\n\n class EmberAppIndex(RedisView):\n app_name = 'ember-cli-my-great-app'\n\nAnd then set it a route for it in your `urls.py` file::\n\n from django.conf.urls import patterns\n from myapp.views import EmberAppIndex\n\n\n urlpatterns = patterns('',\n url(r'^$', EmberAppIndex.as_view()),\n )\n \nAt this point, you should be able to go to your root url and see your index\npage!\n\nTODO: Walk through a full example project.\n\nInjecting Context to your Template\n----------------------------------\n\nIf you want to use Django's template engine to replace values in your Ember\nindex file, you can do that by injecting the context. Let's pretend that we\nhave this very simple Ember index page:\n\n

Hello {{ name }}!

\n\nIn order to inject `{{ name }}` from Django into the Ember index page,\nyou'll want to add to the context. This package is built upon the generic views\nin Django, so we inject context the same way that they do. In your `views.py`\nfile (using the same conventions as above)::\n\n from redis_views import RedisView\n\n class EmberAppIndex(RedisView):\n\n . . . \n\n def get_context_data(self, **kwargs):\n # Call the base implementation first to get a context\n context = super(EmberAppIndex, self).get_context_data(**kwargs)\n # Add in the name value (you could also use a dynamic value from a database object)\n context['name'] = 'Joe'\n return context\n\nThen, in the template, it will fill in the value with your supplied value.\nAs mentioned in the comment, you can inject pretty much anything that could\nnormally be handled by Django templates, such as a CSRF token.\n\nRunning the Tests\n-----------------\n\nTo run the tests, please do the following in your terminal::\n\n # Install the testing requirements\n pip install -r requirements-test.txt\n\n # Run the tests\n py.test\n\n\nCookiecutter Tools Used in Making This Package\n----------------------------------------------\n\n* cookiecutter\n* cookiecutter-djangopackage\n\n\n\n\nHistory\n-------\n\n0.2.2 (2015-10-20)\n++++++++++++++++++\n\n* Fixed bug with setting the socket timeout without a kwarg.\n\n0.2.1 (2015-10-20)\n++++++++++++++++++\n\n* Added a socket timeout and server pinging when connecting to the server to raise a\n ConnectionError if there are any connection issues.\n\n* Added error logging of missing template keys.\n\n0.2.0 (2015-09-21)\n++++++++++++++++++\n\n* Changed the GET parameter value from `version` to `index_key` to match\n the convention established by ember-cli-deploy.\n\n0.1.0 (2015-08-22)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kevinlondon/django-redis-views", "keywords": "django-redis-views", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-redis-views", "package_url": "https://pypi.org/project/django-redis-views/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-redis-views/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kevinlondon/django-redis-views" }, "release_url": "https://pypi.org/project/django-redis-views/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "An implementation of the server-side component for Lightning Fast single page app deploys.", "version": "0.2.2" }, "last_serial": 1780352, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "33ddb556a86346e1b98e7a950621f8fb", "sha256": "c1e410e825e9e9415ca929f32a3e1ff78cc0d81f97dc8eeec2587bb354148ebc" }, "downloads": -1, "filename": "django_redis_views-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "33ddb556a86346e1b98e7a950621f8fb", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4505, "upload_time": "2015-08-24T15:31:17", "url": "https://files.pythonhosted.org/packages/58/eb/bd1b121d6eadfe9456fc0863124c15eeb79b0627063f34c59ffca879772d/django_redis_views-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a68602e2bbc9b3cf81f3f04db9da2c34", "sha256": "c149fadbc63394cb1232ca66b46e23d7dbbcdce462ae717e108f456b48b84bdd" }, "downloads": -1, "filename": "django-redis-views-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a68602e2bbc9b3cf81f3f04db9da2c34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4952, "upload_time": "2015-08-24T15:31:07", "url": "https://files.pythonhosted.org/packages/40/e5/57b95a646520995fc8d5ba21d71933f3157469dea8b2b07e016cfcf66340/django-redis-views-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "fb1227679ba8fa1dadb35f94603ad0f1", "sha256": "173fd40803b67ddf25b2e36439d5fa072e58a589e9d7ca8a4ba0f200c0a0c7a2" }, "downloads": -1, "filename": "django_redis_views-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fb1227679ba8fa1dadb35f94603ad0f1", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4526, "upload_time": "2015-08-25T16:27:02", "url": "https://files.pythonhosted.org/packages/53/7c/fe5bbfa1c9e7a1a233c12084ab1a1f2ea0d0f0246e525ab1f3339f09d81e/django_redis_views-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e87a0b7d24eec1e67f2e1579acd320e8", "sha256": "6715bd108c5eb8ec0a92af0eb50e8e7ce1bb7b4854cb788c67affb43667112e8" }, "downloads": -1, "filename": "django-redis-views-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e87a0b7d24eec1e67f2e1579acd320e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4978, "upload_time": "2015-08-25T16:26:57", "url": "https://files.pythonhosted.org/packages/cf/57/1802325f1eeda6308bfe4791f55eeef7f3ee36331fa5db4e810207d919ea/django-redis-views-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "19c22e2ce46b80b109a026481267ecb1", "sha256": "e3673e16c1a86d2b4830fd88033d3a7e70db8ae9e5293a80af4cf4559e3cf865" }, "downloads": -1, "filename": "django_redis_views-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "19c22e2ce46b80b109a026481267ecb1", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4628, "upload_time": "2015-08-27T20:44:46", "url": "https://files.pythonhosted.org/packages/d4/99/e8a89269cd7c1e093086bacfc3992cd1af9a1d74e4eed424f4bdb7f70b6f/django_redis_views-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "922290ee105b886acac077922f41ccb0", "sha256": "7cba9a9db49f7b5d6e1004c6a6af05eb4a82ce40099cf51cfe9b8bff91036d1b" }, "downloads": -1, "filename": "django-redis-views-0.1.2.tar.gz", "has_sig": false, "md5_digest": "922290ee105b886acac077922f41ccb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5052, "upload_time": "2015-08-27T20:44:41", "url": "https://files.pythonhosted.org/packages/e9/07/a76cc3b2ed52403bbdbe86597cc1a8dd1edf47b2a4dc4722978213f4204f/django-redis-views-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2ce0e98ca7c8c8297b739e31e68162a9", "sha256": "c3f64ddda0733ebe3c27242648416b502c9076a5a728311a0576f3a6dd5825aa" }, "downloads": -1, "filename": "django_redis_views-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2ce0e98ca7c8c8297b739e31e68162a9", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7715, "upload_time": "2015-09-21T15:39:19", "url": "https://files.pythonhosted.org/packages/8a/52/7a66e02077528a6410950ecd60af1c0acd5b13999b2cfbf3b4d46e78368c/django_redis_views-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d54b99a6bab9e83be68c51845c712247", "sha256": "106b41efffeb50b9c439d3b4dfc29084b623e0b60172e4b835031ad0517e8f11" }, "downloads": -1, "filename": "django-redis-views-0.2.0.tar.gz", "has_sig": false, "md5_digest": "d54b99a6bab9e83be68c51845c712247", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6946, "upload_time": "2015-09-21T15:39:08", "url": "https://files.pythonhosted.org/packages/15/7f/450058104719a18f1892fc98fc6a5543eb205765ba4d31b0f67a19287c98/django-redis-views-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "293d57dbc4f570f15a8e57ede394ea3b", "sha256": "fa1efb3371a6a68bcd1ec3602f0d8c07c2cbcb479e0c1e7a4ca7e977292f4afa" }, "downloads": -1, "filename": "django_redis_views-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "293d57dbc4f570f15a8e57ede394ea3b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8316, "upload_time": "2015-10-21T16:34:26", "url": "https://files.pythonhosted.org/packages/09/7b/55e286887ff6eb028fc40f68c27cb2722971c91f1b06d1d0c0139492f4e7/django_redis_views-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1f14f0a97af1d5871662617231f65f3", "sha256": "83ef5734304033f7db6eed67c18e8ce9383b60f93acee080aed027777e267e82" }, "downloads": -1, "filename": "django-redis-views-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e1f14f0a97af1d5871662617231f65f3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7353, "upload_time": "2015-10-21T16:34:21", "url": "https://files.pythonhosted.org/packages/b8/fb/d9e3d509156ae95d6ff09d5d18ef6d5c648c689b50c03bfd7418a0cb8ed0/django-redis-views-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "25f7dc6e42ebca5664b6d54d96a1d5f8", "sha256": "613a8fb2bef7cdc022eef6c86fe9474b295615a74ebf5de7664b8389e2e7d8b3" }, "downloads": -1, "filename": "django_redis_views-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "25f7dc6e42ebca5664b6d54d96a1d5f8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8372, "upload_time": "2015-10-21T17:26:57", "url": "https://files.pythonhosted.org/packages/4b/50/90a64d83326ffa1b6feabb959c51f8a3b713cf65df6fc7dc30d893853f66/django_redis_views-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "70f16214c6f763ff89a3f02b43f3adff", "sha256": "31e2d93fb526bce89dcf47a5d92ef8b9bed0f9e61e41f13f5e60e4f5c47fa07e" }, "downloads": -1, "filename": "django-redis-views-0.2.2.tar.gz", "has_sig": false, "md5_digest": "70f16214c6f763ff89a3f02b43f3adff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7400, "upload_time": "2015-10-21T17:26:52", "url": "https://files.pythonhosted.org/packages/b6/e7/f3ac0c9b09a61eae0de87df8ca0f6f069d12a9f51039aa7269bac8d5033c/django-redis-views-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "25f7dc6e42ebca5664b6d54d96a1d5f8", "sha256": "613a8fb2bef7cdc022eef6c86fe9474b295615a74ebf5de7664b8389e2e7d8b3" }, "downloads": -1, "filename": "django_redis_views-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "25f7dc6e42ebca5664b6d54d96a1d5f8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8372, "upload_time": "2015-10-21T17:26:57", "url": "https://files.pythonhosted.org/packages/4b/50/90a64d83326ffa1b6feabb959c51f8a3b713cf65df6fc7dc30d893853f66/django_redis_views-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "70f16214c6f763ff89a3f02b43f3adff", "sha256": "31e2d93fb526bce89dcf47a5d92ef8b9bed0f9e61e41f13f5e60e4f5c47fa07e" }, "downloads": -1, "filename": "django-redis-views-0.2.2.tar.gz", "has_sig": false, "md5_digest": "70f16214c6f763ff89a3f02b43f3adff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7400, "upload_time": "2015-10-21T17:26:52", "url": "https://files.pythonhosted.org/packages/b6/e7/f3ac0c9b09a61eae0de87df8ca0f6f069d12a9f51039aa7269bac8d5033c/django-redis-views-0.2.2.tar.gz" } ] }