From 92c5a75ff7fecfabd249a5176aa8a550305fd66f Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Fri, 1 Apr 2016 10:43:20 -0600 Subject: [PATCH 001/172] Whoops don't need this right now. --- bikeshop_project/registration/views.py | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 bikeshop_project/registration/views.py diff --git a/bikeshop_project/registration/views.py b/bikeshop_project/registration/views.py deleted file mode 100644 index 91ea44a..0000000 --- a/bikeshop_project/registration/views.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.shortcuts import render - -# Create your views here. From 537dc18f4192052b28224f4287815553df1f7479 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Fri, 1 Apr 2016 10:43:46 -0600 Subject: [PATCH 002/172] Core URLs at the end to hoover up everything. --- bikeshop_project/bikeshop/urls.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bikeshop_project/bikeshop/urls.py b/bikeshop_project/bikeshop/urls.py index 40df174..08781c7 100644 --- a/bikeshop_project/bikeshop/urls.py +++ b/bikeshop_project/bikeshop/urls.py @@ -15,9 +15,11 @@ Including another URLconf """ from django.conf.urls import include, url from django.contrib import admin +from registration import urls as auth_urls from core import urls as core_urls urlpatterns = [ - url('^', include(core_urls)), + url('^', include(auth_urls)), url(r'^admin/', admin.site.urls), + url('^', include(core_urls)), ] From 8c4e533232e30cec8a33f6fb60c3297b58746554 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Fri, 1 Apr 2016 10:44:10 -0600 Subject: [PATCH 003/172] Start of a login form. --- .../registration/templates/login.html | 31 +++++++++++++++++++ bikeshop_project/registration/urls.py | 6 ++++ 2 files changed, 37 insertions(+) create mode 100644 bikeshop_project/registration/templates/login.html create mode 100644 bikeshop_project/registration/urls.py diff --git a/bikeshop_project/registration/templates/login.html b/bikeshop_project/registration/templates/login.html new file mode 100644 index 0000000..e12d229 --- /dev/null +++ b/bikeshop_project/registration/templates/login.html @@ -0,0 +1,31 @@ +{% extends 'base.html' %} + +{% block content %} +
+

Welcome

