Giter Site home page Giter Site logo

christophbrosch / django-vue Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maximdeclercq/django-vue

0.0 0.0 0.0 79 KB

A promising attempt to use VueJS on top of Django.

License: GNU General Public License v3.0

Python 59.00% JavaScript 41.00%

django-vue's Introduction

Django Vue

A promising attempt to bring the power of VueJS to native Django. Write VueJS code and use VueJS Components inside Django templates without extensive code changes!

Installation

Install the django_vue package

pip install git+https://github.com/maximdeclercq/django-vue

Add django_vue to your INSTALLED_APPS

INSTALLED_APPS = (
    # ...,
    'django_vue',
)

Usage

from django_vue import DjangoVueComponent
# To be implemented
from django_vue.decorators import VueMethod

class CounterComponent(DjangoVueComponent):
    template_name = "components/counter.html"

    vue_props = ["count"]

    # To be implemented
    @VueMethod
    def inc_counter(self):
        self.vue_data["count"] += 1

class Home(DjangoVueComponent):
    template_name = "home.html"

    vue_components = {
        'counter': CounterComponent(),
    }

    vue_data = {'count': 0}

django-vue's People

Contributors

maximdeclercq avatar christophbrosch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.