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 details)

Uploaded Source

File details

Details for the file django-djavue-0.3.tar.gz.

File metadata

  • Download URL: django-djavue-0.3.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.7

File hashes

Hashes for django-djavue-0.3.tar.gz
Algorithm Hash digest
SHA256 efb03a120738631bb5f47dbf7fdfc5290c461eab83b202c101bae9759ecc3de8
MD5 62803a39c749be5cb74de1d6ad72a2e9
BLAKE2b-256 b02741ca569e9a470d4364f2b70fd72dabbc1ddc32a00d116f7ad2b27dd427d4

See more details on using hashes here.

Supported by

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