From 74b422af4f58298dc5cfa3a8d8b615762770b584 Mon Sep 17 00:00:00 2001 From: Amir Talebi Date: Sat, 27 Jul 2024 23:52:22 +0330 Subject: [PATCH 1/5] Edit Home Page & Control the Password Length --- .idea/.gitignore | 8 ++ .idea/django-password-generator.iml | 28 +++++++ .idea/inspectionProfiles/Project_Default.xml | 6 ++ .../inspectionProfiles/profiles_settings.xml | 6 ++ .idea/misc.xml | 7 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 ++ .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 211 bytes generator/__pycache__/admin.cpython-312.pyc | Bin 0 -> 255 bytes generator/__pycache__/apps.cpython-312.pyc | Bin 0 -> 462 bytes generator/__pycache__/models.cpython-312.pyc | Bin 0 -> 252 bytes generator/__pycache__/views.cpython-312.pyc | Bin 0 -> 1805 bytes .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 222 bytes generator/templates/generator/home.html | 78 +++++++++++------- generator/views.py | 4 +- .../__pycache__/__init__.cpython-312.pyc | Bin 0 -> 220 bytes .../__pycache__/settings.cpython-312.pyc | Bin 0 -> 2736 bytes .../__pycache__/urls.cpython-312.pyc | Bin 0 -> 1220 bytes .../__pycache__/wsgi.cpython-312.pyc | Bin 0 -> 730 bytes 19 files changed, 121 insertions(+), 30 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/django-password-generator.iml create mode 100644 .idea/inspectionProfiles/Project_Default.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 generator/__pycache__/__init__.cpython-312.pyc create mode 100644 generator/__pycache__/admin.cpython-312.pyc create mode 100644 generator/__pycache__/apps.cpython-312.pyc create mode 100644 generator/__pycache__/models.cpython-312.pyc create mode 100644 generator/__pycache__/views.cpython-312.pyc create mode 100644 generator/migrations/__pycache__/__init__.cpython-312.pyc create mode 100644 password_generator/__pycache__/__init__.cpython-312.pyc create mode 100644 password_generator/__pycache__/settings.cpython-312.pyc create mode 100644 password_generator/__pycache__/urls.cpython-312.pyc create mode 100644 password_generator/__pycache__/wsgi.cpython-312.pyc diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/django-password-generator.iml b/.idea/django-password-generator.iml new file mode 100644 index 0000000..f1cdac9 --- /dev/null +++ b/.idea/django-password-generator.iml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..ac21435 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..8ba7b0a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..16251a4 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/generator/__pycache__/__init__.cpython-312.pyc b/generator/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f76a5abc5be28fed1b56f55c2e287182097be0f6 GIT binary patch literal 211 zcmX@j%ge<81gip;rh(|kAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdRpeq76Ht_&UX+-d zo0*pmVrQi$mlVguyX6;Ur>4XQ1o?ZpI)?KEC3*;Jf8pn literal 0 HcmV?d00001 diff --git a/generator/__pycache__/admin.cpython-312.pyc b/generator/__pycache__/admin.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6d7c9e27ecae88316586bbf5dbecff56ed4a9a3 GIT binary patch literal 255 zcmX@j%ge<81gip;ra1xW#~=<2FhLog1%Qm{3@HpLj5!Rsj8Tk?43$ip%r8OGnvAzt z6H{_C^ZYcKZtm}#sl@w(r6)^)9tYr8MQuiz0#VRJCC_lX@F&C&h9mLK` zO)e>piFeB{%1%v*4+!%2a&-;~j)54WTaZ{>T%KQ)qMM$Yms*rql3#>J2B8M*7`=kZ kUmP~M`6;D2sdhyiK>HbixERFvz|6?Vc#lD$hz-aA09r*!ZvX%Q literal 0 HcmV?d00001 diff --git a/generator/__pycache__/apps.cpython-312.pyc b/generator/__pycache__/apps.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8b3c91d5a27d5b3bec0868b858b7e3ae2d65368b GIT binary patch literal 462 zcmaJ-Jxc>Y5S_WZXg-OBXl)~0k^BG=K@tsE#6zu)z_MmHM`G^w+)D^4h5P`!`~nO0 zr}zitz{<)_h&HL*y-l=pi#PA>o5wKoQmGU{y(jOXcdhEX7VDQ=k;T3ub6~)52qF52 zU_lF*H3MdIe6~%WZ%rLH_o0Q0Y2i4I8zSoUgRZd+;z}&G6qy4D9~t--L*JfSuANp} zJmQj$gf!u_5UfAiu9M~oiD<|PNsEMpf{llomkGHY)8Wc-bbW+{p0tdb2OUp}K+-Vm zM}g)8-W??!aw_BvXT-ZWKRan$U3S=jMuDisG)X2xvfA(5f1JM_8plaJo=SbQ3>-z0 zO$9S}E$!SjWqIwi)tV(Ut*&EI-_Ha~nq`d@#g_R)v*MAgDydJGY%BP*5%CT7zBUkd L@B81NN|yQoNA7rL literal 0 HcmV?d00001 diff --git a/generator/__pycache__/models.cpython-312.pyc b/generator/__pycache__/models.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..464f7d30a051a9b93654985b8586b153f737d541 GIT binary patch literal 252 zcmX@j%ge<81gip;rr7}L#~=<2FhLog1%Qm{3@HpLj5!Rsj8Tk?43$ip%r8OGnvA#D za`RJCbBg^mnQn2WWF_XM=j){;6)^)PS2BDCsrgmlViglml%HOdn46oKmkwfQr6!jY z$Hcqk7iFiW#0LcVd$~G?1jj)1>lP#y7nkQ3rRb)o=A{-TmgE=VkwK_|I7F|Y@)w5< fkX@RSYFESobO0j|7lRldm>C%v?=i>}u>m;%OR`8U literal 0 HcmV?d00001 diff --git a/generator/__pycache__/views.cpython-312.pyc b/generator/__pycache__/views.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fd12d91b8a411935502aae6d2fe33cefec4b539 GIT binary patch literal 1805 zcmbVMO-x%y5Z<+)pPy}vVnPcsRY@Re;!u8UQqr_()iyvyc_>u`#Jm8 z{1{ttq)2Jh96+k%s_KDDq(r$Sr(AQa)QeMFD%z$JQcv6}sCvk$yRWQGE){g7H#7TY zX202;o%z}8bpuY*Q}?gmwgd2oSV*$%Dm$mSQUVAdm;@;}1EJ7uN!yGK*>8gxJ5o4T zkb`r_vMr!)iNJ@DsRXAHCgBL&-AM?Ae;f(y_&F;9TC?T({*QJsCqcj#&K-{8G$uMV zNN>zY;hq>xC5edTdpilfk;Nu8Mf}m1#^8Ii4liv~g6HH`nT)O{A>c+u?1EHg!9L|hzP<)3+ovm$um@vWXL zxAj##!LkzE;s3z@J$rKvvsa%pvb279VgXvmCK^Xz4$FZwa9!l{YA(TwCsbBKM3niJ zT*NL`9T30sy>;MK*sVzc=0QTf0`4v;;gDKgBAbjN{ya=L>lUfiD~;^ZS4s#DfTYN% zeIPlcuapNuQf1UWket$2$^#*3G77oo&jLVBP*F;Y4sbIXa?1{q`=udr7i@VO^33yw zBV6NuJOw*)6%^{JVbrQO2(EI!f+Md`ue2r_rB;{u+AGO%zk+h_4Fyo2wDVqWK;FC( zhmXV?Tm<3k(O5h&pG>8V%nf4F?84&Ga*nyOnG7Zo-NelQ@h2AshlVd+ z`gCOUv(Lk0<6lfnPFFRvqv#yDqf;| zk}-QcO__u6`GNUt)6>XEF*Oo1;t@>5SPQ5`ynE)3#B`!ZC{Ktqiyu}dG0HqNh9wSz zOQz_-qZV16Oj`NcVj^MlZ_fBk@x4}lJyh}a7e_XojdxaVt=zeJ>*nf8)!DhBHT|j` zd9EG#@p!rY{fhs5Rr_FLkI!<|d2El*_xXzd?W)$j50}l*xu;!Ex}Nqv>3w#p5*qz! z;+N3ay~)*cF>Gw*hnnzkwUt;qMkog|))^Or@poxz=~r^QWC#{!&3hlNgz29_OBQl?TEV&sbR* zv!+!*WrzM9);(s-AT*MtrghDvU0jps4{PRG7xoZXG1fJ{)Xt|2luhCf$w}@chMC#M c8ApWhchLD8@NR1mhPG7*`*&0y9EVo$KUSH82><{9 literal 0 HcmV?d00001 diff --git a/generator/migrations/__pycache__/__init__.cpython-312.pyc b/generator/migrations/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..241dd63efd9e0b33a4b706360b17ea86938388c7 GIT binary patch literal 222 zcmX@j%ge<81gip;rh(|kAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdRqJ9E6Ht_&UX+-d zo0*pmVrQi$mlVguyX6;Ur>4XQ1o?ZpI)?TZlX-=wL5i8I&j6hrrVtiy~WMnL2 G2C@J+0zpFn literal 0 HcmV?d00001 diff --git a/generator/templates/generator/home.html b/generator/templates/generator/home.html index 429aae4..5f0e76d 100644 --- a/generator/templates/generator/home.html +++ b/generator/templates/generator/home.html @@ -1,28 +1,50 @@ - - -
-

