Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Managing settings.py from admin site
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Julián C. Pérez  
View profile  
 More options Jul 2, 7:11 pm
From: Julián C. Pérez <jcp...@gmail.com>
Date: Thu, 2 Jul 2009 16:11:31 -0700 (PDT)
Local: Thurs, Jul 2 2009 7:11 pm
Subject: Managing settings.py from admin site
Hi everyone
I have a doubt...
Is it possible to edit or customize -not delete- variables created in
settings.py from the admin site of my application??
I mean, in order to control the whole site from web interface instead
of manually editing settings.py
I hope I made myself clear...
Any idea??
Thanks!

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Graham Dumpleton  
View profile  
 More options Jul 2, 7:22 pm
From: Graham Dumpleton <Graham.Dumple...@gmail.com>
Date: Thu, 2 Jul 2009 16:22:10 -0700 (PDT)
Local: Thurs, Jul 2 2009 7:22 pm
Subject: Re: Managing settings.py from admin site

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.py from the admin site of my application??
> I mean, in order to control the whole site from web interface instead
> of manually editing settings.py
> I hope I made myself clear...
> Any idea??

The only way you could do it is to rewrite the settings.py file 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 own settings.py file, so the application you use to
edit it will never break.

Graham


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Julián C. Pérez  
View profile  
 More options Jul 6, 4:15 pm
From: Julián C. Pérez <jcp...@gmail.com>
Date: Mon, 6 Jul 2009 13:15:08 -0700 (PDT)
Local: Mon, Jul 6 2009 4:15 pm
Subject: Re: Managing settings.py from admin site
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:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google