1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/wuyue92tree-django-adminlte-ui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
index.md 2 КБ
Копировать Редактировать Исходные данные Просмотреть построчно История
伍岳 Отправлено 6 лет назад a5b2240

Welcome to django-adminlte-ui

PyPI Version Download Status Build Status

django-adminlte is a django admin theme base on adminlte

adminlte version: 2.3.6

Helper

  • if you have good ideas, just contact me.
  • if you find some bug, just add an issue.
  • if you think this project is good, just star and fork, make it better 🍉.

Install

pip install django-adminlte-ui

Setup

# settings.py

INSTALLED_APPS = [
    'adminlteui',
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.sites',
    'django.contrib.sitemaps',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    ...
]

Init models

python manage.py migrate django_admin_settings

Guides

General Option

dynamic setup your site base on table django_admin_settings_options.

support options:

  • Site Title
  • Site Header
  • Site Logo
  • Welcome Sign

Options

this options in your db, named django_admin_settings_options, after do migrate.

you can also add your custom option into this table, and use it by templatetags adminlte_options with function get_adminlte_option.

options table has a valid field to control your option work or not.

example:

# adminlte/general_option.html

{% load adminlte_options %}

# here my option_name is site_title, you can custom yourself.
{% get_adminlte_option 'site_title' as adminlte_site_title %}
{% if adminlte_site_title.valid %}
{{ adminlte_site_title.site_title }}
{% else %}
{{ site_title|default:_('Django site admin') }}
{% endif %}

before custom option, you should known what adminlte has used.

  • site_title
  • site_header
  • site_logo
  • welcome_sign

Menu

coming soon...

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/wuyue92tree-django-adminlte-ui.git
git@gitlife.ru:oschina-mirror/wuyue92tree-django-adminlte-ui.git
oschina-mirror
wuyue92tree-django-adminlte-ui
wuyue92tree-django-adminlte-ui
1.2.0