Dear Asad, Ludovic Coues has already answered your question.
simply create a new file and save the content in it: from django.template.loader import render_to_string xml_content = render_to_string('my_xml_template_with_django_template_variables.xml', {'foo': 'bar'}) file_path = '/etc/freeswitch/sip_profiles/external' # this is not the best way to indicate the file. with open(file_path, 'w') as the_file: the_file.write(xml_content) probably the python process must be running on a linux user with permissions to write to the folder you want to create the file. operations in harddisk are usually expensive (because HD is usually thousands of times slower than RAM memory), and depending on how you program it can also be dangerous. to this question, you could create a post_save signal, which starts a task in Celery, which will create the xml file. said that, all here are busy people. We have bills to pay. If you want to help, the least you can do is try to write your question so try to help us give you an answer that is useful for you. learn how to ask questions to facilitate get a useful answer, it is important part of learning information technology and in life in general. When I was starting, this text helped me a lot, gave me a lot of cool tips on how to ask questions: http://www.catb.org/esr/faqs/smart-questions.html good studies :-) On Wed, Aug 10, 2016 at 9:31 AM, Asad ur Rehman <asadurrehman...@gmail.com> wrote: > *M Hashmi* its Ok.... Next i will try to Post question that you can > easily understand. > > -- > 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+unsubscr...@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/828d31a2-6a8b-4e13-aa6f-bed78ea0a620%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/828d31a2-6a8b-4e13-aa6f-bed78ea0a620%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Fábio C. Barrionuevo da Luz Palmas - Tocantins - Brasil - América do Sul http://pythonclub.com.br/ Blog colaborativo sobre Python e tecnologias Relacionadas, mantido totalmente no https://github.com/pythonclub/pythonclub.github.io . Todos são livres para publicar. É só fazer fork, escrever sua postagem e mandar o pull-request. Leia mais sobre como publicar em README.md e contributing.md. Regra básica de postagem: "Você" acha interessante? É útil para "você"? Pode ser utilizado com Python ou é útil para quem usa Python? Está esperando o que? Publica logo, que estou louco para ler... -- 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+unsubscr...@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/CAPVjvMYVBFqFW5cMQNZpomf8%3DxmASrKfQk2qO-GGOL2rncVt%3Dg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.