-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from duri0214/Feature/home/create
Create機能
- Loading branch information
Showing
7 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
padding-top: 48px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends "home/base.html" %} | ||
{% load static %} | ||
{% load humanize %} | ||
{% block extra_css %} | ||
<link rel="stylesheet" href="{% static 'home/css/post/create.css' %}"> | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<div class="container"> | ||
<h2>新規作成</h2> | ||
<form method="POST" enctype="multipart/form-data"> | ||
{% csrf_token %} | ||
{{ form.as_p }} | ||
<button type="submit" class="btn btn-primary">Create</button> | ||
</form> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
from django.urls import path | ||
|
||
from home.views import IndexView, PostDetailView, PostUpdateView | ||
from home.views import IndexView, PostDetailView, PostUpdateView, PostCreateView | ||
|
||
app_name = "home" | ||
urlpatterns = [ | ||
path("", IndexView.as_view(), name="index"), | ||
path("post/<int:pk>/", PostDetailView.as_view(), name="post_detail"), | ||
path("post/<int:pk>/update/", PostUpdateView.as_view(), name="post_update"), | ||
path("post/create/", PostCreateView.as_view(), name="post_create"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters