Change Django Settings On the Fly
Project description
# onthefly
Change Django Settings on Custom admin page at "RUNTIME".
# Installation
```bash
pip install django-onthefly
```
# Configuration
##### adminplus configuration (INSTALLED_APPS)
Replace 'django.contrib.admin' with 'django.contrib.admin.apps.SimpleAdminConfig'
Add 'adminplus' after SimpleAdminConfig
```bash
'django.contrib.admin.apps.SimpleAdminConfig',
# ...
'adminplus',
# ...
```
##### onthefly configuration (INSTALLED_APPS)
Add 'onthefly' at the bottom of the list.
##### Final INSTALLED_APPS
```bash
INSTALLED_APPS = (
'django.contrib.admin.apps.SimpleAdminConfig', (instead of 'django.contrib.admin')
# ...
'adminplus',
# ...
# ...
'onthefly'
)
```
##### You need to change urls.py like below as well
```bash
# urls.py
from django.contrib import admin
from adminplus.sites import AdminSitePlus
admin.site = AdminSitePlus()
admin.autodiscover()
urlpatterns = [
# ...
# Include the admin URL conf as normal.
(r'^admin', include(admin.site.urls)),
# ...
]
```
# Usage
go to django admin panel and see Onthefly Settings on bottom of the page as Custom Views
Add, Delete or Change settings at runtime.
# TODOs
##### 1- Add new backends apart from Redis
##### 2- Exception fallback to prevent unstabilities while changing settings at runtime
##### 3- More if you 'd like to contribute!
# CONTRIBUTE
##### All contributions are very welcomed!
# SCREENSHOT
![ScreenShot](https://raw.github.com/baranbartu/onthefly/master/screenshot.png)
Change Django Settings on Custom admin page at "RUNTIME".
# Installation
```bash
pip install django-onthefly
```
# Configuration
##### adminplus configuration (INSTALLED_APPS)
Replace 'django.contrib.admin' with 'django.contrib.admin.apps.SimpleAdminConfig'
Add 'adminplus' after SimpleAdminConfig
```bash
'django.contrib.admin.apps.SimpleAdminConfig',
# ...
'adminplus',
# ...
```
##### onthefly configuration (INSTALLED_APPS)
Add 'onthefly' at the bottom of the list.
##### Final INSTALLED_APPS
```bash
INSTALLED_APPS = (
'django.contrib.admin.apps.SimpleAdminConfig', (instead of 'django.contrib.admin')
# ...
'adminplus',
# ...
# ...
'onthefly'
)
```
##### You need to change urls.py like below as well
```bash
# urls.py
from django.contrib import admin
from adminplus.sites import AdminSitePlus
admin.site = AdminSitePlus()
admin.autodiscover()
urlpatterns = [
# ...
# Include the admin URL conf as normal.
(r'^admin', include(admin.site.urls)),
# ...
]
```
# Usage
go to django admin panel and see Onthefly Settings on bottom of the page as Custom Views
Add, Delete or Change settings at runtime.
# TODOs
##### 1- Add new backends apart from Redis
##### 2- Exception fallback to prevent unstabilities while changing settings at runtime
##### 3- More if you 'd like to contribute!
# CONTRIBUTE
##### All contributions are very welcomed!
# SCREENSHOT
![ScreenShot](https://raw.github.com/baranbartu/onthefly/master/screenshot.png)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-onthefly-0.2.1.tar.gz
(7.2 kB
view details)
File details
Details for the file django-onthefly-0.2.1.tar.gz
.
File metadata
- Download URL: django-onthefly-0.2.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2985ece7ed7e3bb0236d8dded100fddfb562676121d864335fab688b3f76e61a |
|
MD5 | ffea0be5696e3fc1560da0e16b8f09c9 |
|
BLAKE2b-256 | 0e5129e1b4d9165935ba095d252809a01dcd73242141d3a8f3dbb0164ed0a4f0 |