+
+
+ + +
+
+ +
+
+ + + Input is not a number! +
+
+ +
+ +
+
+{% endblock %} \ No newline at end of file diff --git a/bikeshop_project/registration/urls.py b/bikeshop_project/registration/urls.py new file mode 100644 index 0000000..a96e173 --- /dev/null +++ b/bikeshop_project/registration/urls.py @@ -0,0 +1,6 @@ +from django.conf.urls import url +from django.contrib.auth import views + +urlpatterns = [ + url(r'^login/$', views.login, {'template_name': 'login.html'}), +] From b19c2f7073c35518eed7111e3d8c75a40d327f51 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 3 Apr 2016 19:38:12 -0600 Subject: [PATCH 004/172] Display debug toolbar. --- bikeshop_project/bikeshop/settings/development.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bikeshop_project/bikeshop/settings/development.py b/bikeshop_project/bikeshop/settings/development.py index e604225..67b48e7 100644 --- a/bikeshop_project/bikeshop/settings/development.py +++ b/bikeshop_project/bikeshop/settings/development.py @@ -45,3 +45,12 @@ LOGGING = { } }, } + +INSTALLED_APPS += [ + 'debug_toolbar' +] + +# Don't worry about IP addresses, just show the toolbar. +DEBUG_TOOLBAR_CONFIG = { + 'SHOW_TOOLBAR_CALLBACK': lambda *args: True +} From 49e98929b06a0688e972875240817ec6c3b4020b Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 3 Apr 2016 19:38:47 -0600 Subject: [PATCH 005/172] Keep track of email consent. --- .../migrations/0002_member_email_consent.py | 20 +++++++++++++++++++ bikeshop_project/registration/models.py | 1 + 2 files changed, 21 insertions(+) create mode 100644 bikeshop_project/registration/migrations/0002_member_email_consent.py diff --git a/bikeshop_project/registration/migrations/0002_member_email_consent.py b/bikeshop_project/registration/migrations/0002_member_email_consent.py new file mode 100644 index 0000000..7f18d39 --- /dev/null +++ b/bikeshop_project/registration/migrations/0002_member_email_consent.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-03-27 04:50 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registration', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='member', + name='email_consent', + field=models.BooleanField(default=False), + ), + ] diff --git a/bikeshop_project/registration/models.py b/bikeshop_project/registration/models.py index 238634e..9d60ecb 100644 --- a/bikeshop_project/registration/models.py +++ b/bikeshop_project/registration/models.py @@ -44,6 +44,7 @@ class Member(AbstractBaseUser, PermissionsMixin): max_length=255, unique=True, ) + email_consent = models.BooleanField(default=False) first_name = models.CharField(max_length=255, null=False) last_name = models.CharField(max_length=255, null=False) preferred_name = models.CharField(max_length=255, null=True, blank=True) From d58421fa31d8a677a24b060f09fdeb0d3c166ef4 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 3 Apr 2016 19:39:31 -0600 Subject: [PATCH 006/172] Don't allow fields to be blank. This is totes essential information for the BCBC. --- .../migrations/0003_auto_20160327_0620.py | 25 +++++++++++++++++++ bikeshop_project/registration/models.py | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 bikeshop_project/registration/migrations/0003_auto_20160327_0620.py diff --git a/bikeshop_project/registration/migrations/0003_auto_20160327_0620.py b/bikeshop_project/registration/migrations/0003_auto_20160327_0620.py new file mode 100644 index 0000000..de51319 --- /dev/null +++ b/bikeshop_project/registration/migrations/0003_auto_20160327_0620.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.9.4 on 2016-03-27 06:20 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('registration', '0002_member_email_consent'), + ] + + operations = [ + migrations.AlterField( + model_name='member', + name='date_of_birth', + field=models.DateField(null=True), + ), + migrations.AlterField( + model_name='member', + name='post_code', + field=models.CharField(max_length=20, null=True), + ), + ] diff --git a/bikeshop_project/registration/models.py b/bikeshop_project/registration/models.py index 9d60ecb..a7110e8 100644 --- a/bikeshop_project/registration/models.py +++ b/bikeshop_project/registration/models.py @@ -48,14 +48,14 @@ class Member(AbstractBaseUser, PermissionsMixin): first_name = models.CharField(max_length=255, null=False) last_name = models.CharField(max_length=255, null=False) preferred_name = models.CharField(max_length=255, null=True, blank=True) - date_of_birth = models.DateField(null=True, blank=True) + date_of_birth = models.DateField(null=True, blank=False) guardian_name = models.CharField(max_length=255, null=True, blank=True) phone = models.CharField(max_length=20, null=True, blank=True) street = models.CharField(max_length=255, null=True, blank=True) city = models.CharField(max_length=255, null=True, blank=True) province = models.CharField(max_length=255, null=True, blank=True) country = models.CharField(max_length=255, null=True, blank=True) - post_code = models.CharField(max_length=20, null=True, blank=True) + post_code = models.CharField(max_length=20, null=True, blank=False) self_identification = models.CharField(max_length=255, null=True, blank=True) gender = models.CharField(max_length=255, null=True, blank=True) involvement = models.CharField(max_length=255, null=True, blank=True) From 81627e414e1d2052f0d2cccb52112f76b85f35cd Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 3 Apr 2016 19:40:16 -0600 Subject: [PATCH 007/172] Use dashboard view. --- bikeshop_project/core/templates/dashboard.html | 1 + bikeshop_project/core/urls.py | 2 +- bikeshop_project/core/views.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 bikeshop_project/core/templates/dashboard.html diff --git a/bikeshop_project/core/templates/dashboard.html b/bikeshop_project/core/templates/dashboard.html new file mode 100644 index 0000000..838aa18 --- /dev/null +++ b/bikeshop_project/core/templates/dashboard.html @@ -0,0 +1 @@ +{% extends 'base.html' %} \ No newline at end of file diff --git a/bikeshop_project/core/urls.py b/bikeshop_project/core/urls.py index 3e4e780..f7687bd 100644 --- a/bikeshop_project/core/urls.py +++ b/bikeshop_project/core/urls.py @@ -2,5 +2,5 @@ from django.conf.urls import url from .views import DashboardView urlpatterns = [ - url(r'^', DashboardView.as_view()), + url(r'^$', DashboardView.as_view()), ] diff --git a/bikeshop_project/core/views.py b/bikeshop_project/core/views.py index a9d0b98..aa475e1 100644 --- a/bikeshop_project/core/views.py +++ b/bikeshop_project/core/views.py @@ -4,4 +4,4 @@ from django.views.generic import View class DashboardView(View): def get(self, request): - return TemplateResponse(request, 'base.html') \ No newline at end of file + return TemplateResponse(request, 'dashboard.html') \ No newline at end of file From f8fee04cfa832c03644e55a661185b654092d2f0 Mon Sep 17 00:00:00 2001 From: Drew Larson Date: Sun, 3 Apr 2016 19:40:39 -0600 Subject: [PATCH 008/172] Add some blocks to override. --- bikeshop_project/core/templates/base.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bikeshop_project/core/templates/base.html b/bikeshop_project/core/templates/base.html index c203579..26a9c46 100644 --- a/bikeshop_project/core/templates/base.html +++ b/bikeshop_project/core/templates/base.html @@ -50,6 +50,7 @@ {% compress css %} {% endcompress %} + {% block styles %}{% endblock %}