Commit ee052bbe by liuyingying

allow host

parent 23f314e3
...@@ -25,7 +25,7 @@ SECRET_KEY = '^20@&z2z0r&#3xbfy6m4y+p=5&d1n58g4ng03n2c=0)b@*=bu(' ...@@ -25,7 +25,7 @@ SECRET_KEY = '^20@&z2z0r&#3xbfy6m4y+p=5&d1n58g4ng03n2c=0)b@*=bu('
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = ['*']
# Application definition # Application definition
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
{% if publications %} {% if publications %}
{% for publication in publications %} {% for publication in publications %}
<ul> <ul>
<li class="big_text"><a href="{{ publication.link }}">{{ publication.title }}</a></li> <li class="big_text"><a href="{% static 'hunter/publications/' %} {{ publication.link }}" target="_blank">{{ publication.title }}</a></li>
<li class="small_text">{{ publication.authors }}</li> <li class="small_text">{{ publication.authors }}</li>
<li class="middle_text right">{{ publication.date }}</li> <li class="middle_text right">{{ publication.date }}</li>
</ul> </ul>
......
...@@ -15,6 +15,8 @@ def index(request): ...@@ -15,6 +15,8 @@ def index(request):
for pub in publication_list: for pub in publication_list:
year = str(pub.date)[0:4] year = str(pub.date)[0:4]
pub.date = str(pub.date)[5:10] pub.date = str(pub.date)[5:10]
pub.link = pub.link.split('/')[-1]
print(pub.link)
if year in publication_year_list.keys(): if year in publication_year_list.keys():
publication_year_list[year].append(pub) publication_year_list[year].append(pub)
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment