Addressbook

- location field.. has to be refactored
This commit is contained in:
Martin Bauer
2013-09-22 11:11:48 +02:00
parent 49ba4e5223
commit 230f1e6a36
28 changed files with 587 additions and 463 deletions

View File

@@ -4,6 +4,8 @@ from django.utils.translation import ugettext as _
from musicians.models import Musician
from datetime import datetime
from location_field.models import PlainLocationField
class Event ( models.Model ):
@@ -17,11 +19,14 @@ class Event ( models.Model ):
title = models.CharField( max_length=40, verbose_name = _("titel") )
type = models.CharField( max_length=6, choices=EVENT_TYPES, default='Reh', verbose_name= _("type") )
location = models.TextField( blank=False, verbose_name=_("location") )
map_location = PlainLocationField( based_fields = [location], zoom=7 )
desc = models.TextField( blank=True, verbose_name=_("description"))
date = models.DateField( verbose_name= _("date") )
time = models.TimeField( null=True, blank=True, verbose_name = _("time") )
meeting_time = models.TimeField( null=True, blank=True, verbose_name = _("meeting_time") )
participants = models.ManyToManyField( Musician, through='EventParticipation', verbose_name=_("participants") )

View File

@@ -14,8 +14,6 @@
{% block content %}
{% addtoblock "js" strip %} <script src="{{STATIC_URL}}/js/bindWithDelay.js" type="text/javascript" ></script>{% endaddtoblock %}
{% addtoblock "js" %}