Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
thalia
concrexit
Commits
905fcf46
Commit
905fcf46
authored
Oct 05, 2016
by
Jelle Besseling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make starting year random
parent
72fb4885
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
website/utils/management/commands/createfixtures.py
website/utils/management/commands/createfixtures.py
+3
-1
No files found.
website/utils/management/commands/createfixtures.py
View file @
905fcf46
...
...
@@ -2,6 +2,8 @@ import random
import
string
import
tempfile
from
datetime
import
date
from
django.contrib.auth.models
import
User
from
django.core.management.base
import
BaseCommand
...
...
@@ -24,7 +26,7 @@ class MemberFactory(factory.Factory):
programme
=
random
.
choice
([
'computingscience'
,
'informationscience'
])
student_number
=
factory
.
LazyAttribute
(
lambda
x
:
faker
.
numerify
(
text
=
"s#######"
))
starting_year
=
2016
starting_year
=
random
.
randint
(
1990
,
date
.
today
().
year
)
address_street
=
factory
.
LazyAttribute
(
lambda
x
:
faker
.
street_address
())
address_postal_code
=
factory
.
LazyAttribute
(
lambda
x
:
faker
.
postcode
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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