An open API service indexing awesome lists of open source software.

https://github.com/chanmo/django-settings

用户可编辑的站点配置
https://github.com/chanmo/django-settings

Last synced: about 1 year ago
JSON representation

用户可编辑的站点配置

Awesome Lists containing this project

README

          

# 站点设置

为django提供后台可编辑的配置方案, 同时也方便request调用

## Quick Start

修改`settings.py`

```
INSTALLED_APPS = [
...
'django.contrib.sites',
'settings',
...
]

SITE_ID = 1
```

更新数据库

```
$ ./manage.py makemigrations
$ ./manage.py migrate
```

在views中使用

```
def index(request):
settings = request.site.setting
```

在templates中使用

```
logo
```