Merge branch 'KyivPy-master'

This commit is contained in:
Patrick Altman 2014-12-15 15:29:43 -06:00
commit 5c57512b04
49 changed files with 273 additions and 237 deletions

View file

@ -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"),
)

View file

@ -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"),

View file

@ -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"),
)

View file

@ -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"),
)

View file

@ -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,

View file

@ -1,23 +1,37 @@
from django.conf.urls import patterns, url
urlpatterns = patterns("symposion.reviews.views",
url(r"^section/(?P<section_slug>[\w\-]+)/all/$", "review_section", {"reviewed": "all"}, name="review_section"),
url(r"^section/(?P<section_slug>[\w\-]+)/reviewed/$", "review_section", {"reviewed": "reviewed"}, name="user_reviewed"),
url(r"^section/(?P<section_slug>[\w\-]+)/not_reviewed/$", "review_section", {"reviewed": "not_reviewed"}, name="user_not_reviewed"),
url(r"^section/(?P<section_slug>[\w\-]+)/assignments/$", "review_section", {"assigned": True}, name="review_section_assignments"),
url(r"^section/(?P<section_slug>[\w\-]+)/status/$", "review_status", name="review_status"),
url(r"^section/(?P<section_slug>[\w\-]+)/status/(?P<key>\w+)/$", "review_status", name="review_status"),
url(r"^section/(?P<section_slug>[\w\-]+)/list/(?P<user_pk>\d+)/$", "review_list", name="review_list_user"),
url(r"^section/(?P<section_slug>[\w\-]+)/admin/$", "review_admin", name="review_admin"),
url(r"^section/(?P<section_slug>[\w\-]+)/admin/accept/$", "review_bulk_accept", name="review_bulk_accept"),
url(r"^section/(?P<section_slug>[\w\-]+)/notification/(?P<status>\w+)/$", "result_notification", name="result_notification"),
url(r"^section/(?P<section_slug>[\w\-]+)/notification/(?P<status>\w+)/prepare/$", "result_notification_prepare", name="result_notification_prepare"),
url(r"^section/(?P<section_slug>[\w\-]+)/notification/(?P<status>\w+)/send/$", "result_notification_send", name="result_notification_send"),
urlpatterns = patterns(
"symposion.reviews.views",
url(r"^section/(?P<section_slug>[\w\-]+)/all/$", "review_section",
{"reviewed": "all"}, name="review_section"),
url(r"^section/(?P<section_slug>[\w\-]+)/reviewed/$", "review_section",
{"reviewed": "reviewed"}, name="user_reviewed"),
url(r"^section/(?P<section_slug>[\w\-]+)/not_reviewed/$", "review_section",
{"reviewed": "not_reviewed"}, name="user_not_reviewed"),
url(r"^section/(?P<section_slug>[\w\-]+)/assignments/$", "review_section",
{"assigned": True}, name="review_section_assignments"),
url(r"^section/(?P<section_slug>[\w\-]+)/status/$", "review_status",
name="review_status"),
url(r"^section/(?P<section_slug>[\w\-]+)/status/(?P<key>\w+)/$",
"review_status", name="review_status"),
url(r"^section/(?P<section_slug>[\w\-]+)/list/(?P<user_pk>\d+)/$",
"review_list", name="review_list_user"),
url(r"^section/(?P<section_slug>[\w\-]+)/admin/$", "review_admin",
name="review_admin"),
url(r"^section/(?P<section_slug>[\w\-]+)/admin/accept/$",
"review_bulk_accept", name="review_bulk_accept"),
url(r"^section/(?P<section_slug>[\w\-]+)/notification/(?P<status>\w+)/$",
"result_notification", name="result_notification"),
url(r"^section/(?P<section_slug>[\w\-]+)/notification/(?P<status>\w+)/prepare/$",
"result_notification_prepare", name="result_notification_prepare"),
url(r"^section/(?P<section_slug>[\w\-]+)/notification/(?P<status>\w+)/send/$",
"result_notification_send", name="result_notification_send"),
url(r"^review/(?P<pk>\d+)/$", "review_detail", name="review_detail"),
url(r"^(?P<pk>\d+)/delete/$", "review_delete", name="review_delete"),
url(r"^assignments/$", "review_assignments", name="review_assignments"),
url(r"^assignment/(?P<pk>\d+)/opt-out/$", "review_assignment_opt_out", name="review_assignment_opt_out"),
url(r"^assignment/(?P<pk>\d+)/opt-out/$", "review_assignment_opt_out",
name="review_assignment_opt_out"),
)

View file

@ -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"),
)

