Giter Site home page Giter Site logo

Comments (6)

robmadole avatar robmadole commented on June 11, 2024

You know I've ran into this too. It's because those are tuples and immutable. I'll see if I can come up with something that makes sense to include in this project. You have any ideas? This is ugly but functional (I think, haven't tried it)

INSTALLED_APPS = list(INSTALLED_APPS) + ['debug_toolbar']

from django-sunset.

 avatar commented on June 11, 2024

A solution might be to work with exec() and compile() to load a series of settings files in order, where each file has full access to settings from previously-loaded files, to update, modify, etc.

http://code.djangoproject.com/wiki/SplitSettings#UsingalistofconffilesTransifex

from django-sunset.

robmadole avatar robmadole commented on June 11, 2024

Thanks, I'll check this out.

from django-sunset.

 avatar commented on June 11, 2024

I am now using INSTALLED_APPS += ('django_extensions',) from settingsdev.py by putting
exec(compile(open(os.path.join(os.path.dirname(file), 'settingsdev.py')).read(), "settingsdev.py", 'exec'))
into settings.py. This of course only works if
import settingsdev
api.collect(settingsdev)
is not used. I guess now we only need to make django-sunset use exec() implicitly for settingsdev.py, settingslocal.py, and everything in deployments/ etc.

from django-sunset.

robmadole avatar robmadole commented on June 11, 2024

Wow, that does get pretty hairy.

Try this before we get too crazy with things.

In settingsdev or settingslocal:

import settingsbase
INSTALLED_APPS = list(settingsbase.INSTALLED_APPS) + [
    'debug_toolbar']

I would hate to get complex with this as long as there is a simple solution that accomplishes the same goal.

from django-sunset.

robmadole avatar robmadole commented on June 11, 2024

Hey sunoano, is this issue resolved? I was going to close it out if you've worked around it.

from django-sunset.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.