migrate and clean urls

pull/1/head
eric 2013-03-07 21:53:32 -05:00
parent 80536a491a
commit 339d4653ab
16 changed files with 19 additions and 19 deletions

View File

@ -10,7 +10,7 @@
{% if user.is_authenticated %}
<p> Welcome {{user.username}}. Your API key is <span style="font-weight:bold">{{api_key}}</span>.</p>
{% else %}
<p> Please <a href="{% url auth_login %}?next={% firstof request.path '/' %}"><span>sign in</span></a> first.</p>
<p> Please <a href="{% url superlogin %}?next={% firstof request.path '/' %}"><span>sign in</span></a> first.</p>
{% endif %}
<h3>Basic API info</h3>

View File

@ -124,7 +124,7 @@
{% else %}
<div class="js-topmenu">
<ul class="menu">
<li><a href="{% url auth_login %}?next={% firstof request.path '/' %}" class="hijax"><span>Sign In</span></a></li>
<li><a href="{% url superlogin %}?next={% firstof request.path '/' %}" class="hijax"><span>Sign In</span></a></li>
{% if not suppress_search_box %}
{% ifnotequal request.get_full_path "/accounts/register/" %}
{% comment %}

View File

@ -11,7 +11,7 @@
<div class="tabs-content" id="js-maincol">
{% if request.user.is_anonymous %}
<p>You must be <a href="{% url auth_login %}?next={{ request.path }}">logged in</a> to comment.</p>
<p>You must be <a href="{% url superlogin %}?next={{ request.path }}">logged in</a> to comment.</p>
{% else %}
<form action="{% comment_form_target %}" method="post">{% csrf_token %}
{% if next %}<div><input type="hidden" name="next" value="{{ next }}" /></div>{% endif %}

View File

@ -17,7 +17,7 @@
<div><h2>Wrong user for donation credit</h2>
<div>
<p>Unglue.it would like to process your donation credit, but you are currently logged in as <code>{{request.user.username}}</code>. Your donation credit from {{nonprofit.name}} for ${{ envelope.amount }}.{{ envelope.cents }} is designated for <code>{{ envelope.username }}</code>. To record your credit, you need to <a href='{% url auth_logout %}?next={{ request.get_full_path|urlencode }}'>log out</a>, and then <a href='{% url auth_login %}?next={{ request.get_full_path|urlencode }}'>log in</a> as <code>{{ envelope.username }}</code>. If you have any problem, don't hesitate to contact <a href="mailto:support@gluejar.com?subject={{ request.get_full_path|urlencode }}">unglue.it support</a>.
<p>Unglue.it would like to process your donation credit, but you are currently logged in as <code>{{request.user.username}}</code>. Your donation credit from {{nonprofit.name}} for ${{ envelope.amount }}.{{ envelope.cents }} is designated for <code>{{ envelope.username }}</code>. To record your credit, you need to <a href='{% url auth_logout %}?next={{ request.get_full_path|urlencode }}'>log out</a>, and then <a href='{% url superlogin %}?next={{ request.get_full_path|urlencode }}'>log in</a> as <code>{{ envelope.username }}</code>. If you have any problem, don't hesitate to contact <a href="mailto:support@gluejar.com?subject={{ request.get_full_path|urlencode }}">unglue.it support</a>.
</p>
</div>
</div>

View File

@ -101,7 +101,7 @@ If you believe you are a rights holder and would like to discuss ungluing your w
<dl>
<dt>I forgot my password. What do I do?</dt>
<dd>
Click on this <a href="/accounts/password/reset/">forgot your password</a> link (you can also find it at the bottom of the <a href="/accounts/login/">sign in page</a>). Enter the email address you use for your account and we'll send you an email to help you reset your password.
Click on this <a href="{% url django.contrib.auth.views.password_reset %}">forgot your password</a> link (you can also find it at the bottom of the <a href="{% url superlogin %}">sign in page</a>). Enter the email address you use for your account and we'll send you an email to help you reset your password.
</dd>
<dt>I never received an activation email after I signed up, or my activation email isn't working. What do I do?</dt>
@ -121,7 +121,7 @@ Click on this <a href="/accounts/password/reset/">forgot your password</a> link
<dt>How can I change my profile name or password, or the email address associated with my account?</dt>
<dd>At the bottom of every page there's a link to an <a href="/accounts/edit/">account editing page</a> where you can change your profile name, password, and email.</dd>
<dd>At the bottom of every page there's a link to an <a href="{% url regluit.frontend.views.edit_user %}">account editing page</a> where you can change your profile name, password, and email.</dd>
{% comment %}
We have no functionality for this at this time. Should we?

View File

@ -46,7 +46,7 @@
<h3 class="module-title">Start Ungluing Now!</h3>
<div class="jsmod-content">
{% if not request.user.is_authenticated %}
<form action='/accounts/register/' method='post'>{% csrf_token %}
<form action='{% url registration_register %}' method='post'>{% csrf_token %}
<div class="user-name">
<label>Username</label>
<input id="id_username_pop" type="text" class="required" name="username" maxlength="30" size="30" />
@ -122,7 +122,7 @@
<h3 class="module-title">Start Ungluing Now!</h3>
{% if not request.user.is_authenticated %}
<div class="jsmod-content">
<form action='/accounts/register/' method='post'>{% csrf_token %}
<form action='{% url registration_register %}' method='post'>{% csrf_token %}
<div class="user-name">
<label>Username</label>
<input id="id_username_main" type="text" class="required" name="username" maxlength="30" size="30" />

View File

