Created
November 26, 2009 01:28
-
-
Save aggieben/243158 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>{% block title %}My amazing site{% endblock %}</title> | |
</head> | |
<body> | |
<div id="header"> | |
{% if lip %} | |
Welcome {{ lip.pretty_openid }} | |
<a href="{% url openidgae.views.LogoutSubmit %}">logout</a> | |
{% else %} | |
<form id="login-form" action="{% url openidgae.views.OpenIDStartSubmit %}?continue={{continueUrl}}" method="post"> | |
<input type="text" name="openid_identifier" id="openid_identifier" /> | |
<input type="submit" value="Verify" /> | |
</form> | |
<!-- BEGIN ID SELECTOR --> | |
<script type="text/javascript" id="__openidselector" src="https://www.idselector.com/selector/46b0e6d0c8ba5c8617f6f5b970865604c9f87da5" charset="utf-8"></script> | |
<!-- END ID SELECTOR --> | |
{% endif %} | |
</div> | |
{% block content %}{% endblock %} | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block title %}blahblah!{% endblock %} | |
{% block content %} | |
blahblahblah | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
urlpatterns = patterns('', | |
(r'', 'pub.vies.index'), | |
(r'^/$', 'pub.views.index'), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
urlpatterns = patterns('', | |
(r'', include('openidgae.urls')), | |
(r'^pub', include('pub.urls')), | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create your views here. | |
from django.shortcuts import render_to_response | |
from django.http import HttpResponse | |
from django import forms | |
import openidgae | |
#class CallForm(forms.Form): | |
# phnum = forms.PhoneNumberField() | |
# message = forms.TextField() | |
# this needs to be moved somewhere else, but for now it can live here | |
def index(request): | |
lip = openidgae.get_current_person(request, HttpResponse()) | |
# resp = render_to_response('pub/index.html', {'lip': lip, 'form': CallForm()}) | |
resp = render_to_response('pub/index.html', {'lip': lip}) | |
return resp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment