idlesign / django-siteprefs

Reusable app for Django introducing site preferences system
https://github.com/idlesign/django-siteprefs
BSD 3-Clause "New" or "Revised" License
17 stars 6 forks source link

WIP: Overwrite django.conf #25

Open jayvdb opened 4 years ago

jayvdb commented 4 years ago

Demo for https://github.com/idlesign/django-siteprefs/issues/23

Includes Mimic hackery so that the following works

from django.conf import settings as django_settings
from django.http import JsonResponse

def settings(request):
    return JSONResponse({
        'site_name': django_settings.SITE_NAME,
    })
coveralls commented 4 years ago

Coverage Status

Coverage decreased (-1.2%) to 94.737% when pulling 61da050e4ab39fbe3d980bd9eb39018072239402 on jayvdb:overwrite-django-conf into 9cb3026b94a98299d60ccb61baf567b3d0c64a2f on idlesign:master.

jayvdb commented 4 years ago

Ran into another Mimic annoyance - re wants to see a str or a bytes, and fails on Prefproxy as it is neither.

idlesign commented 4 years ago

We'll probably also need a separate branch to play with before merging into master.

jayvdb commented 4 years ago

We'll probably also need a separate branch to play with before merging into master.

Sure. I am in no rush for a merge. I have just deployed this branch to my teams QA environment, but it wont get a lot of QA until a few weeks when we go live. I'll get the next push a bit neater so that you could also safely play with it in test beds at your disposal.