import error: no module named viewflow.frontend

ยอดดู 377 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

angelachakupa.at

ยังไม่อ่าน,
23 ก.พ. 2560 06:58:5323/2/60
ถึง Django users
hie guys
m getting this error  Import error: no module named viewflow.frontend  yet i followed the procedures on how to apply the view flow module what could be the problem.


 

Flow.py

 

 

from viewflow import flow,lock

from viewflow.base import this, Flow

from viewflow.contrib import celery

from viewflow.flow.views import CreateProcessView, UpdateProcessView, Startview

from viewflow import frontend

from viewflow.site import viewsite

 

 

from .models import HelloWorldProcess

 

 

@frontend.register

class HelloWorldFlow(Flow):

    process_class = HelloWorldProcess

    lock_impl = lock.select_for_update_lock

 

    start = (

        flow.Start

        (CreateProcessView,

        fields=["text"]

        ).Permission(auto_create=True)\

        .Next(this.approve))

 

    approve = (flow.View(UpdateProcessView,fields=["approved"])\

        .Permission(auto_create=True)\

        .Next(this.check_approve)

    )

 

    check_approve = (

        flow.If(lambda activation: activation.process.approved)\

        .Then(this.send)\

        .Else(this.end)

    )

 

    send = (celery.Job(tasks.send_hello_world_request)\

        .Next(this.end)

    )

 

    end = flow.End()

 

    viewsite.register(HelloWorldFlow)

 

    #def send_question_app_request(self, activation):

        #print(activation.process.text)



this is my flow.py

chris rose

ยังไม่อ่าน,
23 ก.พ. 2560 23:03:4423/2/60
ถึง Django users
did you add 'viewflow.frontend' to installed_apps?

Михаил Подгурский

ยังไม่อ่าน,
24 ก.พ. 2560 07:52:2124/2/60
ถึง Django users
It looks that you are using an outdated version of the viewflow.

viewflow.frontend was added to the open-source version since 0.12+

Please consider upgrade to the latest 0.12.2

You can check out the viewflow cookbook helloword sample, and get it running with few commands.
 

$ virtualenv env --python=python3.4
$ env/bin/pip install requirements.txt
$ env/bin/python manage.py migrate
$ env/bin/python manage.py createsuperuser
$ env/bin/python manage.py runserver


четверг, 23 февраля 2017 г., 17:58:53 UTC+6 пользователь angelachakupa.at написал:
ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