Hacker News new | ask | show | jobs
by throwaway154 1055 days ago
Does

    class TodoView(UnicornView):
create a model?

    class UnicornView(TemplateView)
and

    from django.views.generic.base import TemplateView
Is this Django magic a Flasker doesn't get?
1 comments

As far as I understand UnicornView attributes (such as `self.tasks`) simply synchronise client state with the server side. It doesn't seem to automagically create a model instance unless you specifically do it.
This is correct. It looks like there is good integration with existing Django models: https://www.django-unicorn.com/docs/django-models/