From 6f21d19bbd381c81a717653fa7de6180ca26c06e Mon Sep 17 00:00:00 2001 From: keannu125 Date: Fri, 24 Feb 2023 16:27:14 +0800 Subject: [PATCH 01/12] Reset database --- project/db.sqlite3 | Bin 139264 -> 135168 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/project/db.sqlite3 b/project/db.sqlite3 index d1819e5ee2b81a8c6cf69afa9b1849ea746ffbe6..e3d2f6acd84bc7d4c4d9eea803376dab00a86705 100644 GIT binary patch delta 1048 zcmZ8gO-vI(7~QYCWy`i@3Ja;BEu|s~8f1UFJ5>@OYD_d@Vxn?_0=0lZk%C-|DdMB7>klX+bM5#Q?#qUXJGx)Sl$y%o0wb=R_2>muw`U1*j$ zPJAdaGU(#y;6^!;j18Fwjo+yL33zE*2J+a&m$AH!u5)ztMhD`Fww#@|zC?Pp-Y=w? z71jf6x;XU}O&zu0%6iOuI_m^354x9SQd>D@hCKj-_%=%CENV7I$LJ(0H|PtmGn=xj%LhVJ|{b!OI+dlk1;;x;aQ`p5hgPe zhv6(=Z(^m?DGK!#4Z82UR=JPd-om?%w~ms6&t|)R+Yfqz&f1>9H);(YP^YG*!t_|F zVtj9h1_&8S6i$LkWlqJU$%l=!**Mr$XinQSNQV3`Z&eQf4SFZ9z!<36*;=R;7GIdBlJfteSq Z{BD_^WNtHA@Z@66I9K2&GMB%Ce*gjW8mIsO delta 3144 zcmai0du$ZP8Q-}*-^;!mgK;ik8=nm+9LDFFeeV`j*5<&*J{vzcj4NcX@7DI2d*OQ- zqUbP*@<&J`$f}&wf6^pXo&FK2iB+sBRcl3UQ#Dc(D$<8SnutmzZCXWY)S{}5)Y&x; zpF`8V-Jf(bzu!0CeDlqGbK%>r3u~^+P2Q6fMYZ4kz?HosIQiPt3lKCtU*A!4ymqJO z)(WaGcx+#7G;Z$L*T4oar?8B|3L#DsWgaWrjO|Uq7ShftoSNSQ3yd8qaQO6K{?@+ z9sU_k!8c$LUV`6(ufYD5wg3yu@D-{Nr1jF|q_waXI=9*AP7t5h(zBUK%ZbTkW)?Qs z=?|BO*55)-U+{V9Ht@jiBP4bFG|k>K z9m}MRx9i-EPLizKT$`L&`M9eYIRG4{;P6TtItt56`+=8QI;gt+-k{s9db87K;xo)- zZcbx(VK*xy^6b{+xol*3C=)$9o$rkn^w`LFJaK;ad|$q6_82=Y2(dmnbq*DZ?65W< zCP#XPV$-pL78CkMW*8)dld}gI#IT)+>10SK1qDgw)(|-P0E;;*7#18#X^CVgmPu`7 zvkEIKJR6b(MijA!Obfs}6nUL1Tc$pNZWrx$Tk6*@*y|m@_dex&pDe?5U-@D?sEIr| zs?MKF&1i8hb%smg(tJwHF3uM-vOZhT7mC?@u^7^iEk@_V;h|DO9Ujpqdzh@+6DdVw zg<>o+(btoWs_0BMiY7#XA1ve#=Vv-6ta)u>nmgO2zK;1r{Bh8($Fc$jA)Ns`}xHFdiN1Svc3-cet-~ zY&3d)k&ox|;fYAUdbGrynu}kjk{+cUXdw~80cx&}5 zhro+q_4Yh?$M)Lw{kGLNj{qLnsN=@JoCB-bG`I{_-|GWopy3gJTN_w9lh>w``rY)e z{2&E>MAtVsE9xO|dG*o&C^lgFCFpKD+{Xsh_A!I>RozvT6FzCDoF7xRI^p|QZ=iGhLO z(l%U4Oo4+SP+6V={T&_P;#n&qoA&aizimAuVRbAV7*o3k!h!Zpy@p!HSK`wk;$0fQYjk#L zkgNPt1A+BOyb3%k;3FEfL%2-Af5U&kPs!o-NB9B!ExZojhChQpfj@*R@Kv}>l4J>% zYiIzR&_bVuUJL6ithLZ%q1!^2g-#0{7S>p3w~)5bW~YJMY33t@*C_ZOcnAI+{tbRi z-1r0hJ-h+mfxje6zsGcKofi>culA?q1FVC32qZyCOA!Sm|*<%!$+6x zYoNXzdiPTBr|>G&p#*DvANpSQm3#xf9o|p9KlVQBo$&4@M~Tf_M$k=dX$4;3Rx!>e z@=2W(>^$w9IqR_BXEP=n-(zniv*tBU61gs#knbjtmW$`KIKj;VBr7a$1qe&~ZA7r$@&yl` zCPjX;eR56Y6^2|S86*mv0!+HQ!%WaYi~aS-+qHOHkGCs<$DerObXBSnEo)vSSy|wD z?%GGdteo%`1#gjU^*gw~g;w4FyI^?D1FfEH(r=KTM(z<&Sms;RUF$hQ`kwDnTjN@K zPcAU6>oa;h5X&s2i9OO)B44gcZF^Yv{hTEiWKrR;=^hf08C!GZ0;XOJsx9j&aBuM~ zKZEzL7DUM~Ay(utZ>^!JBs%LMXUO--1fPQ0eT{zA>@h#4dJ|(=VelSj4b|94D2s%$ kn6GA#TO}`tFwe6L_n4!GYG_c2kL3LVjUl Date: Sat, 25 Feb 2023 16:48:43 +0800 Subject: [PATCH 02/12] Allow showing of note timestamp in api --- project/db.sqlite3 | Bin 135168 -> 151552 bytes .../notes/migrations/0004_historicalnote.py | 39 ++++++++++++++++++ .../migrations/0005_delete_historicalnote.py | 16 +++++++ project/notes/serializers.py | 2 +- 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 project/notes/migrations/0004_historicalnote.py create mode 100644 project/notes/migrations/0005_delete_historicalnote.py diff --git a/project/db.sqlite3 b/project/db.sqlite3 index e3d2f6acd84bc7d4c4d9eea803376dab00a86705..d7142be08d032fbd2abab8b2879eceac8d534238 100644 GIT binary patch delta 1458 zcmb7^Pi)&%9LL{_lP2-ny^cU#D1Th9VGB)LCywhRnqUSpX;PLJ$h2LUYsaqR&a*4W zYbioXdw>JIw6dm1NQg2a1md(skOLgHY0`E>{OJV=iQB}V!z3go4hWvtW=TDo^!lTWjGj-AZ0Jey0sZm6=Q9jVdFva2~b@!4_l)mLQQkyV>6 z%ci_6TYJ?h|3D_W43{86ASRAfwQ9EmpO3L@J|#?Mr-c;D;$wCVOTW4m++q;C1<=^R zucO<2HwKpb-|l-jbS8M|z`f{mk-~vv#BF%1_4IN0K5X4tfL{i#e3cBeZk&KT41ihh z_i(YbXu%EG+CB-(Fg8Suj>5I`uB@1ve9^5+y3_dd0{ns)jD;KGak$Z1FT$l*io635 zmr*4MJxFs1WwO*Sl5du``R_7=@!tg3*DGnSIc686EIwZ>{PVrx476hChULckJ2ZkXIrfZ;u=A%5eA`R<&!OQk5-TlN?R1*%m`D$qt@zj^f5lv=g*l z-IYbH%LA`>Alg2DWj81jKIz>hL*8QenLvVU!XN&e`S2Q?y}UYj`7XUV8y+BVBaLA@ LjE%wnq+ifqO4ZER delta 320 zcmZozz}c{XV}i7xG6MsHA`ruX<3t@}M&*qO^Z7Z1d4YnWTuUdj3utdvR4C@!yi_Wd zRcr+VJAXO@|4aTW{JZ(n`MddN@z?NYY*sYz=bxOeFUrcx!>q_LxlvzT0;pY>BeAq3 zBfcQDC^xgXI5S_Inc0|e@_e;yr9dp{g4}@DI*i(gUvtL zb(y(bRm9UT}aZ147AEE5(4iit3!G4N;c z74UB5dBOF3I!6Md+{B4y+tU&l8@aY0cVs-zG~L#larbsN55|5*My}0_5B~cvJHQwK E0F-1~3;+NC diff --git a/project/notes/migrations/0004_historicalnote.py b/project/notes/migrations/0004_historicalnote.py new file mode 100644 index 0000000..a18a794 --- /dev/null +++ b/project/notes/migrations/0004_historicalnote.py @@ -0,0 +1,39 @@ +# Generated by Django 4.1.7 on 2023-02-24 08:29 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion +import django.utils.timezone +import simple_history.models + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('notes', '0003_alter_note_content'), + ] + + operations = [ + migrations.CreateModel( + name='HistoricalNote', + fields=[ + ('id', models.BigIntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('title', models.CharField(max_length=20)), + ('content', models.CharField(max_length=1024)), + ('date_created', models.DateTimeField(default=django.utils.timezone.now, editable=False)), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_change_reason', models.CharField(max_length=100, null=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ], + options={ + 'verbose_name': 'historical note', + 'verbose_name_plural': 'historical notes', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), + }, + bases=(simple_history.models.HistoricalChanges, models.Model), + ), + ] diff --git a/project/notes/migrations/0005_delete_historicalnote.py b/project/notes/migrations/0005_delete_historicalnote.py new file mode 100644 index 0000000..832316c --- /dev/null +++ b/project/notes/migrations/0005_delete_historicalnote.py @@ -0,0 +1,16 @@ +# Generated by Django 4.1.7 on 2023-02-24 08:53 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('notes', '0004_historicalnote'), + ] + + operations = [ + migrations.DeleteModel( + name='HistoricalNote', + ), + ] diff --git a/project/notes/serializers.py b/project/notes/serializers.py index f07403d..c4c74cd 100644 --- a/project/notes/serializers.py +++ b/project/notes/serializers.py @@ -5,4 +5,4 @@ from .models import Note class NoteSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Note - fields = ('id', 'title', 'content') + fields = ('id', 'title', 'content', 'date_created') From 4ad3bedb18744150ab943fdd6a870c9d6a7a772d Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sat, 25 Feb 2023 17:57:38 +0800 Subject: [PATCH 03/12] Added djoser --- project/accounts/__init__.py | 0 project/accounts/admin.py | 3 +++ project/accounts/apps.py | 6 ++++++ project/accounts/migrations/__init__.py | 0 project/accounts/models.py | 3 +++ project/accounts/tests.py | 3 +++ project/accounts/urls.py | 5 +++++ project/accounts/views.py | 3 +++ project/api/urls.py | 3 ++- project/config/settings.py | 3 ++- project/config/urls.py | 2 +- project/db.sqlite3 | Bin 151552 -> 151552 bytes 12 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 project/accounts/__init__.py create mode 100644 project/accounts/admin.py create mode 100644 project/accounts/apps.py create mode 100644 project/accounts/migrations/__init__.py create mode 100644 project/accounts/models.py create mode 100644 project/accounts/tests.py create mode 100644 project/accounts/urls.py create mode 100644 project/accounts/views.py diff --git a/project/accounts/__init__.py b/project/accounts/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/project/accounts/admin.py b/project/accounts/admin.py new file mode 100644 index 0000000..ea5d68b --- /dev/null +++ b/project/accounts/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/project/accounts/apps.py b/project/accounts/apps.py new file mode 100644 index 0000000..d69d316 --- /dev/null +++ b/project/accounts/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AccountsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'accounts' diff --git a/project/accounts/migrations/__init__.py b/project/accounts/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/project/accounts/models.py b/project/accounts/models.py new file mode 100644 index 0000000..fd18c6e --- /dev/null +++ b/project/accounts/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/project/accounts/tests.py b/project/accounts/tests.py new file mode 100644 index 0000000..de8bdc0 --- /dev/null +++ b/project/accounts/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/project/accounts/urls.py b/project/accounts/urls.py new file mode 100644 index 0000000..06cf4c6 --- /dev/null +++ b/project/accounts/urls.py @@ -0,0 +1,5 @@ +from django.urls import path, include + +urlpatterns = [ + path('accounts/', include('djoser.urls')), +] diff --git a/project/accounts/views.py b/project/accounts/views.py new file mode 100644 index 0000000..c60c790 --- /dev/null +++ b/project/accounts/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/project/api/urls.py b/project/api/urls.py index d2e4445..d608648 100644 --- a/project/api/urls.py +++ b/project/api/urls.py @@ -2,5 +2,6 @@ from django.contrib import admin from django.urls import path, include urlpatterns = [ - path('api/v1/', include('notes.urls')) + path('', include('notes.urls')), + path('accounts/', include('djoser.urls')), ] diff --git a/project/config/settings.py b/project/config/settings.py index 89b8d9f..2e6be28 100644 --- a/project/config/settings.py +++ b/project/config/settings.py @@ -39,7 +39,8 @@ INSTALLED_APPS = [ 'django.contrib.staticfiles', 'rest_framework', 'notes.apps.NotesConfig', - 'corsheaders' + 'corsheaders', + 'djoser' ] MIDDLEWARE = [ diff --git a/project/config/urls.py b/project/config/urls.py index 87dbb51..e84cc21 100644 --- a/project/config/urls.py +++ b/project/config/urls.py @@ -18,5 +18,5 @@ from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), - path('', include('api.urls')) + path('api/v1/', include('api.urls')) ] diff --git a/project/db.sqlite3 b/project/db.sqlite3 index d7142be08d032fbd2abab8b2879eceac8d534238..677836587f1c8d8601cac6a9602585823dfad80c 100644 GIT binary patch delta 671 zcmaiy%Wm3W5QXiMmN*izy2_##r7cnymBIdfM@oeufC(`+;TF6h#^4KJFc<>P29mx& z^8}6h1Zk1l$Eeg*rDjoO+Xtw+tCegbRaHkvvznvPd}o#y$npYt`v{JoKTgB(4@a-# zFtU0V@8Az$RDn=s^=vzfE>1Bx0-f#%$X4VPf(Q|})oUA|=~)_}nJCHQK}F{s%5o~Z z-CD)bwN&kZFImC~9yM@DqbiJIlCqNlcwMZ=DZ4i=#Pc*c0zB83y|TWao7&=|ktQae|MLfC4nV0YMOq{(=I9R}YVV zqR4t^3%Rj>T&``e!<*lsKpVk%Up5zK&*A&ho3cP#mdE;>H83fH_2-mn9~*O%AIw~P z+?x)2vCiJS)|EVYW(%bQ1ItdznYL)=r=;N()tqKlyY*6ERQpZQXt~01n;a;z(U|5L zV&4YGlJ5GYso+)Iwy*S5hGNSC=JEbQqltRGQ6UK!o;lRU>71%`R0h|ZvILm4ne}TgO;)RPRX4w@xAOU0s3b-ZcQfEvz@J@yx`fw~ x!Dn1S=v9FAD;j$dl92ylyA9(SLazhQH}vU~kbwMq%ljYrxf1>yPTu>C{sFn$$b Date: Sat, 25 Feb 2023 18:00:08 +0800 Subject: [PATCH 04/12] Added email confirmation redirect to mailtrap --- project/config/settings.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/project/config/settings.py b/project/config/settings.py index 2e6be28..a554405 100644 --- a/project/config/settings.py +++ b/project/config/settings.py @@ -131,3 +131,14 @@ CORS_ALLOWED_ORIGINS = [ "http://localhost:3000", "http://localhost:8000", ] + +DJOSER = { + 'SEND_ACTIVATION_EMAIL': True, + 'SEND_CONFIRMATION_EMAIL': True, + 'ACTIVATION_URL': 'activation/{uid}/{token}', +} + +EMAIL_HOST = 'sandbox.smtp.mailtrap.io' +EMAIL_HOST_USER = '54ff6949e39105' +EMAIL_HOST_PASSWORD = 'c59d3eaa05f98d' +EMAIL_PORT = '2525' From fdc9381216c66e9b03f0e9e2b618a2b77586bd66 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sat, 25 Feb 2023 18:39:40 +0800 Subject: [PATCH 05/12] Registered test user --- project/config/settings.py | 2 +- project/db.sqlite3 | Bin 151552 -> 151552 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/project/config/settings.py b/project/config/settings.py index a554405..993734b 100644 --- a/project/config/settings.py +++ b/project/config/settings.py @@ -135,7 +135,7 @@ CORS_ALLOWED_ORIGINS = [ DJOSER = { 'SEND_ACTIVATION_EMAIL': True, 'SEND_CONFIRMATION_EMAIL': True, - 'ACTIVATION_URL': 'activation/{uid}/{token}', + 'ACTIVATION_URL': 'api/v1/accounts/users/activation/{uid}/{token}', } EMAIL_HOST = 'sandbox.smtp.mailtrap.io' diff --git a/project/db.sqlite3 b/project/db.sqlite3 index 677836587f1c8d8601cac6a9602585823dfad80c..c66d6bf8aa8eb82e959142ec686214881c0615f9 100644 GIT binary patch delta 361 zcmZozz}c{XbAmLZ(L@<%Mx%`hi{!;-F|hNeGxNXXzrw$pKb^muzlMJWf5v7-1AqR> z>H4Bdyj;xkjESWs8S$mXsYOh@oXm8TbSEc5hZx zSkK4XD8$6e&}hrRAlzs88ks5>8dw<^SQ(k<85tWJSr|3yGJ;&-$SKaN&B^IFIX-_W2NVBW2LA8- zZ#N4TJmlx%WEN)xo5r;Hdp)lL2ZI36Gq)MIfIhg$$Hb`Ge1F~c`|B809oaxK{C9x5 puJSXgOn>m7Q3WFO2q<)$pHXh}v-MH}i#{k!3}D~R?!feu9{{@FYGwcc delta 210 zcmZozz}c{XbAmLZ{zMsPM*WQmi{!;>7})vKnfYJxU*X@)pU&USKZ}0_f5v7-1AqR> z>H4Bd3=9nXoO$^rsm1Xil9!WNkt4CRBqKh(D8ICThl^Q$^E~}D12#tf00#bm&58e`f$9_RWF~ulYBBujf_ZVC1{a07P6sMd$fgnv@t>oA0mNet#XKsv}VQ z9R~h8n*|Fl@v|s1`*Kcy@SjlyDEf$j{}E9120x1|vm@u`XX~W|7JX2d7{I=r-GS*R FKLElbK^g!6 From fa5bd13ca0fbec93cf45a45986ff7fafda731ad4 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sat, 25 Feb 2023 19:00:29 +0800 Subject: [PATCH 06/12] Successfully verified test1 user from frontend url --- project/db.sqlite3 | Bin 151552 -> 151552 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/project/db.sqlite3 b/project/db.sqlite3 index c66d6bf8aa8eb82e959142ec686214881c0615f9..d86ab9cb34bc249dc059ca5cb64f9175b55da3e6 100644 GIT binary patch delta 287 zcmZozz}c{XbAmLZ9V<wRz{Y37RILL#)g|Okxz|L)wem=(KI8Y*u2srBQM>=(7dw3Bt5e%ts>nrue>0$D7!R2douI-EuKXl z=2qd(Ny!28%_>E?+cSy2U^F3Cxro<;^n#<~W^ zx`u`dNbayOH?nNnux$e)ivt_TCH!|b3l?1E*H$6q1TF?30BLvx)Nq?$S`N4QiyjzE N3}D~R?!feu9{@dJQw{(C From 41c77ae9eff29749e3637cb8c9bd10f8140e08e9 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sat, 25 Feb 2023 19:10:23 +0800 Subject: [PATCH 07/12] Added token auth --- project/accounts/urls.py | 3 ++- project/api/urls.py | 2 +- project/config/settings.py | 7 +++++++ project/db.sqlite3 | Bin 151552 -> 151552 bytes 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/project/accounts/urls.py b/project/accounts/urls.py index 06cf4c6..d27d046 100644 --- a/project/accounts/urls.py +++ b/project/accounts/urls.py @@ -1,5 +1,6 @@ from django.urls import path, include urlpatterns = [ - path('accounts/', include('djoser.urls')), + path('', include('djoser.urls')), + path('', include('djoser.urls.authtoken')), ] diff --git a/project/api/urls.py b/project/api/urls.py index d608648..845d143 100644 --- a/project/api/urls.py +++ b/project/api/urls.py @@ -3,5 +3,5 @@ from django.urls import path, include urlpatterns = [ path('', include('notes.urls')), - path('accounts/', include('djoser.urls')), + path('accounts/', include('accounts.urls')), ] diff --git a/project/config/settings.py b/project/config/settings.py index 993734b..e99db89 100644 --- a/project/config/settings.py +++ b/project/config/settings.py @@ -38,6 +38,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', + 'rest_framework.authtoken', 'notes.apps.NotesConfig', 'corsheaders', 'djoser' @@ -132,6 +133,12 @@ CORS_ALLOWED_ORIGINS = [ "http://localhost:8000", ] +REST_FRAMEWORK = { + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.TokenAuthentication', + ), +} + DJOSER = { 'SEND_ACTIVATION_EMAIL': True, 'SEND_CONFIRMATION_EMAIL': True, diff --git a/project/db.sqlite3 b/project/db.sqlite3 index d86ab9cb34bc249dc059ca5cb64f9175b55da3e6..b2a2ba9a97e1446c2a991e8385f53142dd204df4 100644 GIT binary patch delta 1486 zcma)+Pi)&%9LN1)H}Okwe`!Za32SX9DP2gjJljp;WK>P4q6uwk8tAkOQR=4I3QWl~ zmA{MBR$LgT4Qt8`+6lpl1F}#w0hfu>KpKZ$Kup`XAb~*Qf+p<%&vuojVFx1lm*n^R zyzl$I-}@z7J9ujcUwvkzz%b0z{)6cI$!jwjDtxi>39w<@HhsaA7ypgF#BHk>Ea1&- zc!&`bMdOW)^^Ml+jV2*Pt2v)8UTVGlj!IN5Nz|m8mJ}sVw7ilzp3@XU((_N#g(nUz zRBKeGRa1$QA*!0GDcRZVV+B;5knHR@6$nfnD44tA*hv3AbQhAfX2Rt$6f@hYvk04e zsl-^=PmhJ6%)p=U9sC5}z&ezzAUOfaaZZ#`?<@z$z(+VSG*IBp_Wb*7%zw-D6>`DA zw}G8NJMc;%7YO=)_205&>5_jl8XICzB97mDweeP8R~C$>WTzx&hv_JVQc1klxX{>W z3}9|@AB?zQecfoD9|YZ`3(7JDUbrcIDqI(~ zgmqy_$kQ(V_Qd8GhZ1P8hp`ZcQs}=;i@N!KOU@)lp5#y*;hqa8DF-}@$NFPG`veqUmq5>XFLM4Jy+yILYz0Nt#R{yb0K_q zoE4HM`f)W!(zkU;BoojV;H0q4LyGKnO(231udf>DDpfUhP=`We5597Dc{eQ|IUge&`u*kq4 z@FU!Yui<0(04~FMSfu@%g=7eGj41as9A#$?MtNEY9WHb)-$7RjUIbkRy4J|W&*9~h zh^rQnzN#5oPCHl6W{6^>4dt9_=$f)x&*swfD(fUYtCFm)KK8D4o#@14{{tb|V_=U8 l--b+rt>XVH>#lvoz@zR6@%#k>$0F>pn_$1Xe8KY&{sr7qpcw!F delta 438 zcmZozz}c{XbAq&>B?AM4DipH-X}5_w#*CI56PEBZi*xBrW*5-ktf=sfbF+?=zbK>3 z*GWthA&FJZHC z{=)=j8UEPG>=!`lW%)P9-e2Cp$UmJmfl-l-M->FO>m)Gl<^npJRdW05EXH}ve3|K) zc_j*d{vir}p*}v-6O$Mfr!Prjl%HOo#Hh-iky%`lUsO3=F`rRvvLBZWTwrb@qePsJ zf)Z3gd~!x&UV3VLQEFmwex8y-Sz-}Tq)5Ziz(5mhFp|=e%7RoR6+n5Y8nYVK|F#X^M00U=-kpKVy From 3623f407d4ef29b62e25758ec3f165a2bd47b802 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Sun, 26 Feb 2023 12:25:44 +0800 Subject: [PATCH 08/12] Added requirements.txt --- project/db.sqlite3 | Bin 151552 -> 151552 bytes project/requirements.txt | Bin 0 -> 1462 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 project/requirements.txt diff --git a/project/db.sqlite3 b/project/db.sqlite3 index b2a2ba9a97e1446c2a991e8385f53142dd204df4..da54cf3f54c750170c8e2b3d077aa606e4bfa021 100644 GIT binary patch delta 74 zcmV-Q0JZ;spb3DW36L8BRgoM+0adYJvThMJATTsKFgH3iG%hnXF*r9hvm35O1y|d+mqpYDsLCskwEk(QXz@n* zH_AsAGVq;ss9HY2K$lzak!^>6Oz)<{n%4wsDLTSB6L|+?t~j#I@fzw*_FyT%R%&#n z5!Z*L7mZLEYi!_or%tHA-_Gqs{n#vqnGHN2QEQG2W@pHv2fA_DHYs*^nA;-9a#zTq zmq@#lb$)C<&QCv={iaT;ojT&zn`$1s<^+9p+w;H72#mqY9*nK;+hV{~0?Gc+pY4}Z z%HW|u*PU~lZ3ZUJmNhd%U!f;Us1`bn*ykC79lHlxEeA}yl1F?`!P3`_b$d!gctUo% zsV|;~Du$>~0jJE#vU49gvA|^8NJT?dsyp--*ldmM4RA#e|5}qPeqbjTC zhPb}iS?pt{K->8)(2v9;L!S)&*=f479rm3&@d_pLXPq|xoSt>zH-?($on!ZT|JXU= zR=lgK?PKuTAbX7{?}y0q@LPq4?$1wP=<{FMb{4Hy++kK?C$E9O9L(;HVmIvuA&RqW raZ4qLw|H%~p-+sTuuI&=;khHy-45oNxExO=FJNZeHj>_XvdHxVpxWCy literal 0 HcmV?d00001 From 36635161dcb8a4cd4d61c5fa1823bdcf90301eeb Mon Sep 17 00:00:00 2001 From: keannu125 Date: Mon, 27 Feb 2023 00:27:26 +0800 Subject: [PATCH 09/12] Activation now points to localhost:3000 --- project/config/settings.py | 5 ++++- project/db.sqlite3 | Bin 151552 -> 151552 bytes 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/project/config/settings.py b/project/config/settings.py index e99db89..3a92483 100644 --- a/project/config/settings.py +++ b/project/config/settings.py @@ -139,10 +139,13 @@ REST_FRAMEWORK = { ), } +DOMAIN = 'localhost:3000' +SITE_NAME = 'localhost:3000' + DJOSER = { 'SEND_ACTIVATION_EMAIL': True, 'SEND_CONFIRMATION_EMAIL': True, - 'ACTIVATION_URL': 'api/v1/accounts/users/activation/{uid}/{token}', + 'ACTIVATION_URL': 'activation/{uid}/{token}', } EMAIL_HOST = 'sandbox.smtp.mailtrap.io' diff --git a/project/db.sqlite3 b/project/db.sqlite3 index da54cf3f54c750170c8e2b3d077aa606e4bfa021..4899fabe5a00ecd9fb38b089da6f92cac520d4b0 100644 GIT binary patch delta 1249 zcma*mPi)&%90%|uPCJLTysd2Xz|e-sVPjqL{GR=6N2~rnKay7F@mQ3Zut+2UTM~rr8Gw zB77I3yNKLmNCJ@rhhr>*SyAZDUK$-v&&}MXBU0~c>-EF7tF_kTs#Wo}3!6Iy$FMVE zt{si<7W4Z3-IU|t99Pd(1mCfDY+p}x8fr0KDdgAKWzouz;*L2o@IwPX-T+|?B9Vuv zJ3IN0fj&2saviCn))iM>+AB5SV!oPT(sC5DilN18ZBwyDWEVbISNOfn9VK5-%lY8E^t}F~~!fWxBHyFB#Ysf1NjW%1+fT)jeHzp{EczYWarL z-du4NIi0Or@n&UTZ`Hh%R8AL?rmCeo4KXfCMb2i0Q4ieEz>PD&1jaGK^N7RU+3-sS z&0Wnjh|!UVo^)|mDKwXTe>Iw~q`i#nH}=(5(!Y~p>z)MJrnH|iims9IN^R53E{nQk z9h~>T4h`%W10yC_CdToI5rpnMH8e;s?nBwOkSDY)MjKS28)gBwc2oDFyRDUuZ)4dfEm0H6C5|FjT3pX_qP4(RT`WGz+d1D{04pjKY<^>x8S6I#rX{M&JJl- zpd-{=aCi!T>0%<27ZW#eF|px`2~qvC!|Ru+C%_!UsGw(kxpylNxP48!Hp0H}L*c>4 zBp5NqA_DPf=|4RF<~SI3=n$|1;1pP+gr#&Syd?!y4MIUDnz#+CL}YlZ2{pno)!Mcw z)G&`>O(ZMorgNbh; z1AhSD!p({bQ~4$@%q!+MFtIW)w=y-+Gd44{FgKm7od1x6iT^DF|9Aekn*|#l@^5}y zFC)Nwl|Os4VnGuBD%R*e1QU282GOM1y1p^XfwxhPTwofq%qBa Zi3KS0n}Po~Q06^969dEc-}X$b0sz@aLw5iG From 0869d7ad5d06071b8f398bbbb2edc23b0ea04139 Mon Sep 17 00:00:00 2001 From: keannu125 Date: Mon, 27 Feb 2023 00:30:35 +0800 Subject: [PATCH 10/12] Reset test users --- project/db.sqlite3 | Bin 151552 -> 151552 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/project/db.sqlite3 b/project/db.sqlite3 index 4899fabe5a00ecd9fb38b089da6f92cac520d4b0..66b61f4bf172075219efedb49018ab715c7f7991 100644 GIT binary patch delta 293 zcmZozz}c{XbAmME(}^<9tWO#Ak{LIqEQl9jKU1s8X8%Yq!yPLfr-fiIpQLQrdB4VdIqMZ#>VCh3=Hd``eY{`%k$?mvjXZg zG}ALQHa0Rdnyj4v5a`(N4E*2uHzLE$f(>){ZQVeIS^zC)umQ2m*?}yuMP_V3mIg@7 gloiO51F=kiPG=ASv5c63EUxB{_1izzGxA>m03Lr&-v9sr delta 298 zcmZozz}c{XbAmMEoryBetaljn;$=3bEQlB3;O1oD58zwK`-wM}=LC;2_dIUS&58;i zxmX&7ICv-XW={k%*g*`%$%nHGfE+g7$%(m&lOu9K999VDEttas;!Nad)M4gjXtZ^l zESN1fSt2h$%+SKh&{)sh)Xd1jq9nDr#0X4G7RV77F*LO@G1W6LH8nOiZ`5Ie>64v& zEYF`0C}(M9YN}^uZfa?6IaxXXp$G^6Mh5=x{BQXm^WWq@&wrGEH~+@Xf(@b!Y8;oVj3S*hDz*t7iAXf9o`t2X<8Tl^&07ybqsQ>@~ From a5f7e2ecfc3a6d21456197cf596196f39d7b48ac Mon Sep 17 00:00:00 2001 From: keannu125 Date: Mon, 27 Feb 2023 00:42:57 +0800 Subject: [PATCH 11/12] Reregistered test1 user --- project/db.sqlite3 | Bin 151552 -> 151552 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/project/db.sqlite3 b/project/db.sqlite3 index 66b61f4bf172075219efedb49018ab715c7f7991..7c9c9885a62b0652760c418d6777dd0220f7ad07 100644 GIT binary patch delta 541 zcmZozz}c{XbAmMEr-?Gote+V4;$=3bsOd9uPVUy%;bbq)%ok^7HfEfBkVkm)Wqm^f z4ko^Z4EzCn3pev5Oy%Qf)Zyf1XtZ^lESN2u9${SSY@DB!5$YG{U6vn~=NT0g5fr2n z5S3{d<)oicWn7XNQRZe4rXA{4k!a~s5K>fFmKEt@W|W(4l33!GQ{ZZAWME{hYha{n zWTs$fW@T(_Wn!XdYGH0*Y+jODTw(|&CJW?<^B5ainVRXDnHZRwm`@JK-@?Jf|CWLO zJOA6wJOvN=xj31{8NrGQ1@v7Gzpf5*EYXHDPhYOj6bm%sJp=!5{;&M+ XHw!jAa&+{~_lYWY^mTL$b}p%McGULtNRG59j`YZ~EVZyTGB7gMH89dO zGE*=#vof-@GBndOG&VLeGb%|fE-?fX4!Mb$IeN+Yxp2j%3Wf$&2HXZ#MkabjK-CsT zlLPX%0G;}sf&V-I#?3qh5Ba%(PUQmYXWIO|UPyrXI)CWYp8CqDG8tWOG7y}hEFldT8ih@jr zs{uOR*b0O!^-PS+42;b|vP}!NEns9R;9%m Date: Mon, 27 Feb 2023 12:41:10 +0800 Subject: [PATCH 12/12] Registered test user 3 --- project/db.sqlite3 | Bin 151552 -> 151552 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/project/db.sqlite3 b/project/db.sqlite3 index 7c9c9885a62b0652760c418d6777dd0220f7ad07..4b4b685f771c003d0c153eee6c041e7cfc2ef6cd 100644 GIT binary patch delta 850 zcma)(OK1~O6ozLq2{f;{DOD<3X$p0rrjtAO&g0HN(M-~&RYE2v8Z8u>nd#V?G)dnz zAZ>7`8)X(C(rh;I1ndr65QbZcI|5P!PKLIg4}t^PTf=?fSQN{co;% zXwTaLt)=@jx8iirc^!}WdzR;G{S1R?=VPeP{TklKxg;DKf_5kGK0fC%~&u@ zHAfRpZ~6M>yD3r~~2dgdNI%PJ`ceVsQmK`v)eT{( zUQE;;Wfqm^(%AY&Caq`7qX;5A0?`PPqfk%k3c&T8X2nw-$)hAY{}t0_I5d04FHi`E#_QGQ8m zB#O$DT!vIJS=X~#cFvwijU~=;VObR;7? delta 538 zcmY+8&u`Lj7{s^O){bzn+MGXVpdxVqrhN^ ziZSuxMbiVPg>mvsdf=)@6L0zt_y-UYjp5+M!p-E(CvWmR&-=Wc3$Am)eYnPeUmus! z9tVdv1s~_U7jAQxZM_mkiP1g^T@1tbQTg+74!h5j5j$GO2nGVd&!5Q-`xysRi# zA^`Y)JKxM$u2kR2)@1!ulgsOMvX$Spx7+QV_=AIuRyNnJnZ?F>`&NdYv^0_0nwi!2 z>Uy?SXd1@WcCxHlFEXim*{;(WoS+#Aqohg^FDV!$5?;*{@Ft}>A!GSj#lo#b(?X^F z>QPxYc1hznla3!Z?w__Rg=}$?+uZJ9|A~HslKR>(6M^uxVWgT9NAC3 z`Ts#eRZ92-mL(Cto%Dv2o^QT-g@vmC4xt5C-B>gNFKw{?$6EKLz})CQTww;Deg@zV l_z9kQ4JPbH1;*cfB{1(iWenh7_y>;NQ0FHcj_)v`;6JJRpEUpg