On Apr 3, 4:31 am, hollando <[email protected]> wrote: > Yes. Thanks for your replies. > > I have one more question. I want to put all my configures into one > file and pass the file name by command line. > My django is deployed as in uwsgi, so I pass the command line by -- > pyargv '-c /etc/myconfig.ini'. > In django, how can I retrieve this command line file name? If I set it > by os.enviroment, how to retrieve it? > Thanks. >
Hi, why not using the embedded uWSGI config parser ? You can put all the uWSGI option in a ini file with your custom options: [uwsgi] ; uwsgi related options socket = :3031 module = django.core.handlers.wsgi:WSGIHandler() master = 1 ; and here your custom options my_funny_option = pluto foo = bar The in your code you can access all the options with the uwsgi.opt dictionary: import uwsgi uwsgi.opt['socket'] uwsgi.opt['my_funny_option'] -- Roberto De Ioris http://unbit.it -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

