Skip to content

Commit

Permalink
resolved merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
erickpeirson committed Jan 25, 2019
2 parents e6725e1 + 1dd5b4e commit faf454e
Show file tree
Hide file tree
Showing 54 changed files with 3,471 additions and 735 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ uwsgi = "*"
"boto3" = "*"
wtforms = "*"
"e1839a8" = {path = "."}
bleach = "*"

[dev-packages]
pydocstyle = "*"
Expand Down
126 changes: 69 additions & 57 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions arxiv/base/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@
SERVER_NAME = None

SECRET_KEY = os.environ.get('SECRET_KEY', 'yes123')
CLICKTHROUGH_SECRET = os.environ.get('CLICKTHROUGH_SECRET', 'bar')

A11Y_URL = os.environ.get("ARXIV_ACCESSIBILITY_URL",
"mailto:[email protected]")

EXTERNAL_URL_SCHEME = os.environ.get('EXTERNAL_URL_SCHEME', 'https')
BASE_SERVER = os.environ.get('BASE_SERVER', 'arxiv.org')
MAIN_SERVER = os.environ.get('MAIN_SERVER', 'arxiv.org')


URLS = [
("help", "/help", BASE_SERVER),
Expand All @@ -25,15 +21,12 @@
("help_social_bookmarking", "/help/social_bookmarking", BASE_SERVER),
("contact", "/help/contact", BASE_SERVER),
("search_box", "/search", BASE_SERVER),
("clickthrough", "/ct", BASE_SERVER),
("search_archive", "/search/<archive>", BASE_SERVER),
("search_advanced", "/search/advanced", BASE_SERVER),
("account", "/user", BASE_SERVER),
("login", "/user/login", BASE_SERVER),
("logout", "/user/logout", BASE_SERVER),
("home", "/", BASE_SERVER),
("abs", "/abs/<arxiv:paper_id>v<string:version>", BASE_SERVER),
("abs_by_id", "/abs/<arxiv:paper_id>", BASE_SERVER),
("ignore_me", "/IgnoreMe", BASE_SERVER), # Anti-robot honneypot.
("pdf", "/pdf/<arxiv:paper_id>", BASE_SERVER),
("twitter", "/arxiv", "twitter.com"),
Expand Down
6 changes: 5 additions & 1 deletion arxiv/base/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from flask import Flask

from arxiv.base import alerts
from arxiv.base import alerts, config


def inject_get_alerts() -> dict:
Expand All @@ -14,6 +14,9 @@ def inject_get_hidden_alerts() -> dict:
"""Insert :func:`alerts.get_hidden_alerts` into the template context."""
return dict(get_hidden_alerts=alerts.get_hidden_alerts)

def inject_a11y_url() -> dict:
"""Insert local config variable `A11Y_URL` into the template context."""
return dict(A11Y_URL=config.A11Y_URL)

def register_context_processors(app: Flask) -> None:
"""
Expand All @@ -26,3 +29,4 @@ def register_context_processors(app: Flask) -> None:
"""
app.context_processor(inject_get_alerts)
app.context_processor(inject_get_hidden_alerts)
app.context_processor(inject_a11y_url)
Loading

0 comments on commit faf454e

Please sign in to comment.