@ -107,7 +107,7 @@ $j(document).ready(function(){
<h2> Other Account Management Tools </h2>
<ul>
<li>Want to <a href="{% url auth_password_change %}">change your password</a>?</li>
<li>Want to <a href="/accounts/edit/">change your username or email address</a>?</li>
<li>Want to <a href="{% url regluit.frontend.views.edit_user %}">change your username or email address</a>?</li>
<li>Want to <a href="{% url notification_notice_settings %}">manage your contact preferences</a>?</li>
</ul>
{% endblock %}

View File

@ -17,7 +17,7 @@
<div><h2>Error: Wrong user for a pledge transaction</h2>
<div>
<p>Unglue.it would like to process your pledge, but you are currently logged in as <code>{{request.user.username}}</code>. To complete your pledge, you need to <a href='{% url auth_logout %}?next={{ request.get_full_path|urlencode }}'>log out</a>, and then <a href='{% url auth_login %}?next={{ request.get_full_path|urlencode }}'>log in</a> as <code>{{ transaction.user.username }}</code>. If you have any problem, don't hesitate to contact <a href="mailto:support@gluejar.com?subject={{ request.get_full_path|urlencode }}">unglue.it support</a>.
<p>Unglue.it would like to process your pledge, but you are currently logged in as <code>{{request.user.username}}</code>. To complete your pledge, you need to <a href='{% url auth_logout %}?next={{ request.get_full_path|urlencode }}'>log out</a>, and then <a href='{% url superlogin %}?next={{ request.get_full_path|urlencode }}'>log in</a> as <code>{{ transaction.user.username }}</code>. If you have any problem, don't hesitate to contact <a href="mailto:support@gluejar.com?subject={{ request.get_full_path|urlencode }}">unglue.it support</a>.
</p>
</div>
</div>

View File

@ -3,7 +3,7 @@
{% block doccontent %}
{% if not user.is_authenticated %}
{% if account %}
Thanks {{ account }}, activation complete! You may now <a href='{% url auth_login %}'>sign in</a> using the username and password you set at registration.
Thanks {{ account }}, activation complete! You may now <a href='{% url superlogin %}'>sign in</a> using the username and password you set at registration.
{% else %}
Oops &ndash; it seems that your activation key is invalid. Please check the url again.
{% endif %}

View File

@ -1,5 +1,5 @@
<!-- login_form.html -->
<form method="post" action="{% url django.contrib.auth.views.login %}" class="login">{% csrf_token %}
<form method="post" action="{% url superlogin %}" class="login">{% csrf_token %}
{{ form.username.label_tag }}
{{ form.username }}
{{ form.password.label_tag }}

View File

@ -18,8 +18,8 @@
{% endifequal %}
{% else %}
<div>You must be logged in to change your password.</div>
<a href="{% url auth_login %}?next={% firstof request.path '/' %}" class="nounderline"><div class="actionbutton">Log in</div></a>
<a href="{% url superlogin %}?next={% firstof request.path '/' %}" class="nounderline"><div class="actionbutton">Log in</div></a>
{% endif %}
<p>Want to <a href="/accounts/edit/">change your username</a> instead?</p>
<p>Want to <a href="{% url regluit.frontend.views.edit_user %}">change your username</a> instead?</p>
{% endblock %}

View File

@ -23,7 +23,7 @@
</div>
<div>
<h2>Other Account Tools</h2>
<p>Want to <a href="/accounts/password/change/">change your password</a>?</p>
<p>Want to <a href="{% url auth_password_change %}">change your password</a>?</p>
<p>... or <a href="{% url manage_account %}">manage your pledges and payment info</a>?</div>
{% endblock %}

View File

@ -156,7 +156,7 @@ Any questions not covered here? Please email us at <a href="mailto:rights@gluej
<li>Use the Claim option on the Rights tab of each book's page.</li>
<li>Agree to our <a href="{{ termsurl }}">Terms</a> on the following page. This includes agreeing that you are making the claim in good faith and can substantiate that you have legal control over worldwide electronic rights to the work.</li>
<li>If you have any questions or you claim a work by mistake, email us.</li>
<li>We will review your claim. We may contact you at {{ request.user.email }} if we have any questions. If this is the wrong email address, please <a href="/accounts/edit">change the email address</a> for your account.</li>
<li>We will review your claim. We may contact you at {{ request.user.email }} if we have any questions. If this is the wrong email address, please <a href="{% url regluit.frontend.views.edit_user %}">change the email address</a> for your account.</li>
</ul>
<li>Once your claim is approved, you can set up a campaign for it. All the campaigns you can manage will be listed on this page.</li>
<li>You may optionally add other Unglue.it users as campaign managers, if you'd like them to be able to edit your campaign. That option will also appear on this page.</li>

View File

@ -264,7 +264,7 @@ $j(document).ready(function(){
{% if user.is_authenticated %}
{% render_comment_form for work %}
{% else %}
<p>You must be <a href="{% url auth_login %}?next={{ request.path }}">logged in</a> to comment.</p>
<p>You must be <a href="{% url superlogin %}?next={{ request.path }}">logged in</a> to comment.</p>
{% endif %}
</div>
</div>

View File

@ -212,7 +212,7 @@ SOCIAL_AUTH_NEW_USER_REDIRECT_URL = '/'
TWITTER_EXTRA_DATA = [('profile_image_url', 'profile_image_url')]
LOGIN_URL = "/accounts/login/"
LOGIN_URL = "/accounts/superlogin/"
LOGIN_REDIRECT_URL = "/"
LOGOUT_URL = "/accounts/logout/"

View File

@ -45,7 +45,7 @@ $j().ready(function() {
contentblock.on("click", "div.create-account", function () {
var span = $j(this).find("span");
var work_url = span.attr('title')
top.location = "/accounts/login/?next=" + work_url;
top.location = "/accounts/superlogin/?next=" + work_url;
});
// in panel view on the supporter page we want to remove the entire book listing from view upon wishlist-remove