View file

@ -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<pk>\d+)/)?$", "speaker_edit", name="speaker_edit"),
url(r"^profile/(?P<pk>\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"),
)

View file

@ -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"),

View file

@ -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<slug>[\w\-]+)/$", "team_detail", name="team_detail"),
url(r"^(?P<slug>[\w\-]+)/join/$", "team_join", name="team_join"),

View file

@ -8,7 +8,7 @@
<div class="row">
<div class="span12">
<h1>Upload File</h1>
<form method="POST" action="{% url file_create %}" enctype="multipart/form-data">
<form method="POST" action="{% url "file_create" %}" enctype="multipart/form-data">
{% csrf_token %}
{{ form|as_bootstrap }}
<div class="form-actions">

View file

@ -9,7 +9,7 @@
{% for file in files %}
<div style="margin-top: 1em;">
<form class="pull-right" action="{% url file_delete file.pk %}" method="post">
<form class="pull-right" action="{% url "file_delete" file.pk %}" method="post">
{% csrf_token %}
<button type="submit" class="btn btn-error"><i class="icon-trash"></i> delete</button>
</form>
@ -20,7 +20,7 @@
<p>No uploaded files.</p>
{% endfor %}
<div style="margin-top: 2em">
<a class="btn btn-success" href="{% url file_create %}">
<a class="btn btn-success" href="{% url "file_create" %}">
<i class="icon-plus icon-white"></i>
Add File
</a>

View file

@ -68,9 +68,9 @@
<td>{{ user.get_full_name }}</td>
<td>
{% if user.speaker_profile %}
<a href="{% url speaker_profile user.speaker_profile.pk %}">{{ user.speaker_profile }}</a>
<a href="{% url "speaker_profile" user.speaker_profile.pk %}">{{ user.speaker_profile }}</a>
{% else %}
<a href="{% url speaker_create_staff user.pk %}" class="btn btn-mini">create</a>
<a href="{% url "speaker_create_staff" user.pk %}" class="btn btn-mini">create</a>
{% endif %}
</td>
</tr>

View file

