Create a gist now

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>{% block title %}My amazing site{% endblock %}</title>
<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" />
<script type="text/javascript" id="__openidselector" src="" charset="utf-8"></script>
{% endif %}
{% block content %}{% endblock %}
{% extends "base.html" %}
{% block title %}blahblah!{% endblock %}
{% block content %}
{% endblock %}
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'', 'pub.vies.index'),
(r'^/$', 'pub.views.index'),
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'', include('openidgae.urls')),
(r'^pub', include('pub.urls')),
# 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