update bootstrap script with profile information for users
This commit is contained in:
parent
12dbc05680
commit
edc128c94f
|
@ -5,6 +5,7 @@ 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,
|
||||||
|
@ -92,6 +93,9 @@ class Command(BaseCommand):
|
||||||
username='user1',
|
username='user1',
|
||||||
password='user1',
|
password='user1',
|
||||||
)
|
)
|
||||||
|
user1.profile.name = 'John Doe'
|
||||||
|
user1.profile.description = 'one that once was'
|
||||||
|
user1.profile.save()
|
||||||
email = EmailAddress.objects.create(
|
email = EmailAddress.objects.create(
|
||||||
user=user1,
|
user=user1,
|
||||||
email='user1@example.com',
|
email='user1@example.com',
|
||||||
|
@ -103,6 +107,9 @@ class Command(BaseCommand):
|
||||||
username='user2',
|
username='user2',
|
||||||
password='user2',
|
password='user2',
|
||||||
)
|
)
|
||||||
|
user2.profile.name = 'Jane Doe'
|
||||||
|
user2.profile.description = 'one that once was'
|
||||||
|
user2.profile.save()
|
||||||
email = EmailAddress.objects.create(
|
email = EmailAddress.objects.create(
|
||||||
user=user2,
|
user=user2,
|
||||||
email='user2@example.com',
|
email='user2@example.com',
|
||||||
|
@ -114,6 +121,9 @@ class Command(BaseCommand):
|
||||||
username='user3',
|
username='user3',
|
||||||
password='user3',
|
password='user3',
|
||||||
)
|
)
|
||||||
|
user3.profile.name = 'Lorem Ipsum'
|
||||||
|
user3.profile.description = 'just a user'
|
||||||
|
user3.profile.save()
|
||||||
email = EmailAddress.objects.create(
|
email = EmailAddress.objects.create(
|
||||||
user=user3,
|
user=user3,
|
||||||
email='user3@example.com',
|
email='user3@example.com',
|
||||||
|
@ -125,6 +135,9 @@ class Command(BaseCommand):
|
||||||
username='user4',
|
username='user4',
|
||||||
password='user4',
|
password='user4',
|
||||||
)
|
)
|
||||||
|
user4.profile.name = 'Ethe Reum'
|
||||||
|
user4.profile.description = 'I prefer doge'
|
||||||
|
user4.profile.save()
|
||||||
email = EmailAddress.objects.create(
|
email = EmailAddress.objects.create(
|
||||||
user=user4,
|
user=user4,
|
||||||
email='user4@example.com',
|
email='user4@example.com',
|
||||||
|
@ -137,6 +150,9 @@ class Command(BaseCommand):
|
||||||
email='admin@example.com',
|
email='admin@example.com',
|
||||||
password='admin',
|
password='admin',
|
||||||
)
|
)
|
||||||
|
admin.profile.name = "Ad min"
|
||||||
|
admin.profile.description = 'I can administer the admin rights'
|
||||||
|
admin.profile.save()
|
||||||
email = EmailAddress.objects.create(
|
email = EmailAddress.objects.create(
|
||||||
user=admin,
|
user=admin,
|
||||||
email='admin@example.com',
|
email='admin@example.com',
|
||||||
|
|
Loading…
Reference in a new issue