Skip to content

Commit

Permalink
Remove intranet related stuff and USE_LOCAL_FONTS
Browse files Browse the repository at this point in the history
  • Loading branch information
juliezhangr committed Nov 21, 2019
1 parent 58e9b48 commit d7208c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
9 changes: 2 additions & 7 deletions askbot/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ def application_settings(request):
'ASKBOT_CSS_DEVEL',
False
)
my_settings['USE_LOCAL_FONTS'] = getattr(
settings,
'ASKBOT_USE_LOCAL_FONTS',
False
)
my_settings['CSRF_COOKIE_NAME'] = settings.CSRF_COOKIE_NAME
my_settings['DEBUG'] = settings.DEBUG
my_settings['USING_RUNSERVER'] = 'runserver' in sys.argv
Expand All @@ -64,15 +59,15 @@ def application_settings(request):
my_settings['LOGOUT_REDIRECT_URL'] = url_utils.get_logout_redirect_url()
my_settings['USE_ASKBOT_LOGIN_SYSTEM'] = 'askbot.deps.django_authopenid' \
in settings.INSTALLED_APPS

current_language = get_language()

#for some languages we will start searching for shorter words
if current_language == 'ja':
#we need to open the search box and show info message about
#the japanese lang search
min_search_word_length = 1
else:
else:
min_search_word_length = my_settings['MIN_SEARCH_WORD_LENGTH']

context = {
Expand Down
18 changes: 3 additions & 15 deletions askbot/templates/meta/fonts.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
{% if settings.USE_LOCAL_FONTS %}
{# this version is for serving fonts locally - e.g. for intranet sites #}
<style type="text/css">
@font-face {
font-family: 'Open Sans Condensed';
font-style: normal;
font-weight: 700;
src: url('{{"/images/OpenSans-CondBold.ttf"|media}}');
}
</style>
{% else %}
{# note: for IE8 we ask for fonts separately #}
<link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=latin-ext' rel='stylesheet' type='text/css' />
<link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=cyrillic-ext' rel='stylesheet' type='text/css' />
{% endif %}
{# note: for IE8 we ask for fonts separately #}
<link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=latin-ext' rel='stylesheet' type='text/css' />
<link href='//fonts.googleapis.com/css?family=Open+Sans+Condensed:700&amp;subset=cyrillic-ext' rel='stylesheet' type='text/css' />

0 comments on commit d7208c5

Please sign in to comment.