diff --git a/events/models/profiles.py b/events/models/profiles.py index d90b513..4aafc4c 100644 --- a/events/models/profiles.py +++ b/events/models/profiles.py @@ -2,6 +2,7 @@ from django.db import models from django.contrib.sites.models import Site from django.contrib.auth.models import User, Group, AnonymousUser from django.utils.translation import ugettext_lazy as _ +from django.utils import timezone from django.conf import settings from imagekit.models import ProcessedImageField @@ -191,7 +192,7 @@ class Team(models.Model): web_url = models.URLField(_("Website"), null=True, blank=True) email = models.EmailField(_("Email Address"), null=True, blank=True) - created_date = models.DateField(_("Date Created"), null=True, blank=True) + created_date = models.DateField(_("Date Created"), default=timezone.now, null=True, blank=True) owner_profile = models.ForeignKey(UserProfile, related_name='owned_teams', null=True, on_delete=models.CASCADE) admin_profiles = models.ManyToManyField(UserProfile, related_name='admins', blank=True) diff --git a/get_together/templates/get_together/events/show_event.html b/get_together/templates/get_together/events/show_event.html index e45b65a..34cecc9 100644 --- a/get_together/templates/get_together/events/show_event.html +++ b/get_together/templates/get_together/events/show_event.html @@ -26,9 +26,7 @@ top: 16px; left: -42px; } -.table td, .table th { - border-top: none; -} + {% endblock %} @@ -51,13 +49,13 @@ {% if event.parent %} - + {% endif %} - + - {% if event.web_url %} - + {% endif %}
Part of:{{ event.parent.name }}Part of:{{ event.parent.name }}
Time:{{ event.local_start_time }} - {{ event.local_end_time }}Time:{{ event.local_start_time }} - {{ event.local_end_time }}
Place: + Place: {% if event.place %} {{ event.place.name }} {% elif can_edit_event %} @@ -69,7 +67,7 @@
Website:{{ event.web_url }}Website:{{ event.web_url }}
diff --git a/get_together/templates/get_together/teams/show_team.html b/get_together/templates/get_together/teams/show_team.html index 0f7e78c..3d854e2 100644 --- a/get_together/templates/get_together/teams/show_team.html +++ b/get_together/templates/get_together/teams/show_team.html @@ -29,9 +29,27 @@ Join Team {% endif %} iCal -
+ - {% if team.description %}

{{ team.description|markdown }}


{% endif %} + + + {% if team.description %} + + + + {% endif %} + {% if team.organization %} + + + + {% endif %} + {% if team.web_url %} + + + + {% endif %} +

{{ team.description|markdown }}

Organization:{{ team.organization.name }}
Website:{{ team.web_url }}
+

Upcoming Events

diff --git a/get_together/views/teams.py b/get_together/views/teams.py index b8955f5..f805316 100644 --- a/get_together/views/teams.py +++ b/get_together/views/teams.py @@ -3,7 +3,7 @@ from django.utils.translation import ugettext_lazy as _ from django.contrib import messages from django.contrib.auth import logout as logout_user from django.contrib.auth.decorators import login_required -from django.shortcuts import render, redirect +from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponse, JsonResponse from events.models.profiles import Organization, Team, UserProfile, Member @@ -134,7 +134,7 @@ def delete_team(request, team_id): return redirect('home') def show_org(request, org_slug): - org = Organization.objects.get(slug=org_slug) + org = get_object_or_404(Organization, slug=org_slug) upcoming_events = CommonEvent.objects.filter(organization=org, end_time__gt=datetime.datetime.now()).order_by('start_time') recent_events = CommonEvent.objects.filter(organization=org, end_time__lte=datetime.datetime.now()).order_by('-start_time')[:5] context = {