Merge branch 'Qwann/SmallFixes' into 'master'
Small Fixes See merge request !19
This commit is contained in:
commit
2e5712562f
4 changed files with 31 additions and 4 deletions
|
@ -26,7 +26,7 @@ class SubscriptionTest(TestCase):
|
||||||
title='TestEvent',
|
title='TestEvent',
|
||||||
slug='test',
|
slug='test',
|
||||||
created_by=cls.root,
|
created_by=cls.root,
|
||||||
creation_date=timezone.now(),
|
created_at=timezone.now(),
|
||||||
description="Ceci est un test",
|
description="Ceci est un test",
|
||||||
beginning_date=timezone.now()
|
beginning_date=timezone.now()
|
||||||
+ timedelta(days=30),
|
+ timedelta(days=30),
|
||||||
|
|
26
event/migrations/0003_auto_20170726_1116.py
Normal file
26
event/migrations/0003_auto_20170726_1116.py
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.11.3 on 2017-07-26 11:16
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('event', '0002_auto_20170723_1419'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RenameField(
|
||||||
|
model_name='event',
|
||||||
|
old_name='creation_date',
|
||||||
|
new_name='created_at',
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='activity',
|
||||||
|
name='parent',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='event.ActivityTemplate'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -24,7 +24,7 @@ class Event(SubscriptionMixin, models.Model):
|
||||||
related_name="created_events",
|
related_name="created_events",
|
||||||
editable=False,
|
editable=False,
|
||||||
)
|
)
|
||||||
creation_date = models.DateTimeField(
|
created_at = models.DateTimeField(
|
||||||
_('date de création'),
|
_('date de création'),
|
||||||
auto_now_add=True,
|
auto_now_add=True,
|
||||||
)
|
)
|
||||||
|
@ -179,7 +179,8 @@ class Activity(AbstractActivityTemplate):
|
||||||
end = models.DateTimeField(_("heure de fin"))
|
end = models.DateTimeField(_("heure de fin"))
|
||||||
|
|
||||||
def get_herited(self, attrname):
|
def get_herited(self, attrname):
|
||||||
inherited_fields = [f.name for f in ActivityTemplate._meta.get_fields()]
|
inherited_fields = [f.name for f in
|
||||||
|
ActivityTemplate._meta.get_fields()]
|
||||||
m2m_fields = [f.name for f in ActivityTemplate._meta.get_fields()
|
m2m_fields = [f.name for f in ActivityTemplate._meta.get_fields()
|
||||||
if f.many_to_many]
|
if f.many_to_many]
|
||||||
attr = getattr(self, attrname)
|
attr = getattr(self, attrname)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class ActivityInheritanceTest(TestCase):
|
||||||
title='La Nuit 2042',
|
title='La Nuit 2042',
|
||||||
slug='nuit42',
|
slug='nuit42',
|
||||||
created_by=cls.erkan,
|
created_by=cls.erkan,
|
||||||
creation_date=timezone.now(),
|
created_at=timezone.now(),
|
||||||
description="La nuit c'est lol",
|
description="La nuit c'est lol",
|
||||||
beginning_date=timezone.now()
|
beginning_date=timezone.now()
|
||||||
+ timedelta(days=30),
|
+ timedelta(days=30),
|
||||||
|
|
Loading…
Reference in a new issue