Add location to Event object
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 2.1.5 on 2019-03-12 12:58
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0050_signupform_visible'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='event',
|
||||
name='location',
|
||||
field=models.CharField(blank=True, max_length=255),
|
||||
),
|
||||
]
|
||||
@@ -63,6 +63,7 @@ class Event(BaseFeed):
|
||||
end_time = models.DateTimeField(default=timezone.now)
|
||||
signupForm = models.ManyToManyField(
|
||||
'SignupForm', blank=True)
|
||||
location = models.CharField(max_length=255, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return _('Event: {}').format(self.title)
|
||||
|
||||
@@ -25,7 +25,7 @@ class EventSerializer(serializers.HyperlinkedModelSerializer):
|
||||
class Meta:
|
||||
model = Event
|
||||
fields = ('id', 'tag_id', 'tags', 'visible', 'title', 'description',
|
||||
'content', 'start_time', 'end_time', 'signup_id', 'signupForm')
|
||||
'content', 'start_time', 'end_time', 'location', 'signup_id', 'signupForm')
|
||||
depth = 1
|
||||
|
||||
def create(self, validated_data):
|
||||
|
||||
Reference in New Issue
Block a user