diff --git a/symposion/boxes/urls.py b/symposion/boxes/urls.py index 993ec136..c7076c91 100644 --- a/symposion/boxes/urls.py +++ b/symposion/boxes/urls.py @@ -1,6 +1,7 @@ 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"), ) diff --git a/symposion/cms/urls.py b/symposion/cms/urls.py index 74064edb..af3ef981 100644 --- a/symposion/cms/urls.py +++ b/symposion/cms/urls.py @@ -3,7 +3,8 @@ 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 90ae79f8..43a42a5b 100644 --- a/symposion/conference/urls.py +++ b/symposion/conference/urls.py @@ -1,6 +1,7 @@ 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 a69e6136..994fad30 100644 --- a/symposion/proposals/urls.py +++ b/symposion/proposals/urls.py @@ -1,18 +1,26 @@ 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+)/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+)/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/proposals/views.py b/symposion/proposals/views.py index 570e988b..878d17ce 100644 --- a/symposion/proposals/views.py +++ b/symposion/proposals/views.py @@ -7,25 +7,25 @@ from django.core.urlresolvers import reverse from django.db.models import Q from django.http import Http404, HttpResponse, HttpResponseForbidden from django.shortcuts import render, redirect, get_object_or_404 - -try: - from hashlib import sha1 as sha_constructor -except ImportError: - from django.utils.hashcompat import sha_constructor - from django.views import static +from hashlib import sha1 + from django.contrib import messages 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): @@ -123,8 +123,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 = sha1(str(random.random())).hexdigest()[:5] + token = sha1(salt + email_address).hexdigest() pending = Speaker.objects.create( invite_email=email_address, invite_token=token, diff --git a/symposion/reviews/urls.py b/symposion/reviews/urls.py index 1719eb0e..09264557 100644 --- a/symposion/reviews/urls.py +++ b/symposion/reviews/urls.py @@ -1,23 +1,37 @@ 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 b6cd1630..74064ba8 100644 --- a/symposion/schedule/urls.py +++ b/symposion/schedule/urls.py @@ -1,16 +1,20 @@ 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"), url(r"^conference.json", "schedule_json", name="schedule_json"), ) diff --git a/symposion/speakers/urls.py b/symposion/speakers/urls.py index fb30e787..fadead36 100644 --- a/symposion/speakers/urls.py +++ b/symposion/speakers/urls.py @@ -1,10 +1,13 @@ 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 c7dc581c..17db5124 100644 --- a/symposion/sponsorship/urls.py +++ b/symposion/sponsorship/urls.py @@ -2,7 +2,8 @@ from django.conf.urls import patterns, url from django.views.generic import TemplateView -urlpatterns = patterns("symposion.sponsorship.views", +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"), diff --git a/symposion/teams/urls.py b/symposion/teams/urls.py index 785c4300..f6ddaf9d 100644 --- a/symposion/teams/urls.py +++ b/symposion/teams/urls.py @@ -1,7 +1,8 @@ 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"), 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 }})

- +