{ "info": { "author": "", "author_email": "synwe@yahoo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Django Sfp\n==========\n\nServe flat pages for a Vuejs frontend\n\n* **Fast**: no database hits\n* **Safe**: keep the pages in a version control system\n* **Friendly**: edit the pages in an IDE\n* **Cache**: client-side cache thanks to [Apollo client](https://www.apollographql.com/)\n\nInstallation\n------------\n\n``pip install django-sfp``\n\nConfiguration\n-------------\n\n1. Add ``\"sfp\",`` to your ``INSTALLED_APPS``\n\n2. Declare the graphql schema in settings:\n\n ```python\n GRAPHENE = {\n 'SCHEMA': 'sfp.schema.schema',\n }\n ```\n\n3. Add the graphql endpoint url:\n\n ```python\n from django.views.decorators.csrf import csrf_exempt\n from graphene_django.views import GraphQLView\n\n urlpatterns = [\n # ...\n url(r'^graphql', csrf_exempt(GraphQLView.as_view())),\n ]\n ```\n\n4. Install the frontend:\n\nGrab the `Page.vue` component:\n\n ```bash\n wget https://raw.githubusercontent.com/synw/django-sfp/master/frontend/src/components/Page.vue\n ```\n\nInstall the dependencies:\n\n ```\n npm install --save vue-apollo // or vue add apollo if you use vue-cli\n npm install --save @fortawesome/fontawesome-svg-core\n npm install --save @fortawesome/free-solid-svg-icons\n npm install --save @fortawesome/vue-fontawesome\n ```\n\nFont-Awesome is for the spinner loading icon (only this icon will be included in the build, \nnot the whole lib). Vue-router must be installed\n \n5. Add a frontend generic route:\n\n ```javascript\n import Page from './path/to/my/components/Page.vue'\n\n routes: [\n // ...\n\t {\n\t path: '*',\n\t name: 'Page',\n\t component: Page\n\t },\n ],\n ```\nTo make links: ````\n\nUsage\n-----\n\nCreate a ``pages`` in the Django project static directory. Any html file you include there will get served as\na static page.\n\nFor example::\n\n* The url ``/about/`` will render ``static/pages/about.html``\n* The url ``/about/team/`` will render ``static/pages/about/team.html``\n\nNote: the first line of each file is the title of the page: ex:\n\n ```html\n My page title\n
My page content
\n ```\n\nEdit pages online\n-----------------\n\nTo edit pages at runtime you can use [django-dirtyedit](https://github.com/synw/django-dirtyedit)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/synw/django-sfp", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-sfp", "package_url": "https://pypi.org/project/django-sfp/", "platform": "", "project_url": "https://pypi.org/project/django-sfp/", "project_urls": { "Homepage": "https://github.com/synw/django-sfp" }, "release_url": "https://pypi.org/project/django-sfp/0.7/", "requires_dist": null, "requires_python": "", "summary": "Serve static pages for a Vuejs frontend", "version": "0.7" }, "last_serial": 4475237, "releases": { "0.6": [ { "comment_text": "", "digests": { "md5": "45baa4d078dfdea9b0ae16489b77b079", "sha256": "9e77f9cee3c2dd1e61e16c1d722622c55cdd08fb312770e9ce1bafe54075792f" }, "downloads": -1, "filename": "django-sfp-0.6.tar.gz", "has_sig": false, "md5_digest": "45baa4d078dfdea9b0ae16489b77b079", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4453, "upload_time": "2018-02-15T14:00:13", "url": "https://files.pythonhosted.org/packages/f1/6f/9cd1b7ab05412cc8517c62c69776d48e0395608c7b6cfa1f0181e0d7c579/django-sfp-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "b67aeb8ab62bf25dc06b0b9f3affb653", "sha256": "27d2f64a3c67f98c05967b18a6c413ed8f173056eeae4ae597a83840e02dac97" }, "downloads": -1, "filename": "django-sfp-0.7.tar.gz", "has_sig": false, "md5_digest": "b67aeb8ab62bf25dc06b0b9f3affb653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3814, "upload_time": "2018-11-11T22:04:54", "url": "https://files.pythonhosted.org/packages/94/15/1508b2dfc7627b6ec0636da05b83d2aa0fec1e4b906abb9c54a8ab532130/django-sfp-0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b67aeb8ab62bf25dc06b0b9f3affb653", "sha256": "27d2f64a3c67f98c05967b18a6c413ed8f173056eeae4ae597a83840e02dac97" }, "downloads": -1, "filename": "django-sfp-0.7.tar.gz", "has_sig": false, "md5_digest": "b67aeb8ab62bf25dc06b0b9f3affb653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3814, "upload_time": "2018-11-11T22:04:54", "url": "https://files.pythonhosted.org/packages/94/15/1508b2dfc7627b6ec0636da05b83d2aa0fec1e4b906abb9c54a8ab532130/django-sfp-0.7.tar.gz" } ] }