Skip to content

Commit

Permalink
django course 34 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kim946509 committed Feb 6, 2023
1 parent 1c0aa83 commit d765e95
Show file tree
Hide file tree
Showing 21 changed files with 391 additions and 0 deletions.
Empty file added articleapp/__init__.py
Empty file.
Binary file added articleapp/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added articleapp/__pycache__/admin.cpython-310.pyc
Binary file not shown.
Binary file added articleapp/__pycache__/apps.cpython-310.pyc
Binary file not shown.
Binary file added articleapp/__pycache__/models.cpython-310.pyc
Binary file not shown.
Binary file added articleapp/__pycache__/urls.cpython-310.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions articleapp/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.contrib import admin

# Register your models here.
6 changes: 6 additions & 0 deletions articleapp/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class ArticleappConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'articleapp'
Empty file.
Binary file not shown.
3 changes: 3 additions & 0 deletions articleapp/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
61 changes: 61 additions & 0 deletions articleapp/templates/articleapp/list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{% extends 'base.html' %}
{% load static %}

{% block content %}
<style>
.container div {
width: 250px;
background-color: antiquewhite;
display: flex;
justify-content: center;
align-items: center;
border-radius: 1rem;
}
.container img{
width:100%;
border-radius: 1rem;
}
</style>
<div class="container">
<div class="item1">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item2">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item3">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item4">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item5">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item6">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item7">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item8">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item9">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item10">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item11">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item12">
<img src="https://picsum.photos/200/300" alt="">
</div>
<div class="item13">
<img src="https://picsum.photos/200/300" alt="">
</div>
</div>
<script src="{% static 'js/magicgrid.js' %}"></script>
{% endblock %}
3 changes: 3 additions & 0 deletions articleapp/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.test import TestCase

# Create your tests here.
6 changes: 6 additions & 0 deletions articleapp/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.urls import path
from django.views.generic import TemplateView

urlpatterns = [
path('list/', TemplateView.as_view(template_name='articleapp/list.html'), name='list')
]
3 changes: 3 additions & 0 deletions articleapp/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from django.shortcuts import render

# Create your views here.
Binary file modified pragmatic/__pycache__/settings.cpython-310.pyc
Binary file not shown.
Binary file modified pragmatic/__pycache__/urls.cpython-310.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions pragmatic/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
'bootstrap4',
'accountapp',
'profileapp',
'articleapp',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
Expand Down
1 change: 1 addition & 0 deletions pragmatic/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
path('admin/', admin.site.urls),
path('accounts/', include('accountapp.urls')),
path('profiles/', include('profileapp.urls')),
path('articles/', include('articleapp.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Binary file modified profileapp/__pycache__/views.cpython-310.pyc
Binary file not shown.
Loading

0 comments on commit d765e95

Please sign in to comment.