From 7596729ec10fed7570f021bf7c5051a2ea2556cf Mon Sep 17 00:00:00 2001 From: Volodymyr Hotsyk Date: Sat, 5 Jul 2014 16:11:43 +0300 Subject: [PATCH 1/5] Update to Django=1.6 --- symposion/boxes/urls.py | 7 ++--- symposion/cms/urls.py | 5 ++-- symposion/conference/urls.py | 5 ++-- symposion/proposals/urls.py | 28 ++++++++++++-------- symposion/reviews/urls.py | 48 ++++++++++++++++++++++------------- symposion/schedule/urls.py | 14 ++++++---- symposion/speakers/urls.py | 11 +++++--- symposion/sponsorship/urls.py | 10 +++++--- symposion/teams/urls.py | 7 ++--- symposion/utils/mail.py | 10 ++++---- symposion/views.py | 10 +++++--- 11 files changed, 96 insertions(+), 59 deletions(-) diff --git a/symposion/boxes/urls.py b/symposion/boxes/urls.py index dc57fe6b..c7076c91 100644 --- a/symposion/boxes/urls.py +++ b/symposion/boxes/urls.py @@ -1,6 +1,7 @@ -from django.conf.urls.defaults import url, patterns +from django.conf.urls import url, patterns -urlpatterns = patterns("symposion.boxes.views", +urlpatterns = patterns( + "symposion.boxes.views", url(r"^([-\w]+)/edit/$", "box_edit", name="box_edit"), -) \ No newline at end of file +) diff --git a/symposion/cms/urls.py b/symposion/cms/urls.py index 3297ce53..b9893dd7 100644 --- a/symposion/cms/urls.py +++ b/symposion/cms/urls.py @@ -1,8 +1,9 @@ -from django.conf.urls.defaults import url, patterns +from django.conf.urls import url, patterns PAGE_RE = r"(([\w-]{1,})(/[\w-]{1,})*)/" -urlpatterns = patterns("symposion.cms.views", +urlpatterns = patterns( + "symposion.cms.views", url(r"^files/$", "file_index", name="file_index"), url(r"^files/create/$", "file_create", name="file_create"), url(r"^files/(\d+)/([^/]+)$", "file_download", name="file_download"), diff --git a/symposion/conference/urls.py b/symposion/conference/urls.py index 6bd44c16..43a42a5b 100644 --- a/symposion/conference/urls.py +++ b/symposion/conference/urls.py @@ -1,6 +1,7 @@ -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url -urlpatterns = patterns("symposion.conference.views", +urlpatterns = patterns( + "symposion.conference.views", url(r"^users/$", "user_list", name="user_list"), ) diff --git a/symposion/proposals/urls.py b/symposion/proposals/urls.py index 85e2bb1c..994fad30 100644 --- a/symposion/proposals/urls.py +++ b/symposion/proposals/urls.py @@ -1,18 +1,26 @@ -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url -urlpatterns = patterns("symposion.proposals.views", +urlpatterns = patterns( + "symposion.proposals.views", url(r"^submit/$", "proposal_submit", name="proposal_submit"), - url(r"^submit/([\w\-]+)/$", "proposal_submit_kind", name="proposal_submit_kind"), + url(r"^submit/([\w\-]+)/$", "proposal_submit_kind", + name="proposal_submit_kind"), url(r"^(\d+)/$", "proposal_detail", name="proposal_detail"), url(r"^(\d+)/edit/$", "proposal_edit", name="proposal_edit"), - url(r"^(\d+)/speakers/$", "proposal_speaker_manage", name="proposal_speaker_manage"), + url(r"^(\d+)/speakers/$", "proposal_speaker_manage", + name="proposal_speaker_manage"), url(r"^(\d+)/cancel/$", "proposal_cancel", name="proposal_cancel"), url(r"^(\d+)/leave/$", "proposal_leave", name="proposal_leave"), - url(r"^(\d+)/join/$", "proposal_pending_join", name="proposal_pending_join"), - url(r"^(\d+)/decline/$", "proposal_pending_decline", name="proposal_pending_decline"), - - url(r"^(\d+)/document/create/$", "document_create", name="proposal_document_create"), - url(r"^document/(\d+)/delete/$", "document_delete", name="proposal_document_delete"), - url(r"^document/(\d+)/([^/]+)$", "document_download", name="proposal_document_download"), + url(r"^(\d+)/join/$", "proposal_pending_join", + name="proposal_pending_join"), + url(r"^(\d+)/decline/$", "proposal_pending_decline", + name="proposal_pending_decline"), + + url(r"^(\d+)/document/create/$", "document_create", + name="proposal_document_create"), + url(r"^document/(\d+)/delete/$", "document_delete", + name="proposal_document_delete"), + url(r"^document/(\d+)/([^/]+)$", "document_download", + name="proposal_document_download"), ) diff --git a/symposion/reviews/urls.py b/symposion/reviews/urls.py index 564bd35e..09264557 100644 --- a/symposion/reviews/urls.py +++ b/symposion/reviews/urls.py @@ -1,23 +1,37 @@ -from django.conf.urls.defaults import patterns, url +from django.conf.urls import patterns, url -urlpatterns = patterns("symposion.reviews.views", - url(r"^section/(?P[\w\-]+)/all/$", "review_section", {"reviewed": "all"}, name="review_section"), - url(r"^section/(?P[\w\-]+)/reviewed/$", "review_section", {"reviewed": "reviewed"}, name="user_reviewed"), - url(r"^section/(?P[\w\-]+)/not_reviewed/$", "review_section", {"reviewed": "not_reviewed"}, name="user_not_reviewed"), - url(r"^section/(?P[\w\-]+)/assignments/$", "review_section", {"assigned": True}, name="review_section_assignments"), - url(r"^section/(?P[\w\-]+)/status/$", "review_status", name="review_status"), - url(r"^section/(?P[\w\-]+)/status/(?P\w+)/$", "review_status", name="review_status"), - url(r"^section/(?P[\w\-]+)/list/(?P\d+)/$", "review_list", name="review_list_user"), - url(r"^section/(?P[\w\-]+)/admin/$", "review_admin", name="review_admin"), - url(r"^section/(?P[\w\-]+)/admin/accept/$", "review_bulk_accept", name="review_bulk_accept"), - url(r"^section/(?P[\w\-]+)/notification/(?P\w+)/$", "result_notification", name="result_notification"), - url(r"^section/(?P[\w\-]+)/notification/(?P\w+)/prepare/$", "result_notification_prepare", name="result_notification_prepare"), - url(r"^section/(?P[\w\-]+)/notification/(?P\w+)/send/$", "result_notification_send", name="result_notification_send"), - +urlpatterns = patterns( + "symposion.reviews.views", + url(r"^section/(?P[\w\-]+)/all/$", "review_section", + {"reviewed": "all"}, name="review_section"), + url(r"^section/(?P[\w\-]+)/reviewed/$", "review_section", + {"reviewed": "reviewed"}, name="user_reviewed"), + url(r"^section/(?P[\w\-]+)/not_reviewed/$", "review_section", + {"reviewed": "not_reviewed"}, name="user_not_reviewed"), + url(r"^section/(?P[\w\-]+)/assignments/$", "review_section", + {"assigned": True}, name="review_section_assignments"), + url(r"^section/(?P[\w\-]+)/status/$", "review_status", + name="review_status"), + url(r"^section/(?P[\w\-]+)/status/(?P\w+)/$", + "review_status", name="review_status"), + url(r"^section/(?P[\w\-]+)/list/(?P\d+)/$", + "review_list", name="review_list_user"), + url(r"^section/(?P[\w\-]+)/admin/$", "review_admin", + name="review_admin"), + url(r"^section/(?P[\w\-]+)/admin/accept/$", + "review_bulk_accept", name="review_bulk_accept"), + url(r"^section/(?P[\w\-]+)/notification/(?P\w+)/$", + "result_notification", name="result_notification"), + url(r"^section/(?P[\w\-]+)/notification/(?P\w+)/prepare/$", + "result_notification_prepare", name="result_notification_prepare"), + url(r"^section/(?P[\w\-]+)/notification/(?P\w+)/send/$", + "result_notification_send", name="result_notification_send"), + url(r"^review/(?P\d+)/$", "review_detail", name="review_detail"), - + url(r"^(?P\d+)/delete/$", "review_delete", name="review_delete"), url(r"^assignments/$", "review_assignments", name="review_assignments"), - url(r"^assignment/(?P\d+)/opt-out/$", "review_assignment_opt_out", name="review_assignment_opt_out"), + url(r"^assignment/(?P\d+)/opt-out/$", "review_assignment_opt_out", + name="review_assignment_opt_out"), ) diff --git a/symposion/schedule/urls.py b/symposion/schedule/urls.py index 58890827..b227de61 100644 --- a/symposion/schedule/urls.py +++ b/symposion/schedule/urls.py @@ -1,15 +1,19 @@ -from django.conf.urls.defaults import url, patterns +from django.conf.urls import url, patterns -urlpatterns = patterns("symposion.schedule.views", +urlpatterns = patterns( + "symposion.schedule.views", url(r"^$", "schedule_conference", name="schedule_conference"), url(r"^edit/$", "schedule_edit", name="schedule_edit"), url(r"^list/$", "schedule_list", name="schedule_list"), url(r"^presentations.csv$", "schedule_list_csv", name="schedule_list_csv"), - url(r"^presentation/(\d+)/$", "schedule_presentation_detail", name="schedule_presentation_detail"), + url(r"^presentation/(\d+)/$", "schedule_presentation_detail", + name="schedule_presentation_detail"), url(r"^([\w\-]+)/$", "schedule_detail", name="schedule_detail"), url(r"^([\w\-]+)/edit/$", "schedule_edit", name="schedule_edit"), url(r"^([\w\-]+)/list/$", "schedule_list", name="schedule_list"), - url(r"^([\w\-]+)/presentations.csv$", "schedule_list_csv", name="schedule_list_csv"), - url(r"^([\w\-]+)/edit/slot/(\d+)/", "schedule_slot_edit", name="schedule_slot_edit"), + url(r"^([\w\-]+)/presentations.csv$", "schedule_list_csv", + name="schedule_list_csv"), + url(r"^([\w\-]+)/edit/slot/(\d+)/", "schedule_slot_edit", + name="schedule_slot_edit"), ) diff --git a/symposion/speakers/urls.py b/symposion/speakers/urls.py index fa7055cf..fadead36 100644 --- a/symposion/speakers/urls.py +++ b/symposion/speakers/urls.py @@ -1,10 +1,13 @@ -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url -urlpatterns = patterns("symposion.speakers.views", +urlpatterns = patterns( + "symposion.speakers.views", url(r"^create/$", "speaker_create", name="speaker_create"), - url(r"^create/(\w+)/$", "speaker_create_token", name="speaker_create_token"), + url(r"^create/(\w+)/$", "speaker_create_token", + name="speaker_create_token"), url(r"^edit/(?:(?P\d+)/)?$", "speaker_edit", name="speaker_edit"), url(r"^profile/(?P\d+)/$", "speaker_profile", name="speaker_profile"), - url(r"^staff/create/(\d+)/$", "speaker_create_staff", name="speaker_create_staff"), + url(r"^staff/create/(\d+)/$", "speaker_create_staff", + name="speaker_create_staff"), ) diff --git a/symposion/sponsorship/urls.py b/symposion/sponsorship/urls.py index e5d32bb0..8ae8c65d 100644 --- a/symposion/sponsorship/urls.py +++ b/symposion/sponsorship/urls.py @@ -1,9 +1,11 @@ -from django.conf.urls.defaults import patterns, url -from django.views.generic.simple import direct_to_template +from django.conf.urls import patterns, url +from django.views.generic import TemplateView -urlpatterns = patterns("symposion.sponsorship.views", - url(r"^$", direct_to_template, {"template": "sponsorship/list.html"}, name="sponsor_list"), +urlpatterns = patterns( + "symposion.sponsorship.views", + url(r"^$", TemplateView.as_view(template_name="sponsorship/list.html"), + name="sponsor_list"), url(r"^apply/$", "sponsor_apply", name="sponsor_apply"), url(r"^add/$", "sponsor_add", name="sponsor_add"), url(r"^(?P\d+)/$", "sponsor_detail", name="sponsor_detail"), diff --git a/symposion/teams/urls.py b/symposion/teams/urls.py index 01145f41..f6ddaf9d 100644 --- a/symposion/teams/urls.py +++ b/symposion/teams/urls.py @@ -1,13 +1,14 @@ -from django.conf.urls.defaults import * +from django.conf.urls import patterns, url -urlpatterns = patterns("symposion.teams.views", +urlpatterns = patterns( + "symposion.teams.views", # team specific url(r"^(?P[\w\-]+)/$", "team_detail", name="team_detail"), url(r"^(?P[\w\-]+)/join/$", "team_join", name="team_join"), url(r"^(?P[\w\-]+)/leave/$", "team_leave", name="team_leave"), url(r"^(?P[\w\-]+)/apply/$", "team_apply", name="team_apply"), - + # membership specific url(r"^promote/(?P\d+)/$", "team_promote", name="team_promote"), url(r"^demote/(?P\d+)/$", "team_demote", name="team_demote"), diff --git a/symposion/utils/mail.py b/symposion/utils/mail.py index dc856871..59cdf09c 100644 --- a/symposion/utils/mail.py +++ b/symposion/utils/mail.py @@ -7,9 +7,9 @@ from django.contrib.sites.models import Site def send_email(to, kind, **kwargs): - + current_site = Site.objects.get_current() - + ctx = { "current_site": current_site, "STATIC_URL": settings.STATIC_URL, @@ -19,12 +19,12 @@ def send_email(to, kind, **kwargs): current_site.name, render_to_string("emails/%s/subject.txt" % kind, ctx).strip() ) - + message_html = render_to_string("emails/%s/message.html" % kind, ctx) message_plaintext = strip_tags(message_html) - + from_email = settings.DEFAULT_FROM_EMAIL - + email = EmailMultiAlternatives(subject, message_plaintext, from_email, to) email.attach_alternative(message_html, "text/html") email.send() diff --git a/symposion/views.py b/symposion/views.py index 669e2847..68e40559 100644 --- a/symposion/views.py +++ b/symposion/views.py @@ -12,18 +12,19 @@ import symposion.forms class SignupView(account.views.SignupView): - + form_class = symposion.forms.SignupForm form_kwargs = { "prefix": "signup", } - + def create_user(self, form, commit=True): user_kwargs = { "first_name": form.cleaned_data["first_name"], "last_name": form.cleaned_data["last_name"] } - return super(SignupView, self).create_user(form, commit=commit, **user_kwargs) + return super(SignupView, self).create_user(form, commit=commit, + **user_kwargs) def generate_username(self, form): def random_username(): @@ -51,5 +52,6 @@ class LoginView(account.views.LoginView): @login_required def dashboard(request): if request.session.get("pending-token"): - return redirect("speaker_create_token", request.session["pending-token"]) + return redirect("speaker_create_token", + request.session["pending-token"]) return render(request, "dashboard.html") From 3ad6d4cfef2261c01cff757cbd63603522e65bbd Mon Sep 17 00:00:00 2001 From: Volodymyr Hotsyk Date: Sat, 5 Jul 2014 16:21:49 +0300 Subject: [PATCH 2/5] Update sha_constructor to hashlib.sha256 --- symposion/proposals/views.py | 70 +++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/symposion/proposals/views.py b/symposion/proposals/views.py index cf532c2b..53ddc280 100644 --- a/symposion/proposals/views.py +++ b/symposion/proposals/views.py @@ -6,7 +6,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.http import Http404, HttpResponse, HttpResponseForbidden from django.shortcuts import render, redirect, get_object_or_404 -from django.utils.hashcompat import sha_constructor +from hashlib import sha256 from django.views import static from django.contrib import messages @@ -14,12 +14,16 @@ from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from account.models import EmailAddress -from symposion.proposals.models import ProposalBase, ProposalSection, ProposalKind +from symposion.proposals.models import ( + ProposalBase, ProposalSection, ProposalKind +) from symposion.proposals.models import SupportingDocument, AdditionalSpeaker from symposion.speakers.models import Speaker from symposion.utils.mail import send_email -from symposion.proposals.forms import AddSpeakerForm, SupportingDocumentCreateForm +from symposion.proposals.forms import ( + AddSpeakerForm, SupportingDocumentCreateForm +) def get_form(name): @@ -37,21 +41,21 @@ def proposal_submit(request): request.user.speaker_profile except ObjectDoesNotExist: return redirect("dashboard") - + kinds = [] for proposal_section in ProposalSection.available(): for kind in proposal_section.section.proposal_kinds.all(): kinds.append(kind) - + return render(request, "proposals/proposal_submit.html", { "kinds": kinds, }) def proposal_submit_kind(request, kind_slug): - + kind = get_object_or_404(ProposalKind, slug=kind_slug) - + if not request.user.is_authenticated(): return redirect("home") # @@@ unauth'd speaker info page? else: @@ -59,12 +63,12 @@ def proposal_submit_kind(request, kind_slug): speaker_profile = request.user.speaker_profile except ObjectDoesNotExist: return redirect("dashboard") - + if not kind.section.proposalsection.is_available(): return redirect("proposal_submit") - + form_class = get_form(settings.PROPOSAL_FORMS[kind_slug]) - + if request.method == "POST": form = form_class(request.POST) if form.is_valid(): @@ -79,7 +83,7 @@ def proposal_submit_kind(request, kind_slug): return redirect("dashboard") else: form = form_class() - + return render(request, "proposals/proposal_submit_kind.html", { "kind": kind, "form": form, @@ -91,17 +95,17 @@ def proposal_speaker_manage(request, pk): queryset = ProposalBase.objects.select_related("speaker") proposal = get_object_or_404(queryset, pk=pk) proposal = ProposalBase.objects.get_subclass(pk=proposal.pk) - + if proposal.speaker != request.user.speaker_profile: raise Http404() - + if request.method == "POST": add_speaker_form = AddSpeakerForm(request.POST, proposal=proposal) if add_speaker_form.is_valid(): message_ctx = { "proposal": proposal, } - + def create_speaker_token(email_address): # create token and look for an existing speaker to prevent # duplicate tokens and confusing the pending speaker @@ -110,8 +114,8 @@ def proposal_speaker_manage(request, pk): Q(user=None, invite_email=email_address) ) except Speaker.DoesNotExist: - salt = sha_constructor(str(random.random())).hexdigest()[:5] - token = sha_constructor(salt + email_address).hexdigest() + salt = sha256(str(random.random())).hexdigest()[:5] + token = sha256(salt + email_address).hexdigest() pending = Speaker.objects.create( invite_email=email_address, invite_token=token, @@ -173,14 +177,14 @@ def proposal_edit(request, pk): if request.user != proposal.speaker.user: raise Http404() - + if not proposal.can_edit(): ctx = { "title": "Proposal editing closed", "body": "Proposal editing is closed for this session type." } return render(request, "proposals/proposal_error.html", ctx) - + form_class = get_form(settings.PROPOSAL_FORMS[proposal.kind.slug]) if request.method == "POST": @@ -206,7 +210,7 @@ def proposal_edit(request, pk): return redirect("proposal_detail", proposal.pk) else: form = form_class(instance=proposal) - + return render(request, "proposals/proposal_edit.html", { "proposal": proposal, "form": form, @@ -218,22 +222,22 @@ def proposal_detail(request, pk): queryset = ProposalBase.objects.select_related("speaker", "speaker__user") proposal = get_object_or_404(queryset, pk=pk) proposal = ProposalBase.objects.get_subclass(pk=proposal.pk) - + if request.user not in [p.user for p in proposal.speakers()]: raise Http404() - + if "symposion.reviews" in settings.INSTALLED_APPS: from symposion.reviews.forms import SpeakerCommentForm message_form = SpeakerCommentForm() if request.method == "POST": message_form = SpeakerCommentForm(request.POST) if message_form.is_valid(): - + message = message_form.save(commit=False) message.user = request.user message.proposal = proposal message.save() - + ProposalMessage = SpeakerCommentForm.Meta.model reviewers = User.objects.filter( id__in=ProposalMessage.objects.filter( @@ -242,7 +246,7 @@ def proposal_detail(request, pk): user=request.user ).distinct().values_list("user", flat=True) ) - + for reviewer in reviewers: ctx = { "proposal": proposal, @@ -253,13 +257,13 @@ def proposal_detail(request, pk): [reviewer.email], "proposal_new_message", context=ctx ) - + return redirect(request.path) else: message_form = SpeakerCommentForm() else: message_form = None - + return render(request, "proposals/proposal_detail.html", { "proposal": proposal, "message_form": message_form @@ -271,7 +275,7 @@ def proposal_cancel(request, pk): queryset = ProposalBase.objects.select_related("speaker") proposal = get_object_or_404(queryset, pk=pk) proposal = ProposalBase.objects.get_subclass(pk=proposal.pk) - + if proposal.speaker.user != request.user: return HttpResponseForbidden() @@ -281,7 +285,7 @@ def proposal_cancel(request, pk): # @@@ fire off email to submitter and other speakers messages.success(request, "%s has been cancelled" % proposal.title) return redirect("dashboard") - + return render(request, "proposals/proposal_cancel.html", { "proposal": proposal, }) @@ -339,10 +343,10 @@ def document_create(request, proposal_pk): queryset = ProposalBase.objects.select_related("speaker") proposal = get_object_or_404(queryset, pk=proposal_pk) proposal = ProposalBase.objects.get_subclass(pk=proposal.pk) - + if proposal.cancelled: return HttpResponseForbidden() - + if request.method == "POST": form = SupportingDocumentCreateForm(request.POST, request.FILES) if form.is_valid(): @@ -353,7 +357,7 @@ def document_create(request, proposal_pk): return redirect("proposal_detail", proposal.pk) else: form = SupportingDocumentCreateForm() - + return render(request, "proposals/document_create.html", { "proposal": proposal, "form": form, @@ -378,8 +382,8 @@ def document_download(request, pk, *args): def document_delete(request, pk): document = get_object_or_404(SupportingDocument, pk=pk, uploaded_by=request.user) proposal_pk = document.proposal.pk - + if request.method == "POST": document.delete() - + return redirect("proposal_detail", proposal_pk) From fc4b1c4542674d8a9b908fb8baf71b25c1dd5156 Mon Sep 17 00:00:00 2001 From: Volodymyr Hotsyk Date: Sat, 5 Jul 2014 16:46:01 +0300 Subject: [PATCH 3/5] Updated urls to 1.6 --- symposion/templates/cms/file_create.html | 4 +- symposion/templates/cms/file_index.html | 6 +-- symposion/templates/conference/user_list.html | 6 +-- symposion/templates/dashboard.html | 48 +++++++++---------- .../emails/proposal_new_message/message.html | 4 +- .../emails/proposal_updated/message.html | 2 +- .../emails/speaker_addition/message.html | 2 +- .../emails/speaker_invite/message.html | 2 +- .../proposals/_pending_proposal_row.html | 12 ++--- .../templates/proposals/_proposal_fields.html | 18 +++---- .../templates/proposals/_proposal_row.html | 12 ++--- .../templates/proposals/proposal_cancel.html | 4 +- .../templates/proposals/proposal_detail.html | 30 ++++++------ .../templates/proposals/proposal_edit.html | 8 ++-- .../proposals/proposal_speaker_manage.html | 12 ++--- .../templates/proposals/proposal_submit.html | 6 +-- .../templates/reviews/_review_table.html | 4 +- symposion/templates/reviews/base.html | 8 ++-- .../reviews/result_notification.html | 24 +++++----- .../reviews/result_notification_prepare.html | 16 +++---- symposion/templates/reviews/review_admin.html | 4 +- .../templates/reviews/review_assignment.html | 4 +- .../templates/reviews/review_detail.html | 20 ++++---- .../templates/reviews/review_review.html | 32 ++++++------- symposion/templates/reviews/review_stats.html | 26 +++++----- symposion/templates/schedule/_edit_grid.html | 8 ++-- symposion/templates/schedule/_grid.html | 2 +- symposion/templates/schedule/_slot_edit.html | 4 +- .../schedule/presentation_detail.html | 2 +- .../templates/schedule/schedule_list.html | 2 +- .../templates/speakers/speaker_create.html | 2 +- .../templates/speakers/speaker_edit.html | 2 +- .../templates/speakers/speaker_profile.html | 6 +-- symposion/templates/sponsorship/add.html | 4 +- symposion/templates/sponsorship/apply.html | 4 +- symposion/templates/sponsorship/detail.html | 4 +- symposion/templates/sponsorship/list.html | 2 +- symposion/templates/teams/team_detail.html | 26 +++++----- 38 files changed, 191 insertions(+), 191 deletions(-) diff --git a/symposion/templates/cms/file_create.html b/symposion/templates/cms/file_create.html index 547fc5d3..07f449c9 100644 --- a/symposion/templates/cms/file_create.html +++ b/symposion/templates/cms/file_create.html @@ -8,7 +8,7 @@

Upload File

-
+ {% csrf_token %} {{ form|as_bootstrap }}
@@ -17,4 +17,4 @@
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/symposion/templates/cms/file_index.html b/symposion/templates/cms/file_index.html index bfe1337c..e9f367f0 100644 --- a/symposion/templates/cms/file_index.html +++ b/symposion/templates/cms/file_index.html @@ -6,10 +6,10 @@

Files

- + {% for file in files %}
-
+ {% csrf_token %}
@@ -20,7 +20,7 @@

No uploaded files.

{% endfor %}
- + Add File diff --git a/symposion/templates/conference/user_list.html b/symposion/templates/conference/user_list.html index 22caaede..9886fde1 100644 --- a/symposion/templates/conference/user_list.html +++ b/symposion/templates/conference/user_list.html @@ -60,7 +60,7 @@ {% trans "Name" %} {% trans "Speaker Profile?" %} - + {% for user in users %} @@ -68,9 +68,9 @@ {{ user.get_full_name }} {% if user.speaker_profile %} - {{ user.speaker_profile }} + {{ user.speaker_profile }} {% else %} - create + create {% endif %} diff --git a/symposion/templates/dashboard.html b/symposion/templates/dashboard.html index a88b4a3f..f4ef8775 100644 --- a/symposion/templates/dashboard.html +++ b/symposion/templates/dashboard.html @@ -16,23 +16,23 @@

{% trans "Speaking" %}

{% if not user.speaker_profile %} - + Create a speaker profile {% else %} - + Edit your speaker profile - + Submit a new proposal {% endif %}
- +
{% if not user.speaker_profile %} -

To submit a proposal, you must first create a speaker profile.

+

To submit a proposal, you must first create a speaker profile.

{% else %}

Your Proposals

{% if user.speaker_profile.proposals.exists %} @@ -50,7 +50,7 @@ {% else %}

No proposals submitted yet.

{% endif %} - + {% associated_proposals as associated_proposals %} {% if associated_proposals %}

Proposals you have joined as an additional speaker

@@ -66,7 +66,7 @@ {% endfor %} {% endif %} - + {% pending_proposals as pending_proposals %} {% if pending_proposals %}

Proposals you have been invited to join

@@ -85,29 +85,29 @@ {% endif %}
- +

{% trans "Sponsorship" %}

{% if not user.sponsorships.exists %} - + Apply to be a sponsor {% endif %}
- +
{% if not user.sponsorships.exists %} -

If you or your organization would be interested in sponsorship opportunities, use our online form to apply to be a sponsor. +

If you or your organization would be interested in sponsorship opportunities, use our online form to apply to be a sponsor. {% else %}

Your Sponsorship

    {% for sponsorship in user.sponsorships.all %}
  • - {{ sponsorship.name }} + {{ sponsorship.name }} ({{ sponsorship.level }}) {% if not sponsorship.active %} awaiting approval @@ -118,32 +118,32 @@ {% endif %} {% if user.is_staff %}

    - As staff, you can directly add a sponsor if the organization isn't + As staff, you can directly add a sponsor if the organization isn't applying themselves.

    {% endif %}
- + {% if review_sections %}

{% trans "Reviews" %}

- +

Reviews by Section

- + - + {% comment %}

My Assignments

@@ -163,11 +163,11 @@
{% endcomment %} - +
{% endif %} - + {% available_teams as available_teams %} {% if user.memberships.exists or available_teams %}
@@ -175,7 +175,7 @@

{% trans "Teams" %}

- +
{% if user.memberships.exists %}

Your Teams

@@ -183,7 +183,7 @@ {% for membership in user.memberships.all %} - {{ membership.team.name }} + {{ membership.team.name }} {% if membership.team.description %}
{{ membership.team.description }}{% endif %} diff --git a/symposion/templates/emails/proposal_new_message/message.html b/symposion/templates/emails/proposal_new_message/message.html index 90bbd8c8..42c55ac2 100644 --- a/symposion/templates/emails/proposal_new_message/message.html +++ b/symposion/templates/emails/proposal_new_message/message.html @@ -6,6 +6,6 @@ {{ message.message|safe }}

- {% if reviewer %}{% url review_detail proposal.pk as detail_url %}{% else %}{% url proposal_detail proposal.pk as detail_url %}{% endif %} + {% if reviewer %}{% url "review_detail" proposal.pk as detail_url %}{% else %}{% url "proposal_detail" proposal.pk as detail_url %}{% endif %} Respond online at http://{{ current_site }}{{ detail_url }}#proposal-feedback -

\ No newline at end of file +

diff --git a/symposion/templates/emails/proposal_updated/message.html b/symposion/templates/emails/proposal_updated/message.html index d5ed74ec..e20ed4f0 100644 --- a/symposion/templates/emails/proposal_updated/message.html +++ b/symposion/templates/emails/proposal_updated/message.html @@ -3,6 +3,6 @@ {% user_display user %} has made changes to {{ proposal.title }} which you have previously reviewed or commented on.

- {% url review_detail proposal.pk as detail_url %} + {% url "review_detail" proposal.pk as detail_url %} View the latest version of the proposal online at http://{{ current_site }}{{ detail_url }}

diff --git a/symposion/templates/emails/speaker_addition/message.html b/symposion/templates/emails/speaker_addition/message.html index dff0c7ba..1d01ab7e 100644 --- a/symposion/templates/emails/speaker_addition/message.html +++ b/symposion/templates/emails/speaker_addition/message.html @@ -2,5 +2,5 @@ talk proposal for {{ current_site.name }} entitled "{{ proposal.title }}".

For more details, visit the {{ current_site.name }} speaker dashboard: - http://{{ current_site }}{% url dashboard %} + http://{{ current_site }}{% url "dashboard" %}

diff --git a/symposion/templates/emails/speaker_invite/message.html b/symposion/templates/emails/speaker_invite/message.html index 5ab2c2e8..57cea710 100644 --- a/symposion/templates/emails/speaker_invite/message.html +++ b/symposion/templates/emails/speaker_invite/message.html @@ -3,7 +3,7 @@

Go to

-

http://{{ current_site }}{% url speaker_create_token token %}

+

http://{{ current_site }}{% url "speaker_create_token" token %}

to confirm.

diff --git a/symposion/templates/proposals/_pending_proposal_row.html b/symposion/templates/proposals/_pending_proposal_row.html index fafd0ea0..2dda000b 100644 --- a/symposion/templates/proposals/_pending_proposal_row.html +++ b/symposion/templates/proposals/_pending_proposal_row.html @@ -2,11 +2,11 @@ - {{ proposal.title }} + {{ proposal.title }} - + {{ proposal.kind.name }} - + {% if proposal.cancelled %} {% trans 'Cancelled' %} @@ -22,7 +22,7 @@ {% endif %} {% endif %} - + {% if not proposal.cancelled %} diff --git a/symposion/templates/proposals/_proposal_fields.html b/symposion/templates/proposals/_proposal_fields.html index a1040625..49f94aa9 100644 --- a/symposion/templates/proposals/_proposal_fields.html +++ b/symposion/templates/proposals/_proposal_fields.html @@ -3,13 +3,13 @@
{% trans "Submitted by" %}
{{ proposal.speaker }}
- +
{% trans "Track" %}
{{ proposal.track }} 
- +
{% trans "Audience Level" %}
{{ proposal.get_audience_level_display }} 
- + {% if proposal.additional_speakers.all %}
{% trans "Additional Speakers" %}
@@ -24,19 +24,19 @@ {% endfor %}
{% endif %} - +
{% trans "Description" %}
{{ proposal.description }} 
- +
{% trans "Abstract" %}
{{ proposal.abstract|safe }} 
- +
{% trans "Notes" %}
{{ proposal.additional_notes|safe }} 
- +
{% trans "Speaker Bio" %}
{{ proposal.speaker.biography|safe }} 
- +
{% trans "Documents" %}
{% if proposal.supporting_documents.exists %} @@ -45,7 +45,7 @@ {{ document.description }} -
+ {% csrf_token %}
diff --git a/symposion/templates/proposals/_proposal_row.html b/symposion/templates/proposals/_proposal_row.html index 6ed15607..de820cfd 100644 --- a/symposion/templates/proposals/_proposal_row.html +++ b/symposion/templates/proposals/_proposal_row.html @@ -1,10 +1,10 @@ - {{ proposal.title }} + {{ proposal.title }} - + {{ proposal.kind.name }} - + {% if proposal.cancelled %} Cancelled @@ -20,12 +20,12 @@ {% endif %} {% endif %} - + {% if not proposal.cancelled %} {% if request.user == proposal.speaker.user and proposal.can_edit %} - Edit - Manage Additional Speakers + Edit + Manage Additional Speakers {% endif %} {% endif %} diff --git a/symposion/templates/proposals/proposal_cancel.html b/symposion/templates/proposals/proposal_cancel.html index 93a1204a..5e57c80a 100644 --- a/symposion/templates/proposals/proposal_cancel.html +++ b/symposion/templates/proposals/proposal_cancel.html @@ -8,11 +8,11 @@ {% block body %}

Cancel: {{ proposal.title }}

- +
{% csrf_token %}

Are you sure you want to cancel {{ proposal.title }}?

- {% trans 'No, keep it for now' %} + {% trans 'No, keep it for now' %}
{% endblock %} diff --git a/symposion/templates/proposals/proposal_detail.html b/symposion/templates/proposals/proposal_detail.html index a9b881e7..7f02504c 100644 --- a/symposion/templates/proposals/proposal_detail.html +++ b/symposion/templates/proposals/proposal_detail.html @@ -10,14 +10,14 @@
{% if not proposal.cancelled %} {% if request.user == proposal.speaker.user %} - + {% trans "Edit this proposal" %} - + {% trans "Cancel this proposal" %} {% else %} - + {% trans "Remove me from this proposal" %} {% endif %} @@ -25,9 +25,9 @@ {% trans 'Cancelled' } {% endif %}
- +

#{{ proposal.number }}: {{ proposal.title }} ({{ proposal.speaker }}, Track: {{ proposal.track }})

- +