diff --git a/boofilsic/context_processors.py b/boofilsic/context_processors.py new file mode 100644 index 00000000..6fd333b3 --- /dev/null +++ b/boofilsic/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings + + +def site_info(request): + return settings.SITE_INFO diff --git a/boofilsic/settings.py b/boofilsic/settings.py index c5abe792..66e33ba4 100644 --- a/boofilsic/settings.py +++ b/boofilsic/settings.py @@ -83,6 +83,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'boofilsic.context_processors.site_info', ], }, }, @@ -190,6 +191,8 @@ AUTH_USER_MODEL = 'users.User' MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') +SITE_INFO = {'site_name': 'NeoDB'} + # Mastodon configs CLIENT_NAME = 'NiceDB' APP_WEBSITE = 'https://nicedb.org' diff --git a/books/templates/books/create_update.html b/books/templates/books/create_update.html index fdd7ec61..d971bb5c 100644 --- a/books/templates/books/create_update.html +++ b/books/templates/books/create_update.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/books/templates/books/create_update_review.html b/books/templates/books/create_update_review.html index 9acae132..1d056b7c 100644 --- a/books/templates/books/create_update_review.html +++ b/books/templates/books/create_update_review.html @@ -12,7 +12,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/books/templates/books/delete.html b/books/templates/books/delete.html index 5adcb246..98e1cd22 100644 --- a/books/templates/books/delete.html +++ b/books/templates/books/delete.html @@ -11,7 +11,7 @@ - {% trans 'NiceDB - 删除图书' %} + {{ site_name }} - {% trans '删除图书' %} diff --git a/books/templates/books/delete_review.html b/books/templates/books/delete_review.html index 8c0a7d18..da03447b 100644 --- a/books/templates/books/delete_review.html +++ b/books/templates/books/delete_review.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 删除评论' %} + {{ site_name }} - {% trans '删除评论' %} diff --git a/books/templates/books/detail.html b/books/templates/books/detail.html index fd8ee1e7..318f9573 100644 --- a/books/templates/books/detail.html +++ b/books/templates/books/detail.html @@ -11,11 +11,11 @@ - + - + {% if book.author %} @@ -24,7 +24,7 @@ {% endif %} - {% trans 'NiceDB - 书籍详情' %} | {{ book.title }} + {{ site_name }} - {% trans '书籍详情' %} | {{ book.title }} diff --git a/books/templates/books/mark_list.html b/books/templates/books/mark_list.html index 46c5acf1..9c47035f 100644 --- a/books/templates/books/mark_list.html +++ b/books/templates/books/mark_list.html @@ -12,7 +12,7 @@ - {% trans 'NiceDB - ' %}{{ book.title }}{% trans '的标记' %} + {{ site_name }} - {{ book.title }}{% trans '的标记' %} diff --git a/books/templates/books/review_detail.html b/books/templates/books/review_detail.html index 76a53aaf..8022d952 100644 --- a/books/templates/books/review_detail.html +++ b/books/templates/books/review_detail.html @@ -11,12 +11,12 @@ - + - {% trans 'NiceDB - 评论详情' %} + {{ site_name }} - {% trans '评论详情' %} diff --git a/books/templates/books/review_list.html b/books/templates/books/review_list.html index d7fad68b..892fe451 100644 --- a/books/templates/books/review_list.html +++ b/books/templates/books/review_list.html @@ -12,7 +12,7 @@ - {% trans 'NiceDB - ' %}{{ book.title }}{% trans '的评论' %} + {{ site_name }} - {{ book.title }}{% trans '的评论' %} diff --git a/books/templates/books/scrape.html b/books/templates/books/scrape.html index 6ad5a8a1..eb7737bf 100644 --- a/books/templates/books/scrape.html +++ b/books/templates/books/scrape.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 从豆瓣获取数据' %} + {{ site_name }} - {% trans '从豆瓣获取数据' %} diff --git a/common/templates/common/search_result.html b/common/templates/common/search_result.html index baec6b0d..90c7f17d 100644 --- a/common/templates/common/search_result.html +++ b/common/templates/common/search_result.html @@ -14,7 +14,7 @@ - {% trans 'NiceDB - 搜索结果' %} + {{ site_name }} - {% trans '搜索结果' %} diff --git a/games/templates/games/create_update.html b/games/templates/games/create_update.html index 40a768e2..7779a0e3 100644 --- a/games/templates/games/create_update.html +++ b/games/templates/games/create_update.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/games/templates/games/create_update_review.html b/games/templates/games/create_update_review.html index 54391b6d..4c46dbdd 100644 --- a/games/templates/games/create_update_review.html +++ b/games/templates/games/create_update_review.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/games/templates/games/delete.html b/games/templates/games/delete.html index 008a561b..041375db 100644 --- a/games/templates/games/delete.html +++ b/games/templates/games/delete.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - 删除电影/剧集' %} + {{ site_name }} - {% trans '删除电影/剧集' %} diff --git a/games/templates/games/delete_review.html b/games/templates/games/delete_review.html index b24fc5d2..bcd87049 100644 --- a/games/templates/games/delete_review.html +++ b/games/templates/games/delete_review.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 删除评论' %} + {{ site_name }} - {% trans '删除评论' %} diff --git a/games/templates/games/detail.html b/games/templates/games/detail.html index e32ebf66..b81e09d1 100644 --- a/games/templates/games/detail.html +++ b/games/templates/games/detail.html @@ -14,14 +14,14 @@ - + - + - {% trans 'NiceDB - 游戏详情' %} | {{ game.title }} + {{ site_name }} - {% trans '游戏详情' %} | {{ game.title }} diff --git a/games/templates/games/mark_list.html b/games/templates/games/mark_list.html index 45071f89..16f00f8d 100644 --- a/games/templates/games/mark_list.html +++ b/games/templates/games/mark_list.html @@ -14,7 +14,7 @@ - {% trans 'NiceDB - ' %}{{ game.title }}{% trans '的标记' %} + {{ site_name }} - {{ game.title }}{% trans '的标记' %} diff --git a/games/templates/games/review_detail.html b/games/templates/games/review_detail.html index 1ffab003..8f08a533 100644 --- a/games/templates/games/review_detail.html +++ b/games/templates/games/review_detail.html @@ -13,12 +13,12 @@ - + - {% trans 'NiceDB - 评论详情' %} + {{ site_name }} - {% trans '评论详情' %} diff --git a/games/templates/games/review_list.html b/games/templates/games/review_list.html index 10b01d43..6463325d 100644 --- a/games/templates/games/review_list.html +++ b/games/templates/games/review_list.html @@ -14,7 +14,7 @@ - {% trans 'NiceDB - ' %}{{ game.title }}{% trans '的评论' %} + {{ site_name }} - {{ game.title }}{% trans '的评论' %} diff --git a/games/templates/games/scrape.html b/games/templates/games/scrape.html index 87f2efa8..a8befb7e 100644 --- a/games/templates/games/scrape.html +++ b/games/templates/games/scrape.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 从豆瓣获取数据' %} + {{ site_name }} - {% trans '从豆瓣获取数据' %} diff --git a/management/templates/management/detail.html b/management/templates/management/detail.html index a7cf64e5..210a7e53 100644 --- a/management/templates/management/detail.html +++ b/management/templates/management/detail.html @@ -8,7 +8,7 @@ - NiceDB - {{ object.title }} + {{ site_name }} - {{ object.title }} diff --git a/management/templates/management/list.html b/management/templates/management/list.html index c8199e1f..e08f8ac2 100644 --- a/management/templates/management/list.html +++ b/management/templates/management/list.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 公告栏' %} + {{ site_name }} - {% trans '公告栏' %} diff --git a/movies/templates/movies/create_update.html b/movies/templates/movies/create_update.html index f55c026b..ca86a70a 100644 --- a/movies/templates/movies/create_update.html +++ b/movies/templates/movies/create_update.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/movies/templates/movies/create_update_review.html b/movies/templates/movies/create_update_review.html index 1f4e5b34..bcb9a038 100644 --- a/movies/templates/movies/create_update_review.html +++ b/movies/templates/movies/create_update_review.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/movies/templates/movies/delete.html b/movies/templates/movies/delete.html index 5aa651ac..96e9dbc2 100644 --- a/movies/templates/movies/delete.html +++ b/movies/templates/movies/delete.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - 删除电影/剧集' %} + {{ site_name }} - {% trans '删除电影/剧集' %} diff --git a/movies/templates/movies/delete_review.html b/movies/templates/movies/delete_review.html index a16e6c49..515108f0 100644 --- a/movies/templates/movies/delete_review.html +++ b/movies/templates/movies/delete_review.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 删除评论' %} + {{ site_name }} - {% trans '删除评论' %} diff --git a/movies/templates/movies/detail.html b/movies/templates/movies/detail.html index 8dbb4a09..b083112f 100644 --- a/movies/templates/movies/detail.html +++ b/movies/templates/movies/detail.html @@ -14,11 +14,11 @@ - + - + {% if movie.is_series %} - {% trans 'NiceDB - 剧集详情' %} | {{ movie.title }} + {{ site_name }} - {% trans '剧集详情' %} | {{ movie.title }} {% else %} - {% trans 'NiceDB - 电影详情' %} | {{ movie.title }} + {{ site_name }} - {% trans '电影详情' %} | {{ movie.title }} {% endif %} diff --git a/movies/templates/movies/mark_list.html b/movies/templates/movies/mark_list.html index 23e57b28..060d92ec 100644 --- a/movies/templates/movies/mark_list.html +++ b/movies/templates/movies/mark_list.html @@ -14,7 +14,7 @@ - {% trans 'NiceDB - ' %}{{ movie.title }}{% trans '的标记' %} + {{ site_name }} - {{ movie.title }}{% trans '的标记' %} diff --git a/movies/templates/movies/review_detail.html b/movies/templates/movies/review_detail.html index b52c7b54..096033d9 100644 --- a/movies/templates/movies/review_detail.html +++ b/movies/templates/movies/review_detail.html @@ -13,12 +13,12 @@ - + - {% trans 'NiceDB - 评论详情' %} + {{ site_name }} - {% trans '评论详情' %} diff --git a/movies/templates/movies/review_list.html b/movies/templates/movies/review_list.html index ed32cfe0..c1ae710c 100644 --- a/movies/templates/movies/review_list.html +++ b/movies/templates/movies/review_list.html @@ -14,7 +14,7 @@ - {% trans 'NiceDB - ' %}{{ movie.title }}{% trans '的评论' %} + {{ site_name }} - {{ movie.title }}{% trans '的评论' %} diff --git a/movies/templates/movies/scrape.html b/movies/templates/movies/scrape.html index 91cd90c9..cf1fbb69 100644 --- a/movies/templates/movies/scrape.html +++ b/movies/templates/movies/scrape.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 从豆瓣获取数据' %} + {{ site_name }} - {% trans '从豆瓣获取数据' %} diff --git a/music/templates/music/album_detail.html b/music/templates/music/album_detail.html index 68fe1143..05d583b6 100644 --- a/music/templates/music/album_detail.html +++ b/music/templates/music/album_detail.html @@ -13,14 +13,14 @@ - + - + - {% trans 'NiceDB - 音乐详情' %} | {{ album.title }} + {{ site_name }} - {% trans '音乐详情' %} | {{ album.title }} diff --git a/music/templates/music/album_mark_list.html b/music/templates/music/album_mark_list.html index cc9c7821..36ab340c 100644 --- a/music/templates/music/album_mark_list.html +++ b/music/templates/music/album_mark_list.html @@ -14,7 +14,7 @@ - {% trans 'NiceDB - ' %}{{ album.title }}{% trans '的标记' %} + {{ site_name }} - {{ album.title }}{% trans '的标记' %} diff --git a/music/templates/music/album_review_detail.html b/music/templates/music/album_review_detail.html index fb3b7b5a..798b860d 100644 --- a/music/templates/music/album_review_detail.html +++ b/music/templates/music/album_review_detail.html @@ -13,12 +13,12 @@ - + - {% trans 'NiceDB - 评论详情' %} + {{ site_name }} - {% trans '评论详情' %} diff --git a/music/templates/music/album_review_list.html b/music/templates/music/album_review_list.html index a4e4f04a..fd6acf3d 100644 --- a/music/templates/music/album_review_list.html +++ b/music/templates/music/album_review_list.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ album.title }}{% trans '的评论' %} + {{ site_name }} - {{ album.title }}{% trans '的评论' %} diff --git a/music/templates/music/create_update_album.html b/music/templates/music/create_update_album.html index 841eab79..d342e074 100644 --- a/music/templates/music/create_update_album.html +++ b/music/templates/music/create_update_album.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/music/templates/music/create_update_album_review.html b/music/templates/music/create_update_album_review.html index db1f11f8..f49014e2 100644 --- a/music/templates/music/create_update_album_review.html +++ b/music/templates/music/create_update_album_review.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/music/templates/music/create_update_song.html b/music/templates/music/create_update_song.html index a694c891..e5a3e730 100644 --- a/music/templates/music/create_update_song.html +++ b/music/templates/music/create_update_song.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/music/templates/music/create_update_song_review.html b/music/templates/music/create_update_song_review.html index 03e8271f..c4ec4539 100644 --- a/music/templates/music/create_update_song_review.html +++ b/music/templates/music/create_update_song_review.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ title }} + {{ site_name }} - {{ title }} diff --git a/music/templates/music/delete_album.html b/music/templates/music/delete_album.html index bbc15964..35501a4e 100644 --- a/music/templates/music/delete_album.html +++ b/music/templates/music/delete_album.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - 删除音乐' %} + {{ site_name }} - {% trans '删除音乐' %} diff --git a/music/templates/music/delete_album_review.html b/music/templates/music/delete_album_review.html index 7deaaa49..4a48e456 100644 --- a/music/templates/music/delete_album_review.html +++ b/music/templates/music/delete_album_review.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 删除评论' %} + {{ site_name }} - {% trans '删除评论' %} diff --git a/music/templates/music/delete_song.html b/music/templates/music/delete_song.html index 4d3825af..f398d797 100644 --- a/music/templates/music/delete_song.html +++ b/music/templates/music/delete_song.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - 删除音乐' %} + {{ site_name }} - {% trans '删除音乐' %} diff --git a/music/templates/music/delete_song_review.html b/music/templates/music/delete_song_review.html index 9e515b02..ff57a838 100644 --- a/music/templates/music/delete_song_review.html +++ b/music/templates/music/delete_song_review.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 删除评论' %} + {{ site_name }} - {% trans '删除评论' %} diff --git a/music/templates/music/scrape_album.html b/music/templates/music/scrape_album.html index 8079aa9e..81ba8a93 100644 --- a/music/templates/music/scrape_album.html +++ b/music/templates/music/scrape_album.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 从豆瓣获取数据' %} + {{ site_name }} - {% trans '从豆瓣获取数据' %} diff --git a/music/templates/music/scrape_song.html b/music/templates/music/scrape_song.html index e2cd4730..55a6478b 100644 --- a/music/templates/music/scrape_song.html +++ b/music/templates/music/scrape_song.html @@ -10,7 +10,7 @@ - {% trans 'NiceDB - 从豆瓣获取数据' %} + {{ site_name }} - {% trans '从豆瓣获取数据' %} diff --git a/music/templates/music/song_detail.html b/music/templates/music/song_detail.html index 6aa9b87b..a1b6da31 100644 --- a/music/templates/music/song_detail.html +++ b/music/templates/music/song_detail.html @@ -13,14 +13,14 @@ - + - + - {% trans 'NiceDB - 音乐详情' %} | {{ song.title }} + {{ site_name }} - {% trans '音乐详情' %} | {{ song.title }} diff --git a/music/templates/music/song_mark_list.html b/music/templates/music/song_mark_list.html index 6314df96..6fd9d547 100644 --- a/music/templates/music/song_mark_list.html +++ b/music/templates/music/song_mark_list.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ song.title }}{% trans '的标记' %} + {{ site_name }} - {{ song.title }}{% trans '的标记' %} diff --git a/music/templates/music/song_review_detail.html b/music/templates/music/song_review_detail.html index ee7c2704..d5b762dc 100644 --- a/music/templates/music/song_review_detail.html +++ b/music/templates/music/song_review_detail.html @@ -13,12 +13,12 @@ - + - {% trans 'NiceDB - 评论详情' %} + {{ site_name }} - {% trans '评论详情' %} diff --git a/music/templates/music/song_review_list.html b/music/templates/music/song_review_list.html index b8078275..632470ef 100644 --- a/music/templates/music/song_review_list.html +++ b/music/templates/music/song_review_list.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ song.title }}{% trans '的评论' %} + {{ site_name }} - {{ song.title }}{% trans '的评论' %} diff --git a/users/templates/users/book_list.html b/users/templates/users/book_list.html index ff2dfea9..5ca44c85 100644 --- a/users/templates/users/book_list.html +++ b/users/templates/users/book_list.html @@ -12,7 +12,7 @@ - {% trans 'NiceDB - ' %}{{ user.username }}{{ list_title }} + {{ site_name }} - {{ user.username }}{{ list_title }} diff --git a/users/templates/users/game_list.html b/users/templates/users/game_list.html index f4e97145..8d955249 100644 --- a/users/templates/users/game_list.html +++ b/users/templates/users/game_list.html @@ -13,7 +13,7 @@ - {% trans 'NiceDB - ' %}{{ user.username }}{{ list_title }} + {{ site_name }} - {{ user.username }}{{ list_title }} diff --git a/users/templates/users/home.html b/users/templates/users/home.html index 1d49c7f7..a1a879c3 100644 --- a/users/templates/users/home.html +++ b/users/templates/users/home.html @@ -13,9 +13,9 @@ {% if user == request.user %} - {% trans 'NiceDB - 我的主页' %} + {{ site_name }} - {% trans '我的主页' %} {% else %} - {% trans 'NiceDB - ' %}{{user.username}}{% trans '的主页' %} + {{ site_name }} - {{user.username}}{% trans '的主页' %} {% endif %} diff --git a/users/templates/users/login.html b/users/templates/users/login.html index 109b250b..75de5072 100644 --- a/users/templates/users/login.html +++ b/users/templates/users/login.html @@ -6,7 +6,7 @@ - + @@ -16,7 +16,7 @@ - {% trans 'NiceDB - 登录' %} + {{ site_name }} - {% trans '登录' %}