Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1337 closed enhancement (wontfix)

Convert configuration file ( and to plain text file

Reported by: limodou@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I'm thinking using some tools to make apps installation easily. But I found out that is hard to modifying the and So I suggest that whether the and can be convert to text file. Maybe you will say: if it's happened, many applications need to be converted. That's may not true, I think we can also support old-style configuration files. e.g.:

if exists(
if exists(settings.ini):

So two style configuration files can be proccessed. I think there are many benefits about using text configuration files, because Django is not a application, but a framework, so it'll need consider apps deployment, and even make these things easier. So how to easily modify the configration files becomes a problem, but using python file is not so easy to modify, because the syntax may be ambiguist and many hacks, so parsing it is more difficult. (I'v finished two models to deal with and, but the code is ugly and has many limits.)

If we could adopt standard ini format, or enhanced ini format(dict4ini - written by me also, ConfigObj), then change the configuration files will be very easily.

And the best benefit will be: others can easily write useful tools for deploying apps or somethings else. I'v developed some support in NewEdit to help the development about Django, so I also need this. For now, I can only using the ugly modules to do these things.

Attachments (1)

User.ini (14.6 KB ) - added by artileri88@… 12 years ago.
Configurasi Setting

Download all attachments as: .zip

Change History (3)

comment:1 by Malcolm Tredinnick <malcolm@…>, 18 years ago

This looks like a large step backwards. Your claims of ambiguous syntax and "many hacks" are not really supported here and it would be removing a lot of the power available in to make them only a text file. Generally will only be configured by somebody familiar with Django (and hence Python).

Look, for example, at the documentation file settings.txt and explain how we are to replicate something like the ABSOLUTE_URL_OVERRIDES example with only a text file. A python file can do everything you can do with a text file (via variable assignment), but not vice-versa. But you are removing things that are genuinely useful in moving to text files. So not a win at all, as far as I can see.

comment:2 by Adrian Holovaty, 18 years ago

Resolution: wontfix
Status: newclosed

I don't see how this is a step forward, either. Feel free to use this technique in your own use of the framework, but this won't be adapted into the framework proper.

by artileri88@…, 12 years ago

Attachment: User.ini added

Configurasi Setting

Note: See TracTickets for help on using tickets.
Back to Top