Skip to content
Snippets Groups Projects
Commit e35230ae authored by Bodor Máté's avatar Bodor Máté
Browse files

add absent filed to model

parent a36c0862
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.0.1 on 2019-01-22 13:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('account', '0002_auto_20190122_1341'),
('stats', '0002_event_description'),
]
operations = [
migrations.AddField(
model_name='event',
name='absent',
field=models.ManyToManyField(blank=True, related_name='events_absent', to='account.Profile'),
),
migrations.AlterField(
model_name='event',
name='visitors',
field=models.ManyToManyField(blank=True, related_name='events_visitor', to='account.Profile'),
),
]
from django.db import models
from account.models import Profile
from common.middleware import CurrentUserMiddleware
from django.utils import timezone
from django.core.exceptions import ValidationError
class Event(models.Model):
......@@ -11,7 +9,12 @@ class Event(models.Model):
description = models.TextField(blank=True, default='')
visitors = models.ManyToManyField(
Profile,
related_name='events',
related_name='events_visitor',
blank=True
)
absent = models.ManyToManyField(
Profile,
related_name='events_absent',
blank=True
)
created_by = models.ForeignKey(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment