Commits

Johnny Goodnow committed 4085e78 Merge

* Merged.

Comments (0)

Files changed (4)

geolocator/models.py

 from django.db import models
 from django.contrib.auth.models import User
 
-# Create your models here.
 class Person(models.Model):
 	pid = models.CharField(max_length = 50, primary_key = True)
 	display_name = models.CharField(max_length = 30)

resources/templates/friends.html

+{% extends "base.html" %}
+
+{% block content %}
+	{% if form.errors %}
+        <p style="color: red;">
+            Please correct the error{{ form.errors|pluralize }} below.
+        </p>
+	{% endif %}
+	<form action="" method="post">
+		<table>
+			{{ form.as_table }}
+		</table>
+		<input type="submit" value="Update">
+		<a href="/">Cancel</a>
+	</form>
+{% endblock %}

resources/templates/index.html

 
 {% block auth_status %}
   	<div id="auth_status">
-	    {% if user.is_authenticated %}<span id="username">{{ user.username }}</span> | <a href="/accounts/logout/">Log out</a>
+	    {% if user.is_authenticated %}<span id="username">{{ user.username }}</span> | <a href="/friends/">Friends</a> | <a href="/accounts/logout/">Log out</a>
 	    {% else %}
       	<a href="/accounts/login/">Log in</a> | <a href="/accounts/add/">Register</a>
 	    {% endif %}
     (r'^accounts/login/$', views.user_login_view),
     (r'^accounts/logout/$', views.user_logout_view),
     (r'^accounts/logout/success/$', views.user_logout_complete_view),
+    (r'^friends/$', views.friends_view),
 
     (r'^static_media/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': settings.STATIC_MEDIA_ROOT}),