Is creating a view necessary ?

29 views
Skip to first unread message

VIPUL BANSAL

unread,
Jul 31, 2014, 7:18:48 AM7/31/14
to django...@googlegroups.com
Hi all,

I have a complete HTML website and a few python scripts.
I want to run those scripts via HTML events such as clicking a button.

I read Django tutorial and found out that it is using Views to create HTML content.

Is there any way I can do it without using the Views and use the HTML code that I have already created ?

Thnaks,

Andreas Kuhne

unread,
Jul 31, 2014, 7:40:01 AM7/31/14
to django...@googlegroups.com
Hi Vipul,

I think you should follow the Django tutorial a bit further. Your HTML pages can be used as templates for the result of the views. Views in django aren't the View in a MVC-pattern, but rather the controller (this was something that confused me when I started in Django). So the python parts of your code can be run in the views and your HTML pages can be used as templates in Django.

Regards,

Andréas


--
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d7f8d0b4-73c5-4cbc-bcd3-49d17ccc6c29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages