mirror of
https://github.com/searxng/searxng.git
synced 2025-07-19 03:09:25 +02:00
New Theme, Pix-art.
First commit
This commit is contained in:
parent
3ff269c84c
commit
d740e7384a
22 changed files with 1182 additions and 0 deletions
|
@ -29,6 +29,7 @@ import hashlib
|
|||
|
||||
from datetime import datetime, timedelta
|
||||
from urllib import urlencode
|
||||
from urlparse import urlparse
|
||||
from werkzeug.contrib.fixers import ProxyFix
|
||||
from flask import (
|
||||
Flask, request, render_template, url_for, Response, make_response,
|
||||
|
@ -178,6 +179,12 @@ def code_highlighter(codelines, language=None):
|
|||
return html_code
|
||||
|
||||
|
||||
# Extract domain from url
|
||||
@app.template_filter('extract_domain')
|
||||
def extract_domain(url):
|
||||
return urlparse(url)[1]
|
||||
|
||||
|
||||
def get_base_url():
|
||||
if settings['server']['base_url']:
|
||||
hostname = settings['server']['base_url']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue