httpresponse from stand alone script

2012-08-24 Thread Blaxton
Hi I am calling a stand alone script from within views.py and  was able to generate a html file with render_to_string in a stand alone script by include followng line: from django.template.loader import render_to_string now , need to use "httpresponse" to generate a response. is it possible ?

Re: invoking a funcion or module as root

2012-08-18 Thread Blaxton
Thank you Jirka, Changed the function to stand alone script and called it with sudo from views.py. that worked and solved my problem. From: Jirka Vejrazka To: django-users@googlegroups.com Sent: Tuesday, August 14, 2012 1:03:29

invoking a funcion or module as root

2012-08-14 Thread Blaxton
Hi I have setup Django with wsgi and Apache on Linux and all is good, but the application that I am building should be able to modify Linux files which are only allowed by root. so, I have created a function named myfunc in a module named mymodule.py and has invoked the function in my

named url patterns - invalid syntax

2012-08-05 Thread Blaxton
Hi Why following line cause an invalid syntax : (r'^myform/$',  'mysite.views.myform', name="myform"), it seems named url pattern has changed from name="myform" to just 'myform' because when I change it to: (r'^myform/$',  'mysite.views.myform', 'myform'), it pass the syntax error and throw

Login Required Middleware

2012-07-30 Thread Blaxton
Hi I am trying to use login required middleware in a project and followed every step mentioned on following url , but its just not working. http://djangosnippets.org/snippets/1179/ placed the above middleware in myproject/middleware.py added following lines to settings.py LOGIN_URL = '/'

Re: Prevent direct access to some URLs

2012-07-26 Thread Blaxton
I just figured the solution is using @login_required decorator. Thanks From: Blaxton <blaxx...@yahoo.com> To: "django-users@googlegroups.com" <django-users@googlegroups.com> Sent: Wednesday, July 25, 2012 10:42:31 PM Subject: Prevent

Prevent direct access to some URLs

2012-07-25 Thread Blaxton
Hi I have set up a login page, using "django.contrib.auth.views.login" and user's would be forwarded to  their own web page after being authenticated, but they can access to their web page directly with placing the related uri.  how can I prevent direct access to those page ? Thanks -- You

Re: Writing or editing files using Django

2012-06-19 Thread Blaxton
? From: kenneth gonsalves <law...@thenilgiris.com> To: django-users@googlegroups.com Sent: Tuesday, June 19, 2012 3:42:34 PM Subject: Re: Writing or editing files using Django On Tue, 2012-06-19 at 00:40 -0700, Blaxton wrote: > I am a newbie

Writing or editing files using Django

2012-06-19 Thread Blaxton
I am a newbie in Django and in need of some hints to point in the right direction.  I am building a new application which users would enter some names and then after clicking on submit, some non .html files should be created or modified while entered data should be inserted in some parts of

Writing or editing files using Django

2012-06-19 Thread Blaxton
I am a newbie in Django and in need of some hints to point in the right direction. I am building a new application which users would enter some names and then after clicking on submit, some non .html files should be created or modified while entered data should be inserted in some parts of the