set is_staff for users who are responsibles in bootstrap-script
This commit is contained in:
parent
edc128c94f
commit
1522e3997b
|
@ -5,12 +5,10 @@ from camps.models import Camp
|
||||||
from news.models import NewsItem
|
from news.models import NewsItem
|
||||||
from info.models import InfoCategory, InfoItem
|
from info.models import InfoCategory, InfoItem
|
||||||
from villages.models import Village
|
from villages.models import Village
|
||||||
from profiles.models import Profile
|
|
||||||
from shop.models import (
|
from shop.models import (
|
||||||
ProductCategory,
|
ProductCategory,
|
||||||
Product,
|
Product,
|
||||||
Order,
|
Order
|
||||||
OrderProductRelation
|
|
||||||
)
|
)
|
||||||
from program.models import (
|
from program.models import (
|
||||||
EventType,
|
EventType,
|
||||||
|
@ -106,6 +104,7 @@ class Command(BaseCommand):
|
||||||
user2 = User.objects.create_user(
|
user2 = User.objects.create_user(
|
||||||
username='user2',
|
username='user2',
|
||||||
password='user2',
|
password='user2',
|
||||||
|
is_staff=True
|
||||||
)
|
)
|
||||||
user2.profile.name = 'Jane Doe'
|
user2.profile.name = 'Jane Doe'
|
||||||
user2.profile.description = 'one that once was'
|
user2.profile.description = 'one that once was'
|
||||||
|
@ -120,6 +119,7 @@ class Command(BaseCommand):
|
||||||
user3 = User.objects.create_user(
|
user3 = User.objects.create_user(
|
||||||
username='user3',
|
username='user3',
|
||||||
password='user3',
|
password='user3',
|
||||||
|
is_staff=True
|
||||||
)
|
)
|
||||||
user3.profile.name = 'Lorem Ipsum'
|
user3.profile.name = 'Lorem Ipsum'
|
||||||
user3.profile.description = 'just a user'
|
user3.profile.description = 'just a user'
|
||||||
|
@ -134,6 +134,7 @@ class Command(BaseCommand):
|
||||||
user4 = User.objects.create_user(
|
user4 = User.objects.create_user(
|
||||||
username='user4',
|
username='user4',
|
||||||
password='user4',
|
password='user4',
|
||||||
|
is_staff=True
|
||||||
)
|
)
|
||||||
user4.profile.name = 'Ethe Reum'
|
user4.profile.name = 'Ethe Reum'
|
||||||
user4.profile.description = 'I prefer doge'
|
user4.profile.description = 'I prefer doge'
|
||||||
|
@ -1355,7 +1356,7 @@ Please note that sleeping in the parking lot is not permitted. If you want to sl
|
||||||
)
|
)
|
||||||
|
|
||||||
self.output("Setting teamarea responsibles for {}...".format(year))
|
self.output("Setting teamarea responsibles for {}...".format(year))
|
||||||
pr_area.responsible.add(user1, user2)
|
pr_area.responsible.add(user2)
|
||||||
content_area.responsible.add(user2, user3)
|
content_area.responsible.add(user2, user3)
|
||||||
infrastructure_area.responsible.add(user3, user4)
|
infrastructure_area.responsible.add(user3, user4)
|
||||||
bar_area.responsible.add(user4)
|
bar_area.responsible.add(user4)
|
||||||
|
|
Loading…
Reference in a new issue