From 7a1955794ffe7634f969faf98cb5a421da7e16cd Mon Sep 17 00:00:00 2001 From: Timur Akhmetov Date: Wed, 22 Nov 2023 11:46:21 +0000 Subject: [PATCH 1/2] Finish Introduction and Django Admin --- blango/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 130 bytes blango/__pycache__/settings.cpython-36.pyc | Bin 0 -> 2498 bytes blango/__pycache__/urls.cpython-36.pyc | Bin 0 -> 904 bytes blango/__pycache__/wsgi.cpython-36.pyc | Bin 0 -> 531 bytes blango/settings.py | 15 +++++-- blog/__init__.py | 0 blog/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 128 bytes blog/__pycache__/admin.cpython-36.pyc | Bin 0 -> 484 bytes blog/__pycache__/apps.cpython-36.pyc | Bin 0 -> 397 bytes blog/__pycache__/models.cpython-36.pyc | Bin 0 -> 1181 bytes blog/admin.py | 10 +++++ blog/apps.py | 6 +++ blog/migrations/0001_initial.py | 39 ++++++++++++++++++ blog/migrations/__init__.py | 0 .../__pycache__/0001_initial.cpython-36.pyc | Bin 0 -> 1231 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 0 -> 139 bytes blog/models.py | 26 ++++++++++++ blog/tests.py | 3 ++ blog/views.py | 3 ++ db.sqlite3 | Bin 0 -> 163840 bytes 20 files changed, 99 insertions(+), 3 deletions(-) create mode 100644 blango/__pycache__/__init__.cpython-36.pyc create mode 100644 blango/__pycache__/settings.cpython-36.pyc create mode 100644 blango/__pycache__/urls.cpython-36.pyc create mode 100644 blango/__pycache__/wsgi.cpython-36.pyc create mode 100644 blog/__init__.py create mode 100644 blog/__pycache__/__init__.cpython-36.pyc create mode 100644 blog/__pycache__/admin.cpython-36.pyc create mode 100644 blog/__pycache__/apps.cpython-36.pyc create mode 100644 blog/__pycache__/models.cpython-36.pyc create mode 100644 blog/admin.py create mode 100644 blog/apps.py create mode 100644 blog/migrations/0001_initial.py create mode 100644 blog/migrations/__init__.py create mode 100644 blog/migrations/__pycache__/0001_initial.cpython-36.pyc create mode 100644 blog/migrations/__pycache__/__init__.cpython-36.pyc create mode 100644 blog/models.py create mode 100644 blog/tests.py create mode 100644 blog/views.py create mode 100644 db.sqlite3 diff --git a/blango/__pycache__/__init__.cpython-36.pyc b/blango/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef6774674cb8c89af6cc30a9a453ad3e6ebc62ef GIT binary patch literal 130 zcmXr!<>ktG9-GPl1dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnFMa)t{M=Oi=#N<@{q@2XO^n4fJuG literal 0 HcmV?d00001 diff --git a/blango/__pycache__/settings.cpython-36.pyc b/blango/__pycache__/settings.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90ab90848496b9462ac69cc0c3ee8063dd4d5c49 GIT binary patch literal 2498 zcmb7F-Ez}b5VmYZcAUh75C{+`N@)sCu$+)gflh~_*mCgTSQ$$ut!9cw_MRxm$dZv{ zLUhY(@B)1$-S(o>K0>d$lI6s8xJWG@`FMZ6U46TIw6m~~|NGD12vrjKS{||_)0^wf zL+&%Pl7iWll(qmFtpNFHIa*&szeQZvVGb?kv?Z8_1t`EZScL1aWM;J+a08a%CftG* zb4FW++uBXIW2RsR?!qeEgZuD}$x;R$d|?sq7Vz2%tiiV=3lCRQ@ZFa*WwhI{4&S5A zIy{Q+kK=ohGA66tfer00Y-+2R#XVg2aeV_%v{2qIPi@}w4cAXBAMryELHGo7M|dhc zL+=_w_8ph-)JF8a;Zw)v@#~*Zj7Kf<1jCd3iSG}*AIoKMx}GqKG0vdt^vlF9BVgHg z2DIyy$N82=@cs$mkB64UTh#M;=lJ4z3>z>Ip)UW?u!h9@Ke1eLJQ3)xsG*8X$Q~O0 zNi*0>XrQ)7xbd;IX!Dt>xltn1s( z;8hSj-P|szA+r(8iH(MQRI0V)170gs`WP-Q}Gptv98F5**&rHMru|ywpwo~VNN_e)Z<-NK2+;+QwdfQ zwoW~h3dUeyC1nV+K#q-}<)1ekbS}vAK3LQzJ3$_W$-bBlIjOl{Z%Q~KI6`h7r#5&! zm3LhGf#G?ljte@T3>4z33vG|Mq94uD&?gG*Q_G0@^zF#Paf6pvMLM81?GO76Vw?WS zh5yf2^&j=`VUptoz^khQG>3iS((Yx18Df`)o|b8=l^|Ef0~~w49NbTEk;=XU#PWna zYT`^dHA*Zfu7z1$$D>)-!|VVLK#O+VG*TO;9WTu3dNlcw&Ly5>eIy|_z=5}YEw?8s zQdI0PuSk`ar0Q>^U&EQIwAbDb7vi%|s>TPN5@w10k-Cl@W=!IT*M8A!Ev%rP^hmf| zQCc;A?N*PCDp&>T++v2{2$yFr;tmA`gGInvUjr`TO zpEpOl#`ab-A*CwDs6=^$OI4{Rwi~LBF=V|~mm1aIQ|<F}x1m*z`P;%PeNu44dYdWrk&L;fgOV k&0Jg@8}HL;hGW_D{YYQn*le^bq7q`kV>1#;J+WuTgCCLYP|B9C;g_;y zfsptDR$O~BQiOz5OL1vPXJ_nw`cWa8&X_B)B9AJJfqAbt*yeGD6o77>kUB4U{= zlGw*1F_P&bjU$%QlqK8ocJeJ*$BP3xeis!Jq5*Izh+1p(;q7a5q1B47TSFYzD$Cw) z7`kqaXoz#nD0__rw+_s1b}_ddq58)>>kw@L73^oo;w-u}{WO-s0@#7a{@6&a=x_)t=q1Yyf>y zq8F4Rq7avjHg1m4%4mt?ZAF@Izas&3+*<{cp_ymYES1CUXRmrV<_>aCpb?Ao=X^oH+A_PMiQ%AMIRgm+>QH^pIhP*pG=RkgU^QvxN<@TGxajk==&PvhsmOD%V-OFi-K zXwb~>k+}!|!}jMP_T9s^rd;D2Z9dtC)C}*2fB*6jWpmpdK9!obf<1cx_w59>G(L`x GM}GlESsK;= literal 0 HcmV?d00001 diff --git a/blango/__pycache__/wsgi.cpython-36.pyc b/blango/__pycache__/wsgi.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8f40fe405c1aa6968c0b211b45847923cc287e3e GIT binary patch literal 531 zcmYjN!A=`75cPTkiI&oGK%9MzTGmy$RaMnWKor!5LqJH8s*PDsHcq{s)!HP$74b3r zP!GQLQ1ur$;mryumi)%{%)IwJN4vX;{`U(WBSQX?jTMLUx3KNU0Fq3Ij3m|3BnmOs zw2UWlL?Bvp7F)6-w;pJ?#Sdh%E$Nu_x9|TXSL4Bu?s9_13Ek&)?DI-ddY&sQHrByDRLNlEPzSAI5 zVhv20pjWOF3{4UA8~)(^>-7E_ZvdmMoey{bB=D~j2u+}u__%4{Gs?qo)G)kC>8}0nghTs#alTf&Z=l8*M p2|P!skgu@*Z7Y!jZ>3*DL!MT5zW1da?$=)Ew+(b?kG`RA=?k;)ro{jN literal 0 HcmV?d00001 diff --git a/blango/settings.py b/blango/settings.py index f9209bef27..c33aef2ef9 100644 --- a/blango/settings.py +++ b/blango/settings.py @@ -11,6 +11,7 @@ """ from pathlib import Path +import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -25,7 +26,14 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True -ALLOWED_HOSTS = [] +ALLOWED_HOSTS = ['*'] +X_FRAME_OPTIONS = 'ALLOW-FROM ' + os.environ.get('CODIO_HOSTNAME') + '-8000.codio.io' +CSRF_COOKIE_SAMESITE = None +CSRF_TRUSTED_ORIGINS = ['https://' + os.environ.get('CODIO_HOSTNAME') + '-8000.codio.io'] +CSRF_COOKIE_SECURE = True +SESSION_COOKIE_SECURE = True +CSRF_COOKIE_SAMESITE = 'None' +SESSION_COOKIE_SAMESITE = 'None' # Application definition @@ -37,16 +45,17 @@ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'blog', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', - 'django.middleware.csrf.CsrfViewMiddleware', + # 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', - 'django.middleware.clickjacking.XFrameOptionsMiddleware', + # 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'blango.urls' diff --git a/blog/__init__.py b/blog/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/blog/__pycache__/__init__.cpython-36.pyc b/blog/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..902360520596e0a0a0955fdedde89ec658d57d6a GIT binary patch literal 128 zcmXr!<>l&r9-GPl1dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnFJ1kN{M=Oi=#N<@{q@2XO^n4(dpROMtpP83g5+AQuP5vDgjko$a02e)EfRt& zuwtARurxDoK5sP7$J6Qf?ekWCAcWq*{vHK12XhzT1QJ-I3NwrYj&xKJMk>lEM(0Qn zL0^!d60hPlVFQT6RU*k6rni^|EaGdF4!&R?O0kb~QK>qOJh{nBPp^z?i_rRg5r8?E zI|L^Y!ve8LU_ljTL=adN`%z$>g*~1+-IYFWRjcJ9#dZj+l=_78Ie$07gM5hCu zaQ@ikdfPc@tZYov>AaPK-zlkudqs8v8+!MBl--+3W`z;TWKYIExF#=Tw$yoD8VIJ$ zdNH%+*~Y*Mf9Jye3GVYnI%2zG6{cr}sava-HniDJ;LhMIshuTIv4QHxm!Z<@>iHl} iwbCb6mddr#{-3r%(?Cj2Hu6p}WG(?W!F$m@ncyF=+jk!T literal 0 HcmV?d00001 diff --git a/blog/__pycache__/apps.cpython-36.pyc b/blog/__pycache__/apps.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..43ae59996a0702da3eb2f93b73faa4216fcbd12b GIT binary patch literal 397 zcmYLFu};G<5Ix7K6w-DBV|j z;Aij9#bjp(-${038kLm>Ym+^g?#{NdR9T_D4|+_M$+op=``B?3`SVy05ewO_vrM=f e?`?Z#7x>+t`~S;Ojj89Nv%&7UKaKU=3I73ilVZaF literal 0 HcmV?d00001 diff --git a/blog/__pycache__/models.cpython-36.pyc b/blog/__pycache__/models.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..03ba3295298c11ad775434bfe89af6efea6e2f9f GIT binary patch literal 1181 zcma)5OK;Oa5Z?7Gj^iYywDig~LTV0N5i05fB-Z^pN8z&V32?<*>J2Sg8yZg$kquPxOb?+2E2CCT&kpiM!_y?n z#yN(3Je*%*b9Pm?geXcaM2qSJL+tjkgEMU|;s=9P?Fx}asS=|0gg|PQknIcczKW9h zjHcAO9jME4FII`vR8MzE(V3Q%M=mvoq#)&T-)JI#07)}jwB$3?GLXuiIsmjK`K=MU zu-ej)CZP2ewgtPhunlQrl@G5g(MinoVE3 z_(*mEc(1mO@}dOT?K~6UfGSl0&yT7y7g>HGA}Qg!_x`}BZNmJ#wz4Wow2gZVxTYS) zKhV<9o}nHw$=520N+lbV|FiRDTqfwec2VwcbP4u#$bCP3I{5E~ZfKv9x}ZU>=*D^7AM8 zva28`J?9nCqPEItT>P6|D_BD`E7qV~zRG?4JqVZv=^2_<5VPBIN{?bwp3Xt&EPQN# kHb=qUr}y5_v&mY*x*<00Q@hXRui`nq)aI39M`P9b1uz8>DgXcg literal 0 HcmV?d00001 diff --git a/blog/admin.py b/blog/admin.py new file mode 100644 index 0000000000..8d52c296fc --- /dev/null +++ b/blog/admin.py @@ -0,0 +1,10 @@ +from django.contrib import admin +from blog.models import Tag, Post + +class PostAdmin(admin.ModelAdmin): + prepopulated_fields = {"slug": ("title",)} + +admin.site.register(Tag) +admin.site.register(Post) + +# Register your models here. diff --git a/blog/apps.py b/blog/apps.py new file mode 100644 index 0000000000..94788a5eac --- /dev/null +++ b/blog/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class BlogConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'blog' diff --git a/blog/migrations/0001_initial.py b/blog/migrations/0001_initial.py new file mode 100644 index 0000000000..234a914f5a --- /dev/null +++ b/blog/migrations/0001_initial.py @@ -0,0 +1,39 @@ +# Generated by Django 3.2.5 on 2023-11-22 11:39 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('value', models.TextField(max_length=100)), + ], + ), + migrations.CreateModel( + name='Post', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('modified_at', models.DateTimeField(auto_now=True)), + ('published_at', models.DateTimeField(blank=True, null=True)), + ('title', models.TextField(max_length=100)), + ('slug', models.SlugField()), + ('summary', models.TextField(max_length=500)), + ('content', models.TextField()), + ('author', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)), + ('tags', models.ManyToManyField(related_name='posts', to='blog.Tag')), + ], + ), + ] diff --git a/blog/migrations/__init__.py b/blog/migrations/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/blog/migrations/__pycache__/0001_initial.cpython-36.pyc b/blog/migrations/__pycache__/0001_initial.cpython-36.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c4808a99bbd4f128516ebda6ad743dc569bcfc2 GIT binary patch literal 1231 zcmZuxOK;mo5auo)q9{tX6D4iZ2YTp57s){nErOuP!**M=PJ&pu5GaV1W=*e5av3fa zM*(_DuKpqYJ-yAfm*!sd&{JngImw|Ub~&$|{pOopelr|Kzy0;A{KI#gKb?;rkL3F_ z%w3wm0hT)jOBk~<&w1e{Zs8?ftGl_M1V1?7f&bP4U%IQ_8#n2Jd*V!jceLJ_Fbs`s z8dYXy!Z9jTR*OdI(qK?%khyuhv~gF@9trnpn15)JPQt)RIIzT(-pZE&J^0_~n4*WYerTg%wAFT6ZFj3N*t_K9 zz4mctxK7&WjYIZvYroO$2sf?P+CL#_NA9lnR?+I(>bgY_pSGE9k!K9I;WPN$>RDt_ zW<0q8Ul4O&V*mJxra8KEks()bg#4$2iHEURH#%L`QZy29P}Qms^(H-+8|)idE0L?$ z662S$UT7oJQWO&Xmm*)wcR-v{L!v^wN^@Ce%^9`CYa@bFC37(7J=LbcXq!G24aIjm zmii(UKs!>~6h%Yl3|lzl#JE~7a%Ijs4@ZBIi}IZEuk#%JMm4!a&*bY2duCl&(CTmI zIM`e2vXNzj0i`EZwh^yMAML0GWqN>D#0zp=?1X(UOHMg#v z2hZm}rq53fpQXo74i108_l&r9-GPl1dl-k3@`#24nSPY0whuxf*CX!{Z=v*frJsnFAM#Q{M=Oi=#N<@{q@2XO^n4(dpRS*qnO>Awl9``ZtREkrnU`4-AFo$Xd5gm)H$SB` NC)EyQVlfai0074JB1!-N literal 0 HcmV?d00001 diff --git a/blog/models.py b/blog/models.py new file mode 100644 index 0000000000..7005a123e4 --- /dev/null +++ b/blog/models.py @@ -0,0 +1,26 @@ +from django.db import models +from django.conf import settings + +class Tag(models.Model): + value = models.TextField(max_length=100) + + def __str__(self): + return self.value + +class Post(models.Model): + author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.PROTECT) + created_at = models.DateTimeField(auto_now_add=True) + modified_at = models.DateTimeField(auto_now=True) + published_at = models.DateTimeField(blank=True, null=True) + title = models.TextField(max_length=100) + slug = models.SlugField() + summary = models.TextField(max_length=500) + content = models.TextField() + tags = models.ManyToManyField(Tag, related_name="posts") + + def __str__(self): + return self.title + + + +# Create your models here. diff --git a/blog/tests.py b/blog/tests.py new file mode 100644 index 0000000000..7ce503c2dd --- /dev/null +++ b/blog/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/blog/views.py b/blog/views.py new file mode 100644 index 0000000000..91ea44a218 --- /dev/null +++ b/blog/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..29533d05217de9e2c196c159004487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VbMI|0{3L(2p13p9eU@J`eErMzIm5KWetxYKF_UPYc{T zRiFR=L?A!uQyD~o00@8p2!H?xfB*=900@8p2!H?xJmCbKqEqns^#A|=J%N1h39k<1 zg8&GC00@8p2!H?xfB*=900@8p2yg-;jv1f*?0`Q1|3Dxg01^m*00@8p2!H?xfB*=9 z00@8p2!Oz0B;atg_y6A)$oq$}hNu$=fB*=900@8p2!H?xfB*=900{it6L30x?fF0U z|9|d#0|0;k2!H?xfB*=900@8p2!H?x99jbA{y*mbhqjSXF%SR&5C8!X009sH0T2KI N5CDOndjf3!|3AX5lk5Nh literal 0 HcmV?d00001 From 3be0cb7c83916950071b8f41745da324e9d3daee Mon Sep 17 00:00:00 2001 From: Timur Akhmetov Date: Wed, 22 Nov 2023 17:22:47 +0000 Subject: [PATCH 2/2] Finish html frameworks --- blango/__pycache__/__init__.cpython-36.pyc | Bin 130 -> 130 bytes blango/__pycache__/settings.cpython-36.pyc | Bin 2498 -> 2515 bytes blango/__pycache__/urls.cpython-36.pyc | Bin 904 -> 980 bytes blango/__pycache__/wsgi.cpython-36.pyc | Bin 531 -> 531 bytes blango/settings.py | 2 +- blango/urls.py | 4 +++- blog/__pycache__/__init__.cpython-36.pyc | Bin 128 -> 128 bytes blog/__pycache__/admin.cpython-36.pyc | Bin 484 -> 484 bytes blog/__pycache__/apps.cpython-36.pyc | Bin 397 -> 397 bytes blog/__pycache__/models.cpython-36.pyc | Bin 1181 -> 1181 bytes blog/__pycache__/views.cpython-36.pyc | Bin 0 -> 299 bytes .../__pycache__/0001_initial.cpython-36.pyc | Bin 1231 -> 1231 bytes .../__pycache__/__init__.cpython-36.pyc | Bin 139 -> 139 bytes blog/views.py | 3 +++ templates/base.html | 17 +++++++++++++++++ templates/blog/index.html | 4 ++++ 16 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 blog/__pycache__/views.cpython-36.pyc create mode 100644 templates/base.html create mode 100644 templates/blog/index.html diff --git a/blango/__pycache__/__init__.cpython-36.pyc b/blango/__pycache__/__init__.cpython-36.pyc index ef6774674cb8c89af6cc30a9a453ad3e6ebc62ef..4b80daa0389de28013126d6bf86cbe32bc3d5740 100644 GIT binary patch delta 15 WcmZo-Y+__L=H=yjXAn1$y&3=<2Lto~ delta 15 WcmZo-Y+__L=H=zec^*5Fy&3=kd|6o8n3tDprD0sE3?Bo-V+JI^0c1M>aWT(C<+=5#>?u;x4C#z1tSQndGAXht zaw+oZESZcc3UgS}8KcBf6r;pblv0#|>Qtl|QdH+KWim!dq^PB+1J$UdXn;vgFsYTv zn9dRV$%jXuSk2cBxgM%$K;uungAEJF3tb| delta 205 zcmcaCd`MW?n3tF9)$`a?Ha-T1#|%h-1ITs&;$pUm%5&?}8B$nNq*A0)WKv{PsLWx?WQ>wXQB6?;s!>f*2a_6LQZth=oh3># zMJq}wMLSA5g*8eBh-HCTE=4CwK1DZ5A%!`ZK~pbLn~{Nm%Oxu@FFjwOIJKl?vnyja i^XA(u-i(Y~o7LI=GO=j^omQkZS&Ortk!kWOPE7z(j4!|d diff --git a/blango/__pycache__/urls.cpython-36.pyc b/blango/__pycache__/urls.cpython-36.pyc index b00b4f899a4111242c8f5197d029061f5a7f6f9f..200245ab07f55ab48be13eb46e3b4d9a7ac8fcd7 100644 GIT binary patch delta 261 zcmeBRzrtQ`%*)I5(=;wsjhTVrF#{4{0kR!{xYz?oq%cG=q%fv18sxJvy@W}Y=@v^tVoAm=_RPHGoYIt3zbdxGl-$fb{aXy0yp!KD8MqgL zToc8Wl#`#XSC*MtUVMuM#J0(Er}!2tM1nOlFD13&7B^4~XlO}lQC{&% dh9W+o{vy7~_RRKtTtFrZBM+khBL_1NBLFO)LOB2c delta 170 zcmcb@-oYMW%*)G_^E@{74HE;yV+JI^3}ib1aj^lANMVR#NMTH2%3;i9ieh2}v6*w2 zb6KKT7#UJoQdm-%vRJd&nwioWqu5hegBdj0HWoB92{GPcDM&2IsA5Y@$<55u_tWH< zEWm7_bc>}pvn2HvOKDL~@hxs32~<>)T9jA3lA(wbXj>8I(WL delta 15 WcmZo*Y+z(J=H=z;ejYoKy%GQ&3Iss_ diff --git a/blog/__pycache__/admin.cpython-36.pyc b/blog/__pycache__/admin.cpython-36.pyc index 50abbffc17b218aa723fb5a563b71ecaf05b0bf7..4c68ba04a46c67db6c442f727407a5cbe328c6fd 100644 GIT binary patch delta 16 XcmaFD{Dhg^n3tF9ok842_PdM#Ec69G delta 16 XcmaFD{Dhg^n3tDp`-|9(>~|RfFTMr8 diff --git a/blog/__pycache__/apps.cpython-36.pyc b/blog/__pycache__/apps.cpython-36.pyc index 43ae59996a0702da3eb2f93b73faa4216fcbd12b..03654d36aa17cfea148ca338234907e90cc12f1d 100644 GIT binary patch delta 16 XcmeBW?qy~-=H=yjXArlMy^Rq7A`}EV delta 16 XcmeBW?qy~-=H=z;ejdA#y^Rq7Bcue4 diff --git a/blog/__pycache__/models.cpython-36.pyc b/blog/__pycache__/models.cpython-36.pyc index 03ba3295298c11ad775434bfe89af6efea6e2f9f..8c832de611dc54b276e25132143877ae29d3c32a 100644 GIT binary patch delta 16 XcmbQsIhT{&n3tF9ok842_Gv5tB)z2gHUD5_=c63`lLB)r2~Au^kGC0SSJFU&_kFFEI7& z0r8}}XZyXolP~7;qPV=*??m(s{FTJ%2JmMfCKiTzQ42vVIs2qq^5l-n{0CDi#W;0( z%i1*}-chk{@k@JXdY#O(|Rqgwc`HkAwE%i`)b+zvrs8 zy;hCo&Z@n28^2pNTCL1-yS8YsdFu4uSG$)nPlhqpM>i5~3SN|1eaa7Uzw)hhp&5ct ZacP`l{!tFeIJ@dC4@O_det+KKra9Q literal 0 HcmV?d00001 diff --git a/blog/migrations/__pycache__/0001_initial.cpython-36.pyc b/blog/migrations/__pycache__/0001_initial.cpython-36.pyc index 4c4808a99bbd4f128516ebda6ad743dc569bcfc2..a039568490ce1628eb7b09f337ac49d36fe7025c 100644 GIT binary patch delta 16 XcmX@ld7hKqn3tF9ok842_7f}sD*pu! delta 16 XcmX@ld7hKqn3tEU_C@SQ_7f}sEHedF diff --git a/blog/migrations/__pycache__/__init__.cpython-36.pyc b/blog/migrations/__pycache__/__init__.cpython-36.pyc index f2b32d60518a60e76285d9a735f9d896774f2d7a..b081c065c19e62f68ee94735ab2851b547bc173a 100644 GIT binary patch delta 15 WcmeBX>}F&)=H=yjXAn1$y#)Xr3}F&)=H=z;ejYoKy#)XsNd#g5 diff --git a/blog/views.py b/blog/views.py index 91ea44a218..39da9d5d90 100644 --- a/blog/views.py +++ b/blog/views.py @@ -1,3 +1,6 @@ from django.shortcuts import render +def index(request): + return render(request, "blog/index.html") + # Create your views here. diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000000..fab417314f --- /dev/null +++ b/templates/base.html @@ -0,0 +1,17 @@ + + + + + + + Hello, world! + + +
+ {% block content %} + + {% endblock %} +
+ + + \ No newline at end of file diff --git a/templates/blog/index.html b/templates/blog/index.html new file mode 100644 index 0000000000..47eb54f581 --- /dev/null +++ b/templates/blog/index.html @@ -0,0 +1,4 @@ +{% extends "base.html" %} +{% block content %} +

Hello in a Container

+{% endblock %} \ No newline at end of file