@ -16,14 +16,14 @@
<h3>{% trans "Speaking" %}</h3>
<div class="pull-right header-actions">
{% if not user.speaker_profile %}
<a href="{% url speaker_create %}" class="btn">
<a href="{% url "speaker_create" %}" class="btn">
<i class="icon-plus-sign"></i> Create a speaker profile
</a>
{% else %}
<a href="{% url speaker_edit %}" class="btn">
<a href="{% url "speaker_edit" %}" class="btn">
<i class="icon-pencil"></i> Edit your speaker profile
</a>
<a href="{% url proposal_submit %}" class="btn">
<a href="{% url "proposal_submit" %}" class="btn">
<i class="icon-plus-sign"></i> Submit a new proposal
</a>
{% endif %}
@ -32,7 +32,7 @@
<div class="dashboard-panel-content">
{% if not user.speaker_profile %}
<p>To submit a proposal, you must first <a href="{% url speaker_create %}">create a speaker profile</a>.</p>
<p>To submit a proposal, you must first <a href="{% url "speaker_create" %}">create a speaker profile</a>.</p>
{% else %}
<h4>Your Proposals</h4>
{% if user.speaker_profile.proposals.exists %}
@ -92,7 +92,7 @@
<h3>{% trans "Sponsorship" %}</h3>
<div class="pull-right header-actions">
{% if not user.sponsorships.exists %}
<a href="{% url sponsor_apply %}" class="btn">
<a href="{% url "sponsor_apply" %}" class="btn">
<i class="icon-plus-sign"></i> Apply to be a sponsor
</a>
{% endif %}
@ -101,13 +101,13 @@
<div class="dashboard-panel-content">
{% if not user.sponsorships.exists %}
<p>If you or your organization would be interested in sponsorship opportunities, <a href="{% url sponsor_apply %}">use our online form to apply to be a sponsor</a>.
<p>If you or your organization would be interested in sponsorship opportunities, <a href="{% url "sponsor_apply" %}">use our online form to apply to be a sponsor</a>.
{% else %}
<h4>Your Sponsorship</h4>
<ul>
{% for sponsorship in user.sponsorships.all %}
<li>
<a href="{% url sponsor_detail sponsorship.pk %}"><b>{{ sponsorship.name }}</b></a>
<a href="{% url "sponsor_detail" sponsorship.pk %}"><b>{{ sponsorship.name }}</b></a>
({{ sponsorship.level }})
{% if not sponsorship.active %}
<span class="label label-warning">awaiting approval</span>
@ -118,7 +118,7 @@
{% endif %}
{% if user.is_staff %}
<p>
As staff, you can directly <a href="{% url sponsor_add %}">add a sponsor</a> if the organization isn't
As staff, you can directly <a href="{% url "sponsor_add" %}">add a sponsor</a> if the organization isn't
applying themselves.
</p>
{% endif %}
@ -138,9 +138,9 @@
<ul>
{% for section in review_sections %}
<h5>{{ section }}</h5>
<li><a href="{% url review_section section.section.slug %}">All</a></li>
<li><a href="{% url user_reviewed section.section.slug %}">Reviewed by you</a></li>
<li><a href="{% url user_not_reviewed section.section.slug %}">Not Reviewed by you</a></li>
<li><a href="{% url "review_section" section.section.slug %}">All</a></li>
<li><a href="{% url "user_reviewed" section.section.slug %}">Reviewed by you</a></li>
<li><a href="{% url "user_not_reviewed" section.section.slug %}">Not Reviewed by you</a></li>
{% endfor %}
</ul>
@ -183,7 +183,7 @@
{% for membership in user.memberships.all %}
<tr>
<td>
<a href="{% url team_detail membership.team.slug %}">{{ membership.team.name }}</a>
<a href="{% url "team_detail" membership.team.slug %}">{{ membership.team.name }}</a>
{% if membership.team.description %}<br>{{ membership.team.description }}{% endif %}
</td>
<td>

View file

