added htmlbase to enforce https login
parent
37a0139e8d
commit
93afadcf46
|
@ -10,6 +10,7 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>unglue.it {% block title %}{% endblock %}</title>
|
||||
{% if htmlbase %}<base href="{{ htmlbase }}" />{% endif %}
|
||||
<link type="text/css" rel="stylesheet" href="/static/css/sitewide.css" />
|
||||
<link REL="SHORTCUT ICON" HREF="/static/images/favicon.ico">
|
||||
{% block extra_css %}{% endblock %}
|
||||
|
@ -48,13 +49,13 @@
|
|||
<li class="first"><a href="/supporter/{{user.username}}"><span id="welcome">Welcome, {{ user.username }}</span></a></li>
|
||||
<li><a href="{% url auth_logout %}"><span>Sign Out</span></a></li>
|
||||
{% else %}
|
||||
<li class="first"><a href="{% url auth_login %}?next={% firstof request.path '/' %}"><span>Sign In</span></a></li>
|
||||
<li class="first"><a href="{{ htmlbase }}{% url auth_login %}"><span>Sign In</span></a></li>
|
||||
{% endif %}
|
||||
<li><a href="/stub/tour"><span>Tour</span></a></li>
|
||||
<li><a href="{{faqurl}}"><span>FAQs</span></a></li>
|
||||
<li><a href="/stub/Help"><span>Help</span></a></li>
|
||||
{% if not user.is_authenticated %}
|
||||
<li class="last" id="expander"><a href="{% url registration_register %}"><span>sign up</span></a></li>
|
||||
<li class="last" id="expander"><a href="{{ htmlbase }}{% url registration_register %}"><span>sign up</span></a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -74,7 +74,7 @@ var $j = jQuery.noConflict();
|
|||
<div class="user-block2">
|
||||
<div class="block-inner">
|
||||
<label class="title">Spread the Word</label>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?src=bm&u=http://{{ request.META.HTTP_HOST }}{{ request.path }}"><img src="/static/images/supporter_icons/facebook_square.png" alt="Facebook" title="Facebook" /></a>
|
||||
<a href="https://www.facebook.com/sharer/sharer.php?src=bm&u={{ htmlbase }}{{ request.path }}"><img src="/static/images/supporter_icons/facebook_square.png" alt="Facebook" title="Facebook" /></a>
|
||||
<a href="https://twitter.com/share"><img src="/static/images/supporter_icons/twitter_square.png" alt="tweeter" title="Twitter" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -121,7 +121,7 @@ var $j = jQuery.noConflict();
|
|||
</div>
|
||||
</form>
|
||||
<div class="google_signup">
|
||||
<a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png"></a><div>Or: <a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}">Sign Up With Google</a></div>
|
||||
<a href="/socialauth/login/google?next={{ htmlbase }}{{ next }}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png"></a><div>Or: <a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}">Sign Up With Google</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -168,7 +168,7 @@ var $j = jQuery.noConflict();
|
|||
<div class="jsmodule">
|
||||
<h3 class="module-title">Start Ungluing Now!</h3>
|
||||
<div class="jsmod-content">
|
||||
<form action='/accounts/register/' method='post'>{% csrf_token %}
|
||||
<form action='{{ htmlbase }}/accounts/register/' method='post'>{% csrf_token %}
|
||||
<div class="user-name">
|
||||
<label>Username</label>
|
||||
<input id="id_username" type="text" class="required" name="username" maxlength="30" size="30" />
|
||||
|
@ -189,7 +189,7 @@ var $j = jQuery.noConflict();
|
|||
<input type="submit" class="signup" value="sign up" />
|
||||
</div>
|
||||
<div class="google_signup">
|
||||
<a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png"></a><div>Or: <a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}">Sign Up With Google</a></div>
|
||||
<a href="/socialauth/login/google?next={{ htmlbase }}{{ next }}"><img src="{{ STATIC_URL }}images/auth/google_32_noborder.png"></a><div>Or: <a href="/socialauth/login/google?next={{ htmlbase }}{{ next }}">Sign Up With Google</a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<br>
|
||||
<br>
|
||||
<h3>Or, login with:</h3>
|
||||
<a href="/socialauth/login/google?next=http://{{ request.get_host }}{{ next }}"><img src="{{ STATIC_URL }}/images/auth/google_64.png"</a>
|
||||
<a href="/socialauth/login/google?next=http://{{ site.domain }}{{ next }}"><img src="{{ STATIC_URL }}images/auth/google_64.png"</a>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -51,7 +51,7 @@ logger = logging.getLogger(__name__)
|
|||
|
||||
def home(request):
|
||||
if request.user.is_authenticated():
|
||||
return HttpResponseRedirect(reverse('supporter',
|
||||
return HttpResponseRedirect(settings.HTML_BASE + reverse('supporter',
|
||||
args=[request.user.username]))
|
||||
ending = models.Campaign.objects.filter(status='ACTIVE').order_by('deadline')
|
||||
j=0
|
||||
|
@ -69,7 +69,7 @@ def home(request):
|
|||
if j == count:
|
||||
j = 0
|
||||
events = models.Wishes.objects.order_by('-created')[0:2]
|
||||
return render(request, 'home.html', {'suppress_search_box': True, 'works': works, 'works2': works2, 'events': events})
|
||||
return render(request, 'home.html', {'suppress_search_box': True, 'works': works, 'works2': works2, 'events': events, 'htmlbase':settings.HTML_BASE})
|
||||
|
||||
def stub(request):
|
||||
path = request.path[6:] # get rid of /stub/
|
||||
|
@ -132,7 +132,7 @@ def manage_campaign(request, id):
|
|||
alerts.append(_('Campaign has NOT been launched'))
|
||||
else:
|
||||
form= ManageCampaignForm(instance=campaign)
|
||||
return render(request, 'manage_campaign.html', {'campaign': campaign, 'form':form, 'problems': campaign.problems, 'alerts': alerts})
|
||||
return render(request, 'manage_campaign.html', {'campaign': campaign, 'form':form, 'problems': campaign.problems, 'alerts': alerts, 'htmlbase':settings.HTML_BASE})
|
||||
|
||||
def googlebooks(request, googlebooks_id):
|
||||
try:
|
||||
|
@ -380,7 +380,7 @@ def rh_tools(request):
|
|||
claim.campaign_form = OpenCampaignForm(data={'work': claim.work, 'name': claim.work.title, 'userid': request.user.id})
|
||||
else:
|
||||
claim.can_open_new=False
|
||||
return render(request, "rh_tools.html", {'claims': claims ,})
|
||||
return render(request, "rh_tools.html", {'claims': claims , 'htmlbase':settings.HTML_BASE})
|
||||
|
||||
def rh_admin(request):
|
||||
if not request.user.is_authenticated() :
|
||||
|
@ -610,7 +610,7 @@ def supporter(request, supporter_username, template_name):
|
|||
def edit_user(request):
|
||||
form=UserData()
|
||||
if not request.user.is_authenticated():
|
||||
return HttpResponseRedirect(reverse('auth_login'))
|
||||
return HttpResponseRedirect(settings.HTML_BASE + reverse('auth_login'))
|
||||
oldusername=request.user.username
|
||||
if request.method == 'POST':
|
||||
# surely there's a better way to add data to the POST data?
|
||||
|
|
|
@ -24,6 +24,8 @@ DATABASES = {
|
|||
TIME_ZONE = 'America/New_York'
|
||||
SECRET_KEY = '_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t'
|
||||
|
||||
HTML_BASE = 'https://please.unglueit.com'
|
||||
|
||||
# settings for outbout email
|
||||
# if you have a gmail account you can use your email address and password
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@ DATABASES = {
|
|||
TIME_ZONE = 'America/New_York'
|
||||
SECRET_KEY = '_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t'
|
||||
|
||||
HTML_BASE = 'http://jenkins.gluejar.com'
|
||||
|
||||
|
||||
# settings for outbout email
|
||||
# if you have a gmail account you can use your email address and password
|
||||
|
||||
|
|
|
@ -28,6 +28,9 @@ DATABASES = {
|
|||
TIME_ZONE = 'America/New_York'
|
||||
SECRET_KEY = '_^_off!8zsj4+)%qq623m&$7_m-q$iau5le0w!mw&n5tgt#x=t'
|
||||
|
||||
HTML_BASE = 'https://please.unglueit.com'
|
||||
|
||||
|
||||
# settings for outbout email
|
||||
# if you have a gmail account you can use your email address and password
|
||||
|
||||
|
|
Loading…
Reference in New Issue