Discussion:
import error: no module named viewflow.frontend
angelachakupa.at
2017-02-23 08:58:54 UTC
Permalink
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
--
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+***@googlegroups.com.
To post to this group, send email to django-***@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/ea26d0b2-29e9-49a6-808c-b8c12b43d018%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
chris rose
2017-02-24 04:03:43 UTC
Permalink
did you add 'viewflow.frontend' to installed_apps?
--
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+***@googlegroups.com.
To post to this group, send email to django-***@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/be562e55-25fb-45df-b4a5-f58dbf75aa7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Михаил Подгурский
2017-02-24 04:28:07 UTC
Permalink
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.

https://github.com/viewflow/cookbook/tree/master/helloworld

$ 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
Post by angelachakupa.at
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
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)
#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+***@googlegroups.com.
To post to this group, send email to django-***@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.
Loading...