Skip to content

Commit 4a163ca

Browse files
committed
웹페이지와 연결
1 parent 2895a12 commit 4a163ca

File tree

8 files changed

+21
-5
lines changed

8 files changed

+21
-5
lines changed
Binary file not shown.

zimmyrabbit/config/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
TEMPLATES = [
5555
{
5656
'BACKEND': 'django.template.backends.django.DjangoTemplates',
57-
'DIRS': [],
57+
'DIRS': [BASE_DIR / 'templates'],
5858
'APP_DIRS': True,
5959
'OPTIONS': {
6060
'context_processors': [

zimmyrabbit/db.sqlite3

128 KB
Binary file not shown.
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<H1>JENKINS</H1>
2+
3+
<form action="{%url 'zimmyrabbit:check_model'%}" method='post'>
4+
{% csrf_token %}
5+
<textarea name="content" id="content" row="15"></textarea>
6+
<input type="submit" value="검증">
7+
</form>
Binary file not shown.
Binary file not shown.

zimmyrabbit/zimmyrabbit/urls.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
from django.urls import path
2-
32
from . import views
43

4+
app_name = 'zimmyrabbit'
5+
56
urlpatterns = [
6-
path('', views.index),
7+
path('', views.index, name="index"),
8+
path('check_model/', views.check_model, name="check_model"),
79
]

zimmyrabbit/zimmyrabbit/views.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
from django.shortcuts import render
1+
from django.shortcuts import render,redirect
22
from django.http import HttpResponse
33

44
def index(request) :
5-
return HttpResponse('zimmyrabbit');
5+
return render(request, 'jenkins/main.html')
6+
7+
8+
def check_model(request) :
9+
content = request.POST.get('content')
10+
scontent = sorted(set(content.split()))
11+
print(scontent)
12+
return redirect('zimmyrabbit:index')

0 commit comments

Comments
 (0)