On 19-6-2012 14:37, Blaxton wrote: > My understanding from template system was: > Django template system is to create html files on fly while returning > the resulting html to user's browser!
Nope, that's just the default use. The template system can be used for anything to return "text" based on a "context". > How can I save the created files by template system on file system ? You'd do that in your view, similar to how mail is sent in this example: <https://docs.djangoproject.com/en/1.4/topics/forms/#processing-the-data-from-a-form> Except that you use: <https://docs.djangoproject.com/en/1.4/ref/templates/api/#rendering-a-context> So your process is: - show editing form to user using a HTML template that gets sent to browser - validate the form and clean the data - render the template that generates your file based on the form data - write the file using standard python file methods - redirect the user It's similar to this: https://docs.djangoproject.com/en/1.4/howto/outputting-csv/ except don't call response.write() but write to a file. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.