@ -6,6 +6,6 @@
{{ message.message|safe }}
</blockquote>
<p>
{% 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 <a href="http://{{ current_site }}{{ detail_url }}#proposal-feedback">http://{{ current_site }}{{ detail_url }}#proposal-feedback</a>
</p>

View file

@ -3,6 +3,6 @@
<b>{% user_display user %}</b> has made changes to <b>{{ proposal.title }}</b> which you have previously reviewed or commented on.
</p>
<p>
{% 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 <a href="http://{{ current_site }}{{ detail_url }}">http://{{ current_site }}{{ detail_url }}</a>
</p>

View file

@ -2,5 +2,5 @@
talk proposal for {{ current_site.name }} entitled "{{ proposal.title }}".</p>
<p>For more details, visit the {{ current_site.name }} speaker dashboard:
<a href="http://{{ current_site }}{% url dashboard %}">http://{{ current_site }}{% url dashboard %}</a>
<a href="http://{{ current_site }}{% url "dashboard" %}">http://{{ current_site }}{% url "dashboard" %}</a>
</p>

View file

@ -3,7 +3,7 @@
<p>Go to</p>
<p><a href="http://{{ current_site }}{% url speaker_create_token token %}">http://{{ current_site }}{% url speaker_create_token token %}</a></p>
<p><a href="http://{{ current_site }}{% url "speaker_create_token" token %}">http://{{ current_site }}{% url "speaker_create_token" token %}</a></p>
<p>to confirm.</p>

View file

@ -2,7 +2,7 @@
<tr>
<td>
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
<a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a>
</td>
<td>{{ proposal.kind.name }}</td>
@ -31,9 +31,9 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="{% url proposal_pending_join proposal.id %}">
<li><a href="{% url "proposal_pending_join" proposal.id %}">
{% trans 'Accept invitation' %}</a></li>
<li><a href="{% url proposal_pending_decline proposal.id
<li><a href="{% url "proposal_pending_decline" proposal.id
%}">{% trans 'Decline invitation' %}</a></li>
</ul>
</div>

View file

@ -45,7 +45,7 @@
<tr>
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td>
<td>
<form style="margin: 0;" method="post" action="{% url proposal_document_delete document.pk %}">
<form style="margin: 0;" method="post" action="{% url "proposal_document_delete" document.pk %}">
{% csrf_token %}
<button type="submit" class="btn btn-mini">delete</button>
</form>

View file

@ -1,6 +1,6 @@
<tr>
<td>
<a href="{% url proposal_detail proposal.pk %}">{{ proposal.title }}</a>
<a href="{% url "proposal_detail" proposal.pk %}">{{ proposal.title }}</a>
</td>
<td>{{ proposal.kind.name }}</td>
@ -24,8 +24,8 @@
<td>
{% if not proposal.cancelled %}
{% if request.user == proposal.speaker.user and proposal.can_edit %}
<a href="{% url proposal_edit proposal.pk %}" class="btn btn-mini"><i class="icon-pencil"></i> Edit</a>
<a href="{% url proposal_speaker_manage proposal.id %}" class="btn btn-mini"><i class="icon-user"></i> Manage Additional Speakers</a>
<a href="{% url "proposal_edit" proposal.pk %}" class="btn btn-mini"><i class="icon-pencil"></i> Edit</a>
<a href="{% url "proposal_speaker_manage" proposal.id %}" class="btn btn-mini"><i class="icon-user"></i> Manage Additional Speakers</a>
{% endif %}
{% endif %}
</td>

View file

@ -13,6 +13,6 @@
{% csrf_token %}
<p>Are you sure you want to cancel <b>{{ proposal.title }}</b>?</p>
<input class="btn btn-danger" type="submit" value="I am sure" />
<a class="btn" href="{% url proposal_detail proposal.pk %}">{% trans 'No, keep it for now' %}</a>
<a class="btn" href="{% url "proposal_detail" proposal.pk %}">{% trans 'No, keep it for now' %}</a>
</form>
{% endblock %}

View file

@ -10,14 +10,14 @@
<div class="pull-right">
{% if not proposal.cancelled %}
{% if request.user == proposal.speaker.user %}
<a href="{% url proposal_edit proposal.pk %}" class="btn">
<a href="{% url "proposal_edit" proposal.pk %}" class="btn">
{% trans "Edit this proposal" %}
</a>
<a href="{% url proposal_cancel proposal.pk %}" class="btn">
<a href="{% url "proposal_cancel" proposal.pk %}" class="btn">
{% trans "Cancel this proposal" %}
</a>
{% else %}
<a href="{% url proposal_leave proposal.pk %}" class="btn">
<a href="{% url "proposal_leave" proposal.pk %}" class="btn">
{% trans "Remove me from this proposal" %}
</a>
{% endif %}
@ -52,7 +52,7 @@
<tr>
<td><a href="{{ document.download_url }}">{{ document.description }}</a></td>
<td>
<form style="margin: 0;" method="post" action="{% url proposal_document_delete document.pk %}">
<form style="margin: 0;" method="post" action="{% url "proposal_document_delete" document.pk %}">
{% csrf_token %}
<button type="submit" class="btn btn-mini">{% trans 'delete' %}</button>
</form>

View file

@ -8,7 +8,7 @@
{% block body %}
<h1>Edit: {{ proposal.title }}</h1>
<p><a href="{% url proposal_speaker_manage proposal.pk %}">Manage speakers</a></p>
<p><a href="{% url "proposal_speaker_manage" proposal.pk %}">Manage speakers</a></p>
<form method="POST" action="" enctype="multipart/form-data">
{% csrf_token %}
@ -17,7 +17,7 @@
</fieldset>
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="Save" />
<a class="btn" href="{% url proposal_detail proposal.pk %}">Cancel</a>
<a class="btn" href="{% url "proposal_detail" proposal.pk %}">Cancel</a>
</div>
</form>
{% endblock %}

View file

@ -7,7 +7,7 @@
<h1>{% trans 'Proposal:' %} {{ proposal.title }}</h1>
<p>
<a href="{% url proposal_edit proposal.pk %}">{% trans 'Edit proposal' %}
<a href="{% url "proposal_edit" proposal.pk %}">{% trans 'Edit proposal' %}
</a>
</p>

View file

@ -13,7 +13,7 @@
<ul>
{% for kind in kinds %}
<li><a href="{% url proposal_submit_kind kind.slug %}">{{ kind }}</a></li>
<li><a href="{% url "proposal_submit_kind" kind.slug %}">{{ kind }}</a></li>
{% endfor %}
</ul>
{% else %}

View file

@ -18,7 +18,7 @@
<tr class="{{ proposal.user_vote_css }}">
<td>{{ proposal.number }}</td>
<td>
<a href="{% url review_detail proposal.pk %}">
<a href="{% url "review_detail" proposal.pk %}">
<small><strong>{{ proposal.speaker }}</strong></small>
<br />
{{ proposal.title }}

View file

@ -60,25 +60,25 @@
{{ section }}
</li>
<li>
<a href="{% url review_section section.section.slug %}">
<a href="{% url "review_section" section.section.slug %}">
{% trans "All Reviews" %}
</a>
</li>
{% comment %}
<li>
<a href="{% url review_section_assignments section.section.slug %}">
<a href="{% url "review_section_assignments" section.section.slug %}">
{% trans "Your Assignments" %}
</a>
</li>
{% endcomment %}
<li>
<a href="{% url review_status section.section.slug %}">
<a href="{% url "review_status" section.section.slug %}">
{% trans "Voting Status" %}
</a>
</li>
{% if request.user.is_staff %}
<li>
<a href="{% url result_notification section.section.slug 'accepted' %}">Result Notification</a>
<a href="{% url "result_notification" section.section.slug 'accepted' %}">Result Notification</a>
</li>
{% endif %}
{% endfor %}

View file

@ -13,14 +13,14 @@
{% block body %}
<ul class="nav nav-pills">
<li{% if status == 'accepted' %} class="active"{% endif %}><a href="{% url result_notification section_slug 'accepted' %}">accepted</a>
<li{% if status == 'rejected' %} class="active"{% endif %}><a href="{% url result_notification section_slug 'rejected' %}">rejected</a>
<li{% if status == 'standby' %} class="active"{% endif %}><a href="{% url result_notification section_slug 'standby' %}">standby</a>
<li{% if status == 'accepted' %} class="active"{% endif %}><a href="{% url "result_notification" section_slug 'accepted' %}">accepted</a>
<li{% if status == 'rejected' %} class="active"{% endif %}><a href="{% url "result_notification" section_slug 'rejected' %}">rejected</a>
<li{% if status == 'standby' %} class="active"{% endif %}><a href="{% url "result_notification" section_slug 'standby' %}">standby</a>
</ul>
<h1>Result Notification</h1>
<form method="post" action="{% url result_notification_prepare section_slug status %}">
<form method="post" action="{% url "result_notification_prepare" section_slug status %}">
{% csrf_token %}
@ -54,7 +54,7 @@
<td><input class="action-select" type="checkbox" name="_selected_action" value="{{ proposal.pk }}"></td>
<td>{{ proposal.number }}</td>
<td>
<a href="{% url review_detail proposal.pk %}">
<a href="{% url "review_detail" proposal.pk %}">
<small><strong>{{ proposal.speaker }}</strong></small>
<br />
{{ proposal.title }}

View file

@ -23,7 +23,7 @@
<div class="span6">
<h2>Email</h2>
<form method="post" action="{% url result_notification_send section_slug status %}">
<form method="post" action="{% url "result_notification_send" section_slug status %}">
{% csrf_token %}
@ -42,7 +42,7 @@
{% include "reviews/_result_notification_prepare_help.html" %}
<button type="submit" class="btn btn-primary">Send {{ proposals|length }} Email{{ proposals|length|pluralize }}</button>
<a class="btn" href="{% url result_notification section_slug status %}">Cancel</a>
<a class="btn" href="{% url "result_notification" section_slug status %}">Cancel</a>
</form>
</div>
</form>

View file

@ -30,7 +30,7 @@
{% for reviewer in reviewers %}
<tr>
<td>
<a href="{% url review_list_user section_slug reviewer.pk %}">{{ reviewer.get_full_name }}</a>
<a href="{% url "review_list_user" section_slug reviewer.pk %}">{{ reviewer.get_full_name }}</a>
</td>
<td>
{{ reviewer.total_votes }}

View file

@ -18,7 +18,7 @@
</a>
</td>
<td>
<form method="post" action="{% url review_assignment_opt_out assignment.pk %}">
<form method="post" action="{% url "review_assignment_opt_out" assignment.pk %}">
{% csrf_token %}
<input type="submit" value="Opt-out" />
</form>

View file

@ -126,7 +126,7 @@
</div>
{% if is_manager %}
<div class="pull-right">
<form class="form-inline" action="{% url review_delete review.id %}" method="POST">
<form class="form-inline" action="{% url "review_delete" review.id %}" method="POST">
{% csrf_token %}
<button class="btn btn-mini btn-danger" type="submit">Delete</button>
</form>

View file

@ -55,7 +55,7 @@
<h2>Review</h2>
<form method="POST" action="{% url review_review proposal.pk %}" class="uniForm">
<form method="POST" action="{% url "review_review" proposal.pk %}" class="uniForm">
{% csrf_token %}
<fieldset class="inlineLabels">
{{ review_form|as_uni_form }}
@ -67,7 +67,7 @@
<h2>Comment</h2>
<form method="POST" action="{% url review_comment proposal.pk %}" class="uniForm">
<form method="POST" action="{% url "review_comment" proposal.pk %}" class="uniForm">
{% csrf_token %}
<fieldset>
{{ comment_form|as_uni_form }}

View file

@ -5,11 +5,11 @@
{% if key %}
<div class="breadcrumbs">
<a href="{% url review_status section_slug "positive" %}">Positive</a> |
<a href="{% url review_status section_slug "negative" %}">Negative</a> |
<a href="{% url review_status section_slug "indifferent" %}">Indifferent</a> |
<a href="{% url review_status section_slug "controversial" %}">Controversial</a> |
<a href="{% url review_status section_slug "too_few" %}">Too Few</a>
<a href="{% url "review_status" section_slug "positive" %}">Positive</a> |
<a href="{% url "review_status" section_slug "negative" %}">Negative</a> |
<a href="{% url "review_status" section_slug "indifferent" %}">Indifferent</a> |
<a href="{% url "review_status" section_slug "controversial" %}">Controversial</a> |
<a href="{% url "review_status" section_slug "too_few" %}">Too Few</a>
</div>
<div>
@ -42,35 +42,35 @@
<dl>
<dt>
<a href="{% url review_status section_slug "positive" %}">Positive</a>
<a href="{% url "review_status" section_slug "positive" %}">Positive</a>
<span class="badge">{{ proposals.positive|length }}</span>
</dt>
<dd>
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and at least one +1 and no &minus;1s
</dd>
<dt>
<a href="{% url review_status section_slug "negative" %}">Negative</a>
<a href="{% url "review_status" section_slug "negative" %}">Negative</a>
<span class="badge">{{ proposals.negative|length }}</span>
</dt>
<dd>
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and at least one &minus;1 and no +1s
</dd>
<dt>
<a href="{% url review_status section_slug "indifferent" %}">Indifferent</a>
<a href="{% url "review_status" section_slug "indifferent" %}">Indifferent</a>
<span class="badge">{{ proposals.indifferent|length }}</span>
</dt>
<dd>
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and neither a +1 or a &minus;1
</dd>
<dt>
<a href="{% url review_status section_slug "controversial" %}">Controversial</a>
<a href="{% url "review_status" section_slug "controversial" %}">Controversial</a>
<span class="badge">{{ proposals.controversial|length }}</span>
</dt>
<dd>
proposals with at least {{ vote_threshold }} vote{{ vote_threshold|pluralize }} and both a +1 and &minus;1
</dd>
<dt>
<a href="{% url review_status section_slug "too_few" %}">Too Few Reviews</a>
<a href="{% url "review_status" section_slug "too_few" %}">Too Few Reviews</a>
<span class="badge">{{ proposals.too_few|length }}</span>
</dt>
<dd>

View file

@ -15,9 +15,9 @@
<td class="slot slot-{{ slot.kind.label }}" colspan="{{ slot.colspan }}" rowspan="{{ slot.rowspan }}">
{% if slot.kind.label == "talk" or slot.kind.label == "tutorial" %}
{% if not slot.content %}
<a class="btn btn-mini edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">+</a>
<a class="btn btn-mini edit-slot" data-action="{% url "schedule_slot_edit" schedule.section.slug slot.pk %}" href="#">+</a>
{% else %}
<span class="title"><a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></span>
<span class="title"><a class="edit-slot" data-action="{% url "schedule_slot_edit" schedule.section.slug slot.pk %}" href="#">{{ slot.content.title }}</a></span>
<span class="speaker">{{ slot.content.speaker }}</span>
{% endif %}
{% else %}
@ -26,7 +26,7 @@
{% else %}
{{ slot.kind.label }}
{% endif %}
&mdash; <a class="edit-slot" data-action="{% url schedule_slot_edit schedule.section.slug slot.pk %}" href="#">edit</a>
&mdash; <a class="edit-slot" data-action="{% url "schedule_slot_edit" schedule.section.slug slot.pk %}" href="#">edit</a>
{% endif %}
</td>
{% endfor %}

View file

@ -17,7 +17,7 @@
{% if not slot.content %}
{% else %}
<span class="title">
<a href="{% url schedule_presentation_detail slot.content.pk %}">{{ slot.content.title }}</a>
<a href="{% url "schedule_presentation_detail" slot.content.pk %}">{{ slot.content.title }}</a>
</span>
<span class="speaker">
{{ slot.content.speakers|join:", " }}

View file

@ -1,5 +1,5 @@
{% load i18n bootstrap_tags %}
<form id="slotEditForm" class="modal-form" method="POST" action="{% url schedule_slot_edit slug slot.pk %}">
<form id="slotEditForm" class="modal-form" method="POST" action="{% url "schedule_slot_edit" slug slot.pk %}">
<div class="modal-header">
<a class="close" data-dismiss="modal">&times;</a>
<h3>{% trans "Edit Slot" %}</h3>

View file

@ -17,7 +17,7 @@
<h4>
{% for speaker in presentation.speakers %}
<a href="{% url speaker_profile speaker.pk %}">{{ speaker }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
<a href="{% url "speaker_profile" speaker.pk %}">{{ speaker }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}
</h4>
<dl class="dl-horizontal">

View file

@ -33,7 +33,7 @@
{% for presentation in presentations %}
<div class="row">
<div class="span8 presentation well">
<h3><a href="{% url schedule_presentation_detail presentation.pk %}">{{ presentation.title }}</a></h3>
<h3><a href="{% url "schedule_presentation_detail" presentation.pk %}">{{ presentation.title }}</a></h3>
<h4>{{ presentation.speakers|join:", " }}</h4>
{{ presentation.description }}
{% if presentation.slot %}

View file

@ -17,7 +17,7 @@
</fieldset>
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="Save" />
<a class="btn" href="{% url dashboard %}">Cancel</a>
<a class="btn" href="{% url "dashboard" %}">Cancel</a>
</div>
</form>
{% endblock %}

View file

@ -17,7 +17,7 @@
</fieldset>
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="Save" />
<a class="btn" href="{% url dashboard %}">Cancel</a>
<a class="btn" href="{% url "dashboard" %}">Cancel</a>
</div>
</form>
{% endblock %}

View file

@ -17,14 +17,14 @@
</div>
<div class="span6">
{% if speaker.user == request.user or request.user.is_staff %}
<a class="btn pull-right" href="{% url speaker_edit speaker.pk %}">Edit</a>
<a class="btn pull-right" href="{% url "speaker_edit" speaker.pk %}">Edit</a>
{% endif %}
<h1>{{ speaker.name }}</h1>
<div class="bio">{{ speaker.biography|safe }}</div>
<h2>Presentations</h2>
{% for presentation in presentations %}
<h3><a href="{% url schedule_presentation_detail presentation.pk %}">{{ presentation.title }}</a></h3>
<h3><a href="{% url "schedule_presentation_detail" presentation.pk %}">{{ presentation.title }}</a></h3>
{% if presentation.slot %}
<p>
{{ presentation.slot.day.date|date:"l" }}

View file

@ -9,13 +9,13 @@
{% block body_class %}sponsorships{% endblock %}
{% block body %}
<form method="POST" action="{% url sponsor_add %}" class="form-horizontal">
<form method="POST" action="{% url "sponsor_add" %}" class="form-horizontal">
{% csrf_token %}
<legend>{% trans "Add a Sponsor" %}</legend>
{{ form|as_bootstrap }}
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="Add" />
<a class="btn" href="{% url dashboard %}">Cancel</a>
<a class="btn" href="{% url "dashboard" %}">Cancel</a>
</div>
</form>

View file

@ -18,9 +18,9 @@
{{ form|as_bootstrap }}
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="Apply" />
<a class="btn" href="{% url dashboard %}">Cancel</a>
<a class="btn" href="{% url "dashboard" %}">Cancel</a>
<p class="help-block">
<small>By submitting this sponsor application you are agreeing to the <a href="{% url cms_page "sponsor/terms/" %}" target="_blank">terms and conditions</a>.</small>
<small>By submitting this sponsor application you are agreeing to the <a href="{% url "cms_page" "sponsor/terms/" %}" target="_blank">terms and conditions</a>.</small>
</p>
</div>
</form>

View file

@ -33,7 +33,7 @@
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="Save" />
<a class="btn" href="{% url dashboard %}">Cancel</a>
<a class="btn" href="{% url "dashboard" %}">Cancel</a>
</div>
</form>

View file

@ -12,7 +12,7 @@
<div class="row">
<div class="span12">
<h1>{% trans "About Our Sponsors" %}</h1>
<a href="{% url cms_page "sponsors/prospectus/" %}" class="btn">Learn how to become a sponsor <span class="arrow"></span></a>
<a href="{% url "cms_page" "sponsors/prospectus/" %}" class="btn">Learn how to become a sponsor <span class="arrow"></span></a>
{% sponsor_levels as levels %}
{% for level in levels %}

View file

@ -9,21 +9,21 @@
<div class="span12">
<div class="pull-right">
{% if can_join %}
<form method="post" action="{% url team_join team.slug %}">
<form method="post" action="{% url "team_join" team.slug %}">
{% csrf_token %}
<input type="submit" class="btn btn-primary" value="join">
</form>
{% endif %}
{% if can_leave %}
<form method="post" action="{% url team_leave team.slug %}">
<form method="post" action="{% url "team_leave" team.slug %}">
{% csrf_token %}
<input type="submit" class="btn" value="leave">
</form>
{% endif %}
{% if can_apply %}
<form method="post" action="{% url team_apply team.slug %}">
<form method="post" action="{% url "team_apply" team.slug %}">
{% csrf_token %}
<input type="submit" class="btn btn-primary" value="apply">
</form>
@ -44,7 +44,7 @@
<tr>
<td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td>
<td>
<form style="margin: 0;" method="post" action="{% url team_demote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form>
<form style="margin: 0;" method="post" action="{% url "team_demote" membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">demote</button></form>
</td>
</tr>
{% endfor %}
@ -57,7 +57,7 @@
<tr>
<td>{{ membership.user.email }}{% if user == membership.user %} <span class="label label-info">you</span>{% endif %}</td>
<td>
<form style="margin: 0;" method="post" action="{% url team_promote membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form>
<form style="margin: 0;" method="post" action="{% url "team_promote" membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">promote</button></form>
</td>
</tr>
{% endfor %}
@ -70,8 +70,8 @@
<tr>
<td>{{ membership.user.email }}</td>
<td>
<form style="margin: 0; float: left;" method="post" action="{% url team_accept membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">accept</button></form>
<form style="margin: 0; float: left;" method="post" action="{% url team_reject membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">reject</button></form>
<form style="margin: 0; float: left;" method="post" action="{% url "team_accept" membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">accept</button></form>
<form style="margin: 0; float: left;" method="post" action="{% url "team_reject" membership.pk %}">{% csrf_token %}<button type="submit" class="btn btn-mini">reject</button></form>
</td>
</tr>
{% endfor %}

View file

@ -23,7 +23,8 @@ class SignupView(account.views.SignupView):
"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")