Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
Go to file
2020-07-16 17:04:43 +03:00
.github Remove the labeler workflow, it's broken with forks 2020-04-24 15:38:20 +01:00
{{cookiecutter.project_slug}} Add Vue project generation options 2020-07-16 17:04:43 +03:00
docs FIX the link to Let's Encrypt *Automatic HTTPS (#2661) 2020-07-06 07:54:32 -07:00
hooks Add Vue project generation options 2020-07-16 17:04:43 +03:00
tests Add Vue project generation options 2020-07-16 17:04:43 +03:00
.editorconfig Update nginx.conf (#808) 2016-09-20 23:22:47 +02:00
.gitattributes Add .gitattributes file. 2013-12-12 17:31:45 +05:30
.gitignore Fix issue with Heroku + Django Compressor 2020-07-04 15:20:51 +01:00
.pyup.yml Update .pyup.yml 2020-06-17 23:16:13 +01:00
.travis.yml Use default distribution on Travis 2020-05-01 17:57:43 +01:00
CHANGELOG.md Added a few things to the changelog 2020-04-13 15:24:45 +01:00
CONTRIBUTING.rst Change Python version to 3.8 2020-03-29 19:55:27 +02:00
CONTRIBUTORS.rst Update CONTRIBUTORS.rst 2020-06-30 00:43:13 +02:00
cookiecutter.json Add Vue project generation options 2020-07-16 17:04:43 +03:00
LICENSE Add Vue project generation options 2020-07-16 17:04:43 +03:00
pytest.ini Bump pytest verbosity 2020-03-03 20:54:06 +00:00
README.rst Add Vue project generation options 2020-07-16 17:04:43 +03:00
requirements.txt Update flake8-isort from 3.0.0 to 3.0.1 2020-07-08 01:33:24 -07:00
setup.py Update version to 3.0.8 2020-07-04 16:35:28 +01:00
tox.ini Change Python version to 3.8 2020-03-29 19:55:27 +02:00

Cookiecutter Vue Django
=======================

.. image:: https://travis-ci.com/ilikerobots/cookiecutter-vue-django.svg?branch=master
    :target: https://travis-ci.com/ilikerobots/cookiecutter-vue-django?branch=master
    :alt: Build Status

.. image:: https://readthedocs.org/projects/cookiecutter-vue-django/badge/?version=latest
    :target: https://cookiecutter-vue-django.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. image:: https://pyup.io/repos/github/ilikerobots/cookiecutter-vue-django/shield.svg
    :target: https://pyup.io/repos/github/ilikerobots/cookiecutter-vue-django/
    :alt: Updates

Vue + Django with no compromise. 

Cookiecutter Vue Django is a framework for jumpstarting production-ready Django + Vue projects quickly.  Expanding on the the wonderful Cookiecutter Django, this project template allows the intermingling of both Django Templates and Vue, even on the same page, without compromising the full power of either. 

Typical solutions to integrating Django and Vue forgo much of the strengths of one lieu of the other. For example, a common approach is using Django Rest Framework as backend and writing the entire front end in Vue, making it difficult to utilize Django templates in places it could be expedient. A second approach is to use Vue within Django templates using browser `<script>` includes, but then lost is the ability to use Vue's Single File Components.

This project utilizes a different approach, melding these two technologies more naturally. As a result, not only are the typical compromises eliminated, but additional distinct advantages are realized:

* Increased flexibility: The developer is free to use Django Templates or Vue as appropriate, choosing the right tool for the job
* Increased development speed: Reduce time spent fighting the framework by using Django and Vue where each excels
* Increased performance: Leverage Django's powerful caching backend to deliver content-rich pages quickly with little or no Javascript, while deferring complex and interactive Vue functionality until after page load

Features
---------

* All the features of the wonderful cookiecutter-django_ 
* Harmonious coexistence of Django templates and Vue components
* Vue Single File Components (SFCs)
* Multi-page App (MPA) layout
* Vue Loader Hot Reload
* Property passing from Django Template -> Vue Component
* Sass/SCSS pre-compilation of Vue Components
* Vue DevTools support
* Chunked resource loading via webpack
* Deferred loading of Vue and/or Vue components
* Shared Vuex state across components on the same page
* Persistent state across page loads
* REST support via Axios -> DRF 
* Sample application illustrating all of the above

.. _cookiecutter-django: https://github.com/pydanny/cookiecutter-django

Usage
------

First, get Cookiecutter. Trust me, it's awesome::

    $ pip install "cookiecutter>=1.7.0"

Now run it against this repo::

    $ cookiecutter https://github.com/ilikerobots/cookiecutter-vue-django


You'll be prompted for some values. Provide them, then a Django project will be created for you. Don't forget to carefully look at the generated README.

For more detailed instructions, see upstream cookiecutter-django_

.. _cookiecutter: https://github.com/cookiecutter/cookiecutter
.. _cookiecutter-django: https://github.com/pydanny/cookiecutter-django

Issues
-----------

* If you think you found a bug or want to request a feature, please open an issue_.

.. _`issue`: https://github.com/ilikerobots/cookiecutter-vue-django/issues

Articles
---------

This cookiecutter is based on the methods described in the following articles

* `Vue + Django — Best of Both Frontends`_ - 26 May 2019 by Mike Hoolehan
* `Vue + Django — Best of Both Frontends, Part 2`_ - 4 Dec 2019 by Mike Hoolehan
* `Django + Vue — Blazing Content, Rich Interactivity`_ - 23 Apr 2020 by Mike Hoolehan

.. _`Vue + Django — Best of Both Frontends`: https://medium.com/js-dojo/vue-django-best-of-both-frontends-701307871478
.. _`Vue + Django — Best of Both Frontends, Part 2`: https://medium.com/js-dojo/django-vue-vuex-best-of-both-frontends-part-2-1dcb78215575
.. _`Django + Vue — Blazing Content, Rich Interactivity`: https://medium.com/js-dojo/django-vue-blazing-content-rich-interactivity-b34e45d8c602


Show your Support
-----------------

If you find this repository useful, then please consider leaving a star so this project can reach more people. Also, if the articles above were helpful, then a clap on those platforms would also be appreciated.  Thanks!


Code of Conduct
---------------

Everyone interacting in the this project's codebases, issue trackers, chat
rooms, and mailing lists is expected to follow the `PyPA Code of Conduct`_.


.. _`PyPA Code of Conduct`: https://www.pypa.io/en/latest/code-of-conduct/