Skip to content

Commit 9626151

Browse files
5 - Reload the Database with Fixtures
1 parent 968ec05 commit 9626151

File tree

9 files changed

+83
-83
lines changed

9 files changed

+83
-83
lines changed

notes/checkout_process.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,9 @@
1818
- Connecting the Billing Profile
1919
- Shipping / Billing Address
2020
- Cart
21-
- Status -- Shipped? Cancelled?
21+
- Status -- Shipped? Cancelled?
22+
23+
24+
25+
4. Backup Fixtures
26+
python manage.py dumpdata products --format json --indent 4 > products/fixtures/products.json

src/accounts/migrations/0001_initial.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Generated by Django 1.11.4 on 2017-09-28 22:10
2+
# Generated by Django 1.11.4 on 2017-10-09 21:27
33
from __future__ import unicode_literals
44

55
from django.db import migrations, models
@@ -13,6 +13,22 @@ class Migration(migrations.Migration):
1313
]
1414

1515
operations = [
16+
migrations.CreateModel(
17+
name='User',
18+
fields=[
19+
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
20+
('password', models.CharField(max_length=128, verbose_name='password')),
21+
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
22+
('email', models.EmailField(max_length=255, unique=True)),
23+
('active', models.BooleanField(default=True)),
24+
('staff', models.BooleanField(default=False)),
25+
('admin', models.BooleanField(default=False)),
26+
('timestamp', models.DateTimeField(auto_now_add=True)),
27+
],
28+
options={
29+
'abstract': False,
30+
},
31+
),
1632
migrations.CreateModel(
1733
name='GuestEmail',
1834
fields=[

src/accounts/migrations/0002_customuser.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/accounts/migrations/0003_auto_20171009_2046.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/accounts/migrations/0004_auto_20171009_2050.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/db.sqlite3

-56 KB
Binary file not shown.

src/db2.sqlite3

268 KB
Binary file not shown.

src/ecommerce/settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
'tags',
5050
]
5151

52+
AUTH_USER_MODEL = 'accounts.User' #changes the built-in user model to ours
53+
5254
MIDDLEWARE = [
5355
'django.middleware.security.SecurityMiddleware',
5456
'django.contrib.sessions.middleware.SessionMiddleware',

src/products/fixtures/products.json

Lines changed: 58 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)