Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
concrexit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
70
Issues
70
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
thalia
concrexit
Commits
66bd1865
Commit
66bd1865
authored
Dec 04, 2016
by
Jim Driessen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formatting problems (pep8).
parent
e2c0d7c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
website/pizzas/management/commands/migratepizzas.py
website/pizzas/management/commands/migratepizzas.py
+8
-6
No files found.
website/pizzas/management/commands/migratepizzas.py
View file @
66bd1865
import
json
import
re
from
datetime
import
datetime
import
requests
...
...
@@ -9,7 +8,6 @@ from django.core.exceptions import ImproperlyConfigured
from
django.core.management.base
import
BaseCommand
from
django.utils
import
timezone
from
django.utils
import
translation
from
django.conf
import
settings
import
pizzas.models
as
pizzas_models
import
events.models
as
events_models
...
...
@@ -51,7 +49,6 @@ class Command(BaseCommand):
print
(
'[!]No json data found'
)
return
activity_map
=
{}
product_map
=
{}
...
...
@@ -68,7 +65,8 @@ class Command(BaseCommand):
event
=
events
.
first
()
else
:
for
e
in
events
:
if
'borrel'
in
e
.
title_nl
or
'Programmeerwedstrijd'
in
e
.
title_nl
:
if
'borrel'
in
e
.
title_nl
or
'Programmeerwedstrijd'
\
in
e
.
title_nl
:
event
=
e
new_event
=
pizzas_models
.
PizzaEvent
(
...
...
@@ -96,8 +94,12 @@ class Command(BaseCommand):
if
order_data
[
'username'
]
is
None
:
member
=
None
else
:
registration_user
=
User
.
objects
.
get
(
username
=
order_data
[
'username'
])
member
=
members_models
.
Member
.
objects
.
get
(
user
=
registration_user
)
registration_user
=
User
.
objects
.
get
(
username
=
order_data
[
'username'
]
)
member
=
members_models
.
Member
.
objects
.
get
(
user
=
registration_user
)
new_order
=
pizzas_models
.
Order
(
member
=
member
,
paid
=
order_data
[
'paid'
],
...
...
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