Thank you, Graham In fact... my post was just a wondering, maybe to use on personal projects... because it would be risky in a production enviroment Right now best thing I could do is to keep clean and isolated the settings file
On Jul 2, 6:22 pm, Graham Dumpleton <graham.dumple...@gmail.com> wrote: > On Jul 3, 9:11 am, Julián C. Pérez <jcp...@gmail.com> wrote: > > > Hi everyone > > I have a doubt... > > Is it possible to edit or customize -not delete- variables created in > >settings.pyfrom theadminsite of my application?? > > I mean, in order to control the whole site from web interface instead > > of manually editingsettings.py > > I hope I made myself clear... > > Any idea?? > > The only way you could do it is to rewrite thesettings.pyfile and > then trigger a restart of the web server. If you were using daemon > mode of mod_wsgi, you could also just trigger restart of the specific > web application instance by updating modification time on the WSGI > script file used as entry point for the application. > > Note that the safest thing to do would be to write new settings into > new file and then atomically rename file so as to replace existing > file. This avoids problem of half modified file being picked up by > newly started web server/application process. > > Finally, do be aware that you would need to have really good error > checking on inputs because any small stuff up could lock you out of > your site. In some respects you might be better off having a separate > application instance for modifying the file and have that run in > separate mod_wsgi daemon process. In other words, you are never > modifying your ownsettings.pyfile, so the application you use to > edit it will never break. > > Graham --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---