Skip to content

Commit

Permalink
Merge pull request #2 from CodeWizardette/django
Browse files Browse the repository at this point in the history
index uptade
  • Loading branch information
ixnur committed Aug 17, 2023
2 parents a29a50c + d4e7b9b commit a1577ee
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 16 deletions.
15 changes: 8 additions & 7 deletions envanter/envanter/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# Application definition

INSTALLED_APPS = [
'envanter'
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
Expand Down Expand Up @@ -73,12 +74,12 @@
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
#DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': BASE_DIR / 'db.sqlite3',
# }
#}


# Password validation
Expand Down Expand Up @@ -117,7 +118,7 @@
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/3.2/howto/static-files/

STATIC_URL = '/static/'
STATIC_URL = 'envanter/envanter/templates/static/'

# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
Expand Down
75 changes: 66 additions & 9 deletions envanter/envanter/teplates/index.html
Original file line number Diff line number Diff line change
@@ -1,33 +1,81 @@
<!DOCTYPE html>

<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Envo</title>
<title>envo</title>
<style>
/* Basit bir stil ekleyebilirsiniz */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
header {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
}
footer {
background-color: #333;
color: #fff;
text-align: center;
padding: 10px;
position: fixed;
bottom: 0;
width: 100%;
}
.container {
max-width: 960px;
margin: 0 auto;
padding: 20px;
}
ul {
list-style-type: none;
padding: 0;
}
li {
margin-bottom: 10px;
padding: 10px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
}
form {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 4px;
padding: 20px;
margin-top: 20px;
}
button {
background-color: #333;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
}

button:hover {
background-color: #555;
}
.emptyspace {
height: 100px; /* 100px boş alan yüksekliği */
}
</style>
</head>
<body>
<body>
<h1>Envanter</h1>

<div class="container">
<h2>Kategoriler</h2>
<ul>
{% for category in categories %}
<li>{{ category.name }}</li>
{% endfor %}
</ul>

<h2>Parçalar</h2>
<ul>
{% for component in components %}
Expand All @@ -39,7 +87,6 @@ <h2>Parçalar</h2>
</li>
{% endfor %}
</ul>

<h2>Yeni Parça Ekle</h2>
<form action="/parca_ekle" method="post">
<label for="model">Model:</label>
Expand All @@ -48,11 +95,9 @@ <h2>Yeni Parça Ekle</h2>
<label for="description">Açıklama:</label>
<input type="text" id="description" name="description"><br>

<!-- Diğer parça özellikleri için input alanları ekleyebilirsiniz -->

<button type="submit">Parça Ekle</button>
</form>

<h2>Parçaları Ara</h2>
<form action="/parca_ara" method="get">
<label for="search_query">Ara:</label>
Expand All @@ -74,5 +119,17 @@ <h2>Parça Detayları</h2>

<h2>Mesaj Alanı</h2>
<p>{{ message }}</p>
<div>
<div class="emptyspace">

</div>
</div>
</div>
</body>
</html>
<footer>
&copy; @mekatronik.org © 2023 Parça Envanteri Uygulaması.
</footer>
</body>
</html>

0 comments on commit a1577ee

Please sign in to comment.