четверг, 23 февраля 2017 г., 17:58:53 UTC+6 пользователь angelachakupa.at написал:
hie guysm 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.
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
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/57d99d23-b93b-484d-ae57-4827dcdce9c2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment