2025-01-04 19:57:22 +08:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
{% block title %}Create Listing{% endblock %}
|
|
|
|
|
{% block content %}
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<h1 class="text-center">Create Listing</h1>
|
|
|
|
|
<form method="POST">
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="title" class="form-label">Title</label>
|
|
|
|
|
<input type="text" class="form-control" id="title" name="title" required>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="description" class="form-label">Description</label>
|
|
|
|
|
<textarea class="form-control" id="description" name="description" rows="3" required></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="price" class="form-label">Price</label>
|
|
|
|
|
<input type="number" class="form-control" id="price" name="price" required>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="location" class="form-label">Location</label>
|
|
|
|
|
<input type="text" class="form-control" id="location" name="location" required>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="property_type" class="form-label">Property Type</label>
|
2025-01-16 13:23:50 +08:00
|
|
|
<select class="form-select" id="property_type" name="property_type" required>
|
|
|
|
|
{% for key, value in property_types.items() %}
|
|
|
|
|
<option value="{{ key }}">{{ value }}</option>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
</select>
|
2025-01-04 19:57:22 +08:00
|
|
|
</div>
|
2025-01-16 17:42:05 +08:00
|
|
|
<div class="row">
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<label for="latitude" class="form-label">Latitude</label>
|
|
|
|
|
<input type="text" class="form-control" id="latitude" name="latitude">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="col-md-6">
|
|
|
|
|
<label for="longitude" class="form-label">Longitude</label>
|
|
|
|
|
<input type="text" class="form-control" id="longitude" name="longitude">
|
|
|
|
|
</div>
|
2025-01-04 19:57:22 +08:00
|
|
|
</div>
|
2025-01-16 18:22:38 +08:00
|
|
|
<div class="mb-3">
|
|
|
|
|
<label for="guests" class="form-label">Guests</label>
|
|
|
|
|
<input type="number" class="form-control" id="guests" name="guests" value="1">
|
|
|
|
|
</div>
|
2025-01-04 19:57:22 +08:00
|
|
|
<button type="submit" class="btn btn-primary w-100">Create</button>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{% endblock %}
|