Merge pull request #4134 from normanjaeckel/MotionCreatedTimestamp
Added timestamp fields for motions.
This commit is contained in:
commit
27cb63174e
@ -35,6 +35,7 @@ Motions:
|
|||||||
- Added new permission to create amendments [#4128].
|
- Added new permission to create amendments [#4128].
|
||||||
- Added multi select action to manage submitters, tags, states and
|
- Added multi select action to manage submitters, tags, states and
|
||||||
recommendations [#4037, #4132].
|
recommendations [#4037, #4132].
|
||||||
|
- Added timestampes for motions [#4134].
|
||||||
|
|
||||||
User:
|
User:
|
||||||
- Added new admin group which grants all permissions. Users of existing group
|
- Added new admin group which grants all permissions. Users of existing group
|
||||||
|
25
openslides/motions/migrations/0019_auto_20190119_1025.py
Normal file
25
openslides/motions/migrations/0019_auto_20190119_1025.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Generated by Django 2.1.5 on 2019-01-19 09:25
|
||||||
|
|
||||||
|
import django.utils.timezone
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('motions', '0018_auto_20190118_2101'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='created',
|
||||||
|
field=models.DateTimeField(auto_now_add=True, default=django.utils.timezone.now),
|
||||||
|
preserve_default=False,
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='motion',
|
||||||
|
name='last_modified',
|
||||||
|
field=models.DateTimeField(auto_now=True),
|
||||||
|
),
|
||||||
|
]
|
@ -244,6 +244,16 @@ class Motion(RESTModelMixin, models.Model):
|
|||||||
Users who support this motion.
|
Users who support this motion.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
|
"""
|
||||||
|
Timestamp when motion is created.
|
||||||
|
"""
|
||||||
|
|
||||||
|
last_modified = models.DateTimeField(auto_now=True)
|
||||||
|
"""
|
||||||
|
Timestamp when motion is modified.
|
||||||
|
"""
|
||||||
|
|
||||||
# In theory there could be one then more agenda_item. But we support only
|
# In theory there could be one then more agenda_item. But we support only
|
||||||
# one. See the property agenda_item.
|
# one. See the property agenda_item.
|
||||||
agenda_items = GenericRelation(Item, related_name="motions")
|
agenda_items = GenericRelation(Item, related_name="motions")
|
||||||
|
@ -434,6 +434,8 @@ class MotionSerializer(ModelSerializer):
|
|||||||
"log_messages",
|
"log_messages",
|
||||||
"sort_parent",
|
"sort_parent",
|
||||||
"weight",
|
"weight",
|
||||||
|
"created",
|
||||||
|
"last_modified",
|
||||||
)
|
)
|
||||||
read_only_fields = (
|
read_only_fields = (
|
||||||
"state",
|
"state",
|
||||||
|
Loading…
Reference in New Issue
Block a user