Skip to main content

A Django app to render Vue files as templates.

Project description

Djavue

Build codecov
Djavue is a Django app that allows the usage of Vue files as Django Templates. It's meant to be an alternative to Django Templates for developers that want to use Vue as frontend inside Django, without needing to setup npm or webpack.

Installation

  1. Install django-djavue from pip
pip install django-djavue
  1. Add djavue to your INSTALLED APPS
INSTALLED_APPS = [
  ...,
  'djavue',
  ...
]

Quickstart

  1. Create a .vue file inside your templates folder.

  2. Write a view that loads the template

from djavue import get_vue_template

def index(request):
    template = get_vue_template('index.vue', title="Homepage")

    return template.render({"""context here"""})

Links:

Tutorial
Pypi
Github

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-djavue-0.3.tar.gz (9.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page