Django site settings app
Project description
# MP-Config
This app helps to save custom site settings in admin and use them in views or templates.
Supported field types:
* CharField
* TextField
* HTMLField
* IntegerField
* FloatField
* BooleanField
* UrlField
* EmailField
* FileField
* ImageField
### Installation
Install with pip:
```sh
$ pip install django-mp-config
```
Add config to settings.py:
```
INSTALLED_APPS = [
'site_config',
]
```
Run migrations:
```
$ python manage.py migrate
```
Sync translation fields:
```
$ python manage.py sync_translation_fields
```
### Usage
```
>>> from site_config import config
>>> print config.my_var
```
### Template tags
To get config in template you should load 'site_config' tags and add 'get_site_config' template tag into your template.
Examples:
```
{% load site_config %}
{% get_site_config as config %}
{{ config.my_var }}
```
### Requirements
App require this packages:
* django-modeltranslation
* beautifulsoup4
This app helps to save custom site settings in admin and use them in views or templates.
Supported field types:
* CharField
* TextField
* HTMLField
* IntegerField
* FloatField
* BooleanField
* UrlField
* EmailField
* FileField
* ImageField
### Installation
Install with pip:
```sh
$ pip install django-mp-config
```
Add config to settings.py:
```
INSTALLED_APPS = [
'site_config',
]
```
Run migrations:
```
$ python manage.py migrate
```
Sync translation fields:
```
$ python manage.py sync_translation_fields
```
### Usage
```
>>> from site_config import config
>>> print config.my_var
```
### Template tags
To get config in template you should load 'site_config' tags and add 'get_site_config' template tag into your template.
Examples:
```
{% load site_config %}
{% get_site_config as config %}
{{ config.my_var }}
```
### Requirements
App require this packages:
* django-modeltranslation
* beautifulsoup4
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-mp-config-3.1.tar.gz
(9.8 kB
view hashes)