Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
d01e46ae
Unverified
Commit
d01e46ae
authored
Jul 13, 2016
by
Thom Wiggers
📐
Browse files
Add missing migrations for
!5
parent
e16ab863
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/committees/migrations/0002_auto_20160713_1558.py
0 → 100644
View file @
d01e46ae
# -*- coding: utf-8 -*-
# Generated by Django 1.10b1 on 2016-07-13 13:58
from
__future__
import
unicode_literals
import
datetime
from
django.db
import
migrations
,
models
import
django.db.models.manager
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'committees'
,
'0001_squashed_0006_auto_20160707_1700'
),
]
operations
=
[
migrations
.
AlterModelManagers
(
name
=
'committee'
,
managers
=
[
(
'active_committees'
,
django
.
db
.
models
.
manager
.
Manager
()),
],
),
migrations
.
AddField
(
model_name
=
'committee'
,
name
=
'contact_email'
,
field
=
models
.
EmailField
(
default
=
'commissie@thalia.nu'
,
max_length
=
254
,
verbose_name
=
'contact email address'
),
preserve_default
=
False
,
),
migrations
.
AddField
(
model_name
=
'committee'
,
name
=
'since'
,
field
=
models
.
DateField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'founded in'
),
),
migrations
.
AddField
(
model_name
=
'committee'
,
name
=
'until'
,
field
=
models
.
DateField
(
blank
=
True
,
null
=
True
,
verbose_name
=
'existed until'
),
),
migrations
.
AlterField
(
model_name
=
'committeemembership'
,
name
=
'since'
,
field
=
models
.
DateField
(
default
=
datetime
.
date
.
today
,
help_text
=
'The date this member joined the committee in this role'
,
verbose_name
=
'Committee member since'
),
),
]
website/committees/models.py
View file @
d01e46ae
import
datetime
import
logging
from
django.core.exceptions
import
ValidationError
,
NON_FIELD_ERRORS
...
...
@@ -49,9 +50,17 @@ class Committee(models.Model):
blank
=
True
,
)
since
=
models
.
DateField
(
_
(
'founded in'
))
since
=
models
.
DateField
(
_
(
'founded in'
),
null
=
True
,
blank
=
True
,
)
until
=
models
.
DateField
(
_
(
'existed until'
))
until
=
models
.
DateField
(
_
(
'existed until'
),
null
=
True
,
blank
=
True
,
)
contact_email
=
models
.
EmailField
(
_
(
'contact email address'
))
...
...
@@ -89,7 +98,7 @@ class CommitteeMembership(models.Model):
since
=
models
.
DateField
(
verbose_name
=
_
(
'Committee member since'
),
help_text
=
_
(
'The date this member joined the committee in this role'
),
default
=
lambda
:
timezone
.
now
().
date
(),
default
=
datetime
.
date
.
today
)
until
=
models
.
DateField
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment