Skip to content

Commit

Permalink
5 - Reload the Database with Fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
codingforentrepreneurs committed Oct 9, 2017
1 parent 968ec05 commit 9626151
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 83 deletions.
7 changes: 6 additions & 1 deletion notes/checkout_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@
- Connecting the Billing Profile
- Shipping / Billing Address
- Cart
- Status -- Shipped? Cancelled?
- Status -- Shipped? Cancelled?



4. Backup Fixtures
python manage.py dumpdata products --format json --indent 4 > products/fixtures/products.json
18 changes: 17 additions & 1 deletion src/accounts/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-28 22:10
# Generated by Django 1.11.4 on 2017-10-09 21:27
from __future__ import unicode_literals

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

operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('email', models.EmailField(max_length=255, unique=True)),
('active', models.BooleanField(default=True)),
('staff', models.BooleanField(default=False)),
('admin', models.BooleanField(default=False)),
('timestamp', models.DateTimeField(auto_now_add=True)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='GuestEmail',
fields=[
Expand Down
26 changes: 0 additions & 26 deletions src/accounts/migrations/0002_customuser.py

This file was deleted.

19 changes: 0 additions & 19 deletions src/accounts/migrations/0003_auto_20171009_2046.py

This file was deleted.

36 changes: 0 additions & 36 deletions src/accounts/migrations/0004_auto_20171009_2050.py

This file was deleted.

Binary file modified src/db.sqlite3
Binary file not shown.
Binary file added src/db2.sqlite3
Binary file not shown.
2 changes: 2 additions & 0 deletions src/ecommerce/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
'tags',
]

AUTH_USER_MODEL = 'accounts.User' #changes the built-in user model to ours

MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
Expand Down
58 changes: 58 additions & 0 deletions src/products/fixtures/products.json

Large diffs are not rendered by default.

0 comments on commit 9626151

Please sign in to comment.