davidmiller / pony-mode

Django mode for emacs
Other
149 stars 32 forks source link

pony-get-settings-module and pony-get-setting does not support setting files in a directory #89

Closed garaud closed 9 years ago

garaud commented 9 years ago

By default, pony-settings-module is set to "settings". I've a settings directory with different configuration files:

where I can overwrite some variables locally or in prod. I would like to tell to pony that my setting file is settings.local. In my case (pony-get-settings-module) returns nil. I'll try to propose a patch.

Cheers, Damien G.

davidmiller commented 9 years ago

Hi @garaud have been looking into this - looks like both django and emacs have moved on !

Working on a fix though :)

davidmiller commented 9 years ago

Hi @garaud - this should now work via the project configuration options! (Only with fixes to master this morning though - so you'll have to update from github for now)

You need to set a .dir-locals.el file with the following pony mode settings:

      ((pony-settings (make-pony-project
                                :settings "local")

This is the equivalent to running manage.py commands with --settings=local and presumes that your local file is in the same directory as your settings file would be.

Do raise an issue if you find that to not be working !

garaud commented 9 years ago

Sweet! I'll test that in a few days I think/hope.