You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
532 B
25 lines
532 B
#!/usr/bin/env python
|
|
# encoding: utf-8
|
|
|
|
|
|
"""
|
|
@version: ??
|
|
@author: liangliangyy
|
|
@license: MIT Licence
|
|
@contact: liangliangyy@gmail.com
|
|
@site: https://www.lylinux.org/
|
|
@software: PyCharm
|
|
@file: context_processors.py
|
|
@time: 2016/11/6 下午4:23
|
|
"""
|
|
from .models import Category, Article, Tag
|
|
from django.conf import settings
|
|
|
|
|
|
def seo_processor(requests):
|
|
return {
|
|
'SITE_NAME': settings.SITE_NAME,
|
|
'SITE_DESCRIPTION': settings.SITE_DESCRIPTION,
|
|
'SITE_BASE_URL':'http://'+ requests.get_host() + '/',
|
|
}
|