Skip to content
Browse files

Merge pull request #2 from cfinn2010/master

Added Big and Little Field
  • Loading branch information...
2 parents 93c5416 + dc5c690 commit 4c296d021eaa8899701440a251d0eb459819fb41 @leibovic committed Mar 4, 2012
Showing with 10 additions and 0 deletions.
  1. BIN mydb.db
  2. +5 −0 website/models.py
  3. +2 −0 website/templates/edit_profile.html
  4. +3 −0 website/templates/profile.html
View
BIN mydb.db
Binary file not shown.
View
5 website/models.py
@@ -36,6 +36,11 @@ class Sister(models.Model):
bio = models.TextField(blank=True)
interests = models.TextField(blank=True)
+ big = models.ForeignKey('Sister', null=True, blank=True, related_name='sister_big')
+ little = models.ForeignKey('Sister', null=True, blank=True, related_name='sister_little')
+
+
+
def full_name(self):
return "%s %s" % (self.user.first_name, self.user.last_name)
full_name.short_description = 'Name'
View
2 website/templates/edit_profile.html
@@ -34,6 +34,8 @@ <h2 class="success"><a href="/sisters/{{ sister.id }}"/>Your profile was updated
<tr><td>Email:</td><td><a href="mailto:{{ sister.user.email }}"">{{ sister.user.email }}</a></td></tr>
<tr><td>Phone Number:</td><td>{{ form.phone_number }}</td></tr>
<tr><td>Residence:</td><td>{{ form.residence }}</td></tr>
+ <tr><td>Big:</td><td>{{ form.big }}</td></tr>
+ <tr><td>Little:</td><td>{{ form.little }}</td></tr>
</table>
<input class="form-submit" type="submit" value="Update Profile"/>
</form>
View
3 website/templates/profile.html
@@ -28,6 +28,9 @@ <h1 class="sister-name">{{ profile_sister.full_name }}</h1>
<li><strong>Email: </strong><a href="mailto:{{ profile_sister.user.email }}"">{{ profile_sister.user.email }}</a></li>
<li><strong>Phone Number: </strong>{% if profile_sister.phone_number %}{{ profile_sister.phone_number|phone }}{% endif %}</li>
<li><strong>Residence: </strong>{% if profile_sister.residence %}{{ profile_sister.residence }}{% endif %}</li>
+
+ <li><strong>Big: </strong>{% if profile_sister.big %}{{ profile_sister.big }}{% endif %}</li>
+ <li><strong>Little: </strong>{% if profile_sister.little %}{{ profile_sister.little }}{% endif %}</li>
{% endif %}
</ul>
</td>

0 comments on commit 4c296d0

Please sign in to comment.
Something went wrong with that request. Please try again.