From c16af75667e6bf57fc04f1c32e134a8a8ce9f4f1 Mon Sep 17 00:00:00 2001 From: Tait Hoyem Date: Fri, 30 Oct 2020 19:27:02 +0000 Subject: [PATCH] Add user model, navbar, auth endpoints --- core/__pycache__/models.cpython-38.pyc | Bin 710 -> 902 bytes core/__pycache__/urls.cpython-38.pyc | Bin 297 -> 355 bytes core/migrations/0002_quoteuser.py | 31 ++++++++++++++++++ .../__pycache__/0002_quoteuser.cpython-38.pyc | Bin 0 -> 1011 bytes core/models.py | 6 +++- core/templates/registration/login.html | 9 +++++ core/urls.py | 5 +-- 7 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 core/migrations/0002_quoteuser.py create mode 100644 core/migrations/__pycache__/0002_quoteuser.cpython-38.pyc create mode 100644 core/templates/registration/login.html diff --git a/core/__pycache__/models.cpython-38.pyc b/core/__pycache__/models.cpython-38.pyc index c605c17086cfc18c98f3cfeb48c7653ddb86ecf5..80bf91d64954fe7bc595da16c67c5fc22753f37a 100644 GIT binary patch delta 451 zcmZuty-ve05cWAv;#LWivLUgtWXa5c5ED#PLRA?eA=JhO8s$fFlDPwjy~^4bfCu3n z$Q$qyh&uxkm9XW{_uZZE?(>`b?1!^395P(XbaVT;4iD8i62%ncETNm{Q1FBU*-q{h zA`!qYm=el;V#?J#b03|=LyxC?^!QpJ_Z3W8BtNL~B!b>6Dy8!pEitRLS!eGf>Po!U z`P~aMK{thK2)kFffng{4@oEPXOt1|hQGwv$sVOKS_}$z_Qgm)DKz4@5rfZgfVhOkN z@qTdCR*j~SCXr)yG0Thy_843J-+Uj#W2(jxBpBk6>_t{rWj|2ayu7bswJ;R!4}N%B wm5o_0;(6OV#NS_G97=F6>0j*Jw$dNHM^-us?&S%-X>)x_Qfi4{RXgM03(BlissI20 delta 239 zcmZo;KgP-%%FD~e00hzERq-1q^2$1B0XZoQDU3M`Q6QQrhcTBaiiwfIogsxeg{6fd zg(a0Ki@BLOiY0|Hm_d{EB}liQCgUx(-29Z(oZ^XnHw8F>LO>Cg;?$h9l?+APlgk;y z7lL8=zB4b5iXXK_;<4OkxHAy@)CH diff --git a/core/__pycache__/urls.cpython-38.pyc b/core/__pycache__/urls.cpython-38.pyc index 42a794a6d3799d107a2ffaf595fe1787e653923a..34ac955c18e060be9dbecb749dec69755fb3665f 100644 GIT binary patch delta 221 zcmXYpEe^s!5Jq=qw?EL9ATb18(<5*M3_-96QkbSt`a_o1V9|(rE`a0?oT3)RB?!BO z5ij%dlJAZ$3>HDqXZk9-tsiYLmQyXn2y#|{gaRc3BP5>lLP!BD0TPMGEV9VH@}D6& z7r0=G(k6G#!rt2~hS-T?T<6+0wLD*@K`n_=*FU zbGf`Xn^>|>k`Ua<;d$)FWb?>eARug@#T*fc5pP(_bB>^pgyOXzNx_Skm`hshAYIOW zAw?^?VmQtC5As^6TW`V2N|U;Kt&3J|)4)bl7rH!W7t{2Hxw?@a!eMO!M;kfi#s+0{ TKY{TtnsEFaLT_V?`Re-vhIuY^ diff --git a/core/migrations/0002_quoteuser.py b/core/migrations/0002_quoteuser.py new file mode 100644 index 0000000..11478c0 --- /dev/null +++ b/core/migrations/0002_quoteuser.py @@ -0,0 +1,31 @@ +# Generated by Django 3.1.2 on 2020-10-30 19:07 + +import django.contrib.auth.models +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ('core', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='QuoteUser', + fields=[ + ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.user')), + ], + options={ + 'verbose_name': 'user', + 'verbose_name_plural': 'users', + 'abstract': False, + }, + bases=('auth.user',), + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + ] diff --git a/core/migrations/__pycache__/0002_quoteuser.cpython-38.pyc b/core/migrations/__pycache__/0002_quoteuser.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..896effc9299b8dd591be13c03c54f3e329f34a4a GIT binary patch literal 1011 zcmYjQOHb866mF-F+ujF|xY89daZwX)k%cQ`ARw;57+}+wOs1W4FD-pBGgrjKm2UY5 zEOhC{A2eH6{s1>5if397rkT@zbIzQ{cTSHclc9y{6ThTC9LxG?!2RVS*u*WLqu>^| zODnPQO-fQZiBq|WYxn0~V!yVy!`&|ycfl$A&rafV`@o94UwGHrkBA;t`CKrSH?`D$ z)o>_fW_0)02*D<9nWBI$T0*$Z$($q(xP@n8fL{!_2SE`QelaXY+{4G`10G!XGcvb% z$cKnWmkuBE3EGW|N#TE8`et?7r3-IvC(C>pvs=;O-fdQxqRSTQIC-+Z{%nJ?Qh}fg ziDH%usc6kApcVT-OQ`4S*qCRH06ktudz#m|%2}zyw~I!>5nj_lcez#KaQ7-So~Py@ z^7R-&Lo)$P0oP$uQzQcv=uyiA)QXmQeS$#b6%*(51kQDcH_?6m5j0Vac8w?P87U)2 zkKcnx8wp*G`oVof+j1c=uYjde36`nI7N+ZZ(4+-qN=BY`O=;Sn4KFVLx?!EP;;oW9Hby7*l4>ecF%NO;HX)8 z@}`Ev2F0$4s(oItdfsTlQyp|{;GF2e_SV7n*3K(E$eLP-JQZH&?Fj4M>$B3sriGia z`fiB`^_{qS7aunj#EOYoywhZh3W=3*h8e^X%GuhP$d!URK7(}46w2dM)48>l&(KOh zd^fH!c6b9TM73dj+MWyZYXrFEs`+q;P5!#RYZJ11OJhtuA6ddpAe_papr>#1=Ryy$!L(r_((lcT+2 G2hKl#L^8tw literal 0 HcmV?d00001 diff --git a/core/models.py b/core/models.py index e436d81..01e244d 100644 --- a/core/models.py +++ b/core/models.py @@ -1,5 +1,6 @@ import json from django.db import models +from django.contrib.auth.models import User # Create your models here. class CalgaryAddress(models.Model): @@ -12,4 +13,7 @@ class CalgaryAddress(models.Model): def toDict(self): return { 'address': self.address - } \ No newline at end of file + } + +class QuoteUser(User): + pass \ No newline at end of file diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html new file mode 100644 index 0000000..a16bc92 --- /dev/null +++ b/core/templates/registration/login.html @@ -0,0 +1,9 @@ +{% extends 'common/master.html' %} +{% block body %} +

Login

+
+ {% csrf_token %} + {{ form.as_p }} + +
+{% endblock %} \ No newline at end of file diff --git a/core/urls.py b/core/urls.py index b4c9357..f428f42 100644 --- a/core/urls.py +++ b/core/urls.py @@ -1,6 +1,7 @@ -from django.urls import path +from django.urls import path, include from . import views urlpatterns = [ - path('', views.index, name='index') + path('', views.index, name='index'), + path('', include('django.contrib.auth.urls')), ]