Password Generator

- -
- Length -
- Uppercase -
- Numbers -
- Special Characters -
- - -
-
+ + + + + + +
+

Password Generator

+ +
+ {# Length#} + : Length +
+ Uppercase +
+ Numbers +
+ Special Characters +
+ + + +

Upgraded by Amir Talebi +

+
+ + diff --git a/generator/views.py b/generator/views.py index d54ad5d..294cf3f 100644 --- a/generator/views.py +++ b/generator/views.py @@ -1,5 +1,4 @@ from django.shortcuts import render -from django.http import HttpResponse import random # Create your views here. @@ -20,7 +19,8 @@ def password(request): if request.GET.get('numbers'): characters.extend(list('0123456789')) - length = int(request.GET.get('length',12)) + length = int(request.GET.get('length',12)) if request.GET.get('length')!='' else 12 + lenght = length if length <= 72 else 72 thepassword = '' for x in range(length): diff --git a/password_generator/__pycache__/__init__.cpython-312.pyc b/password_generator/__pycache__/__init__.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a26989f0fcde86a9dcd3821fca4dd15c38f8e614 GIT binary patch literal 220 zcmX@j%ge<81gip;rh(|kAOanHW&w&!XQ*V*Wb|9fP{ah}eFmxdRqbLG6Ht_&UX+-d zo0*pmVrQi$mlVguyX6;Ur>4XQ1o?ZpI)?cB)B-X>v0I3MjDNMubpx18E5X8 zG}A8JB`d@VkdRs-RVrn{w*R3Uq^J^_Riv)EGq7XTGkzqNleVckitpn*zVo=}+?(Hm zK|clGFZrJ;zXvGl4|_BCJpIMHRhpt6QHT;LL?cI?7HLe^oCC4Fxi-+)BT@fb(l-Rw zUt-q_@W}o~XVHzuL=SR`-YO;fsuXfPqeVZ=ZkWfBM+_j~ASbeU{%5p8qw%NCDlG<4 zKn$TE3jK}0ANA}FkJyclym0g=DE!o+&|(-(ph>`-Ku5b{q&pr{=&DnkK*z;NG$kGd z?;`L!2EXGdDo$-VVjsv?ARvFLCaYDAA=oe!wMv+ZrZY{MkWEcTQWdLMmkpbwYc*Up zSigU(Xa(yG^) zxjMLx%pe4`>%tZ9{IrMbCres;a`aj85PljlgYJX2Fkb23p%S1ZMs$Bgts zWy_js=t_z0Ce=JTN^Kcy=E)JFt%6m<*lJ>8PK_`LCIk|_pV0t@Tm_92qZ$SrP1!yW zV)=H909>5z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JyL{zPqPg`KeX5CbsEruoHZ4 f?rFE=`qK8z-RYg_kI(nC#(r5FSKrk5IPm=g0qt%2 literal 0 HcmV?d00001 diff --git a/password_generator/__pycache__/wsgi.cpython-312.pyc b/password_generator/__pycache__/wsgi.cpython-312.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fc259082a1be380facb7acceebc05837560f66d4 GIT binary patch literal 730 zcmaJ<&ubGw6rS0QP1)EWVtes2h?jubjd&{}h>0P^CdEXA5ZFw2UN)QV&MZ6A#Prsa ze}aF32QB_3UMdR0p8SCaZ%S@GIootiL2wQ;-@G^PecyX;-fwJJNUyhhuSf4NLf^AX zz6uv$v9G}^#84kG%#0BCu|Cbvh|Io;5#Y&s91lP#} zNk%~kcZdYA#!AI<+i{riq|GLj`y$umiO2!&+_P)WSj?1g7{sBNN5GXclYZb>KeLM4 z6`bDiLAjaDy(A;us_#5(H#=^((d)I^&91xKsXu$tIJ)_7BWwvu1>BdFVp?=vt;Tgz zL&)^nQj_iJQtXT&F*Rpe1U?NC!Ba~IG8oarP^G0y Date: Sat, 27 Jul 2024 23:54:47 +0330 Subject: [PATCH 2/5] Delete About Section --- generator/__pycache__/views.cpython-312.pyc | Bin 1805 -> 1649 bytes generator/templates/generator/about.html | 3 --- generator/views.py | 3 --- .../__pycache__/urls.cpython-312.pyc | Bin 1220 -> 1144 bytes password_generator/urls.py | 1 - 5 files changed, 7 deletions(-) delete mode 100644 generator/templates/generator/about.html diff --git a/generator/__pycache__/views.cpython-312.pyc b/generator/__pycache__/views.cpython-312.pyc index 6fd12d91b8a411935502aae6d2fe33cefec4b539..a10f166227c5ee4cf261c5c613a9ad291d839626 100644 GIT binary patch delta 182 zcmeC>`^dw4nwOW00SI!#m!?@x5XD-_q{%ihAdzw9#7!NHoRh5? z^(N+O2a2Sp=A{-TmgE=dCnn{Wmgr@a)8jWK3fgVh3s9O3p|uN=z2KczG$)vib#CHUsY`4n{_!Pi%~g#-G^)83P!>ngI_}KJ@?q diff --git a/generator/templates/generator/about.html b/generator/templates/generator/about.html deleted file mode 100644 index 6a0bac3..0000000 --- a/generator/templates/generator/about.html +++ /dev/null @@ -1,3 +0,0 @@ -

About

- -

This is a pasword generator created by Nick Walter. Enjoy fam!

diff --git a/generator/views.py b/generator/views.py index 294cf3f..5367d4e 100644 --- a/generator/views.py +++ b/generator/views.py @@ -6,9 +6,6 @@ def home(request): return render(request, 'generator/home.html') -def about(request): - return render(request, 'generator/about.html') - def password(request): characters = list('abcdefghijklmnopqrstuvwxyz') diff --git a/password_generator/__pycache__/urls.cpython-312.pyc b/password_generator/__pycache__/urls.cpython-312.pyc index 692c05b581372577c8af58abd767d9d25d887b58..5d2d7f856173c38edde6c5b9a29c227224024602 100644 GIT binary patch delta 100 zcmX@Y`GZ6KG%qg~0}$kfFHLi0W?*;>;=lkKl<~P_qIw}mI#U#TC8s9W#uK}lnEf<4 mCQoHHoqV2o2A2R(86yxETTd=zG3WWf%FNHy$X&z-6aoMR*AzJb delta 174 zcmeytafDO-G%qg~0}!kVSejPK%)sy%#DM{JDC6^-iRy(0Obn?^DV(V+S$r^g1f9aQ zhHW)aI|!sRM{!hgYw~Pdu$xJ!iY+lIzqCaE7Au(c)8w2S$85?}#5s8a^K33bpmIha oF7}>m%3>~alZB&0VuI;(>xtG2!mqICeqd+eXKLgw;s+`L04@U~{r~^~ diff --git a/password_generator/urls.py b/password_generator/urls.py index f5b6554..bee8e7c 100644 --- a/password_generator/urls.py +++ b/password_generator/urls.py @@ -20,5 +20,4 @@ urlpatterns = [ path('', views.home, name='home'), path('password/', views.password, name='password'), - path('about/', views.about, name='about'), ] From 07ec9eb478fbb42727c46fe1544e16aea10b264a Mon Sep 17 00:00:00 2001 From: Amir Talebi Date: Sun, 28 Jul 2024 00:00:54 +0330 Subject: [PATCH 3/5] Edit Password Page --- generator/__pycache__/views.cpython-312.pyc | Bin 1649 -> 1635 bytes generator/templates/generator/home.html | 2 +- generator/templates/generator/password.html | 33 +++++++++++++++----- generator/views.py | 3 +- 4 files changed, 29 insertions(+), 9 deletions(-) diff --git a/generator/__pycache__/views.cpython-312.pyc b/generator/__pycache__/views.cpython-312.pyc index a10f166227c5ee4cf261c5c613a9ad291d839626..6fbcbcbaca897e0ec6463be76d497f95bb220e15 100644 GIT binary patch delta 172 zcmey!^O%SCG%qg~0}w2YSejpoksFDiVbeoIpnL*U3DrtGU^EConZt-w+h;V4HlHwT)4EvKN~irx0TRV-ZLd E03%)}`~Uy| delta 226 zcmaFN^O1-5G%qg~0}$kfFHN)D$eYT@n6kN;@dcy46azyMQw>udV+waIa|&lIO9?kf z9SGDgt!9LS|eQSSGhI>x#4V$gnV!2twq5>KIaZQh0%Kr$v diff --git a/generator/templates/generator/home.html b/generator/templates/generator/home.html index 5f0e76d..38b78e6 100644 --- a/generator/templates/generator/home.html +++ b/generator/templates/generator/home.html @@ -18,7 +18,7 @@
-

Password Generator

+

Password Generator

{#