summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayaram Pai2013-11-27 13:46:31 +0530
committerJayaram Pai2013-11-27 13:46:31 +0530
commit41a2953f337e92f3b5dfd914bd426e2463be7183 (patch)
tree957f51d13a411e25f3efc9f74d55703c54a5bc22
parent1f47c93f1b57a4ff0435c7f396a7fe2b856508ba (diff)
parent9231054c96e650e500cfffe3edb9d09c29a7fd07 (diff)
downloadSciPy2013-41a2953f337e92f3b5dfd914bd426e2463be7183.tar.gz
SciPy2013-41a2953f337e92f3b5dfd914bd426e2463be7183.tar.bz2
SciPy2013-41a2953f337e92f3b5dfd914bd426e2463be7183.zip
Merge branch 'master' of https://github.com/FOSSEE/SciPy2013
-rw-r--r--scipy/settings.py4
-rw-r--r--website/static/css/main.css11
-rw-r--r--website/templates/abstract_details.html22
-rw-r--r--website/templates/index.html1
-rw-r--r--website/templates/list_abstracts.html18
-rw-r--r--website/templates/page.html1
-rw-r--r--website/urls.py2
-rw-r--r--website/views.py16
8 files changed, 73 insertions, 2 deletions
diff --git a/scipy/settings.py b/scipy/settings.py
index e0d3451..db3f2b7 100644
--- a/scipy/settings.py
+++ b/scipy/settings.py
@@ -55,12 +55,12 @@ USE_TZ = True
# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/var/www/example.com/media/"
-MEDIA_ROOT = join(PROJDIR, '../static')
+MEDIA_ROOT = join(PROJDIR, '../static/')
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://example.com/media/", "http://media.example.com/"
-MEDIA_URL = '/static/downloads/'
+MEDIA_URL = '/downloads/'
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
diff --git a/website/static/css/main.css b/website/static/css/main.css
index f57acd7..88812e6 100644
--- a/website/static/css/main.css
+++ b/website/static/css/main.css
@@ -197,3 +197,14 @@
left: 0;
bottom: 0;
}
+
+/* for list of abstracts */
+#abstract{
+ background-color:#F0F8FF;
+ border: 1px solid #C9C9C9;
+ border-radius: 5px 5px 5px 5px;
+ margin-bottom: 10px;
+ min-width: 805px;
+ padding: 10px;
+ text-align: justify;
+}
diff --git a/website/templates/abstract_details.html b/website/templates/abstract_details.html
new file mode 100644
index 0000000..3abf02e
--- /dev/null
+++ b/website/templates/abstract_details.html
@@ -0,0 +1,22 @@
+{% extends 'page.html'%}
+{% load static %}
+
+{% block breadcrumbs %}
+<li><a href="{% url 'website:invited-speakers'%}">Invited Speakers</a></li>
+<li><a href="{% url 'website:list-abstracts'%}">List of Abstracts</a></li>
+{% endblock %}
+
+{% block content %}
+<center><h4>{{ paper.title }}</h4></center>
+
+<p><strong>{{ paper.user.first_name }} {{ paper.user.last_name }}</strong></p>
+<p><strong>{{ paper.bio }}</strong></p>
+<p><strong>Abstract: </strong></p>
+<div id="abstract">
+<p>{{ paper.abstract }}</p>
+</div>
+<p>Affiliation: <strong>{{ paper.affiliation }}</strong></p>
+<p>Links: {{ paper.links }}</p>
+<p><a href="/downloads/{{ paper.attachments }}">Attachment</a></p>
+
+{% endblock %}
diff --git a/website/templates/index.html b/website/templates/index.html
index 2675c4f..b30a60e 100644
--- a/website/templates/index.html
+++ b/website/templates/index.html
@@ -51,6 +51,7 @@
<ul class="dropdown">
<!-- <li><a href="{% url 'website:schedule' %}">Schedule</a></li> -->
<li><a href="{% url 'website:invited-speakers' %}">Invited Speakers</a></li>
+ <li><a href="{% url 'website:list-abstracts' %}">List of Abstracts</a></li>
<!-- <li><a href="{% url 'website:accepted-abstracts' %}">Accepted Abstracts</a></li> -->
</ul>
</li>
diff --git a/website/templates/list_abstracts.html b/website/templates/list_abstracts.html
new file mode 100644
index 0000000..4389d2d
--- /dev/null
+++ b/website/templates/list_abstracts.html
@@ -0,0 +1,18 @@
+{% extends 'page.html'%}
+
+{% block breadcrumbs %}
+<li><a href="{% url 'website:invited-speakers'%}">Invited Speakers</a></li>
+<li><a href="{% url 'website:list-abstracts'%}">List of Abstracts</a></li>
+{% endblock %}
+
+{% block content %}
+<center><h4>List of Abstracts</h4></center>
+
+<table align="center">
+<th>Title
+<th>Speaker
+{% for paper in papers %}
+ <tr><td><a href="{% url 'website:abstract-details' paper.id %}">{{ paper.title }}</a></td><td>{{ paper.user.first_name }} {{ paper.user.last_name }}</td></tr>
+{% endfor %}
+</table>
+{% endblock %}
diff --git a/website/templates/page.html b/website/templates/page.html
index 67b770e..08416a4 100644
--- a/website/templates/page.html
+++ b/website/templates/page.html
@@ -51,6 +51,7 @@
<ul class="dropdown">
<!-- <li><a href="{% url 'website:schedule' %}">Schedule</a></li> -->
<li><a href="{% url 'website:invited-speakers' %}">Invited Speakers</a></li>
+ <li><a href="{% url 'website:list-abstracts' %}">List of Abstracts</a></li>
<!-- <li><a href="{% url 'website:accepted-abstracts' %}">Accepted Abstracts</a></li> -->
</ul>
</li>
diff --git a/website/urls.py b/website/urls.py
index 380f13d..161df22 100644
--- a/website/urls.py
+++ b/website/urls.py
@@ -15,6 +15,8 @@ urlpatterns = patterns('',
# Conference Section
url(r'^schedule/$', 'website.views.schedule_page', name='schedule'),
url(r'^invited-speakers/$', 'website.views.invited_speakers_page', name='invited-speakers'),
+ url(r'^abstracts/$', 'website.views.list_of_abstracts', name='list-abstracts'),
+ url(r'^abstract-details/(?P<paper_id>\d+)/$', 'website.views.abstract_details', name="abstract-details"),
url(r'^accepted-abstracts/$', 'website.views.accepted_abstracts_page', name='accepted-abstracts'),
# Register
diff --git a/website/views.py b/website/views.py
index c3f2918..747f9d4 100644
--- a/website/views.py
+++ b/website/views.py
@@ -1,5 +1,6 @@
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
+from models import Paper
# Home section
def home_page(request):
@@ -39,6 +40,21 @@ def schedule_page(request):
def invited_speakers_page(request):
return render_to_response('invited_speakers.html')
+def list_of_abstracts(request):
+ context = {}
+ papers = Paper.objects.all()
+ context['papers'] = papers
+ return render_to_response('list_abstracts.html', context)
+
+def abstract_details(request, paper_id=None):
+ context = {}
+ paper = Paper.objects.get(id=paper_id)
+ context['paper'] = paper
+ if(len(paper.abstract)<=0):
+ return HttpResponse(paper.abstract)
+ return render_to_response('abstract_details.html', context)
+
+
def accepted_abstracts_page(request):
return render_to_response('accepted_abstracts.html')