Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
abb8dc0c
Commit
abb8dc0c
authored
Feb 01, 2016
by
Skia
Browse files
Add Subscription to setup
parent
bc7ab19e
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/management/commands/setup.py
View file @
abb8dc0c
...
...
@@ -7,6 +7,7 @@ from django.conf import settings
from
core.models
import
Group
,
User
,
Page
,
PageRev
from
accounting.models
import
Customer
,
GeneralJournal
,
ProductType
,
Product
from
club.models
import
Club
from
subscription.models
import
Subscription
,
Subscriber
class
Command
(
BaseCommand
):
help
=
"Set up a new instance of the Sith AE"
...
...
@@ -62,3 +63,7 @@ Cette page vise à documenter la syntaxe *Markdown* utilisée sur le site.
special_selling_price
=
"1.6"
).
save
()
GeneralJournal
(
start_date
=
"2015-06-12"
,
name
=
"A15"
).
save
()
# Subscription
Subscription
(
member
=
Subscriber
.
objects
.
filter
(
pk
=
s
.
pk
).
first
(),
subscription_type
=
list
(
settings
.
AE_SUBSCRIPTIONS
.
keys
())[
0
],
payment_method
=
settings
.
AE_PAYMENT_METHOD
[
0
]).
save
()
Write
Preview
Supports
Markdown
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